b1b51b774b
Moved most of the functions that contained "window.doSomething" that were located at: - app/assets/javascripts/application.js To the following file: - app/assets/javascripts/lib/utils/common_utils.js The functions listed here: - window.ajaxGet - window.split - window.extractLast - window.rstrip - window.disableButtonIfEmptyField - window.disableButtonIfAnyEmptyField - window.sanitize - window.unbindEvents - window.shiftWindow Now will be accessible from the "gl.utils" namespace
31 lines
1.3 KiB
Text
31 lines
1.3 KiB
Text
#modal-upload-blob.modal
|
||
.modal-dialog
|
||
.modal-content
|
||
.modal-header
|
||
%a.close{href: "#", "data-dismiss" => "modal"} ×
|
||
%h3.page-title #{title}
|
||
.modal-body
|
||
= form_tag form_path, method: method, class: 'js-quick-submit js-upload-blob-form form-horizontal' do
|
||
.dropzone
|
||
.dropzone-previews.blob-upload-dropzone-previews
|
||
%p.dz-message.light
|
||
Attach a file by drag & drop or
|
||
= link_to 'click to upload', '#', class: "markdown-selector"
|
||
%br
|
||
.dropzone-alerts{class: "alert alert-danger data", style: "display:none"}
|
||
|
||
= render 'shared/new_commit_form', placeholder: placeholder
|
||
|
||
.form-actions
|
||
= button_tag button_title, class: 'btn btn-small btn-create btn-upload-file', id: 'submit-all'
|
||
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
|
||
|
||
- unless can?(current_user, :push_code, @project)
|
||
.inline.prepend-left-10
|
||
= commit_in_fork_help
|
||
|
||
|
||
:javascript
|
||
gl.utils.disableButtonIfEmptyField($('.js-upload-blob-form').find('.js-commit-message'), '.btn-upload-file');
|
||
new BlobFileDropzone($('.js-upload-blob-form'), '#{method}');
|
||
new NewCommitForm($('.js-upload-blob-form'))
|