From 4f54f4007edfb3efe425a3f87993f4c10672e349 Mon Sep 17 00:00:00 2001 From: Lingnan Wu <wulingnan@gmail.com> Date: Tue, 30 Apr 2013 11:47:42 +0200 Subject: [PATCH] merge bt5/erp5_jquery to product/ERP5/bootstrap/erp5_jquery --- ...onfiguration_setupMaxmaDemoStandardBT5.xml | 1 - .../testMaxmaDemoConfigurationWorkflow.py | 1 - bt5/erp5_configurator_maxma_demo/bt/revision | 2 +- ...BusinessConfiguration_setupStandardBT5.xml | 1 - bt5/erp5_configurator_standard/bt/revision | 2 +- bt5/erp5_credential/bt/dependency_list | 2 +- bt5/erp5_credential/bt/revision | 2 +- .../portal_skins/erp5_xhtml_jquery_style.xml | 26 -- .../ERP5Site_getJavaScriptRelativeUrlList.xml | 77 ---- .../erp5_xhtml_jquery_style/erp5.js.xml | 383 ------------------ .../erp5_xhtml_appearance.js.xml | 62 --- bt5/erp5_xhtml_jquery_style/bt/change_log | 2 - bt5/erp5_xhtml_jquery_style/bt/copyright_list | 1 - .../bt/dependency_list | 2 - bt5/erp5_xhtml_jquery_style/bt/description | 2 - bt5/erp5_xhtml_jquery_style/bt/license | 1 - .../bt/maintainer_list | 1 - bt5/erp5_xhtml_jquery_style/bt/revision | 1 - .../bt/template_format_version | 1 - .../bt/template_skin_id_list | 1 - bt5/erp5_xhtml_jquery_style/bt/title | 1 - bt5/erp5_xhtml_jquery_style/bt/version | 1 - product/ERP5/ERP5Site.py | 2 +- .../portal_skins/erp5_jquery.xml | 0 .../portal_skins/erp5_jquery/jquery.xml | 0 .../portal_skins/erp5_jquery/jquery/core.xml | 0 .../erp5_jquery/jquery/core/jquery-1.7.js.xml | 0 .../jquery/core/jquery-1.7.min.js.xml | 0 .../erp5_jquery/jquery/core/jquery-1.8.js.xml | 0 .../jquery/core/jquery-1.8.min.js.xml | 0 .../erp5_jquery/jquery/core/jquery-1.9.js.xml | 0 .../jquery/core/jquery-1.9.min.js.xml | 0 .../erp5_jquery/jquery/core/jquery.js.xml | 0 .../erp5_jquery/jquery/core/jquery.min.js.xml | 0 .../erp5_jquery/jquery/plugin.xml | 0 .../registered_skin_selection.xml | 0 .../ERP5/bootstrap}/erp5_jquery/bt/change_log | 0 .../ERP5/bootstrap}/erp5_jquery/bt/comment | 0 .../bootstrap}/erp5_jquery/bt/copyright_list | 0 .../bootstrap}/erp5_jquery/bt/dependency_list | 0 .../bootstrap}/erp5_jquery/bt/description | 0 .../ERP5/bootstrap}/erp5_jquery/bt/license | 0 .../bootstrap}/erp5_jquery/bt/maintainer_list | 0 .../ERP5/bootstrap}/erp5_jquery/bt/revision | 0 .../erp5_jquery/bt/template_format_version | 0 .../erp5_jquery/bt/template_path_list | 0 .../template_registered_skin_selection_list | 0 .../ERP5/bootstrap}/erp5_jquery/bt/title | 0 .../ERP5/bootstrap}/erp5_jquery/bt/version | 0 .../ERP5Site_getJavaScriptRelativeUrlList.xml | 3 +- .../portal_skins/erp5_xhtml_style/erp5.js.xml | 315 +++++++++++++- .../erp5_xhtml_style}/erp5_tabber.js.xml | 0 .../erp5_xhtml_appearance.js.xml | 6 +- product/ERP5/tests/testERP5Credential.py | 1 - product/ERP5/tests/testTemplateTool.py | 5 +- .../tests/ConfiguratorTestMixin.py | 2 - product/ERP5Type/tests/testFunctionalCore.py | 2 +- product/ERP5Type/tests/testFunctionalKM.py | 2 +- .../testFunctionalStandaloneUserTutorial.py | 2 +- 59 files changed, 328 insertions(+), 585 deletions(-) delete mode 100644 bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style.xml delete mode 100644 bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/ERP5Site_getJavaScriptRelativeUrlList.xml delete mode 100644 bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml delete mode 100644 bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/change_log delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/copyright_list delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/dependency_list delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/description delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/license delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/maintainer_list delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/revision delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/template_format_version delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/template_skin_id_list delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/title delete mode 100644 bt5/erp5_xhtml_jquery_style/bt/version rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.min.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.min.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.min.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.min.js.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/change_log (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/comment (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/copyright_list (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/dependency_list (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/description (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/license (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/maintainer_list (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/revision (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/template_format_version (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/template_path_list (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/template_registered_skin_selection_list (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/title (100%) rename {bt5 => product/ERP5/bootstrap}/erp5_jquery/bt/version (100%) rename {bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style => product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style}/erp5_tabber.js.xml (100%) diff --git a/bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_setupMaxmaDemoStandardBT5.xml b/bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_setupMaxmaDemoStandardBT5.xml index 19fd1850be..3f6827172d 100644 --- a/bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_setupMaxmaDemoStandardBT5.xml +++ b/bt5/erp5_configurator_maxma_demo/SkinTemplateItem/portal_skins/erp5_configurator_maxma_demo/BusinessConfiguration_setupMaxmaDemoStandardBT5.xml @@ -56,7 +56,6 @@ bt5_installation_list = (\'erp5_simulation\',\n \'erp5_dhtml_style\',\n \'erp5_jquery\',\n \'erp5_jquery_ui\',\n - \'erp5_xhtml_jquery_style\',\n \'erp5_web\',\n \'erp5_ingestion_mysql_innodb_catalog\',\n \'erp5_ingestion\',\n diff --git a/bt5/erp5_configurator_maxma_demo/TestTemplateItem/testMaxmaDemoConfigurationWorkflow.py b/bt5/erp5_configurator_maxma_demo/TestTemplateItem/testMaxmaDemoConfigurationWorkflow.py index 0733d5fc90..f128a49c60 100644 --- a/bt5/erp5_configurator_maxma_demo/TestTemplateItem/testMaxmaDemoConfigurationWorkflow.py +++ b/bt5/erp5_configurator_maxma_demo/TestTemplateItem/testMaxmaDemoConfigurationWorkflow.py @@ -41,7 +41,6 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): 'erp5_dhtml_style', 'erp5_jquery', 'erp5_jquery_ui', - 'erp5_xhtml_jquery_style', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion', 'erp5_web', diff --git a/bt5/erp5_configurator_maxma_demo/bt/revision b/bt5/erp5_configurator_maxma_demo/bt/revision index 978b4e8e51..a5c750feac 100644 --- a/bt5/erp5_configurator_maxma_demo/bt/revision +++ b/bt5/erp5_configurator_maxma_demo/bt/revision @@ -1 +1 @@ -26 \ No newline at end of file +27 \ No newline at end of file diff --git a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardBT5.xml b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardBT5.xml index 7552ac3bf1..893dc0cd3a 100644 --- a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardBT5.xml +++ b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_setupStandardBT5.xml @@ -54,7 +54,6 @@ \n bt5_installation_list = (\'erp5_dhtml_style\',\n \'erp5_jquery_ui\',\n - \'erp5_xhtml_jquery_style\',\n \'erp5_ingestion_mysql_innodb_catalog\',\n \'erp5_dms\',\n \'erp5_accounting\',\n diff --git a/bt5/erp5_configurator_standard/bt/revision b/bt5/erp5_configurator_standard/bt/revision index 3114067d5d..b7f636c12f 100644 --- a/bt5/erp5_configurator_standard/bt/revision +++ b/bt5/erp5_configurator_standard/bt/revision @@ -1 +1 @@ -664 \ No newline at end of file +665 \ No newline at end of file diff --git a/bt5/erp5_credential/bt/dependency_list b/bt5/erp5_credential/bt/dependency_list index b81a4263be..ae1ff17efe 100644 --- a/bt5/erp5_credential/bt/dependency_list +++ b/bt5/erp5_credential/bt/dependency_list @@ -1,4 +1,4 @@ erp5_base erp5_crm erp5_web -erp5_xhtml_jquery_style \ No newline at end of file + diff --git a/bt5/erp5_credential/bt/revision b/bt5/erp5_credential/bt/revision index b14de3adc4..97964b3fde 100644 --- a/bt5/erp5_credential/bt/revision +++ b/bt5/erp5_credential/bt/revision @@ -1 +1 @@ -421 \ No newline at end of file +422 \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style.xml deleted file mode 100644 index c33bdfd98e..0000000000 --- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Folder" module="OFS.Folder"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_objects</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>erp5_xhtml_jquery_style</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/ERP5Site_getJavaScriptRelativeUrlList.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/ERP5Site_getJavaScriptRelativeUrlList.xml deleted file mode 100644 index ac6d104851..0000000000 --- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/ERP5Site_getJavaScriptRelativeUrlList.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <item> - <key> <string>_bind_names</string> </key> - <value> - <object> - <klass> - <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_asgns</string> </key> - <value> - <dictionary> - <item> - <key> <string>name_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>_body</string> </key> - <value> <string># This script returns an iterable of the paths to standard JavaScript objects.\n -# If you want to customize your own site, please override this script\n -# in your own skin folder. Note that the returned items must be\n -# relative URLs instead of absolute URLs, i.e. they must be traversable\n -# from the portal object. This is required for further processing of JavaScript\n -# data, e.g. compression.\n -#\n -# BBB: For the history, erp5_xhtml_appearance.js is included by default when\n -# js_list is not pre-defined before the global definitions.\n -js_list = (\'jquery/core/jquery.min.js\', \'erp5.js\',)\n -return js_list\n -</string> </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>ERP5Site_getJavaScriptRelativeUrlList</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml deleted file mode 100644 index 354bbd171c..0000000000 --- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml +++ /dev/null @@ -1,383 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="DTMLMethod" module="OFS.DTMLMethod"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_Cacheable__manager_id</string> </key> - <value> <string>http_cache</string> </value> - </item> - <item> - <key> <string>__name__</string> </key> - <value> <string>erp5.js</string> </value> - </item> - <item> - <key> <string>_vars</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>globals</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>raw</string> </key> - <value> <string encoding="cdata"><![CDATA[ - -/*\n -Copyright (c) 20xx-2006 Nexedi SARL and Contributors. All Rights Reserved.\n -\n -This program is Free Software; you can redistribute it and/or\n -modify it under the terms of the GNU General Public License\n -as published by the Free Software Foundation; either version 2\n -of the License, or (at your option) any later version.\n -\n -This program is distributed in the hope that it will be useful,\n -but WITHOUT ANY WARRANTY; without even the implied warranty of\n -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n -GNU General Public License for more details.\n -\n -You should have received a copy of the GNU General Public License\n -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 submitAction(form, act) {\n - form.action = act;\n - form.submit();\n -}\n -\n -// This function will be called when the user click the save button. As \n -// submitAction function may have changed the action before, it\'s better to\n -// reset the form action to it\'s original behaviour. This is actually\n -// usefull when the user click the back button.\n -function clickSaveButton(act) {\n - changed = false;\n - document.forms[0].action = act;\n -}\n -\n -// The first input element with an "autofocus" class will get the focus,\n -// else if no element have autofocus class, the first element which is not the\n -// search field will get the focus. This is generally the title input text of\n -// a view\n -function autoFocus() {\n - var first_autofocus_expr = ".//input[@class=\'autofocus\']";\n - var FIRST_RESULT = XPathResult.FIRST_ORDERED_NODE_TYPE;\n -\n - var input = document.evaluate(first_autofocus_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n - if (input) {\n - input.focus();\n - }else{\n - // The following is disabled, because it is too annoying to have an auto focus at everywhere.\n - //var first_text_input_expr = ".//input[@type=\'text\'][@name != \'field_your_search_text\']"\n - //var first_text_input = document.evaluate(first_text_input_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n - //if (first_text_input){\n - // first_text_input.focus();\n - //}\n - true;\n - }\n -}\n -\n -function buildTables(element_list, rowPredicate, columnPredicate,\n - tableClassName) {\n - /* Generic code to build a table from elements in element_list.\n - * XXX: not used anymore ?\n - * rowPredicate(element) -> bool\n - * When it returns a true value, a new line is started with element.\n - * When is returns a false value, element is skipped.\n - * columnPredicate(element, initial_element) -> bitfield\n - * bit 3: end_table (if true, imlies end_row)\n - * End current table.\n - * bit 2: end_row\n - * End current row.\n - * bit 1: use_element\n - * Element passed to columnPredicate will be put in current row.\n - * Hardcoded:\n - * - items in a table line must be siblings in existing DOM\n - * - table is put in place of first element of the first row\n - */\n - var element_index = 0;\n - while (element_index < element_list.length) {\n - var row_list = [];\n - var end_table = false;\n - while ((!end_table) && element_index < element_list.length) {\n - var row_begin = element_list[element_index];\n - if (rowPredicate(row_begin)) {\n - var item_list = [row_begin];\n - var row_item = row_begin;\n - var end_line = false;\n - while ((!end_line) && (row_item = row_item.nextSibling) !== null) {\n - var predicate_result = columnPredicate(row_item, row_begin);\n - if ((predicate_result & 1) !== 0)\n - item_list.push(row_item);\n - end_table = ((predicate_result & 4) !== 0);\n - end_line = ((predicate_result & 6) !== 0);\n - }\n - row_list.push(item_list);\n - }\n - element_index++;\n - }\n - /* Do not create a table with just one cell. */\n - if ((row_list.length > 1) ||\n - (row_list.length == 1 && row_list[0].length > 1)) {\n - var first_element = row_list[0][0];\n - var fake_table = $("<table>");\n - fake_table.addClass(tableClassName);\n - fake_table.insertbefore(first_element);\n - $.each(row_list, function() {\n - var fake_row = $("<tr>");\n - $.each(this, function() {\n - var fake_cell = $("<td>");\n - fake_cell.append(this);\n - fake_row.append(fake_cell[0]);\n - });\n - fake_table.append(fake_row[0]);\n - });\n - }\n - }\n -}\n -\n -function matchLeftFieldset(element) {\n -// XXX: not used anymore ?\n - return (element.tagName == "FIELDSET" &&\n - element.className.toLowerCase().indexOf(\'left\') != -1);\n -}\n -\n -function matchRightFieldset(element, ignored) {\n -// XXX: not used anymore ?\n - if (element.tagName == "FIELDSET" &&\n - element.className.toLowerCase().indexOf(\'right\') != -1)\n - return 7; /* End row, table and use element */\n - return 0;\n -}\n -\n -function fixLeftRightHeightAndFocus(fix_height) {\n - if (fix_height == 1) {\n - var right_xpath = "following-sibling::fieldset[contains(@class, \'right\')]";\n - var matched_left_element_list = document.evaluate("//fieldset[contains(@class, \'left\') and " + right_xpath + "]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\n - var element_index;\n - for (element_index = 0; element_index < matched_left_element_list.snapshotLength; element_index++) {\n - var element = matched_left_element_list.snapshotItem(element_index);\n - var right = document.evaluate(right_xpath, element, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;\n - var table = $(\'<table class="fake">\').insertBefore(element);\n - table.append($("<tr>").append($("<td>").append(element)).append($("<td>").append(right)));\n - }\n - }\n - autoFocus();\n -}\n -\n -// This function can be used to catch ENTER pressed in an input\n -// and modify respective main form action\n -// if clear_changed_flag is set to true, changed will be set to false, so no\n -// warning message about unsaved changes will be displayed\n -function submitFormOnEnter(event, form, method_name, clear_changed_flag, element){\n - if (clear_changed_flag === null){ clear_changed_flag = false; }\n - if(event.keyCode == 13){\n - if (form == "main_form") {\n - form = document.forms[form]; // backward compatibility\n - }\n - form.action = method_name;\n - if (clear_changed_flag === true) {\n - changed = false;\n - }\n - form.submit();\n - }\n -}\n -\n -var old_index = 0;\n -function shiftCheck(evt) {\n - /*Uncheck all checkboxes from last unchecked one in \n - business template Install / Update / Reinstall dialog.\n - */\n - evt = (evt)?evt:event;\n - var target=(evt.target)?evt.target:evt.srcElement;\n - // remove "checkbox" part from ID\n - // This part can be reused easilly by usual left column\n - var target_index= target.id.substr(8);\n - if(!evt.shiftKey) {\n - old_index = target_index;\n - check_option = target.checked;\n - return false;\n - }\n - target.checked=1;\n - var low=Math.min(target_index , old_index);\n - var high=Math.max(target_index , old_index);\n - for(var i=low;i<=high;i++) {\n - $("#checkbox" + i).attr("checked", false);\n - }\n - return true;\n - }\n -\n -var indexAllCheckBoxesAtBTInstallationOnLoad = function() {\n - // This Part is used basically for Business Template Installation.\n - $("input.shift_check_support").each(\n - function(index){$(this).attr("id", "checkbox"+index);});\n - //var inputs = window.getElementsByTagAndClassName("input", "shift_check_support");\n - //for(i=0;i<=inputs.length-1;i++) {inputs[i].id = "checkbox" + i; }\n -};\n -\n -var resizeIFrameOnLoad = function() {\n - /* Resize all frames in document in order to remove sliders */\n - $("object.auto_height").each(function(){\n - var inner_frame = this.contentDocument;\n - if (inner_frame){\n - $(this).css("height", inner_frame.documentElement.offsetHeight + \'px\');\n - }\n - });\n -};\n -\n -var changed = false;\n -function installUnsavedChangesWarning(warning_message) {\n - window.onbeforeunload = function() {\n - if ((changed)&&($("button.save")))\n - // show an warning box only if save button do exists\n - return warning_message;\n - };\n -}\n -\n -var addOnChangeEventHandler = function() {\n - /* Add a onchange event handler for all fields inputs.\n - This event handler set a dirty flag which cause a warning\n - while leaving the page, unless leaving by:\n - - saving (see clickSaveButton function from this file)\n - - clicking a relation field wheel\n - - clicking on a input with type submit\n - */\n - $("#master div").each(function(i) {\n - if ($(this).attr("class") == "input") {\n - $(this).children().each(function() {\n - if ($(this).prop("tagName") == "INPUT" ||\n - $(this).prop("tagName") == "SELECT" ||\n - $(this).prop("tagName") == "TEXTAREA") {\n - if ($(this).val() == "update..." ||\n - ($(this).prop("tagName") == "INPUT" &&\n - $(this).attr("type") == \'submit\')) {\n - // this is a relation field wheel or a submit form button\n - this.onclick = function() { changed = false;};\n - } else {\n - if (!this.onchange) {\n - this.onchange = function() { changed = true; };\n - }\n - }\n - } \n - /* Listbox or MatrixBox */\n - if ($(this).prop("tagName") == "DIV" && (\n - $(this).attr("class") == "listbox-container" ||\n - $(this).attr("class") == "MatrixContent")) {\n - $(this).find(\'td\').each(function(){\n - if ($(this).attr("class") == "listbox-search-line") {\n - return non-false;\n - }\n - $(this).find(\'input\').each(function(){\n - if ($(this).attr("type") != "hidden" &&\n - !this.onchange) {\n - this.onchange = function() { changed = true; };\n - }\n - });\n - });\n - }\n - });\n - }\n - });\n -};\n -\n -var rewriteIndentedSelect = function() {\n - /*\n - Under firefox, rewrite indented title categories using style definition.\n - This way we can select items by pressing the first letter of their name. */\n -\n - $("#master select").each(function() {\n - $(this).children().each(function() {\n - if ($(this).prop("tagName") != "OPTION") {\n - return non-false;\n - }\n - text = $(this).html();\n - if (text.substring(0, 1) == \'\\n\') {\n - text = text.substring(1, text.length);\n - }\n - level = 0;\n - if (text.substring(0, 6) == \' \') {\n - for (idx=0; idx <= text.length; idx+=6) {\n - if (text.substring(idx, idx+6) == \' \') {\n - level += 1;\n - } else {\n - break;\n - }\n - }\n - }\n - if (level >= 1) {\n - level = level / 4.0;\n - $(this).html(text.replace(/^( )+/, ""));\n - $(this).css("paddingLeft", level+"em");\n - }\n - });\n - });\n -};\n -\n -function queryStringToArray(query_string){\n - /*\n - Turn a query string into a "dictionary"\n - */\n - var final_dict = {};\n - var b = query_string.split(\'&\');\n - $.each(b, function(x, y){\n - var temp = y.split(\'=\');\n - final_dict[temp[0]] = temp[1];});\n - return final_dict;\n -}\n -\n -function submitLinkAsHtmlForm(event){\n - /*\n - Parse link into form arguments and pass everything as a \n - form (together with rest of page\'s input elements).\n - */\n - var url = $(this).attr("href");\n - var form = $("form");\n - var method = url.substring(0, url.indexOf(\'?\'));\n - var query_string = url.substring(url.indexOf(\'?\')+1);\n - var params = queryStringToArray(query_string);\n - $.each(params, function(key, value) {\n - if (!$(\'*[name="\' + key + \'"]\').length){\n - // key not part of HTML namespace\n - form.append(\'<input type="hidden" name="\' + key+ \'" value="\' + value + \'">\');\n - }});\n - // submit form \n - form.attr("action", method);\n - form.submit();\n - event.stopPropagation();\n - return false;\n -}\n -\n -function redirectPDFPage(event, element){\n - /*\n - Used in PDF thumbnail preview mode\n - */\n - if(event.keyCode == 13){\n - selection_index = parseInt($(element).val(), 10) - 1;\n - window.location.href = "PDF_viewHTMLPreviewAsImage?selection_index=" + selection_index;\n - return false; \n - }\n -}\n -\n -if (navigator.userAgent.toLowerCase().indexOf(\'firefox\') != -1)\n - $(document).ready(rewriteIndentedSelect);\n -$(document).ready(resizeIFrameOnLoad);\n -$(document).ready(addOnChangeEventHandler);\n -$(document).ready(indexAllCheckBoxesAtBTInstallationOnLoad); - -]]></string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml deleted file mode 100644 index e0b906d3f8..0000000000 --- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="DTMLMethod" module="OFS.DTMLMethod"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_Cacheable__manager_id</string> </key> - <value> <string>http_cache</string> </value> - </item> - <item> - <key> <string>__name__</string> </key> - <value> <string>erp5_xhtml_appearance.js</string> </value> - </item> - <item> - <key> <string>_vars</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>globals</string> </key> - <value> - <dictionary/> - </value> - </item> - <item> - <key> <string>raw</string> </key> - <value> <string>/*\n -Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.\n -\n -This program is Free Software; you can redistribute it and/or\n -modify it under the terms of the GNU General Public License\n -as published by the Free Software Foundation; either version 2\n -of the License, or (at your option) any later version.\n -\n -This program is distributed in the hope that it will be useful,\n -but WITHOUT ANY WARRANTY; without even the implied warranty of\n -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n -GNU General Public License for more details.\n -\n -You should have received a copy of the GNU General Public License\n -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 -var fixLeftRightHeightAndFocusOnLoad = function () {\n - fixLeftRightHeightAndFocus(1);\n -};\n -$(document).ready(fixLeftRightHeightAndFocusOnLoad);\n -</string> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_xhtml_jquery_style/bt/change_log b/bt5/erp5_xhtml_jquery_style/bt/change_log deleted file mode 100644 index 50c5fe2ece..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/change_log +++ /dev/null @@ -1,2 +0,0 @@ -2011-01-14 Ivan -* Initial import \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/copyright_list b/bt5/erp5_xhtml_jquery_style/bt/copyright_list deleted file mode 100644 index 0dbb3a3281..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/copyright_list +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2006-2007 Nexedi SA \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/dependency_list b/bt5/erp5_xhtml_jquery_style/bt/dependency_list deleted file mode 100644 index 7d940520e9..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/dependency_list +++ /dev/null @@ -1,2 +0,0 @@ -erp5_xhtml_style -erp5_jquery \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/description b/bt5/erp5_xhtml_jquery_style/bt/description deleted file mode 100644 index a6ba9e390a..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/description +++ /dev/null @@ -1,2 +0,0 @@ -This bt5 provides ERP5's HTML style UI improvement using jQuery JavaScript library. -It is an extension of erp5_xhtml_style. \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/license b/bt5/erp5_xhtml_jquery_style/bt/license deleted file mode 100644 index 3a3e12bcad..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/license +++ /dev/null @@ -1 +0,0 @@ -GPL \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/maintainer_list b/bt5/erp5_xhtml_jquery_style/bt/maintainer_list deleted file mode 100644 index 95d930c400..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/maintainer_list +++ /dev/null @@ -1 +0,0 @@ -ivan \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/revision b/bt5/erp5_xhtml_jquery_style/bt/revision deleted file mode 100644 index 978b4e8e51..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/revision +++ /dev/null @@ -1 +0,0 @@ -26 \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/template_format_version b/bt5/erp5_xhtml_jquery_style/bt/template_format_version deleted file mode 100644 index 56a6051ca2..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/template_format_version +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/template_skin_id_list b/bt5/erp5_xhtml_jquery_style/bt/template_skin_id_list deleted file mode 100644 index 4f4304f51f..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/template_skin_id_list +++ /dev/null @@ -1 +0,0 @@ -erp5_xhtml_jquery_style \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/title b/bt5/erp5_xhtml_jquery_style/bt/title deleted file mode 100644 index 4f4304f51f..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/title +++ /dev/null @@ -1 +0,0 @@ -erp5_xhtml_jquery_style \ No newline at end of file diff --git a/bt5/erp5_xhtml_jquery_style/bt/version b/bt5/erp5_xhtml_jquery_style/bt/version deleted file mode 100644 index 48360de846..0000000000 --- a/bt5/erp5_xhtml_jquery_style/bt/version +++ /dev/null @@ -1 +0,0 @@ -5.4.7 \ No newline at end of file diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index fa8529b58f..53d9f93509 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -2180,7 +2180,7 @@ class ERP5Generator(PortalGenerator): """ template_tool = p.portal_templates if template_tool.getInstalledBusinessTemplate('erp5_core') is None: - for bt in ('erp5_property_sheets', 'erp5_core', p.erp5_catalog_storage, + for bt in ('erp5_property_sheets', 'erp5_core', p.erp5_catalog_storage, 'erp5_jquery', 'erp5_xhtml_style'): if not bt: continue diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.min.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.min.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.min.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.7.min.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.min.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.min.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.min.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.8.min.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.min.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.min.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.min.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery-1.9.min.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.min.js.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.min.js.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.min.js.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/core/jquery.min.js.xml diff --git a/bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin.xml b/product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin.xml similarity index 100% rename from bt5/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin.xml rename to product/ERP5/bootstrap/erp5_jquery/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin.xml diff --git a/bt5/erp5_jquery/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml b/product/ERP5/bootstrap/erp5_jquery/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml similarity index 100% rename from bt5/erp5_jquery/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml rename to product/ERP5/bootstrap/erp5_jquery/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml diff --git a/bt5/erp5_jquery/bt/change_log b/product/ERP5/bootstrap/erp5_jquery/bt/change_log similarity index 100% rename from bt5/erp5_jquery/bt/change_log rename to product/ERP5/bootstrap/erp5_jquery/bt/change_log diff --git a/bt5/erp5_jquery/bt/comment b/product/ERP5/bootstrap/erp5_jquery/bt/comment similarity index 100% rename from bt5/erp5_jquery/bt/comment rename to product/ERP5/bootstrap/erp5_jquery/bt/comment diff --git a/bt5/erp5_jquery/bt/copyright_list b/product/ERP5/bootstrap/erp5_jquery/bt/copyright_list similarity index 100% rename from bt5/erp5_jquery/bt/copyright_list rename to product/ERP5/bootstrap/erp5_jquery/bt/copyright_list diff --git a/bt5/erp5_jquery/bt/dependency_list b/product/ERP5/bootstrap/erp5_jquery/bt/dependency_list similarity index 100% rename from bt5/erp5_jquery/bt/dependency_list rename to product/ERP5/bootstrap/erp5_jquery/bt/dependency_list diff --git a/bt5/erp5_jquery/bt/description b/product/ERP5/bootstrap/erp5_jquery/bt/description similarity index 100% rename from bt5/erp5_jquery/bt/description rename to product/ERP5/bootstrap/erp5_jquery/bt/description diff --git a/bt5/erp5_jquery/bt/license b/product/ERP5/bootstrap/erp5_jquery/bt/license similarity index 100% rename from bt5/erp5_jquery/bt/license rename to product/ERP5/bootstrap/erp5_jquery/bt/license diff --git a/bt5/erp5_jquery/bt/maintainer_list b/product/ERP5/bootstrap/erp5_jquery/bt/maintainer_list similarity index 100% rename from bt5/erp5_jquery/bt/maintainer_list rename to product/ERP5/bootstrap/erp5_jquery/bt/maintainer_list diff --git a/bt5/erp5_jquery/bt/revision b/product/ERP5/bootstrap/erp5_jquery/bt/revision similarity index 100% rename from bt5/erp5_jquery/bt/revision rename to product/ERP5/bootstrap/erp5_jquery/bt/revision diff --git a/bt5/erp5_jquery/bt/template_format_version b/product/ERP5/bootstrap/erp5_jquery/bt/template_format_version similarity index 100% rename from bt5/erp5_jquery/bt/template_format_version rename to product/ERP5/bootstrap/erp5_jquery/bt/template_format_version diff --git a/bt5/erp5_jquery/bt/template_path_list b/product/ERP5/bootstrap/erp5_jquery/bt/template_path_list similarity index 100% rename from bt5/erp5_jquery/bt/template_path_list rename to product/ERP5/bootstrap/erp5_jquery/bt/template_path_list diff --git a/bt5/erp5_jquery/bt/template_registered_skin_selection_list b/product/ERP5/bootstrap/erp5_jquery/bt/template_registered_skin_selection_list similarity index 100% rename from bt5/erp5_jquery/bt/template_registered_skin_selection_list rename to product/ERP5/bootstrap/erp5_jquery/bt/template_registered_skin_selection_list diff --git a/bt5/erp5_jquery/bt/title b/product/ERP5/bootstrap/erp5_jquery/bt/title similarity index 100% rename from bt5/erp5_jquery/bt/title rename to product/ERP5/bootstrap/erp5_jquery/bt/title diff --git a/bt5/erp5_jquery/bt/version b/product/ERP5/bootstrap/erp5_jquery/bt/version similarity index 100% rename from bt5/erp5_jquery/bt/version rename to product/ERP5/bootstrap/erp5_jquery/bt/version diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getJavaScriptRelativeUrlList.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getJavaScriptRelativeUrlList.xml index 253659bfc2..ac6d104851 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getJavaScriptRelativeUrlList.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getJavaScriptRelativeUrlList.xml @@ -59,8 +59,7 @@ #\n # BBB: For the history, erp5_xhtml_appearance.js is included by default when\n # js_list is not pre-defined before the global definitions.\n -\n -js_list = (\'erp5.js\',)\n +js_list = (\'jquery/core/jquery.min.js\', \'erp5.js\',)\n return js_list\n </string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml index 6b41037e43..354bbd171c 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml @@ -28,7 +28,9 @@ </item> <item> <key> <string>raw</string> </key> - <value> <string>/*\n + <value> <string encoding="cdata"><![CDATA[ + +/*\n Copyright (c) 20xx-2006 Nexedi SARL and Contributors. All Rights Reserved.\n \n This program is Free Software; you can redistribute it and/or\n @@ -60,9 +62,316 @@ function clickSaveButton(act) {\n document.forms[0].action = act;\n }\n \n +// The first input element with an "autofocus" class will get the focus,\n +// else if no element have autofocus class, the first element which is not the\n +// search field will get the focus. This is generally the title input text of\n +// a view\n +function autoFocus() {\n + var first_autofocus_expr = ".//input[@class=\'autofocus\']";\n + var FIRST_RESULT = XPathResult.FIRST_ORDERED_NODE_TYPE;\n +\n + var input = document.evaluate(first_autofocus_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n + if (input) {\n + input.focus();\n + }else{\n + // The following is disabled, because it is too annoying to have an auto focus at everywhere.\n + //var first_text_input_expr = ".//input[@type=\'text\'][@name != \'field_your_search_text\']"\n + //var first_text_input = document.evaluate(first_text_input_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n + //if (first_text_input){\n + // first_text_input.focus();\n + //}\n + true;\n + }\n +}\n +\n +function buildTables(element_list, rowPredicate, columnPredicate,\n + tableClassName) {\n + /* Generic code to build a table from elements in element_list.\n + * XXX: not used anymore ?\n + * rowPredicate(element) -> bool\n + * When it returns a true value, a new line is started with element.\n + * When is returns a false value, element is skipped.\n + * columnPredicate(element, initial_element) -> bitfield\n + * bit 3: end_table (if true, imlies end_row)\n + * End current table.\n + * bit 2: end_row\n + * End current row.\n + * bit 1: use_element\n + * Element passed to columnPredicate will be put in current row.\n + * Hardcoded:\n + * - items in a table line must be siblings in existing DOM\n + * - table is put in place of first element of the first row\n + */\n + var element_index = 0;\n + while (element_index < element_list.length) {\n + var row_list = [];\n + var end_table = false;\n + while ((!end_table) && element_index < element_list.length) {\n + var row_begin = element_list[element_index];\n + if (rowPredicate(row_begin)) {\n + var item_list = [row_begin];\n + var row_item = row_begin;\n + var end_line = false;\n + while ((!end_line) && (row_item = row_item.nextSibling) !== null) {\n + var predicate_result = columnPredicate(row_item, row_begin);\n + if ((predicate_result & 1) !== 0)\n + item_list.push(row_item);\n + end_table = ((predicate_result & 4) !== 0);\n + end_line = ((predicate_result & 6) !== 0);\n + }\n + row_list.push(item_list);\n + }\n + element_index++;\n + }\n + /* Do not create a table with just one cell. */\n + if ((row_list.length > 1) ||\n + (row_list.length == 1 && row_list[0].length > 1)) {\n + var first_element = row_list[0][0];\n + var fake_table = $("<table>");\n + fake_table.addClass(tableClassName);\n + fake_table.insertbefore(first_element);\n + $.each(row_list, function() {\n + var fake_row = $("<tr>");\n + $.each(this, function() {\n + var fake_cell = $("<td>");\n + fake_cell.append(this);\n + fake_row.append(fake_cell[0]);\n + });\n + fake_table.append(fake_row[0]);\n + });\n + }\n + }\n +}\n +\n +function matchLeftFieldset(element) {\n +// XXX: not used anymore ?\n + return (element.tagName == "FIELDSET" &&\n + element.className.toLowerCase().indexOf(\'left\') != -1);\n +}\n +\n +function matchRightFieldset(element, ignored) {\n +// XXX: not used anymore ?\n + if (element.tagName == "FIELDSET" &&\n + element.className.toLowerCase().indexOf(\'right\') != -1)\n + return 7; /* End row, table and use element */\n + return 0;\n +}\n +\n +function fixLeftRightHeightAndFocus(fix_height) {\n + if (fix_height == 1) {\n + var right_xpath = "following-sibling::fieldset[contains(@class, \'right\')]";\n + var matched_left_element_list = document.evaluate("//fieldset[contains(@class, \'left\') and " + right_xpath + "]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\n + var element_index;\n + for (element_index = 0; element_index < matched_left_element_list.snapshotLength; element_index++) {\n + var element = matched_left_element_list.snapshotItem(element_index);\n + var right = document.evaluate(right_xpath, element, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;\n + var table = $(\'<table class="fake">\').insertBefore(element);\n + table.append($("<tr>").append($("<td>").append(element)).append($("<td>").append(right)));\n + }\n + }\n + autoFocus();\n +}\n +\n +// This function can be used to catch ENTER pressed in an input\n +// and modify respective main form action\n +// if clear_changed_flag is set to true, changed will be set to false, so no\n +// warning message about unsaved changes will be displayed\n +function submitFormOnEnter(event, form, method_name, clear_changed_flag, element){\n + if (clear_changed_flag === null){ clear_changed_flag = false; }\n + if(event.keyCode == 13){\n + if (form == "main_form") {\n + form = document.forms[form]; // backward compatibility\n + }\n + form.action = method_name;\n + if (clear_changed_flag === true) {\n + changed = false;\n + }\n + form.submit();\n + }\n +}\n +\n +var old_index = 0;\n +function shiftCheck(evt) {\n + /*Uncheck all checkboxes from last unchecked one in \n + business template Install / Update / Reinstall dialog.\n + */\n + evt = (evt)?evt:event;\n + var target=(evt.target)?evt.target:evt.srcElement;\n + // remove "checkbox" part from ID\n + // This part can be reused easilly by usual left column\n + var target_index= target.id.substr(8);\n + if(!evt.shiftKey) {\n + old_index = target_index;\n + check_option = target.checked;\n + return false;\n + }\n + target.checked=1;\n + var low=Math.min(target_index , old_index);\n + var high=Math.max(target_index , old_index);\n + for(var i=low;i<=high;i++) {\n + $("#checkbox" + i).attr("checked", false);\n + }\n + return true;\n + }\n +\n +var indexAllCheckBoxesAtBTInstallationOnLoad = function() {\n + // This Part is used basically for Business Template Installation.\n + $("input.shift_check_support").each(\n + function(index){$(this).attr("id", "checkbox"+index);});\n + //var inputs = window.getElementsByTagAndClassName("input", "shift_check_support");\n + //for(i=0;i<=inputs.length-1;i++) {inputs[i].id = "checkbox" + i; }\n +};\n +\n +var resizeIFrameOnLoad = function() {\n + /* Resize all frames in document in order to remove sliders */\n + $("object.auto_height").each(function(){\n + var inner_frame = this.contentDocument;\n + if (inner_frame){\n + $(this).css("height", inner_frame.documentElement.offsetHeight + \'px\');\n + }\n + });\n +};\n +\n +var changed = false;\n function installUnsavedChangesWarning(warning_message) {\n - // XXX: to be overriden in othe JavaScript based styles \n -}</string> </value> + window.onbeforeunload = function() {\n + if ((changed)&&($("button.save")))\n + // show an warning box only if save button do exists\n + return warning_message;\n + };\n +}\n +\n +var addOnChangeEventHandler = function() {\n + /* Add a onchange event handler for all fields inputs.\n + This event handler set a dirty flag which cause a warning\n + while leaving the page, unless leaving by:\n + - saving (see clickSaveButton function from this file)\n + - clicking a relation field wheel\n + - clicking on a input with type submit\n + */\n + $("#master div").each(function(i) {\n + if ($(this).attr("class") == "input") {\n + $(this).children().each(function() {\n + if ($(this).prop("tagName") == "INPUT" ||\n + $(this).prop("tagName") == "SELECT" ||\n + $(this).prop("tagName") == "TEXTAREA") {\n + if ($(this).val() == "update..." ||\n + ($(this).prop("tagName") == "INPUT" &&\n + $(this).attr("type") == \'submit\')) {\n + // this is a relation field wheel or a submit form button\n + this.onclick = function() { changed = false;};\n + } else {\n + if (!this.onchange) {\n + this.onchange = function() { changed = true; };\n + }\n + }\n + } \n + /* Listbox or MatrixBox */\n + if ($(this).prop("tagName") == "DIV" && (\n + $(this).attr("class") == "listbox-container" ||\n + $(this).attr("class") == "MatrixContent")) {\n + $(this).find(\'td\').each(function(){\n + if ($(this).attr("class") == "listbox-search-line") {\n + return non-false;\n + }\n + $(this).find(\'input\').each(function(){\n + if ($(this).attr("type") != "hidden" &&\n + !this.onchange) {\n + this.onchange = function() { changed = true; };\n + }\n + });\n + });\n + }\n + });\n + }\n + });\n +};\n +\n +var rewriteIndentedSelect = function() {\n + /*\n + Under firefox, rewrite indented title categories using style definition.\n + This way we can select items by pressing the first letter of their name. */\n +\n + $("#master select").each(function() {\n + $(this).children().each(function() {\n + if ($(this).prop("tagName") != "OPTION") {\n + return non-false;\n + }\n + text = $(this).html();\n + if (text.substring(0, 1) == \'\\n\') {\n + text = text.substring(1, text.length);\n + }\n + level = 0;\n + if (text.substring(0, 6) == \' \') {\n + for (idx=0; idx <= text.length; idx+=6) {\n + if (text.substring(idx, idx+6) == \' \') {\n + level += 1;\n + } else {\n + break;\n + }\n + }\n + }\n + if (level >= 1) {\n + level = level / 4.0;\n + $(this).html(text.replace(/^( )+/, ""));\n + $(this).css("paddingLeft", level+"em");\n + }\n + });\n + });\n +};\n +\n +function queryStringToArray(query_string){\n + /*\n + Turn a query string into a "dictionary"\n + */\n + var final_dict = {};\n + var b = query_string.split(\'&\');\n + $.each(b, function(x, y){\n + var temp = y.split(\'=\');\n + final_dict[temp[0]] = temp[1];});\n + return final_dict;\n +}\n +\n +function submitLinkAsHtmlForm(event){\n + /*\n + Parse link into form arguments and pass everything as a \n + form (together with rest of page\'s input elements).\n + */\n + var url = $(this).attr("href");\n + var form = $("form");\n + var method = url.substring(0, url.indexOf(\'?\'));\n + var query_string = url.substring(url.indexOf(\'?\')+1);\n + var params = queryStringToArray(query_string);\n + $.each(params, function(key, value) {\n + if (!$(\'*[name="\' + key + \'"]\').length){\n + // key not part of HTML namespace\n + form.append(\'<input type="hidden" name="\' + key+ \'" value="\' + value + \'">\');\n + }});\n + // submit form \n + form.attr("action", method);\n + form.submit();\n + event.stopPropagation();\n + return false;\n +}\n +\n +function redirectPDFPage(event, element){\n + /*\n + Used in PDF thumbnail preview mode\n + */\n + if(event.keyCode == 13){\n + selection_index = parseInt($(element).val(), 10) - 1;\n + window.location.href = "PDF_viewHTMLPreviewAsImage?selection_index=" + selection_index;\n + return false; \n + }\n +}\n +\n +if (navigator.userAgent.toLowerCase().indexOf(\'firefox\') != -1)\n + $(document).ready(rewriteIndentedSelect);\n +$(document).ready(resizeIFrameOnLoad);\n +$(document).ready(addOnChangeEventHandler);\n +$(document).ready(indexAllCheckBoxesAtBTInstallationOnLoad); + +]]></string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_tabber.js.xml similarity index 100% rename from bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml rename to product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_tabber.js.xml diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_xhtml_appearance.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_xhtml_appearance.js.xml index ad37401d2a..e0b906d3f8 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_xhtml_appearance.js.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_xhtml_appearance.js.xml @@ -45,7 +45,11 @@ You should have received a copy of the GNU General Public License\n 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 -// XXX: to be overriden in othe JavaScript based styles \n +\n +var fixLeftRightHeightAndFocusOnLoad = function () {\n + fixLeftRightHeightAndFocus(1);\n +};\n +$(document).ready(fixLeftRightHeightAndFocusOnLoad);\n </string> </value> </item> <item> diff --git a/product/ERP5/tests/testERP5Credential.py b/product/ERP5/tests/testERP5Credential.py index 6b9fcdb520..21a6618506 100644 --- a/product/ERP5/tests/testERP5Credential.py +++ b/product/ERP5/tests/testERP5Credential.py @@ -59,7 +59,6 @@ class TestERP5Credential(ERP5TypeTestCase): 'erp5_core_proxy_field_legacy', 'erp5_base', 'erp5_jquery', - 'erp5_xhtml_jquery_style', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion', 'erp5_web', diff --git a/product/ERP5/tests/testTemplateTool.py b/product/ERP5/tests/testTemplateTool.py index 9c826cb078..b87cb795c9 100644 --- a/product/ERP5/tests/testTemplateTool.py +++ b/product/ERP5/tests/testTemplateTool.py @@ -627,8 +627,8 @@ class TestTemplateTool(ERP5TypeTestCase): first_group = range(0, 6) second_group = range(6, 8) third_group = range(8, 10) - fourth_group = range(10, 13) - fifth_group = range(13, 14) + fourth_group = range(10, 12) + fifth_group = range(12, 13) expected_position_dict = dict((('erp5_property_sheets', first_group), ('erp5_core_proxy_field_legacy', first_group), @@ -640,7 +640,6 @@ class TestTemplateTool(ERP5TypeTestCase): ('erp5_base', second_group), ('erp5_jquery', third_group), ('erp5_ingestion', third_group), - ('erp5_xhtml_jquery_style', fourth_group), ('erp5_web', fourth_group), ('erp5_crm', fourth_group), ('erp5_credential', fifth_group))) diff --git a/product/ERP5Configurator/tests/ConfiguratorTestMixin.py b/product/ERP5Configurator/tests/ConfiguratorTestMixin.py index 25e9e94f5b..b627ca62dd 100644 --- a/product/ERP5Configurator/tests/ConfiguratorTestMixin.py +++ b/product/ERP5Configurator/tests/ConfiguratorTestMixin.py @@ -45,7 +45,6 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): 'erp5_dhtml_style', 'erp5_jquery', 'erp5_jquery_ui', - 'erp5_xhtml_jquery_style', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion', 'erp5_web', @@ -69,7 +68,6 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): standard_bt5_list = ('erp5_dhtml_style', 'erp5_jquery_ui', - 'erp5_xhtml_jquery_style', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_dms', 'erp5_accounting', diff --git a/product/ERP5Type/tests/testFunctionalCore.py b/product/ERP5Type/tests/testFunctionalCore.py index 7cf2b08b5c..cff1713dd3 100644 --- a/product/ERP5Type/tests/testFunctionalCore.py +++ b/product/ERP5Type/tests/testFunctionalCore.py @@ -42,7 +42,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase): return ('erp5_core_proxy_field_legacy', 'erp5_full_text_myisam_catalog', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_dhtml_style', 'erp5_dhtml_ui_test', - 'erp5_jquery', 'erp5_jquery_ui', 'erp5_xhtml_jquery_style', + 'erp5_jquery', 'erp5_jquery_ui', 'erp5_knowledge_pad', 'erp5_pdm', 'erp5_simulation', diff --git a/product/ERP5Type/tests/testFunctionalKM.py b/product/ERP5Type/tests/testFunctionalKM.py index 1882503135..76ecb33ceb 100644 --- a/product/ERP5Type/tests/testFunctionalKM.py +++ b/product/ERP5Type/tests/testFunctionalKM.py @@ -47,7 +47,7 @@ class TestZeleniumKM(ERP5TypeFunctionalTestCase): return ('erp5_core_proxy_field_legacy', 'erp5_full_text_myisam_catalog', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_dhtml_style', 'erp5_dhtml_ui_test', - 'erp5_xhtml_jquery_style', 'erp5_jquery', 'erp5_jquery_ui', + 'erp5_jquery', 'erp5_jquery_ui', 'erp5_knowledge_pad', 'erp5_trade', 'erp5_pdm', 'erp5_ooo_import', 'erp5_accounting', 'erp5_invoicing', diff --git a/product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py b/product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py index 8913f540a2..9322d0f90a 100644 --- a/product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py +++ b/product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py @@ -67,7 +67,7 @@ class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase): return ('erp5_core_proxy_field_legacy', 'erp5_full_text_myisam_catalog', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_dhtml_style', - 'erp5_xhtml_jquery_style', 'erp5_jquery', 'erp5_jquery_ui', + 'erp5_jquery', 'erp5_jquery_ui', 'erp5_knowledge_pad', 'erp5_trade', 'erp5_pdm', 'erp5_ooo_import', 'erp5_accounting', 'erp5_invoicing', -- 2.30.9