SHARE
TWEET

Untitled

a guest Aug 12th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From eded5a10ebb24decfc4da5dc3e12098c899c517f Mon Sep 17 00:00:00 2001
  2. From: svmk <svmk-tmsk@yandex.ru>
  3. Date: Thu, 21 Apr 2011 15:03:37 +0700
  4. Subject: [PATCH] Some bug-fixes: changed send method from get to post in routes.
  5.  
  6. ---
  7.  app/views/conversations/new_contact.haml |    4 ++--
  8.  config/application.rb                    |    2 +-
  9.  config/routes.rb                         |   14 +++++++-------
  10.  public/stylesheets/sass/application.sass |    3 +--
  11.  4 files changed, 11 insertions(+), 12 deletions(-)
  12.  
  13. diff --git a/app/views/conversations/new_contact.haml b/app/views/conversations/new_contact.haml
  14. index f792eb1..e35232c 100644
  15. --- a/app/views/conversations/new_contact.haml
  16. +++ b/app/views/conversations/new_contact.haml
  17. @@ -21,7 +21,7 @@
  18.    });
  19.    function change_contact(people_id,url_path,people_url,it,class_name)
  20.      {
  21. -        g = $.ajax({url:url_path,async:false,cache:false});
  22. +        g = $.ajax({url:url_path,async:false,cache:false,type:'POST'});
  23.          if (g.status == 200)
  24.          {
  25.              if (g.responseText.indexOf('O') != -1)
  26. @@ -120,7 +120,7 @@
  27.          };
  28.      }
  29.  .contact_list_new
  30. -  = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('shared.contact_list.all_contacts')
  31. +  = search_field_tag :contact_search, "", :class => 'contact_list_search new_contact', :results => 5, :placeholder => t('shared.contact_list.all_contacts')
  32.    %ul
  33.      - active_records = @active_contacts.map{|rec| rec.person.id}
  34.      - for contact in @active_contacts
  35. diff --git a/config/application.rb b/config/application.rb
  36. index 16c16a1..607be96 100644
  37. --- a/config/application.rb
  38. +++ b/config/application.rb
  39. @@ -47,7 +47,7 @@ module Diaspora
  40.      config.encoding = "utf-8"
  41.  
  42.      # Configure sensitive parameters which will be filtered from the log file.
  43. -    config.filter_parameters += [:password]
  44. +#    config.filter_parameters += [:password]
  45.      config.filter_parameters += [:xml]
  46.      config.filter_parameters += [:message]
  47.      config.filter_parameters += [:text]
  48. diff --git a/config/routes.rb b/config/routes.rb
  49. index 84d2b5e..99413c9 100644
  50. --- a/config/routes.rb
  51. +++ b/config/routes.rb
  52. @@ -25,13 +25,13 @@ Diaspora::Application.routes.draw do
  53.    resources :contacts
  54.    resources :aspect_memberships, :only => [:destroy, :create]
  55.  
  56. -  match 'conversations/:conversation_id/afford_to_own/:person_id', :to => 'conversations#afford_to_own'
  57. -  match 'conversations/:conversation_id/prohibit_owning/:person_id', :to => 'conversations#prohibit_owning'
  58. -  match 'conversations/:conversation_id/allow_edit/:person_id', :to => 'conversations#allow_edit'
  59. -  match 'conversations/:conversation_id/prohibit_edit/:person_id', :to => 'conversations#prohibit_edit'
  60. -  match 'conversations/:conversation_id/delete_contact/:person_id', :to => 'conversations#delete_contact'
  61. -  match 'conversations/:conversation_id/create_contact/:person_id', :to => 'conversations#create_contact'
  62. -  match 'conversations/:conversation_id/new_contact', :to => 'conversations#new_contact'
  63. +  match 'conversations/:conversation_id/afford_to_own/:person_id', :to => 'conversations#afford_to_own', :via => [:post]
  64. +  match 'conversations/:conversation_id/prohibit_owning/:person_id', :to => 'conversations#prohibit_owning', :via => [:post]
  65. +  match 'conversations/:conversation_id/allow_edit/:person_id', :to => 'conversations#allow_edit', :via => [:post]
  66. +  match 'conversations/:conversation_id/prohibit_edit/:person_id', :to => 'conversations#prohibit_edit', :via => [:post]
  67. +  match 'conversations/:conversation_id/delete_contact/:person_id', :to => 'conversations#delete_contact', :via => [:post]
  68. +  match 'conversations/:conversation_id/create_contact/:person_id', :to => 'conversations#create_contact', :via => [:post]
  69. +  match 'conversations/:conversation_id/new_contact', :to => 'conversations#new_contact', :via => [:get]
  70.    resources :conversations do
  71.      resources :messages, :only => [:create, :show]
  72.      resource :conversation_visibility, :only => [:destroy], :path => '/visibility/'
  73. diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
  74. index b3b2b50..e082eba 100644
  75. --- a/public/stylesheets/sass/application.sass
  76. +++ b/public/stylesheets/sass/application.sass
  77. @@ -1852,10 +1852,9 @@ ul#request_result
  78.    :border-radius 0 0 5px 5px
  79.  
  80.    input.contact_list_search
  81. -    :width 97.5%
  82. +    :width 326px
  83.      :margin
  84.        :top 0
  85. -
  86.    ul
  87.      :margin-top 1px
  88.      :margin-left 0px
  89. --
  90. 1.7.1
RAW Paste Data
Top