{I" class:ETI"BundledAsset;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+ú¼ÈUI" length;Ti I" digest;TI"%2f4cb4382a5020e10b1ded0c93b3ebda;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 CSV"); 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', ['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"required_assets_digest;TI"%856fc452a6b6de5ee6716ad316aa853a;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F