diff --git a/www/code2/inner.js b/www/code2/inner.js index f59c6e8fa..aa2a50624 100644 --- a/www/code2/inner.js +++ b/www/code2/inner.js @@ -222,21 +222,19 @@ define([ ]; var onModeChanged = function (mode) { - // TODO - return; - var $codeMirror = $iframe.find('.CodeMirror'); + var $codeMirror = $('.CodeMirror'); window.clearTimeout(APP.previewTo); $codeMirror.addClass('transition'); APP.previewTo = window.setTimeout(function () { $codeMirror.removeClass('transition'); }, 500); - if (mediaTagModes.indexOf(mode) !== -1) { + /*if (mediaTagModes.indexOf(mode) !== -1) { APP.$mediaTagButton.show(); - } else { APP.$mediaTagButton.hide(); } + } else { APP.$mediaTagButton.hide(); }*/// TODO if (mode === "markdown") { APP.$previewButton.show(); - Cryptpad.getPadAttribute('previewMode', function (e, data) { + common.getPadAttribute('previewMode', function (e, data) { if (e) { return void console.error(e); } if (data !== false) { $previewContainer.show(); @@ -323,33 +321,11 @@ define([ var $forgetPad = common.createButton('forget', true, {}, forgetCb); $rightside.append($forgetPad); - // TODO - return; - - var fileDialogCfg = { - $body: $iframe.find('body'), - onSelect: function (href) { - var parsed = Cryptpad.parsePadUrl(href); - var hexFileName = Cryptpad.base64ToHex(parsed.hashData.channel); - var src = '/blob/' + hexFileName.slice(0,2) + '/' + hexFileName; - var mt = ''; - editor.replaceSelection(mt); - }, - data: APP - }; - APP.$mediaTagButton = $('