1/*----------------------------------------------------------------------*/ 2/* wl_Fileexplorer v 1.0 by revaxarts.com 3/* description: makes a Fileexplorer 4/* dependency: elFinder plugin (elfinder.js) 5/*----------------------------------------------------------------------*/ 6 7 8$.fn.wl_Fileexplorer = function (method) { 9 10 var args = arguments; 11 return this.each(function () { 12 13 var $this = $(this); 14 15 16 if ($.fn.wl_Fileexplorer.methods[method]) { 17 return $.fn.wl_Fileexplorer.methods[method].apply(this, Array.prototype.slice.call(args, 1)); 18 } else if (typeof method === 'object' || !method) { 19 if ($this.data('wl_Fileexplorer')) { 20 var opts = $.extend({}, $this.data('wl_Fileexplorer'), method); 21 } else { 22 var opts = $.extend({}, $.fn.wl_Fileexplorer.defaults, method, $this.data()); 23 } 24 } else { 25 $.error('Method "' + method + '" does not exist'); 26 } 27 28 29 if (!$this.data('wl_Fileexplorer')) { 30 31 $this.data('wl_Fileexplorer', {}); 32 33 //simple: call the plugin! 34 //this has potential. maybe there are some options in future updates 35 $this.elfinder(opts); 36 37 } else { 38 39 } 40 41 if (opts) $.extend($this.data('wl_Fileexplorer'), opts); 42 }); 43 44}; 45 46$.fn.wl_Fileexplorer.defaults = { 47 url: 'elfinder/php/connector.php', 48 toolbar: [ 49 ['back', 'reload', 'open', 'select', 'quicklook', 'info', 'rename', 'copy', 'cut', 'paste', 'rm', 'mkdir', 'mkfile', 'upload', 'duplicate', 'edit', 'archive', 'extract', 'resize', 'icons', 'list', 'help'] 50 ] 51}; 52$.fn.wl_Fileexplorer.version = '1.0'; 53 54 55$.fn.wl_Fileexplorer.methods = { 56 set: function () { 57 var $this = $(this), 58 options = {}; 59 if (typeof arguments[0] === 'object') { 60 options = arguments[0]; 61 } else if (arguments[0] && arguments[1] !== undefined) { 62 options[arguments[0]] = arguments[1]; 63 } 64 $.each(options, function (key, value) { 65 if ($.fn.wl_Fileexplorer.defaults[key] !== undefined || $.fn.wl_Fileexplorer.defaults[key] == null) { 66 $this.data('wl_Fileexplorer')[key] = value; 67 } else { 68 $.error('Key "' + key + '" is not defined'); 69 } 70 }); 71 72 } 73};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.