spec/dummy/tmp/cache/assets/test/sprockets/d90e66c7591740ad8c0093969f79a9f2 in storytime-0.0.4 vs spec/dummy/tmp/cache/assets/test/sprockets/d90e66c7591740ad8c0093969f79a9f2 in storytime-1.0.0
- old
+ new
@@ -1,82 +1,80 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"storytime/media.js; FI"
pathname; TI"[/Users/ben/flyover/projects/storytime/app/assets/javascripts/storytime/media.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+áÂ×SI"length; Ti
-I"digest; TI"%0b89bfd9333447f13824480d97e36fb8; FI"source; TI"
-(function() {
+mtime; Tl+˜ .TI"length; Tiã I"digest; TI"%734aba45537766563cc116351a079b6c; FI"source; TI"ã (function() {
Storytime.Dashboard.Media = (function() {
function Media() {}
Media.prototype.initIndex = function() {
this.initUpload();
- return this.initPagination();
+ 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);
+ $(document).on('ajax:success', '#media_gallery .pagination a', function(e, data, status, xhr) {
+ $("#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);
+ $("#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 + '%');
+ $('#progress .progress-bar').css('width', progress + '%');
}
}).prop('disabled', !$.support.fileInput).parent().addClass((_ref = $.support.fileInput) != null ? _ref : {
undefined: 'disabled'
});
- return this.uploadInitialized = true;
+ this.uploadInitialized = true;
+ return;
}
};
Media.prototype.initInsert = function() {
var self;
self = this;
- return $(document).on("click", ".insert-image-button", function(e) {
- var wysihtml5Editor;
+ $(document).on("click", ".insert-image-button", function(e) {
+ var image_tag, node;
e.preventDefault();
if (self.selectingFeatured) {
$("#featured_media_id").val($(this).data("media-id"));
if ($("#featured_media_image").length > 0) {
$("#featured_media_image").attr("src", $(this).data("thumb-url"));
} else {
$("#featured_media_container").html("<img id='featured_media_image' src='" + ($(this).data("thumb-url")) + "' />");
}
- return $("#insertMediaModal").modal("hide");
+ $("#insertMediaModal").modal("hide");
} else {
- wysihtml5Editor = $("textarea.wysiwyg").data("wysihtml5").editor;
- wysihtml5Editor.composer.commands.exec("insertImage", {
- src: $(this).data("image-url")
- });
- return $("#insertMediaModal").modal("hide");
+ image_tag = "<img src='" + ($(this).data("image-url")) + "' />";
+ node = $(".summernote").data("range").createContextualFragment(image_tag);
+ $(".summernote").data("range").insertNode(node);
+ $(".note-image-dialog").modal("hide");
}
});
};
Media.prototype.initFeaturedImageSelector = function() {
var self;
self = this;
$(document).on("click", "#featured_media_button", function(e) {
e.preventDefault();
self.selectingFeatured = true;
- return $("#insertMediaModal").modal("show");
+ $("#insertMediaModal").modal("show");
});
- return $(document).on('hidden.bs.modal', function() {
- return self.selectingFeatured = false;
+ $(document).on('hidden.bs.modal', function() {
+ self.selectingFeatured = false;
});
};
return Media;
})();
}).call(this);
-; TI"required_assets_digest; TI"%6fa554d0092d31bc1af3d2325b0b0e63; FI"
_version; TI"%2b66aa67c90052d553e0328c249bc9b0; F
+; TI"required_assets_digest; TI"%5e05efb560b7f38a233ae2823ed22d2b; FI"
_version; TI"%64b22cf9f770209c1e0beb31754a8cbc; F
\ No newline at end of file