From d754b2ce763818c397eef852fd5641f8ba8f1c13 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Thu, 29 Sep 2016 00:56:30 +0000 Subject: Revert "Merge branch '18297-i-would-like-text-to-wrap-when-in-edit-mode-on-web-app' into 'master'" This reverts merge request !6188 --- app/assets/javascripts/blob_edit/edit_blob.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'app/assets/javascripts/blob_edit/edit_blob.js') diff --git a/app/assets/javascripts/blob_edit/edit_blob.js b/app/assets/javascripts/blob_edit/edit_blob.js index de6cdd851be..b846bab0424 100644 --- a/app/assets/javascripts/blob_edit/edit_blob.js +++ b/app/assets/javascripts/blob_edit/edit_blob.js @@ -22,7 +22,6 @@ // submitted textarea })(this)); this.initModePanesAndLinks(); - this.initSoftWrap(); new BlobLicenseSelectors({ editor: this.editor }); @@ -51,7 +50,6 @@ this.$editModePanes.hide(); currentPane.fadeIn(200); if (paneId === "#preview") { - this.$toggleButton.hide(); return $.post(currentLink.data("preview-url"), { content: this.editor.getValue() }, function(response) { @@ -59,23 +57,10 @@ return currentPane.syntaxHighlight(); }); } else { - this.$toggleButton.show(); return this.editor.focus(); } }; - EditBlob.prototype.initSoftWrap = function() { - this.isSoftWrapped = false; - this.$toggleButton = $('.soft-wrap-toggle'); - this.$toggleButton.on('click', this.toggleSoftWrap.bind(this)); - }; - - EditBlob.prototype.toggleSoftWrap = function(e) { - this.isSoftWrapped = !this.isSoftWrapped; - this.$toggleButton.toggleClass('soft-wrap-active', this.isSoftWrapped); - this.editor.getSession().setUseWrapMode(this.isSoftWrapped); - }; - return EditBlob; })(); -- cgit v1.2.1