diff options
author | Jared Deckard <jared.deckard@gmail.com> | 2016-07-26 22:32:10 -0500 |
---|---|---|
committer | Jared Deckard <jared.deckard@gmail.com> | 2016-09-08 12:23:12 -0500 |
commit | 7f6474b269a5cfa454d28c0c0da969490c9eb33e (patch) | |
tree | aafe7df9bc2683712a466595a046adb57e222565 /app/assets/javascripts/blob | |
parent | 4c833a1d4ead49c27f6a81e607d10a5c6f0fcc2b (diff) | |
download | gitlab-ce-7f6474b269a5cfa454d28c0c0da969490c9eb33e.tar.gz |
Restore comments lost when converting CoffeeScript to JavaScript
Diffstat (limited to 'app/assets/javascripts/blob')
-rw-r--r-- | app/assets/javascripts/blob/blob_file_dropzone.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/blob/template_selector.js | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/blob/blob_file_dropzone.js b/app/assets/javascripts/blob/blob_file_dropzone.js index f4044f22db2..8cca1aa9232 100644 --- a/app/assets/javascripts/blob/blob_file_dropzone.js +++ b/app/assets/javascripts/blob/blob_file_dropzone.js @@ -8,6 +8,8 @@ autoDiscover: false, autoProcessQueue: false, url: form.attr('action'), + // Rails uses a hidden input field for PUT + // http://stackoverflow.com/questions/21056482/how-to-set-method-put-in-form-tag-in-rails method: method, clickable: true, uploadMultiple: false, @@ -36,6 +38,7 @@ formData.append('commit_message', form.find('.js-commit-message').val()); }); }, + // Override behavior of adding error underneath preview error: function(file, errorMessage) { var stripped; stripped = $("<div/>").html(errorMessage).text(); diff --git a/app/assets/javascripts/blob/template_selector.js b/app/assets/javascripts/blob/template_selector.js index b0a37ef0e0a..b18b6962382 100644 --- a/app/assets/javascripts/blob/template_selector.js +++ b/app/assets/javascripts/blob/template_selector.js @@ -66,6 +66,9 @@ // be added by all subclasses. }; + // To be implemented on the extending class + // e.g. + // Api.gitignoreText item.name, @requestFileSuccess.bind(@) TemplateSelector.prototype.requestFileSuccess = function(file, skipFocus) { this.editor.setValue(file.content, 1); if (!skipFocus) this.editor.focus(); |