Sha256: d2e33423b9c78eb5f80798fb8a1deb7123632d72a29ef13290139a656ab76463
Contents?: true
Size: 1.14 KB
Versions: 87
Compression:
Stored size: 1.14 KB
Contents
(function() { if (this.RedactorPlugins == null) { this.RedactorPlugins = {}; } RedactorPlugins.scrivito_editors_image_manager = function() { var self; return self = { init: function() { return this.modal.addCallback('image', self.browse); }, browse: function() { var filterContext; filterContext = $.extend({ _image: true }, this.$element.data('scrivitoEditorsFilterContext')); return scrivito.content_browser.open({ filter: this.$element.data('scrivitoEditorsFilter'), filter_context: filterContext, selection_mode: 'single' }).done((function(_this) { return function(selection) { var id; id = selection[0]; if (id != null) { return self.insert(id); } }; })(this)).always((function(_this) { return function() { return _this.modal.close(); }; })(this)); }, insert: function(id) { return this.image.insert("<img src='" + (scrivito.path_for_id(id)) + "'>"); } }; }; }).call(this);
Version data entries
87 entries across 87 versions & 1 rubygems