Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
142a6384
Commit
142a6384
authored
May 27, 2011
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use inline JavaScript code, rather use external .js file.
parent
205eb523
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
52 deletions
+56
-52
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/WebSection_viewToolbarWidget.xml
.../erp5_web_widget_library/WebSection_viewToolbarWidget.xml
+5
-46
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/erp5_web_toolbar.js.xml
...tal_skins/erp5_web_widget_library/erp5_web_toolbar.js.xml
+50
-5
bt5/erp5_web/bt/revision
bt5/erp5_web/bt/revision
+1
-1
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/WebSection_viewToolbarWidget.xml
View file @
142a6384
...
...
@@ -239,55 +239,11 @@
</div>
\n
</fieldset>
\n
\n
<script
type=
"text/javascript"
tal:content=
"string:\n
// preload action icons\n
if (document.images) {\n
clone_icon = new Image();\n
new_icon = new Image();\n
clone_icon.src = \'$portal_url/admin_toolbox_clone_document.png\';\n
new_icon.src = \'$portal_url/admin_toolbox_new_document.png\';\n
}\n
\n
function setCreationMode (sel) {\n
// default is cloning\n
var action = \'clone\';\n
var action_name = \'Clone & Edit\';\n
var icon = \'admin_toolbox_clone_document.png\';\n
var name = \'Base_cloneContent:method\';\n
var clone_display = \'inline\';\n
var new_title = \'\';\n
\n
// a portal type is given, so create a new document\n
var portal_type = sel.options[sel.selectedIndex].value;\n
if (portal_type != \'None\') {\n
action = \'new\'\n
action_name = \'Create New & Edit\';\n
icon = \'admin_toolbox_new_document.png\';\n
name = \'Base_newContent:method\';\n
clone_display = \'none\';\n
new_title = \'Create New Document\';\n
}\n
\n
// update action dependent values\n
document.getElementById(\'create_new_document_title\').innerHTML = new_title;\n
document.getElementById(\'clone_document_title\' ).style.display = clone_display;\n
document.getElementById(\'duplicate_document_action\').innerHTML = action_name;\n
\n
// replace the action icon\n
document.getElementById(\'clone_action_icon\').src = eval(action + \'_icon.src\');\n
\n
// update action button title\n
var button = document.getElementById(\'clone_action_button\');\n
button.title = action_name;\n
button.name = name;\n
}\n
"
/>
\n
</div>
\n
</li>
\n
\n
<!-- Module panel.\n
Some modules that should be useful for web management will be listed.\n
-->
\n
Some modules that should be useful for web management will be listed.-->
\n
<li
class=
"toolboxSection"
id=
"select-module-toolbox"
>
\n
<h3
class=
"menu_title"
i18n:translate=
""
i18n:domain=
"ui"
>
Module
</h3>
\n
<div
class=
"menu"
>
\n
...
...
@@ -304,7 +260,10 @@
</div>
\n
</li>
\n
</ul>
\n
<script
type=
"text/javascript"
src=
"erp5_web_toolbar.js"
tal:attributes=
"src string:$portal_url/erp5_web_toolbar.js"
></script>
\n
\n
<script
type=
"text/javascript"
\n
tal:attributes=
"src string:$portal_url/erp5_web_toolbar.js"
></script>
\n
\n
</tal:block>
]]>
</unicode>
</value>
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/erp5_web_toolbar.js.xml
View file @
142a6384
...
...
@@ -12,7 +12,7 @@
</item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts
94991458.99
</string>
</value>
<value>
<string>
ts
06480713.25
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
@@ -24,7 +24,9 @@
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string>
/*\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*\n
Copyright (c) 2011-2012 Nexedi SARL and Contributors. All Rights Reserved.\n
\n
This program is Free Software; you can redistribute it and/or\n
...
...
@@ -42,9 +44,50 @@ along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
*/\n
\n
function setCreationMode (sel) {\n
// default is cloning\n
var action = \'clone\';\n
var action_name = \'Clone & Edit\';\n
var icon = \'admin_toolbox_clone_document.png\';\n
var name = \'Base_cloneContent:method\';\n
var clone_display = \'inline\';\n
var new_title = \'\';\n
\n
// a portal type is given, so create a new document\n
var portal_type = sel.options[sel.selectedIndex].value;\n
if (portal_type != \'None\') {\n
action = \'new\'\n
action_name = \'Create New & Edit\';\n
icon = \'admin_toolbox_new_document.png\';\n
name = \'Base_newContent:method\';\n
clone_display = \'none\';\n
new_title = \'Create New Document\';\n
}\n
\n
// update action dependent values\n
document.getElementById(\'create_new_document_title\').innerHTML = new_title;\n
document.getElementById(\'clone_document_title\' ).style.display = clone_display;\n
document.getElementById(\'duplicate_document_action\').innerHTML = action_name;\n
\n
// replace the action icon\n
document.getElementById(\'clone_action_icon\').src = eval(action + \'_icon.src\');\n
\n
// update action button title\n
var button = document.getElementById(\'clone_action_button\');\n
button.title = action_name;\n
button.name = name;\n
}\n
\n
function initialize_toolbar(){\n
/* initialize all toolbar menues */\n
/* initialize all toolbar menu items */\n
\n
if (document.images) {\n
clone_icon = new Image();\n
new_icon = new Image();\n
clone_icon.src = \'admin_toolbox_clone_document.png\';\n
new_icon.src = \'admin_toolbox_new_document.png\';\n
}\n
\n
$("li.toolboxSection").each(\n
function (index, menu){\n
menu = $(this);\n
...
...
@@ -64,7 +107,9 @@ function display_menu(clicked_item){\n
})};\n
\n
$(document).ready(initialize_toolbar);\n
</string>
</value>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
...
...
@@ -72,7 +117,7 @@ $(document).ready(initialize_toolbar);\n
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
1497
</int>
</value>
<value>
<int>
2925
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_web/bt/revision
View file @
142a6384
1053
\ No newline at end of file
1054
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment