[ Index ] |
PHP Cross Reference of MyBB |
[Summary view] [Print] [Text view]
1 var QuickPermEditor = { 2 3 init: function(id) 4 { 5 if(!$('fields_enabled_'+id) || !$('fields_disabled_'+id)) 6 { 7 return; 8 } 9 if(!$('fields_'+id)) 10 { 11 return; 12 } 13 14 Sortable.create("fields_enabled_"+id, {dropOnEmpty: true, containment:["fields_enabled_"+id,"fields_disabled_"+id], constraint: false, onUpdate: function() { QuickPermEditor.buildFieldsList(id)}}); 15 Sortable.create("fields_disabled_"+id, {dropOnEmpty: true, containment:["fields_enabled_"+id,"fields_disabled_"+id], constraint: false, onUpdate: function() { QuickPermEditor.buildFieldsList(id)}}); 16 }, 17 18 buildFieldsList: function(id) 19 { 20 new_input = ''; 21 var length = $('fields_enabled_'+id).childNodes.length; 22 for(var i=0; i <= length; i++) 23 { 24 if($('fields_enabled_'+id).childNodes[i] && $('fields_enabled_'+id).childNodes[i].id) 25 { 26 var split_id = $('fields_enabled_'+id).childNodes[i].id.split("-"); 27 28 if(split_id[1]) 29 { 30 if(new_input) 31 { 32 new_input += ","; 33 } 34 new_input += split_id[1]; 35 } 36 } 37 } 38 if($('fields_'+id).value != new_input) 39 { 40 if($('default_permissions_'+id)) 41 { 42 $('default_permissions_'+id).checked = false; 43 } 44 } 45 $('fields_'+id).value = new_input; 46 47 if($('fields_inherit_'+id)) 48 { 49 $('fields_inherit_'+id).value = 0; 50 } 51 }, 52 };
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 |