Moved everything into new files. Made editor.js.erb really small.

This commit is contained in:
Alexander Kastius
2016-08-11 23:24:38 +02:00
parent 63f62a8efc
commit 842a38c13a
8 changed files with 1274 additions and 1291 deletions

View File

@@ -0,0 +1,16 @@
CodeOceanEditorAJAX = {
ajax: function(options) {
return $.ajax(_.extend({
dataType: 'json',
method: 'POST',
}, options));
},
ajaxError: function(response) {
var message = ((response || {}).responseJSON || {}).message || '';
$.flash.danger({
text: message.length > 0 ? message : $('#flash').data('message-failure')
});
}
};