workflows: add svg pan/zoom functionnality (#6947)

This is using svg-pan-zoom.js from https://github.com/ariutta/svg-pan-zoom,
published with a BSD 2-clause license.
This commit is contained in:
Benjamin Dauvergne 2015-04-14 17:12:36 +02:00 committed by Frédéric Péters
parent 01bb7ef83c
commit afb9068f2c
3 changed files with 1840 additions and 2 deletions

4
README
View File

@ -155,3 +155,7 @@ jQuery Date Picker:
bgiframe:
# Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
# Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)
svg-pan-zoom:
# Copyright 2009-2010 Andrea Leofreddi <a.leofreddi@itcharm.com>
# Licensed under the BSD 2-clause license (http://opensource.org/licenses/BSD-2-Clause)

View File

@ -300,7 +300,8 @@ class WorkflowStatusPage(Directory):
def _q_index(self):
self.html_top('%s - %s' % (_('Workflow'), self.workflow.name))
r = TemplateIO(html=True)
get_response().add_javascript(['jquery.js', 'jquery-ui.js', 'biglist.js'])
get_response().add_javascript(['jquery.js', 'jquery-ui.js', 'biglist.js', 'svg-pan-zoom.js'])
get_response().add_javascript_code('$(function () { svgPanZoom("svg", {controlIconsEnabled: true}); });');
r += htmltext('<h2>%s - ') % _('Workflow')
r += htmltext('%s - %s</h2>') % (self.workflow.name, self.status.name)
@ -765,7 +766,8 @@ class WorkflowPage(Directory):
def _q_index(self):
self.html_top(title = _('Workflow - %s') % self.workflow.name)
r = TemplateIO(html=True)
get_response().add_javascript(['jquery.js', 'jquery-ui.js', 'biglist.js'])
get_response().add_javascript(['jquery.js', 'jquery-ui.js', 'biglist.js', 'svg-pan-zoom.js'])
get_response().add_javascript_code('$(function () { svgPanZoom("svg", {controlIconsEnabled: true}); });');
r += htmltext('<h2>%s - ') % _('Workflow')
r += htmltext('%s') % self.workflow.name
r += htmltext(' <span class="change">(<a rel="popup" href="edit">%s</a>)</span>') % _('change title')

File diff suppressed because it is too large Load Diff