if (!RedactorPlugins) var RedactorPlugins = {}; (function($) { RedactorPlugins.filemanager = function() { return { init: function() { if (!this.opts.fileManagerJson) return; this.modal.addCallback('file', this.filemanager.load); }, load: function() { var $modal = this.modal.getModal(); this.modal.createTabber($modal); this.modal.addTab(1, 'Upload', 'active'); this.modal.addTab(2, 'Choose'); $('#redactor-modal-file-upload-box').addClass('redactor-tab redactor-tab1'); var $box = $('
').hide(); $modal.append($box); $.ajax({ dataType: "json", cache: false, url: this.opts.fileManagerJson, success: $.proxy(function(data) { var ul = $('