Skip to content

Commit

Permalink
Merge branch 'revert-9d302b8d' into 'master'
Browse files Browse the repository at this point in the history
Revert "Merge branch '18297-i-would-like-text-to-wrap-when-in-edit-mode-on-web-app' into 'master'"

## What does this MR do?

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !6583
  • Loading branch information
Jacob Schatz committed Sep 29, 2016
2 parents 2cae81f + d754b2c commit a2c528f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 117 deletions.
1 change: 0 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ v 8.13.0 (unreleased)
- Revoke button in Applications Settings underlines on hover.
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
- Add organization field to user profile
- Added soft wrap option to editor
- Optimize GitHub importing for speed and memory

v 8.12.2 (unreleased)
Expand Down
15 changes: 0 additions & 15 deletions app/assets/javascripts/blob_edit/edit_blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
// submitted textarea
})(this));
this.initModePanesAndLinks();
this.initSoftWrap();
new BlobLicenseSelectors({
editor: this.editor
});
Expand Down Expand Up @@ -51,31 +50,17 @@
this.$editModePanes.hide();
currentPane.fadeIn(200);
if (paneId === "#preview") {
this.$toggleButton.hide();
return $.post(currentLink.data("preview-url"), {
content: this.editor.getValue()
}, function(response) {
currentPane.empty().append(response);
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;

})();
Expand Down
21 changes: 0 additions & 21 deletions app/assets/stylesheets/pages/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
}

.encoding-selector,
.soft-wrap-toggle,
.license-selector,
.gitignore-selector,
.gitlab-ci-yml-selector {
Expand All @@ -68,26 +67,6 @@
font-family: $regular_font;
}

.soft-wrap-toggle {
margin: 0 $btn-side-margin;

.soft-wrap {
display: block;
}
.no-wrap {
display: none;
}

&.soft-wrap-active {
.soft-wrap {
display: none;
}
.no-wrap {
display: block;
}
}
}

.gitignore-selector, .license-selector, .gitlab-ci-yml-selector {
.dropdown {
line-height: 21px;
Expand Down
7 changes: 0 additions & 7 deletions app/views/projects/blob/_editor.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
= dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { data: gitignore_names } } )
.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.hidden
= dropdown_tag("Choose a GitLab CI Yaml template", options: { toggle_class: 'js-gitlab-ci-yml-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls } } )
= button_tag class: 'soft-wrap-toggle btn', type: 'button' do
%span.no-wrap
= custom_icon('icon_no_wrap')
No wrap
%span.soft-wrap
= custom_icon('icon_soft_wrap')
Soft wrap
.encoding-selector
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'

Expand Down
3 changes: 0 additions & 3 deletions app/views/shared/icons/_icon_no_wrap.svg

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/shared/icons/_icon_soft_wrap.svg

This file was deleted.

67 changes: 0 additions & 67 deletions spec/features/projects/files/edit_file_soft_wrap_spec.rb

This file was deleted.

0 comments on commit a2c528f

Please sign in to comment.