@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb008 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
mt-static
/
plugins
/
WidgetManager
/
js
/
Path :
Upload File :
New :
File
Dir
//homepage/v-mt/mt-static/plugins/WidgetManager/js/app.js
function edit_different_widgetmanager( blog_id ) { var current = getByID('current-widgetmanager').value; window.location = '?__mode=manage&blog_id='+blog_id+'&widgetmanager='+current; } // ------------------------------------------------------------------- // selectAllOptions(select_object) // This function takes a select box and selects all options (in a // multiple select object). This is used when passing values between // two select boxes. Select all options in the right box before // submitting the form so the values will be sent to the server. // ------------------------------------------------------------------- function selectAllOptions(obj) { if (!hasOptions(obj)) { return; } for (var i=0; i<obj.options.length; i++) { obj.options[i].selected = true; } } // ------------------------------------------------------------------- // hasOptions(obj) // Utility function to determine if a select object has an options array // ------------------------------------------------------------------- function hasOptions(obj) { if (obj!=null && obj.options!=null) { return true; } return false; } // ------------------------------------------------------------------- // swapOptions(select_object,option1,option2) // Swap positions of two options in a select list // ------------------------------------------------------------------- function swapOptions(obj,i,j) { var o = obj.options; var i_selected = o[i].selected; var j_selected = o[j].selected; var temp = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected); var temp2= new Option(o[j].text, o[j].value, o[j].defaultSelected, o[j].selected); o[i] = temp2; o[j] = temp; o[i].selected = j_selected; o[j].selected = i_selected; } // ------------------------------------------------------------------- // moveOptionUp(select_object) // Move selected option in a select list up one // ------------------------------------------------------------------- function moveOptionUp(obj) { if (!hasOptions(obj)) { return; } var i; for (i=0; i<obj.options.length; i++) { if (obj.options[i].selected) { if (i != 0 && !obj.options[i-1].selected) { swapOptions(obj,i,i-1); obj.options[i-1].selected = true; } } } } // ------------------------------------------------------------------- // moveOptionDown(select_object) // Move selected option in a select list down one // ------------------------------------------------------------------- function moveOptionDown(obj) { if (!hasOptions(obj)) { return; } var i; for (i=obj.options.length-1; i>=0; i--) { if (obj.options[i].selected) { if (i != (obj.options.length-1) && ! obj.options[i+1].selected) { swapOptions(obj,i,i+1); obj.options[i+1].selected = true; } } } } <!-- Original: Phil Webb (phil@philwebb.com) --> <!-- Web Site: http://www.philwebb.com --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> function move(fbox, tbox) { var arrFbox = new Array(); var arrTbox = new Array(); var arrLookup = new Array(); var i; for (i = 0; i < tbox.options.length; i++) { arrLookup[tbox.options[i].text] = tbox.options[i].value; arrTbox[i] = tbox.options[i].text; } var fLength = 0; var tLength = arrTbox.length; for(i = 0; i < fbox.options.length; i++) { arrLookup[fbox.options[i].text] = fbox.options[i].value; if (fbox.options[i].selected && fbox.options[i].value != "") { arrTbox[tLength] = fbox.options[i].text; tLength++; } else { arrFbox[fLength] = fbox.options[i].text; fLength++; } } arrFbox.sort(); //arrTbox.sort(); fbox.length = 0; tbox.length = 0; var c; for(c = 0; c < arrFbox.length; c++) { var no = new Option(); no.value = arrLookup[arrFbox[c]]; no.text = arrFbox[c]; fbox[c] = no; } for(c = 0; c < arrTbox.length; c++) { var no = new Option(); no.value = arrLookup[arrTbox[c]]; no.text = arrTbox[c]; tbox[c] = no; } } function move_item(val, fbox, tbox) { var arrFbox = new Array(); var arrTbox = new Array(); var arrLookup = new Array(); var i; for (i = 0; i < tbox.options.length; i++) { arrLookup[tbox.options[i].text] = tbox.options[i].value; arrTbox[i] = tbox.options[i].text; } var fLength = 0; var tLength = arrTbox.length; for(i = 0; i < fbox.options.length; i++) { arrLookup[fbox.options[i].text] = fbox.options[i].value; if (fbox.options[i].value == val) { arrTbox[tLength] = fbox.options[i].text; tLength++; } else { arrFbox[fLength] = fbox.options[i].text; fLength++; } } arrFbox.sort(); arrTbox.sort(); fbox.length = 0; tbox.length = 0; var c; for(c = 0; c < arrFbox.length; c++) { var no = new Option(); no.value = arrLookup[arrFbox[c]]; no.text = arrFbox[c]; fbox[c] = no; } for(c = 0; c < arrTbox.length; c++) { var no = new Option(); no.value = arrLookup[arrTbox[c]]; no.text = arrTbox[c]; tbox[c] = no; } }