{:uriI"file:///home/franco/Documents/mumuki/laboratory/app/assets/javascripts/application/codemirror-builder.js?type=application/javascript&pipeline=self&id=733be36b0dab7c3839fcad930cb94fca26f2334853f8591f79f6694573b0c059:ET:load_pathI"D/home/franco/Documents/mumuki/laboratory/app/assets/javascripts;T: filenameI"f/home/franco/Documents/mumuki/laboratory/app/assets/javascripts/application/codemirror-builder.js;T: nameI"#application/codemirror-builder;T:logical_pathI"+application/codemirror-builder.self.js;T:content_typeI"application/javascript;T: sourceI"var mumuki = mumuki || {}; (function (mumuki) { function CodeMirrorBuilder(textarea) { this.textarea = textarea; this.$textarea = $(textarea); } function submit() { $('body').removeClass('fullscreen'); $('.editor-resize .fa-stack-1x').removeClass('fa-compress').addClass('fa-expand'); $('.btn-submit').click(); } function submitMessage() { $('.discussion-new-message-button').click(); } var codeMirrorDefaults = { autofocus: false, tabSize: 2, cursorHeight: 1, matchBrackets: true, lineWiseCopyCut: true, autoCloseBrackets: true, showCursorWhenSelecting: true, lineWrapping: true }; CodeMirrorBuilder.prototype = { setupEditor: function () { this.editor = this.createEditor({ lineNumbers: true, extraKeys: { 'Ctrl-Space': 'autocomplete', 'Cmd-Enter': submit, 'Ctrl-Enter': submit, 'F11': function () { mumuki.editor.toggleFullscreen(); }, 'Tab': function (cm) { mumuki.editor.indentWithSpaces(cm) } } }); return this; }, setupSimpleEditor: function () { this.editor = this.createEditor({ mode: 'text', extraKeys: { 'Cmd-Enter': submitMessage, 'Ctrl-Enter': submitMessage, 'Tab': function (cm) { mumuki.editor.indentWithSpaces(cm) } } }); return this; }, setupLanguage: function (language) { var highlightMode = language || this.$textarea.data('editor-language'); if (highlightMode === 'dynamic') { mumuki.page.dynamicEditors.push(this.editor); } else { this.editor.setOption('mode', highlightMode); this.editor.refresh(); } return this; }, setupMinLines: function (minLines) { this.editor.setOption('minLines', minLines); return this; }, build: function () { return this.editor; }, createEditor: function (customOptions) { return CodeMirror.fromTextArea(this.textarea, Object.assign({}, codeMirrorDefaults, customOptions)); } }; mumuki.editor = mumuki.editor || {}; mumuki.editor.CodeMirrorBuilder = CodeMirrorBuilder; }(mumuki)); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"tfile-digest:///home/franco/Documents/mumuki/laboratory/app/assets/javascripts/application/codemirror-builder.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"% la{@6M%4x hgb0: lengthi:dependencies_digest"%ewJCQ'hpf6c. cm0$k:idI"E733be36b0dab7c3839fcad930cb94fca26f2334853f8591f79f6694573b0c059;F: mtimel+DK[