Changeset 499
- Timestamp:
- 08/28/06 05:42:03
- Files:
-
- qPloneTabs/trunk/TODO.txt (modified) (1 diff)
- qPloneTabs/trunk/skins/qPloneTabs/javascripts/qplonetabs.js (modified) (4 diffs)
- qPloneTabs/trunk/skins/qPloneTabs/qplonetabs.css.dtml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneTabs/trunk/TODO.txt
r498 r499 2 2 * Opera compatibility 3 3 * 'portal-globalnav' visualization without page reloading 4 * sliding 'Advanced' section5 * intelligent url processing4 # * sliding 'Advanced' section 5 # * intelligent url processing on adding qPloneTabs/trunk/skins/qPloneTabs/javascripts/qplonetabs.js
r498 r499 20 20 parameters: params, 21 21 onSuccess: function(request){ 22 $A($('tabslist').getElementsByTagName('INPUT')).findAll(function(h){return h.type=='hidden';}).each(function(f,idx){f.value=idx;}); 22 var lis = $A($('tabslist').getElementsByTagName('LI')), 23 inputs = function(li){return $A(li.getElementsByTagName('INPUT'))}; 24 lis.each(function(el,idx){ 25 inputs(el).each(function(inpt){ 26 inpt.type=='hidden'?inpt.value=idx:inpt.name=inpt.name.replace(/i\d+_/, 'i'+idx+'_'); 27 }); 28 }); 23 29 shiftClassNames('app', 'sorting', 'viewing'); 24 30 Sortable.destroy('tabslist'); … … 95 101 } 96 102 }, 97 '#app .collapsibleContent1' : function(el){collapseAdvanced(el.parentNode);},98 103 '#app .collapsibleHeader1' : function(el){ 99 104 el.onclick = function(ev){ … … 247 252 new Ajax.Updater({success:'roottabs'}, 'qpt_getroottabs', { 248 253 method : 'get', 249 on Success: function(){Behaviour.apply()}254 onComplete : function(){Behaviour.apply()} 250 255 }); 251 256 } … … 264 269 Ajax.Responders.register(globalHandlers); 265 270 271 Event.observe(window, 'load', collapseAdvanced); 272 Event.observe(window, 'unload', function(){gBeforeReorderFragment = null; gBeforeEditData = null;}); 273 274 function collapseAdvanced() { 275 $A(document.getElementsByClassName('collapsible1', 'app')).each( 276 function(dl){ 277 var dd = dl.getElementsByTagName('DD')[0]; 278 if (!Element.hasClassName(dl, 'collapsedBlock') && Element.visible(dd)) { 279 shiftClassNames(dl, 'expandedBlock', 'collapsedBlock'); 280 }; 281 Element.hide(dd); 282 } 283 ); 284 }; 285 266 286 function shiftClassNames(el, from, to) { 267 287 Element.removeClassName(el, from); 268 288 Element.addClassName(el, to); 269 };270 271 function collapseAdvanced(dl) {272 var dd = dl.getElementsByTagName('DD')[0];273 if (!Element.hasClassName(dl, 'collapsedBlock') && Element.visible(dd)) {274 shiftClassNames(dl, 'expandedBlock', 'collapsedBlock');275 }276 Element.hide(dd);277 289 }; 278 290 qPloneTabs/trunk/skins/qPloneTabs/qplonetabs.css.dtml
r498 r499 3 3 4 4 /* 5 There are two global self-excludes classes: 'viewing' and 'sorting', 6 one local class 'editing' for menu items which are expanded for editing, 7 and one more local class 'adding' for adding form when it's in open state. 8 9 Reorder action are always available, so it TEMPORARY stop other actions on the form: 10 editing items 11 deleting items 12 toggling item visibility 13 adding item 14 15 After returning to 'viewing' class after 'sorting' all items become to the same state they 16 be before sorting (in editing state or not). 17 18 And the same behaviour for adding form: form state ('adding' or not) become the same it was 19 before sorting. 20 21 All actions except reordering and deleting* could be done at any 22 in relationship to each other. 23 24 * deleting can't be done during the editing the same item 5 *************************************************************************************************** 6 * * 7 * There are two global self-excludes classes: 'viewing' and 'sorting', * 8 * one local class 'editing' for menu items which are expanded for editing, * 9 * and one more local class 'adding' for adding form when it's in open state. * 10 * * 11 * Reorder action are always available and it TEMPORARY stop other actions on the form: * 12 * editing items * 13 * deleting items * 14 * toggling item visibility * 15 * adding item * 16 * * 17 * After returning to 'viewing' class from 'sorting' all items become to the same state they * 18 * were before sorting (in editing state or not). * 19 * * 20 * And the same behaviour for adding form: form state ('adding' or not) become the same it was * 21 * before sorting. * 22 * * 23 * All actions except reordering could be done at any time in relationship to each other. * 24 * * 25 *************************************************************************************************** 25 26 */ 26 27 27 28 #app.viewing .reorder-controls, 28 29 #app.sorting .sort-controls, 29 /* #app.sorting li.editing span, */30 30 #app.viewing li.editing .editform, 31 31 #app #addaction.adding .field-visible,
