[#234] disable submit buttons

This commit is contained in:
Alexander Machehin 2013-07-25 02:29:28 +06:00
parent 394da8ae59
commit 021d2a03a9
36 changed files with 38 additions and 38 deletions

View File

@ -15,7 +15,7 @@
.both
.button_block
= submit_tag t("layout.save")
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
%span.text_button_padding= t("layout.or")
= link_to t("layout.cancel"), admin_flash_notifies_path, :class => "button"

View File

@ -9,7 +9,7 @@
.rightlist= f.text_field :uname
.leftlist
\ 
.rightlist= submit_tag t("layout.save"), :data => {:"disable-with" => t("layout.saving")}
.rightlist= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
.both
-else
= render "users/base/form", :f => f

View File

@ -8,8 +8,8 @@
-# TODO: change filter to Backbone.js
%th{:colspan => 3, :rowspan => 1}
= form_tag advisories_path, :method => :get do |f|
= text_field_tag('q', params[:q], :placeholder => t("layout.advisories.search_by_id"), :class => params[:q].present? ? 'black' : 'gray')
%input{:type => 'submit', :value => t("layout.search.header")}
= text_field_tag('q', params[:q], :placeholder => t('layout.advisories.search_by_id'), :class => params[:q].present? ? 'black' : 'gray', :style => 'width:600px;')
= submit_tag t('layout.search.header'), :data => {'disable-with' => t('layout.processing')}
=# link_to t('layout.back'), advisories_path, :class => 'button'
= button_to t('layout.clear'), {:action => :index} , :method => :get

View File

@ -34,7 +34,7 @@
:class => @form.errors.messages[:message].present? ? 'error' : ''
.form-actions
= f.submit t("layout.contact.send_request"), :class => 'button'
= f.submit t('layout.contact.send_request'), :class => 'button', :data => {'disable-with' => t('layout.processing')}
%section.last
%div

View File

@ -30,7 +30,7 @@
.lineForm= select_tag 'role', options_for_collaborators_roles_select
.both
%br
= submit_tag t("layout.add"), :class => 'button'
= submit_tag t('layout.add'), :class => 'button', :data => {'disable-with' => t('layout.processing')}
.hr.bottom
.both

View File

@ -12,5 +12,5 @@
%br
.leftlist
\ 
.rightlist= submit_tag t("layout.save")
.rightlist= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
.both

View File

@ -2,7 +2,7 @@
= form_for @platform, :url => platform_content_path(@platform, @path), :html => { :class => :form, :remote => true, :method => :get } do |f|
= tracker_search_field(:term, @term.present? ? @term : t('layout.platforms.search_contents'))
= f.submit t('layout.search.header')
= f.submit t('layout.search.header'), :data => {'disable-with' => t('layout.processing')}
%br
.path= build_content_paths(@platform, @path)

View File

@ -12,4 +12,4 @@
.both
.button_block
= submit_tag t("layout.save")
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}

View File

@ -12,6 +12,7 @@
= form_tag platform_maintainers_path(@platform), :method => :get do |f|
= text_field_tag('q', params[:q], :placeholder => t("layout.maintainers.search_by_package"), :class => params[:q].present? ? 'black' : 'gray')
%input{:type => 'submit', :value => t("layout.search.header")}
= submit_tag t('layout.search.header'), :data => {'disable-with' => t('layout.processing')}
= button_to t('layout.clear'), {:action => :index} , :method => :get
%tbody

View File

@ -13,7 +13,7 @@
%h3=t('layout.mass_builds.projects_list')
= f.text_area :projects_list
%br
= f.submit t("layout.projects.build_button")
= f.submit t('layout.projects.build_button'), :data => {'disable-with' => t('layout.processing')}
%section.right
%h3= t("activerecord.attributes.build_list.arch")
- Arch.recent.each do |arch|

View File

@ -27,7 +27,7 @@
.both
.button_block
= submit_tag t("layout.save")
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
-#%input.button{:type => "submit", :class => "button"}
-#= image_tag("choose.png", :alt => t("layout.save"))
-#= t("layout.clone")

View File

@ -12,6 +12,6 @@
.both
.button_block
= submit_tag t("layout.clone")
= submit_tag t('layout.clon'), :data => {'disable-with' => t('layout.processing')}
%span.text_button_padding= t("layout.or")
= link_to t("layout.cancel"), platform_path(@platform), :class => "button"

View File

@ -11,4 +11,4 @@
= text_field_tag :product_id, params[:product_id]
%br
%br
= submit_tag t("layout.search.header")
= submit_tag t('layout.search.header'), :data => {'disable-with' => t('layout.processing')}

View File

@ -14,7 +14,7 @@
= render 'platforms/products/def_fields', :f => f
= f.submit t("layout.projects.build_button")
= f.submit t('layout.projects.build_button'), :data => {'disable-with' => t('layout.processing')}
%br
%div

View File

@ -41,7 +41,7 @@
= f.select :not_delete, [false, true].collect{|status| [t("layout.#{status}_"), status]}, {:selected => pbl.not_delete}
.both
%br
= submit_tag t('layout.update')
= submit_tag t('layout.update'), :data => {'disable-with' => t('layout.processing')}
.both
- unless pbl.not_delete
.flash_notify

View File

@ -21,7 +21,7 @@
.both
.button_block
= submit_tag t("layout.save")
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
%span.text_button_padding= t("layout.or")
= link_to t("layout.cancel"), @product.new_record? ? platform_path(@platform) : platform_product_path(@platform, @product), :class => "button"

View File

@ -12,6 +12,6 @@
.hr
.button_block
= submit_tag t("layout.save")
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
%span.text_button_padding= t("layout.or")
= link_to t("layout.cancel"), @repository.new_record? ? platform_repositories_path(@platform) : platform_repository_path(@platform, @repository), :class => "button"

View File

@ -11,6 +11,6 @@
.both
.hr
.button_block
= submit_tag t('layout.save')
= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
%span.text_button_padding= t('layout.or')
= link_to t('layout.cancel'), platform_tokens_path(@platform), :class => 'button'

View File

@ -56,7 +56,7 @@
%br/
%br/
.butgrp
= f.submit t('layout.search.header')
= f.submit t('layout.search.header'), :data => {'disable-with' => t('layout.processing')}
= f.submit t('reset'), :id => 'filter_clear'
-if @project and can?(:create, @project.build_lists.build)
%input{:id => 'filter_new_build', :type => 'button', :onclick => "location.href='#{new_project_build_list_path(@project)}'", :value => t('layout.build_lists.new_header')}

View File

@ -40,7 +40,7 @@
= f.check_box kind
= f.label kind
%br
= f.submit t("layout.projects.build_button")
= f.submit t('layout.projects.build_button'), :data => {'disable-with' => t('layout.processing')}
.both
%br
= render 'projects/base/submenu'

View File

@ -1,2 +1,2 @@
=render 'projects/comments/body', :f => f, :id => id
.comment-right= submit_tag t("layout.save")
.comment-right= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}

View File

@ -13,7 +13,7 @@
%br
%br
= submit_tag t("layout.save"), :title => t("layout.save")
= submit_tag t('layout.save'), :title => t('layout.save'), :data => {'disable-with' => t('layout.saving')}
= t("layout.or")
= link_to t("layout.cancel"), blob_path(@project, @treeish, @path), :class => 'button'

View File

@ -7,7 +7,7 @@
= form_for @hook, :url => project_hook_path(@project, @hook), :method => :put, :html => { :class => :form } do |f|
= render 'form'
.actions
= f.submit t('layout.update')
= f.submit t('layout.update'), :data => {'disable-with' => t('layout.processing')}
%br
= render "projects/hooks/docs/#{@hook.name}"

View File

@ -7,7 +7,7 @@
= form_for @hook, :url => project_hooks_path(@project), :method => :post, :html => { :class => :form } do |f|
= render 'form'
.actions
= f.submit t('layout.create')
= f.submit t('layout.create'), :data => {'disable-with' => t('layout.processing')}
%br
= render "projects/hooks/docs/#{@hook.name}"

View File

@ -11,5 +11,5 @@
.both
.leftlist
.rightlist
%input{:type => "submit", :value => t(@issue.new_record? ? 'layout.create' : 'layout.update')}
= submit_tag t(@issue.new_record? ? 'layout.create' : 'layout.update'), :data => {'disable-with' => t('layout.processing')}
.both

View File

@ -71,7 +71,7 @@
.both
.leftlist
\ 
.rightlist= submit_tag t("layout.save"), :class => 'button'
.rightlist= submit_tag t('layout.save'), :class => 'button', :data => {'disable-with' => t('layout.saving')}
.both
:javascript
$(function() {

View File

@ -17,7 +17,7 @@
%br
%span{:style => "font-size: 11px;"}= t("layout.projects.has_wiki_description")
.both
.padd25= submit_tag t("layout.save"), :class => 'button'
.padd25= submit_tag t('layout.save'), :class => 'button', :data => {'disable-with' => t('layout.saving')}
.both
:javascript

View File

@ -21,7 +21,7 @@
=render 'ref_select', :kind => 'to', :project => @pull.to_project, :current => @pull.to_ref
.both
.leftlist.big-list
.rightlist=f.submit t('.update'), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :style => @pull.already? ? '' : 'display: none;', :id => 'update_pull'
.rightlist=f.submit t('.update'), :class => 'btn btn-primary', :style => @pull.already? ? '' : 'display: none;', :id => 'update_pull', :data => {'disable-with' => t('layout.processing')}
.both
-unless @pull.already?
=f.fields_for :issue do |issue|
@ -39,7 +39,7 @@
.both
.leftlist.big-list
.rightlist
=f.submit t('.submit'), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :id => 'create_pull' unless @pull.already?
=f.submit t('.submit'), :class => 'btn btn-primary', :id => 'create_pull', :data => {'disable-with' => t('layout.processing')} unless @pull.already?
.both
=render 'diff_commits_tabs' if !@pull.already? && @stats != nil

View File

@ -33,7 +33,7 @@
%span.jaws
%br
= submit_tag t("wiki.save_button"), :id => "gollum-editor-submit", :title => t("wiki.save_changes")
= submit_tag t('wiki.save_button'), :id => 'gollum-editor-submit', :title => t('wiki.save_changes'), :data => {'disable-with' => t('layout.saving')}
= link_to t("wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview", :class => "minibutton", :title => t("wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
/ - content_for :javascripts do

View File

@ -1,5 +1,5 @@
= form_tag search_index_path, :method => 'get' do
.leftside= text_field_tag 'query', @query, :placeholder => t("layout.search.header"), :class => 'exsearch'
.lineForm.leftside.rmargin10= select_tag 'type', options_for_select(t('layout.search.types').invert, @type), :class => 'sel80 cusel', :id => 'selSearch'
.leftside= submit_tag t("layout.search.header"), :class => 'button width100'
.leftside= submit_tag t('layout.search.header'), :class => 'button width100', :data => {'disable-with' => t('layout.processing')}
.both

View File

@ -26,7 +26,7 @@
= link_to "#{remove_member_path}?member_id=#{user.id}", :method => :delete, :confirm => t("layout.confirm") do
%span.delete  
- if can? :remove_memvers, editable_object
= submit_tag t("layout.delete"), :class => 'button'
= submit_tag t("layout.delete"), :class => 'button', :data => {'disable-with' => t('layout.processing')}
.both
- if can? :add_member, editable_object
@ -35,5 +35,5 @@
.admin-search
= autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_autocompletes_path, :id_element => '#member_id_field'
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
= submit_tag t("layout.add"), :class => 'button'
= submit_tag t('layout.add'), :class => 'button', :data => {'disable-with' => t('layout.processing')}
.both

View File

@ -34,5 +34,5 @@
.both
.leftlist
\ 
.rightlist= submit_tag t("layout.save"), :data => {:"disable-with" => t("layout.saving")}
.rightlist= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
.both

View File

@ -21,7 +21,7 @@
%br
.leftside.w25
\ 
.leftside.w420= submit_tag t("layout.save")
.leftside.w420= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
.both
:javascript

View File

@ -13,7 +13,7 @@
.both
.leftlist
\ 
.rightlist= submit_tag t('layout.save')
.rightlist= submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')}
.both
:javascript

View File

@ -21,6 +21,6 @@
.leftlist= f.label :key, t('activerecord.attributes.ssh_key.key')
.rightlist= f.text_area :key
%br
= f.submit t('layout.add')#, :class => 'button'
= f.submit t('layout.add'), :data => {'disable-with' => t('layout.processing')}
- content_for :sidebar, render('sidebar')

View File

@ -177,7 +177,6 @@ ru:
models:
private_user: Приватный пользователь
product_build_list: Сборочный лист продукта
auto_build_list: Автоматическая пересборка пакетов
attributes:
settings: