[Erp5-report] r22562 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 18 16:15:50 CEST 2008
Author: rafael
Date: Fri Jul 18 16:15:44 2008
New Revision: 22562
URL: http://svn.erp5.org?rev=22562&view=rev
Log:
Added shiftClick for multiple check checkbox. This will used by new business template dialog form, but it can be adapted to add the same behaviour at usuall leftside check box columns.
The behavior allow check many checkbox ins sequence holding shift and click.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml?rev=22562&r1=22561&r2=22562&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml Fri Jul 18 16:15:44 2008
@@ -196,7 +196,36 @@
if(key_code == 13){\n
var main_form = getElement(main_form_id)\n
main_form.action=method_name;};\n
-}
+}\n
+\n
+var old_index=0;\n
+function shiftCheck(evt) {\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
+ document.getElementById("checkbox" + i ).checked = check_option;\n
+ }\n
+ return true;\n
+ }\n
+\n
+var indexAllCheckBoxesAtBTInstallationOnLoad = function() {\n
+ // This Part is used basically for Business Template Installation.\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
+addLoadEvent(indexAllCheckBoxesAtBTInstallationOnLoad)
]]></string> </value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=22562&r1=22561&r2=22562&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Fri Jul 18 16:15:44 2008
@@ -1,1 +1,1 @@
-572
+576
More information about the Erp5-report
mailing list