mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 09:10:07 -06:00
repo reorg
This commit is contained in:
60
emhttp/plugins/dynamix/javascript/dynamix.js
Normal file
60
emhttp/plugins/dynamix/javascript/dynamix.js
Normal file
File diff suppressed because one or more lines are too long
14
emhttp/plugins/dynamix/javascript/jquery.apexcharts.js
Normal file
14
emhttp/plugins/dynamix/javascript/jquery.apexcharts.js
Normal file
File diff suppressed because one or more lines are too long
1
emhttp/plugins/dynamix/javascript/jquery.base64.js
Normal file
1
emhttp/plugins/dynamix/javascript/jquery.base64.js
Normal file
@@ -0,0 +1 @@
|
||||
function base64(r){var e,t,a,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=r.length,n=o%3,A="";function d(r){return h.charAt(63&r)}for(a=0,e=o-n;a<e;a+=3)A+=d((c=(r.charCodeAt(a)<<16)+(r.charCodeAt(a+1)<<8)+r.charCodeAt(a+2))>>18)+d(c>>12)+d(c>>6)+d(c);switch(n){case 1:A+=d((t=r.charCodeAt(o-1))>>2),A+=d(t<<4),A+="==";break;case 2:A+=d((t=(r.charCodeAt(o-2)<<8)+r.charCodeAt(o-1))>>10),A+=d(t>>4),A+=d(t<<2),A+="="}return A}
|
||||
2
emhttp/plugins/dynamix/javascript/jquery.filedrop.js
Normal file
2
emhttp/plugins/dynamix/javascript/jquery.filedrop.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/* jQuery filedrop v0.1.0, copyright Weixi Yen - modified by Bergware for jQuery v3.6 */
|
||||
!function(n){var r,s,f={},t={url:"",refresh:1e3,paramname:"userfile",maxfiles:25,maxfilesize:1024,data:{},drop:e,dragEnter:e,dragOver:e,dragLeave:e,docEnter:e,docOver:e,docLeave:e,beforeEach:e,afterAll:e,rename:e,error:function(e,r,t){alert(e)},uploadStarted:e,uploadFinished:e,progressUpdated:e,speedUpdated:e},a=["BrowserNotSupported","TooManyFiles","FileTooLarge"],l=!1,c=0;function o(e){return f.drop(e),null==(s=e.dataTransfer.files)?(f.error(a[0]),!1):(c=s.length,e.preventDefault(),function(){if(l=!1,!s)return f.error(a[0]),!1;var d=0,u=0;if(c>f.maxfiles)return f.error(a[1]),!1;for(var e=0;e<c;e++){if(l)return!1;try{if(0!=function(e){return f.beforeEach(e)}(s[e])){if(e===c)return;var r=new FileReader,t=1024*f.maxfilesize;if(r.index=e,s[e].size>t){f.error(a[2],s[e],e),u++;continue}r.onloadend=n,r.readAsDataURL(s[e])}else u++}catch(e){return f.error(a[0]),!1}}function n(e){null==e.target.index&&(e.target.index=function(e){for(var r=0;r<c;r++)if(s[r].size==e)return r;return}(e.total));var r,t=new XMLHttpRequest,n=t.upload,a=s[e.target.index],o=e.target.index,i=(new Date).getTime();newName=(r=a.name,f.rename(r)),e="string"==typeof newName?p(newName,e.target.result):p(a.name,e.target.result),n.index=o,n.file=a,n.downloadStartTime=i,n.currentStart=i,n.currentProgress=0,n.startData=0,n.addEventListener("progress",g,!1),t.open("POST",f.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(e),f.uploadStarted(o,a,c),t.onload=function(){var e;t.responseText&&(e=(new Date).getTime()-i,e=f.uploadFinished(o,a,t.responseText,e),++d==c-u&&f.afterAll(),!1===e&&(l=!0))}}return 0==u}())}function p(e,r){var t=[];return n.each(f.data,function(e,r){"function"==typeof r&&(r=r()),t.push(e+"="+r)}),t.push("filename="+encodeURI(e)),t.push("filedata="+r),t.join("&")}function g(e){var r,t;e.lengthComputable&&(t=Math.round(100*e.loaded/e.total),this.currentProgress!=t&&(this.currentProgress=t,f.progressUpdated(this.index,this.file,this.currentProgress),(t=(r=(new Date).getTime())-this.currentStart)>=f.refresh&&(t=(e.loaded-this.startData)/t,f.speedUpdated(this.index,this.file,t),this.startData=e.loaded,this.currentStart=r)))}function i(e){clearTimeout(r),e.preventDefault(),f.dragEnter(e)}function d(e){clearTimeout(r),e.preventDefault(),f.docOver(e),f.dragOver(e)}function u(e){clearTimeout(r),f.dragLeave(e),e.stopPropagation()}function v(e){return e.preventDefault(),f.docLeave(e),!1}function m(e){return clearTimeout(r),e.preventDefault(),f.docEnter(e),!1}function h(e){return clearTimeout(r),e.preventDefault(),f.docOver(e),!1}function T(e){r=setTimeout(function(){f.docLeave(e)},200)}function e(){}n.fn.filedrop=function(e){f=n.extend({},t,e),this.on("drop",o).on("dragenter",i).on("dragover",d).on("dragleave",u),n(document).on("drop",v).on("dragenter",m).on("dragover",h).on("dragleave",T)}}(jQuery);
|
||||
2
emhttp/plugins/dynamix/javascript/jquery.filetree.js
Normal file
2
emhttp/plugins/dynamix/javascript/jquery.filetree.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/* jQuery File Tree. Authors - Cory S.N. LaViska & Dave Rogers. Copyright 2008 A Beautiful Site, LLC. - Adapted by Bergware for use in Unraid */
|
||||
jQuery&&function(e){e.extend(e.fn,{fileTree:function(i,t,l){void 0===i.root&&(i.root="/mnt/"),void 0===i.top&&(i.top="/mnt/"),void 0===i.filter&&(i.filter=""),void 0===i.match&&(i.match=".*"),void 0===i.script&&(i.script="/webGui/include/FileTree.php"),void 0===i.folderEvent&&(i.folderEvent="click"),void 0===i.expandSpeed&&(i.expandSpeed=300),void 0===i.collapseSpeed&&(i.collapseSpeed=300),void 0===i.expandEasing&&(i.expandEasing=null),void 0===i.collapseEasing&&(i.collapseEasing=null),void 0===i.multiFolder&&(i.multiFolder=!1),void 0===i.loadMessage&&(i.loadMessage="Loading..."),void 0===i.multiSelect&&(i.multiSelect=!1),void 0===i.allowBrowsing&&(i.allowBrowsing=!1),e(this).each(function(){function s(r,n,o){e(r).addClass("wait"),e(".jqueryFileTree.start").remove(),e.post(i.script,{dir:n,root:i.top,multiSelect:i.multiSelect,filter:i.filter,match:i.match,show_parent:o}).done(function(o){var d;e(r).find(".start").html(""),e(r).removeClass("wait").append(o),i.root==n?e(r).find("UL:hidden").show():e(r).find("UL:hidden").slideDown({duration:i.expandSpeed,easing:i.expandEasing}),e(d=r).find("LI A").on(i.folderEvent,function(r){r.preventDefault();var n={};return n.li=e(this).closest("li"),n.type=n.li.hasClass("directory")?"directory":"file",n.value=e(this).text(),n.rel=e(this).prop("rel"),".."==e(this).text()?(i.root=n.rel,l&&l(e(this).attr("rel")),a(e(this),"filetreefolderclicked",n),root=e(this).closest("ul.jqueryFileTree"),root.html('<ul class="jqueryFileTree start"><li class="wait">'+i.loadMessage+"<li></ul>"),s(e(root),i.root,i.allowBrowsing)):e(this).parent().hasClass("directory")?(e(this).parent().hasClass("collapsed")?(a(e(this),"filetreeexpand",n),i.multiFolder||(e(this).parent().parent().find("UL").slideUp({duration:i.collapseSpeed,easing:i.collapseEasing}),e(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")),e(this).parent().removeClass("collapsed").addClass("expanded"),e(this).parent().find("UL").remove(),s(e(this).parent(),e(this).attr("rel").match(/.*\//)[0],!1)):(a(e(this),"filetreecollapse",n),e(this).parent().find("UL").slideUp({duration:i.collapseSpeed,easing:i.collapseEasing}),e(this).parent().removeClass("expanded").addClass("collapsed"),a(e(this),"filetreecollapsed",n)),l&&l(e(this).attr("rel")),a(e(this),"filetreefolderclicked",n)):(t&&t(e(this).attr("rel")),a(e(this),"filetreeclicked",n)),!1}),"click"!=i.folderEvent.toLowerCase&&e(d).find("LI A").on("click",function(e){return e.preventDefault(),!1}),a(e(this),"filetreeexpanded",o)}).fail(function(){e(r).find(".start").html(""),e(r).removeClass("wait").append("<li>Unable to get file tree information</li>")})}function a(e,i,t){t.trigger=i,e.trigger(i,t)}e(this).html('<ul class="jqueryFileTree start"><li class="wait">'+i.loadMessage+"<li></ul>"),s(e(this),i.root,i.allowBrowsing),e(this).on("change","input:checkbox",function(){var i={};i.li=e(this).closest("li"),i.type=i.li.hasClass("directory")?"directory":"file",i.value=i.li.children("a").text(),i.rel=i.li.children("a").prop("rel"),i.li.find("input:checkbox").prop("checked",e(this).prop("checked")),e(this).prop("checked")?a(e(this),"filetreechecked",i):a(e(this),"filetreeunchecked",i)})})},fileTreeAttach:function(i,t,l){var s={};e.isFunction(i)?(e.isFunction(t)&&(l=t),t=i):i&&e.extend(s,i),e(this).each(function(){var i=e(this),a=e.extend({},s,i.data()),r=i.next(".fileTree");0===r.length&&(e(document).mousedown(function(i){var t=e(".fileTree");t.is(i.target)||0!==t.has(i.target).length||t.slideUp("fast")}),r=e("<div>",{class:"textarea fileTree"}),i.after(r)),i.click(function(){r.is(":visible")?r.slideUp("fast"):(""===r.html()&&(r.html('<span style="padding-left: 20px"><img src="/webGui/images/spinner.gif"> Loading...</span>'),r.fileTree({root:a.pickroot,top:a.picktop,filter:(a.pickfilter||"").split(","),match:a.pickmatch||".*"},e.isFunction(t)?t:function(e){i.val(e).change(),a.hasOwnProperty("pickcloseonfile")&&r.slideUp("fast")},e.isFunction(l)?l:function(e){a.hasOwnProperty("pickfolders")&&i.val(e).change()})),r.offset({left:i.position().left}),r.slideDown("fast"))})})}})}(jQuery);
|
||||
2
emhttp/plugins/dynamix/javascript/jquery.switchbutton.js
Normal file
2
emhttp/plugins/dynamix/javascript/jquery.switchbutton.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/* jquery.switchButton.js v1.0. Copyright (c) Olivier Lance */
|
||||
!function(t){t.widget("sylightsUI.switchButton",{options:{checked:void 0,show_labels:!0,labels_placement:"both",on_label:"ON",off_label:"OFF",width:25,height:11,button_width:12,clear:!0,clear_after:null,on_callback:void 0,off_callback:void 0},_create:function(){void 0===this.options.checked&&(this.options.checked=this.element.prop("checked")),this._initLayout(),this._initEvents()},_initLayout:function(){this.element.hide(),this.off_label=t("<span>").addClass("switch-button-label"),this.on_label=t("<span>").addClass("switch-button-label"),this.button_bg=t("<div>").addClass("switch-button-background"),this.button=t("<div>").addClass("switch-button-button"),this.off_label.insertAfter(this.element),this.button_bg.insertAfter(this.off_label),this.on_label.insertAfter(this.button_bg),this.button_bg.append(this.button),this.options.clear&&(null===this.options.clear_after&&(this.options.clear_after=this.on_label),t("<div>").css({clear:"left"}).insertAfter(this.options.clear_after)),this._refresh(),this.options.checked=!this.options.checked,this._toggleSwitch()},_refresh:function(){switch(this.options.show_labels?(this.off_label.show(),this.on_label.show()):(this.off_label.hide(),this.on_label.hide()),this.options.labels_placement){case"both":this.button_bg.prev()===this.off_label&&this.button_bg.next()===this.on_label||(this.off_label.detach(),this.on_label.detach(),this.off_label.insertBefore(this.button_bg),this.on_label.insertAfter(this.button_bg),this.on_label.addClass(this.options.checked?"on":"off").removeClass(this.options.checked?"off":"on"),this.off_label.addClass(this.options.checked?"off":"on").removeClass(this.options.checked?"on":"off"));break;case"left":this.button_bg.prev()===this.on_label&&this.on_label.prev()===this.off_label||(this.off_label.detach(),this.on_label.detach(),this.off_label.insertBefore(this.button_bg),this.on_label.insertBefore(this.button_bg),this.on_label.addClass("on").removeClass("off"),this.off_label.addClass("off").removeClass("on"));break;case"right":this.button_bg.next()===this.off_label&&this.off_label.next()===this.on_label||(this.off_label.detach(),this.on_label.detach(),this.off_label.insertAfter(this.button_bg),this.on_label.insertAfter(this.off_label),this.on_label.addClass("on").removeClass("off"),this.off_label.addClass("off").removeClass("on"))}this.on_label.html(this.options.on_label),this.off_label.html(this.options.off_label),this.button_bg.width(this.options.width),this.button_bg.height(this.options.height),this.button.width(this.options.button_width),this.button.height(this.options.height)},_initEvents:function(){var t=this;this.button_bg.click(function(e){return e.preventDefault(),e.stopPropagation(),t._toggleSwitch(),!1}),this.button.click(function(e){return e.preventDefault(),e.stopPropagation(),t._toggleSwitch(),!1}),this.on_label.click(function(e){return(!t.options.checked||"both"!==t.options.labels_placement)&&(t._toggleSwitch(),!1)}),this.off_label.click(function(e){return!(!t.options.checked&&"both"===t.options.labels_placement)&&(t._toggleSwitch(),!1)})},_setOption:function(t,e){"checked"!==t?(this.options[t]=e,this._refresh()):this._setChecked(e)},_setChecked:function(t){t!==this.options.checked&&(this.options.checked=!t,this._toggleSwitch())},_toggleSwitch:function(){this.options.checked=!this.options.checked;var t="";this.options.checked?(this.element.prop("checked",!0),this.element.change(),t="+="+(this.options.width-this.options.button_width),"both"==this.options.labels_placement?(this.off_label.removeClass("on").addClass("off"),this.on_label.removeClass("off").addClass("on")):(this.off_label.hide(),this.on_label.show()),this.button_bg.addClass("checked"),"function"==typeof this.options.on_callback&&this.options.on_callback.call(this)):(this.element.prop("checked",!1),this.element.change(),t="-1px","both"==this.options.labels_placement?(this.off_label.removeClass("off").addClass("on"),this.on_label.removeClass("on").addClass("off")):(this.off_label.show(),this.on_label.hide()),this.button_bg.removeClass("checked"),"function"==typeof this.options.off_callback&&this.options.off_callback.call(this));this.button.animate({left:t},250,"easeInOutCubic")}})}(jQuery);
|
||||
1
emhttp/plugins/dynamix/javascript/translate.en_US.js
Normal file
1
emhttp/plugins/dynamix/javascript/translate.en_US.js
Normal file
@@ -0,0 +1 @@
|
||||
function _(t){return t;}
|
||||
Reference in New Issue
Block a user