diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml index 3b43b15f4ecc81f2ce918e547611b946a0d7e0f1..947ad1743d84ea480cde338a632e349797a96a4f 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml @@ -76,7 +76,7 @@ current_web_section_translated_portal_type = current_web_section.getTranslatedPo action_dict = request.get(\'actions\', {}) # XXX actions needs to be renamed to action_dict\n exchange_action_list = action_dict.get(\'object_exchange\', [])\n button_action_list = action_dict.get(\'object_button\', [])\n -portal_url = context.portal_url()\n +portal_url = getattr(context, \'getWebSiteValue\', context.getPortalObject)().absolute_url()\n http_parameters = request.get(\'http_parameters\', \'\')\n http_parameters = http_parameters.replace(\'editable_mode\', \'dummy_editable_mode\')\n \n @@ -102,13 +102,13 @@ if not editable_mode:\n result.append(dict(\n url = "%s/view?editable_mode:int=1&%s" \n %(editable_absolute_url, http_parameters),\n - icon = context.getIcon() or \'file_icon.gif\',\n + icon = "%s/%s" % (portal_url, context.getIcon(relative_to_portal=True) or \'file_icon.gif\'),\n title = edit_title,\n label = "%s Icon" % translated_portal_type,))\n else: \n result.append(dict(\n url = "%s/view?editable_mode:int=0&%s" % (absolute_url, http_parameters),\n - icon = context.getIcon() or \'file_icon.gif\',\n + icon = "%s/%s" % (portal_url, context.getIcon(relative_to_portal=True) or \'file_icon.gif\'),\n title = translateString("View ${portal_type}", \n mapping=dict(portal_type=translated_portal_type)),\n label = "%s Icon" % translated_portal_type,))\n @@ -117,7 +117,7 @@ else: \n if portal_type not in (\'Web Section\', \'Web Site\'): \n result.append(dict(\n url = "%s/view?editable_mode=1" % current_web_section.absolute_url(),\n - icon = current_web_section.getIcon(),\n + icon = "%s/%s" % (portal_url, current_web_section.getIcon(relative_to_portal=True)),\n title = translateString("Edit Parent ${portal_type}",\n mapping=dict(portal_type=current_web_section_translated_portal_type)),\n label = "%s Icon" % current_web_section_translated_portal_type,))\n @@ -193,16 +193,17 @@ return result\n <string>action_dict</string> <string>exchange_action_list</string> <string>button_action_list</string> + <string>getattr</string> <string>portal_url</string> <string>http_parameters</string> <string>absolute_url</string> - <string>getattr</string> <string>editable_absolute_url</string> <string>getActionTitleForContext</string> <string>int</string> <string>editable_mode</string> <string>edit_title</string> <string>dict</string> + <string>True</string> <string>_getiter_</string> <string>action</string> <string>_getitem_</string> diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml index fc032f48fff88a5dfeba9b86d595be702ad06cff..74ad8c27fa43464a0aac5175b8975654e2087970 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml @@ -55,6 +55,7 @@ here.Base_filterDuplicateActions(\n here.portal_actions.listFilteredActionsFor(here));\n dummy python:request.set(\'actions\', actions);\n + portal_url python: getattr(here, \'getWebSiteValue\', here.getPortalObject)().absolute_url();\n portal_type here/getPortalType">\n \n <!-- XXX is this really useful - called how many times ?? - tried to removed but failed -->\n @@ -166,7 +167,8 @@ <button alt=\'Clone & Edit\' id="clone_action_button" \n title=\'Clone & Edit\'\n name="Base_cloneContent:method">\n - <img src="admin_toolbox_clone_document.png" id="clone_action_icon"/>\n + <img src="admin_toolbox_clone_document.png" id="clone_action_icon"\n + tal:attributes="src string:$portal_url/admin_toolbox_clone_document.png" />\n <span id="duplicate_document_action">Clone & Edit</span>\n </button>\n </div>\n @@ -174,14 +176,13 @@ \n </fieldset>\n \n - <script type="text/javascript" language="JavaScript">\n - <!--\n + <script type="text/javascript" language="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 = "admin_toolbox_clone_document.png";\n - new_icon.src = "admin_toolbox_new_document.png";\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 @@ -210,7 +211,7 @@ 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 + document.getElementById(\'clone_action_icon\').src = eval(action + \'_icon.src\');\n \n // update action button alt & title\n var button = document.getElementById(\'clone_action_button\');\n @@ -218,8 +219,7 @@ button.title = action_name;\n button.name = name;\n }\n - -->\n - </script>\n + " />\n </div>\n </tal:block> diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision index 885c7e85d7ce9eef2a377b9bd12fe0ceb1248521..f3daf1d56849a6e206559b8a8a1127beafdfe4ba 100644 --- a/bt5/erp5_web/bt/revision +++ b/bt5/erp5_web/bt/revision @@ -1 +1 @@ -834 \ No newline at end of file +835 \ No newline at end of file