{I" class:ETI"ProcessedAsset;FI"logical_path;TI"storytime/media.js;FI" pathname;TI"b/Users/ben/Documents/benroesch.com/storytime/app/assets/javascripts/storytime/media.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+˝ĂSI" length;TibI" digest;TI"%599d34d16647c563f319d55d9c265754;FI" source;TI"b(function() { Storytime.Dashboard.Media = (function() { function Media() {} Media.prototype.initIndex = function() { this.initUpload(); return this.initPagination(); }; Media.prototype.initPagination = function() { return $(document).on('ajax:success', '#media_gallery .pagination a', function(e, data, status, xhr) { return $("#media_gallery").html(data); }); }; Media.prototype.initUpload = function() { var _ref; if (!this.uploadInitialized) { $('#media_file').fileupload({ dataType: 'json', done: function(e, data) { return $("#media_gallery").prepend(data.result.html); }, progressall: function(e, data) { var progress; progress = parseInt(data.loaded / data.total * 100, 10); return $('#progress .progress-bar').css('width', progress + '%'); } }).prop('disabled', !$.support.fileInput).parent().addClass((_ref = $.support.fileInput) != null ? _ref : { undefined: 'disabled' }); return this.uploadInitialized = true; } }; Media.prototype.initInsert = function() { return $(document).on("click", ".insert-image-button", function(e) { var wysihtml5Editor; e.preventDefault(); wysihtml5Editor = $("textarea.wysiwyg").data("wysihtml5").editor; wysihtml5Editor.composer.commands.exec("insertImage", { src: $(this).data("image-url") }); return $("#insertMediaModal").modal("hide"); }); }; return Media; })(); }).call(this); ;TI"dependency_digest;TI"%2b64d7560c2ff2932eb8bda0ad8c07a0;FI"required_paths;T[I"b/Users/ben/Documents/benroesch.com/storytime/app/assets/javascripts/storytime/media.js.coffee;FI"dependency_paths;T[{I" path;TI"b/Users/ben/Documents/benroesch.com/storytime/app/assets/javascripts/storytime/media.js.coffee;FI" mtime;TI"2014-07-13T18:43:57-05:00;TI" digest;TI"%94abfa645dd25ce0564bded2aac07247;FI" _version;TI"%361c512b9086418778df946c0d278f91;F