{I" class:ETI"ProcessedAsset;FI"logical_path;TI"chaskiq/chaskiq.js;FI" pathname;TI"V/Users/michelson/Documents/ruby/chaskiq/app/assets/javascripts/chaskiq/chaskiq.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+XâÊUI" length;Ti®I" digest;TI"%1c34069d2a6162d199c30858c81f6313;FI" source;TI"®window.Chaskiq = { Helpers: {} } // Custom scripts $(document).ready(function () { // Close ibox function $('.close-link').click( function() { var content = $(this).closest('div.ibox'); content.remove(); }); $("[data-toggle=popover]") .popover(); $('.input-group.date').datepicker({ todayBtn: "linked", keyboardNavigation: false, }); $("[data-modal]").on("click", function(){ console.log($(this).attr("data-modal")) html = $($(this).attr("data-modal")).html(); Chaskiq.Helpers.showModal(html, "Upload"); return false }) $('.input-field select').select2(); }); var sendFile; sendFile = function(file, callback) { var data; data = new FormData(); data.append("image", file); return $.ajax({ url: $('.summernote').data('upload-path'), data: data, cache: false, contentType: false, processData: false, type: 'POST', success: function(data) { return callback(data); } }); }; window.InitSummernote = function(){ $('.summernote').summernote({ toolbar: [ ['style', ['color', 'bold', 'italic', 'underline', 'fontsize']], ['font', ['strikethrough']], ['insert', ['picture', 'link']], ['fontsize', ['fontsize']], ['para', ['FormatH2', 'H3', 'ul', 'ol', 'paragraph']], ] , onImageUpload: function(files, editor, $editable) { sendFile(files[0], function(data){ url = data.image.url console.log($editable) console.log(url) editor.insertImage($editable, url) }) //console.log('image upload:', files, editor, $editable); } }); } ; ;TI"dependency_digest;TI"%152a84ffcd846c963b06b7222c0bd7bb;FI"required_paths;T[I"V/Users/michelson/Documents/ruby/chaskiq/app/assets/javascripts/chaskiq/chaskiq.js;FI"dependency_paths;T[{I" path;TI"V/Users/michelson/Documents/ruby/chaskiq/app/assets/javascripts/chaskiq/chaskiq.js;FI" mtime;TI"2015-08-12T03:06:16-03:00;TI" digest;TI"%c2ea03e4651ef0d9acb1e085d6f5e1bf;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F