[ Index ] |
PHP Cross Reference of MyBB |
[Summary view] [Print] [Text view]
1 var ViewManager = { 2 init: function() 3 { 4 if(!$('fields_enabled') || !$('fields_disabled')) 5 { 6 return; 7 } 8 9 if(!$('fields_js')) 10 { 11 return; 12 } 13 14 Sortable.create("fields_enabled", {dropOnEmpty: true, containment:["fields_enabled","fields_disabled"], constraint: false, onChange: ViewManager.buildFieldsList}); 15 Sortable.create("fields_disabled", {dropOnEmpty: true, containment:["fields_enabled","fields_disabled"], constraint: false, onChange: ViewManager.buildFieldsList}); 16 }, 17 18 buildFieldsList: function() 19 { 20 new_input = ''; 21 for(var i=0; i <= $('fields_enabled').childNodes.length; i++) 22 { 23 if($('fields_enabled').childNodes[i] && $('fields_enabled').childNodes[i].id) 24 { 25 id = $('fields_enabled').childNodes[i].id.split("-"); 26 27 if(id[1]) 28 { 29 if(new_input) 30 { 31 new_input += ","; 32 } 33 new_input += id[1]; 34 } 35 } 36 } 37 $('fields_js').value = new_input; 38 } 39 }; 40 41 Event.observe(window, 'load', ViewManager.init);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Oct 8 19:19:50 2013 | Cross-referenced by PHPXref 0.7.1 |