From c9dca746b54f034356ed061cd9c9569c9c925f79 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Jul 2013 00:48:44 +0600 Subject: [PATCH 1/5] remove old file --- app/views/pages/root.html.haml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 app/views/pages/root.html.haml diff --git a/app/views/pages/root.html.haml b/app/views/pages/root.html.haml deleted file mode 100644 index 0817ea065..000000000 --- a/app/views/pages/root.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -.root - = form_tag search_index_path, :method => 'get' do - = text_field_tag 'query', params[:query], :placeholder => t("layout.search.header"), :class => 'exsearch' - = submit_tag t("layout.search.header") From 5aa8ca111bb9bcd68c80e0afa1b37337da318b87 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Jul 2013 01:38:33 +0600 Subject: [PATCH 2/5] remove old files --- .../projects/collaborators/add.html.haml | 53 ----------- .../projects/collaborators/edit.html.haml | 93 ------------------- 2 files changed, 146 deletions(-) delete mode 100644 app/views/projects/collaborators/add.html.haml delete mode 100644 app/views/projects/collaborators/edit.html.haml diff --git a/app/views/projects/collaborators/add.html.haml b/app/views/projects/collaborators/add.html.haml deleted file mode 100644 index 028862297..000000000 --- a/app/views/projects/collaborators/add.html.haml +++ /dev/null @@ -1,53 +0,0 @@ -.block - .secondary-navigation - %ul.wat-cf - %li.first= link_to t("layout.collaborators.list"), project_collaborators_path(@project) - %li.active= link_to t("layout.collaborators.add"), add_project_collaborators_path(@project) - .content - .inner - = form_tag do - %h2.title= t("layout.users.list_header") - %table.table - %tr - %th.first ID - %th= t("activerecord.attributes.user.name") - %th= t("activerecord.attributes.user.email") - %th= t("activerecord.attributes.user.uname") - %th.last= t("layout.collaborators.add") - - @users.each do |user| - %tr{:class => cycle("odd", "even")} - %td - = user.id - %td - = link_to user.name, user_path(user) - %td - = user.email - %td - = user.uname - %td.last - = check_box_tag "user[#{user.id}]", '1', (@project.collaborators.include? user) ? :checked : nil - = label_tag "user[#{user.id}]", t("layout.collaborators.add") - %h2.title= t("layout.groups.list_header") - %table.table - %tr - %th.first ID - %th= t("activerecord.attributes.group.name") - %th= t("activerecord.attributes.group.uname") - %th.last= t("layout.collaborators.add") - - @groups.each do |group| - %tr{:class => cycle("odd", "even")} - %td - = group.id - %td - = link_to group.name, group_path(group) - %td - = group.uname - %td.last - = check_box_tag "group[#{group.id}]", '1', (@project.groups.include? group) ? :checked : nil - = label_tag "group[#{group.id}]", t("layout.collaborators.add") - .group.navform.wat-cf - %button.button{:type => "submit"} - = image_tag("choose.png", :alt => t("layout.save")) - = t("layout.save") - %span.text_button_padding= t("layout.or") - = link_to t("layout.cancel"), project_collaborators_path(@project), :class => "text_button_padding link_button" diff --git a/app/views/projects/collaborators/edit.html.haml b/app/views/projects/collaborators/edit.html.haml deleted file mode 100644 index 0474cec64..000000000 --- a/app/views/projects/collaborators/edit.html.haml +++ /dev/null @@ -1,93 +0,0 @@ --set_meta_tags :title => [title_object(@project), t('layout.projects.members')] -= render 'sidebar' -= render 'submenu' - -%a{:name => 'users'} -%h3= t("layout.users.list_header") - -= form_tag add_project_collaborators_path(@project) do - .admin-search - = autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_autocompletes_path, :id_element => '#member_id_field' - .admin-role - .lineForm - = select_tag 'role', options_for_collaborators_roles_select - = hidden_field_tag 'member_id', nil, :id => 'member_id_field' - = submit_tag t("layout.add"), :class => 'button' - .both - -= form_tag project_collaborators_path(@project), :id => 'members_form', :delete_url => remove_project_collaborators_path(@project) do - = hidden_field_tag "_method", "post" - %table.tablesorter{:cellpadding => "0", :cellspacing => "0"} - %thead - %tr - %th - \  - %th - = t("layout.collaborators.members") - %th{:colspan => "3"} - = t("layout.collaborators.roles") - %tbody - - @users.each_with_index do |user, num| - %tr{:id => "admin-table-members-row#{num}"} - %td - %span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "} - = check_box_tag "user_remove[#{user.id}][]" - %td - .img - = image_tag avatar_url(user) - .forimg= link_to user.fullname, user_path(user) - - Relation::ROLES.each_with_index do |role, i| - %td - .radio - = radio_button_tag "user[#{user.id}]", role, ((@project.relations.exists? :actor_id => user.id, :actor_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio' - .forradio= t("layout.collaborators.role_names.#{ role }") - = link_to_function t("layout.delete_selected"), "deleteAdminMember();", :class => 'button' - = link_to_function t("layout.save"), "saveAdminMember();", :class => 'button right_floated' - .both -%br - -.hr.bottom -.both - -%a{:name => 'groups'} -%h3= t("layout.groups.list_header") - -= form_tag add_project_collaborators_path(@project) do - .admin-search - = autocomplete_field_tag 'group_id', params[:group_id], autocomplete_group_uname_autocompletes_path, :id_element => '#group_id_field' - .admin-role - .lineForm - = select_tag 'role', options_for_collaborators_roles_select, :id => 'group_role' - = hidden_field_tag 'group_id', nil, :id => 'group_id_field' - = submit_tag t("layout.add"), :class => 'button' - .both - -= form_tag project_collaborators_path(@project), :id => 'groups_form', :delete_url => remove_project_collaborators_path(@project) do - = hidden_field_tag "_method", "post", :id => 'groups_method' - %table.tablesorter{:cellpadding => "0", :cellspacing => "0"} - %thead - %tr - %th - \  - %th - = t("layout.collaborators.members") - %th{:colspan => "3"} - = t("layout.collaborators.roles") - %tbody - - @groups.each_with_index do |group, num| - %tr{:id => "admin-table-members-row#{num + @users.size + 1}"} - %td - %span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "} - = check_box_tag "group_remove[#{group.id}][]" - %td - .forimg= link_to "#{group.uname}", group_path(group) - - Relation::ROLES.each_with_index do |role, i| - %td - .radio - = radio_button_tag "group[#{group.id}]", role, ((@project.relations.exists? :actor_id => group.id, :actor_type => 'Group', :role => role) ? :checked : nil), :class => 'niceRadio' - .forradio= t("layout.collaborators.role_names.#{ role }") - = link_to_function t("layout.delete_selected"), "deleteAdminGroup();", :class => 'button' - = link_to_function t("layout.save"), "saveAdminGroup();", :class => 'button right_floated' - .both -.both - From 394da8ae5929d28fe3fc665e4b442b012139fd43 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Jul 2013 02:14:03 +0600 Subject: [PATCH 3/5] remove old file --- app/views/shared/_search_form.html.haml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 app/views/shared/_search_form.html.haml diff --git a/app/views/shared/_search_form.html.haml b/app/views/shared/_search_form.html.haml deleted file mode 100644 index 656cc717b..000000000 --- a/app/views/shared/_search_form.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -= form_tag '#', :method => :get do#platform_repository_path(@platform, @repository), :method => :get do - .group - = label_tag :query, t("layout.search_by_name"), :class => :label - = text_field_tag :query - %button.search{:type => "submit"}= t("layout.search.header") \ No newline at end of file From 021d2a03a979f7ba35926271c6d391cf41806b57 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Jul 2013 02:29:28 +0600 Subject: [PATCH 4/5] [#234] disable submit buttons --- app/views/admin/flash_notifies/_form.html.haml | 2 +- app/views/admin/users/new.html.haml | 2 +- app/views/advisories/_list.html.haml | 4 ++-- app/views/contacts/new.html.haml | 2 +- app/views/groups/members/index.html.haml | 2 +- app/views/groups/profile/_form.html.haml | 2 +- app/views/platforms/contents/_contents.html.haml | 2 +- app/views/platforms/key_pairs/_new.html.haml | 2 +- app/views/platforms/maintainers/_list.html.haml | 1 + app/views/platforms/mass_builds/new.html.haml | 2 +- app/views/platforms/platforms/_form.html.haml | 2 +- app/views/platforms/platforms/clone.html.haml | 2 +- app/views/platforms/product_build_lists/_filter.html.haml | 2 +- app/views/platforms/product_build_lists/new.html.haml | 2 +- app/views/platforms/product_build_lists/show.html.haml | 2 +- app/views/platforms/products/_form.html.haml | 2 +- app/views/platforms/repositories/_form.html.haml | 2 +- app/views/platforms/tokens/new.html.haml | 2 +- app/views/projects/build_lists/_filter.html.haml | 2 +- app/views/projects/build_lists/new.html.haml | 2 +- app/views/projects/comments/_form.html.haml | 2 +- app/views/projects/git/blobs/_editor.html.haml | 2 +- app/views/projects/hooks/edit.html.haml | 2 +- app/views/projects/hooks/new.html.haml | 2 +- app/views/projects/issues/_form.html.haml | 2 +- app/views/projects/projects/_form.html.haml | 2 +- app/views/projects/projects/sections.html.haml | 2 +- app/views/projects/pull_requests/new.html.haml | 4 ++-- app/views/projects/wiki/_editor.html.haml | 2 +- app/views/search/_form_advanced.html.haml | 2 +- app/views/shared/_members_table.html.haml | 4 ++-- app/views/users/base/_form.html.haml | 2 +- app/views/users/settings/notifiers.html.haml | 2 +- app/views/users/settings/private.html.haml | 2 +- app/views/users/ssh_keys/index.html.haml | 2 +- config/locales/ru.yml | 1 - 36 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/views/admin/flash_notifies/_form.html.haml b/app/views/admin/flash_notifies/_form.html.haml index c609dd20b..e7de4d9de 100644 --- a/app/views/admin/flash_notifies/_form.html.haml +++ b/app/views/admin/flash_notifies/_form.html.haml @@ -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" diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index faa8fca22..d49a54e6a 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -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 diff --git a/app/views/advisories/_list.html.haml b/app/views/advisories/_list.html.haml index 5f3ea4f52..a5b24b6b0 100644 --- a/app/views/advisories/_list.html.haml +++ b/app/views/advisories/_list.html.haml @@ -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 diff --git a/app/views/contacts/new.html.haml b/app/views/contacts/new.html.haml index adcac6264..4a62c5780 100644 --- a/app/views/contacts/new.html.haml +++ b/app/views/contacts/new.html.haml @@ -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 diff --git a/app/views/groups/members/index.html.haml b/app/views/groups/members/index.html.haml index 2ce755b65..dc65e3463 100644 --- a/app/views/groups/members/index.html.haml +++ b/app/views/groups/members/index.html.haml @@ -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 diff --git a/app/views/groups/profile/_form.html.haml b/app/views/groups/profile/_form.html.haml index 4ac4eaf82..db6b6a95f 100644 --- a/app/views/groups/profile/_form.html.haml +++ b/app/views/groups/profile/_form.html.haml @@ -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 diff --git a/app/views/platforms/contents/_contents.html.haml b/app/views/platforms/contents/_contents.html.haml index b2ef13345..a94551c71 100644 --- a/app/views/platforms/contents/_contents.html.haml +++ b/app/views/platforms/contents/_contents.html.haml @@ -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) diff --git a/app/views/platforms/key_pairs/_new.html.haml b/app/views/platforms/key_pairs/_new.html.haml index ff0cff09a..c41dbb1d7 100644 --- a/app/views/platforms/key_pairs/_new.html.haml +++ b/app/views/platforms/key_pairs/_new.html.haml @@ -12,4 +12,4 @@ .both .button_block - = submit_tag t("layout.save") + = submit_tag t('layout.save'), :data => {'disable-with' => t('layout.saving')} diff --git a/app/views/platforms/maintainers/_list.html.haml b/app/views/platforms/maintainers/_list.html.haml index 6effeb766..153e5f88b 100644 --- a/app/views/platforms/maintainers/_list.html.haml +++ b/app/views/platforms/maintainers/_list.html.haml @@ -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 diff --git a/app/views/platforms/mass_builds/new.html.haml b/app/views/platforms/mass_builds/new.html.haml index a528d7a26..9f78fa6c6 100644 --- a/app/views/platforms/mass_builds/new.html.haml +++ b/app/views/platforms/mass_builds/new.html.haml @@ -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| diff --git a/app/views/platforms/platforms/_form.html.haml b/app/views/platforms/platforms/_form.html.haml index 4508e03b6..eff215199 100644 --- a/app/views/platforms/platforms/_form.html.haml +++ b/app/views/platforms/platforms/_form.html.haml @@ -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") diff --git a/app/views/platforms/platforms/clone.html.haml b/app/views/platforms/platforms/clone.html.haml index e72f71a65..112beefeb 100644 --- a/app/views/platforms/platforms/clone.html.haml +++ b/app/views/platforms/platforms/clone.html.haml @@ -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" \ No newline at end of file diff --git a/app/views/platforms/product_build_lists/_filter.html.haml b/app/views/platforms/product_build_lists/_filter.html.haml index 3b785eb86..5104d3208 100644 --- a/app/views/platforms/product_build_lists/_filter.html.haml +++ b/app/views/platforms/product_build_lists/_filter.html.haml @@ -11,4 +11,4 @@ = text_field_tag :product_id, params[:product_id] %br %br - = submit_tag t("layout.search.header") \ No newline at end of file + = submit_tag t('layout.search.header'), :data => {'disable-with' => t('layout.processing')} \ No newline at end of file diff --git a/app/views/platforms/product_build_lists/new.html.haml b/app/views/platforms/product_build_lists/new.html.haml index 24743689f..4a9f130bf 100644 --- a/app/views/platforms/product_build_lists/new.html.haml +++ b/app/views/platforms/product_build_lists/new.html.haml @@ -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 diff --git a/app/views/platforms/product_build_lists/show.html.haml b/app/views/platforms/product_build_lists/show.html.haml index c27756272..67a6c636f 100644 --- a/app/views/platforms/product_build_lists/show.html.haml +++ b/app/views/platforms/product_build_lists/show.html.haml @@ -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 diff --git a/app/views/platforms/products/_form.html.haml b/app/views/platforms/products/_form.html.haml index 0095616ad..919fd0538 100644 --- a/app/views/platforms/products/_form.html.haml +++ b/app/views/platforms/products/_form.html.haml @@ -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" diff --git a/app/views/platforms/repositories/_form.html.haml b/app/views/platforms/repositories/_form.html.haml index 262bd3cf1..0e430665c 100644 --- a/app/views/platforms/repositories/_form.html.haml +++ b/app/views/platforms/repositories/_form.html.haml @@ -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" diff --git a/app/views/platforms/tokens/new.html.haml b/app/views/platforms/tokens/new.html.haml index 9670cecac..c4d22153c 100644 --- a/app/views/platforms/tokens/new.html.haml +++ b/app/views/platforms/tokens/new.html.haml @@ -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' diff --git a/app/views/projects/build_lists/_filter.html.haml b/app/views/projects/build_lists/_filter.html.haml index 3a5132c3c..13d5c697f 100644 --- a/app/views/projects/build_lists/_filter.html.haml +++ b/app/views/projects/build_lists/_filter.html.haml @@ -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')} diff --git a/app/views/projects/build_lists/new.html.haml b/app/views/projects/build_lists/new.html.haml index d5166437b..dab21a1dd 100644 --- a/app/views/projects/build_lists/new.html.haml +++ b/app/views/projects/build_lists/new.html.haml @@ -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' \ No newline at end of file diff --git a/app/views/projects/comments/_form.html.haml b/app/views/projects/comments/_form.html.haml index f37286e42..07e6b688d 100644 --- a/app/views/projects/comments/_form.html.haml +++ b/app/views/projects/comments/_form.html.haml @@ -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')} diff --git a/app/views/projects/git/blobs/_editor.html.haml b/app/views/projects/git/blobs/_editor.html.haml index 3cd15157b..9ed1345f9 100644 --- a/app/views/projects/git/blobs/_editor.html.haml +++ b/app/views/projects/git/blobs/_editor.html.haml @@ -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' diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index 67f3288fc..230d0334a 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -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}" \ No newline at end of file diff --git a/app/views/projects/hooks/new.html.haml b/app/views/projects/hooks/new.html.haml index 927c15caa..80751cd5f 100644 --- a/app/views/projects/hooks/new.html.haml +++ b/app/views/projects/hooks/new.html.haml @@ -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}" \ No newline at end of file diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index d960bafa9..871b4d272 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -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 diff --git a/app/views/projects/projects/_form.html.haml b/app/views/projects/projects/_form.html.haml index 27cb0ae02..18585238c 100644 --- a/app/views/projects/projects/_form.html.haml +++ b/app/views/projects/projects/_form.html.haml @@ -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() { diff --git a/app/views/projects/projects/sections.html.haml b/app/views/projects/projects/sections.html.haml index 6bae42c0f..7289ecfb9 100644 --- a/app/views/projects/projects/sections.html.haml +++ b/app/views/projects/projects/sections.html.haml @@ -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 diff --git a/app/views/projects/pull_requests/new.html.haml b/app/views/projects/pull_requests/new.html.haml index 9b148e318..96f559cec 100644 --- a/app/views/projects/pull_requests/new.html.haml +++ b/app/views/projects/pull_requests/new.html.haml @@ -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 diff --git a/app/views/projects/wiki/_editor.html.haml b/app/views/projects/wiki/_editor.html.haml index cddc9323d..1869eaf58 100644 --- a/app/views/projects/wiki/_editor.html.haml +++ b/app/views/projects/wiki/_editor.html.haml @@ -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 diff --git a/app/views/search/_form_advanced.html.haml b/app/views/search/_form_advanced.html.haml index ab704ec69..7615e109e 100644 --- a/app/views/search/_form_advanced.html.haml +++ b/app/views/search/_form_advanced.html.haml @@ -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 \ No newline at end of file diff --git a/app/views/shared/_members_table.html.haml b/app/views/shared/_members_table.html.haml index 306e9e8aa..4bda6e72e 100644 --- a/app/views/shared/_members_table.html.haml +++ b/app/views/shared/_members_table.html.haml @@ -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 diff --git a/app/views/users/base/_form.html.haml b/app/views/users/base/_form.html.haml index e661a9191..4bacedbc6 100644 --- a/app/views/users/base/_form.html.haml +++ b/app/views/users/base/_form.html.haml @@ -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 diff --git a/app/views/users/settings/notifiers.html.haml b/app/views/users/settings/notifiers.html.haml index d5917480a..76ba13947 100644 --- a/app/views/users/settings/notifiers.html.haml +++ b/app/views/users/settings/notifiers.html.haml @@ -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 diff --git a/app/views/users/settings/private.html.haml b/app/views/users/settings/private.html.haml index 3553c4d44..d16e2707b 100644 --- a/app/views/users/settings/private.html.haml +++ b/app/views/users/settings/private.html.haml @@ -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 diff --git a/app/views/users/ssh_keys/index.html.haml b/app/views/users/ssh_keys/index.html.haml index 9f744fab1..e1764966f 100644 --- a/app/views/users/ssh_keys/index.html.haml +++ b/app/views/users/ssh_keys/index.html.haml @@ -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') diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 13a866e24..186362201 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -177,7 +177,6 @@ ru: models: private_user: Приватный пользователь product_build_list: Сборочный лист продукта - auto_build_list: Автоматическая пересборка пакетов attributes: settings: From 50a0cb16c10c945dba48ef770638aecc9d8d7676 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 25 Jul 2013 02:31:49 +0600 Subject: [PATCH 5/5] fix mistype --- app/views/shared/_members_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_members_table.html.haml b/app/views/shared/_members_table.html.haml index 4bda6e72e..816287a83 100644 --- a/app/views/shared/_members_table.html.haml +++ b/app/views/shared/_members_table.html.haml @@ -25,7 +25,7 @@ %td.buttons = link_to "#{remove_member_path}?member_id=#{user.id}", :method => :delete, :confirm => t("layout.confirm") do %span.delete   - - if can? :remove_memvers, editable_object + - if can? :remove_members, editable_object = submit_tag t("layout.delete"), :class => 'button', :data => {'disable-with' => t('layout.processing')} .both