From 6c56628f9198504658164f92f42eac7d2d2b1370 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 18 Mar 2013 23:50:14 +0100 Subject: [PATCH] =?UTF-8?q?modifs=20ergonomie=20adh=C3=A9rents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/admin/forms.scss | 70 ------------ app/assets/stylesheets/admin/qi_core.css.scss | 6 +- app/assets/stylesheets/admin/sheets.css.scss | 49 ++++++++- app/views/people/_person.html.haml | 3 +- app/views/sheet_years/_sheet_year.html.haml | 4 +- app/views/sheets/edit.html.haml | 17 +-- app/views/sheets/edit.js.erb | 3 +- app/views/sheets/new.html.haml | 12 +- app/views/sheets/new.js.erb | 3 +- app/views/sheets/show.html.haml | 104 +++++++++--------- app/views/sheets/show.js.erb | 3 +- app/views/sheets/update.js.erb | 2 +- 12 files changed, 127 insertions(+), 149 deletions(-) diff --git a/app/assets/stylesheets/admin/forms.scss b/app/assets/stylesheets/admin/forms.scss index 1bd1ee3..5b03337 100755 --- a/app/assets/stylesheets/admin/forms.scss +++ b/app/assets/stylesheets/admin/forms.scss @@ -38,76 +38,6 @@ label { -.button{ - display: inline-block; - background: #3c74a8; - background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(rgb(239,242,242)), to(rgb(255,255,255))); - background: -moz-linear-gradient(bottom, rgb(239,242,242), rgb(255,255,255)); - box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - -moz-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - -webkit-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - border: none; - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; - color: RGB(46,46,46); - - - - - padding: 5px 15px; - margin:0px 5px 0px 5px; - font-weight:normal; - - } - - - - -.button:hover { - box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - -moz-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - -webkit-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - color: RGB(46,46,46); - cursor: pointer; - } - - -.actions{ - text-align:right; -} - -button,input[type=submit] { - display: inline-block; - background: #3c74a8; - background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(rgb(60,116,168)), to(rgb(103,146,187))); - background: -moz-linear-gradient(bottom, rgb(60,116,168), rgb(103,146,187)); - box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - -moz-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - -webkit-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px; - border: none; - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; - color: white; - - margin:0px 5px 0px 5px; - - padding: 5px 15px; - text-shadow: 0 1px 1px rgba(0,0,0,0.6); - font-weight:normal; - font-size:13px; - - } - -button:hover,input[type=submit]:hover { - box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - -moz-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - -webkit-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px; - cursor: pointer; - } - - .field_with_errors{ diff --git a/app/assets/stylesheets/admin/qi_core.css.scss b/app/assets/stylesheets/admin/qi_core.css.scss index a2cb0cd..5a6a698 100644 --- a/app/assets/stylesheets/admin/qi_core.css.scss +++ b/app/assets/stylesheets/admin/qi_core.css.scss @@ -465,7 +465,7 @@ label { - padding: 5px 15px; + padding: 7px 17px; margin:0px 5px 0px 5px; font-weight:normal; @@ -503,10 +503,10 @@ button,input[type=submit] { margin:0px 5px 0px 5px; - padding: 5px 15px; + padding: 7px 17px; text-shadow: 0 1px 1px rgba(0,0,0,0.6); font-weight:normal; - font-size:13px; + } diff --git a/app/assets/stylesheets/admin/sheets.css.scss b/app/assets/stylesheets/admin/sheets.css.scss index 4204871..8d3da83 100644 --- a/app/assets/stylesheets/admin/sheets.css.scss +++ b/app/assets/stylesheets/admin/sheets.css.scss @@ -39,8 +39,8 @@ background:#1b1b1b; color:white; } -@include border-radius(5px); -overflow:auto; + + @include box-shadow(0px 0px 10px rgba(0,0,0,0.8)); position:fixed; top:20px; @@ -48,15 +48,58 @@ left:20px; right:20px; bottom:20px; background:white; -padding:10px; + +.content{ + padding:10px; + position:absolute; + top:40px; + bottom:0px; + left:0px; + right:0px; + overflow:auto; + } +} + + + + + #sheet_show{ @extend .sheet_window; +.links{ +text-align:right; +position:absolute; +top:0px; +left:0px; +right:0px; +height:30px; +padding:10px; + } +} + + +.edit .links{ +background:#FF6B00; +} + +.show .links{ +background : #a4bed6; +} + +.new .links{ +background : #95bc14; +} + + + + + #sheets_selecteds{ height: 300px; overflow : auto; diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 7f62670..8bdf55e 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -21,8 +21,7 @@ %td{:style => "width:16%;text-align:right;"} -if has_permission?('adherent.edit') - = link_to image_tag("/images/style/quartz-admin/delete.png"), :url => person, :method => :delete, :confirm => "Voulez-vous vraiment supprimer "+person.name.to_s+" de cette fiche ?", :remote => true - = link_to image_tag("/images/style/quartz-admin/edit.png"), edit_person_path(person), :remote => true + -if person == person.sheet.person -img = image_tag("/images/style/quartz-admin/principal_active.png") -else diff --git a/app/views/sheet_years/_sheet_year.html.haml b/app/views/sheet_years/_sheet_year.html.haml index 9fac358..81d2f38 100644 --- a/app/views/sheet_years/_sheet_year.html.haml +++ b/app/views/sheet_years/_sheet_year.html.haml @@ -1,7 +1,5 @@ #sheet_year.sheet_block{:id => sheet_year.id} - .links{:style => "float:right"} - = link_to image_tag("/images/style/quartz-admin/delete.png"), :url => sheet_year, :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer l'année "+sheet_year.year.to_s+" de cette fiche ?" if has_permission?('adherent.edit') - = link_to image_tag("/images/style/quartz-admin/edit.png"), :url => edit_sheet_year_path(sheet_year), :method => :get, :remote => true if has_permission?('adherent.edit') + %h3=sheet_year.year %p Type d'adhésion : diff --git a/app/views/sheets/edit.html.haml b/app/views/sheets/edit.html.haml index aa5ff96..e87d2cb 100644 --- a/app/views/sheets/edit.html.haml +++ b/app/views/sheets/edit.html.haml @@ -1,10 +1,13 @@ -#sheet_show - .links{:style => "float:right;"} - =link_to "Retour", @sheet, :class => "lien", :remote => true, :confirm => "Attention, les changements éventuellements apportés ne seront pas sauvegardés." - = link_to 'Fermer', "#", :onclick => "$('#sheet_show').remove();return false;" - %h1 Modifier une fiche +#sheet_show.edit + .links + =link_to "Détail", @sheet, :class => "button", :remote => true, :confirm => "Attention, les changements éventuellements apportés ne seront pas sauvegardés." + = link_to 'Fermer', "#",:class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" + %input{:type => "submit", :onclick => "$(this).closest('#sheet_show').find('form').submit();return false;", :value => "Sauvegarder"} + + .content + %h1 Modifier une fiche - = semantic_form_for [@sheet], :remote => true do |form| + = semantic_form_for [@sheet], :remote => true do |form| - =render :partial => "form", :locals => {:form => form} + =render :partial => "form", :locals => {:form => form} \ No newline at end of file diff --git a/app/views/sheets/edit.js.erb b/app/views/sheets/edit.js.erb index e2a284e..32d71bc 100644 --- a/app/views/sheets/edit.js.erb +++ b/app/views/sheets/edit.js.erb @@ -1,2 +1,3 @@ $('#sheet_show').remove(); -$('body').append("<%= escape_javascript(render(:template => "sheets/edit.html.haml")); %>"); \ No newline at end of file +$('body').append("<%= escape_javascript(render(:template => "sheets/edit.html.haml")); %>"); +$("body").css("overflow", "hidden"); \ No newline at end of file diff --git a/app/views/sheets/new.html.haml b/app/views/sheets/new.html.haml index c19115e..526453f 100644 --- a/app/views/sheets/new.html.haml +++ b/app/views/sheets/new.html.haml @@ -1,9 +1,11 @@ -#sheet_show +#sheet_show.new .links{:style => "float:right;"} - = link_to 'Retour', "#", :onclick => "$('#sheet_show').remove();return false;" - %h1 Nouvelle fiche + = link_to 'Retour', "#", :class => "button", :onclick => "$('#sheet_show').remove();return false;" + + .content + %h1 Nouvelle fiche - = semantic_form_for [@sheet], :remote => true do |form| + = semantic_form_for [@sheet], :remote => true do |form| - =render :partial => "form", :locals => {:form => form} + =render :partial => "form", :locals => {:form => form} \ No newline at end of file diff --git a/app/views/sheets/new.js.erb b/app/views/sheets/new.js.erb index c82eeda..56b9e3c 100644 --- a/app/views/sheets/new.js.erb +++ b/app/views/sheets/new.js.erb @@ -1,2 +1,3 @@ $('#sheet_show').remove(); -$('body').append("<%= escape_javascript(render(:template => "sheets/new.html.haml")); %>"); \ No newline at end of file +$('body').append("<%= escape_javascript(render(:template => "sheets/new.html.haml")); %>"); +$("body").css("overflow", "hidden"); \ No newline at end of file diff --git a/app/views/sheets/show.html.haml b/app/views/sheets/show.html.haml index dd08846..ff80a89 100644 --- a/app/views/sheets/show.html.haml +++ b/app/views/sheets/show.html.haml @@ -1,56 +1,56 @@ -#sheet_show - .links{:style => "float:right;"} - = link_to 'Modifier', edit_sheet_path(@sheet), :method => :get, :remote => true - = link_to 'Fermer', "#", :onclick => "$('#sheet_show').remove();return false;" - - %h1 - Fiche n° - =@sheet.id - Adhérent depuis - =@sheet.first_year - ="/" - =@sheet.last_year - - -if @sheet.plume - %p{:style => "background:red;"} Souhaite recevoir la plume par courrier. - - - - %h2 Cette adhésion regroupe : - = link_to 'Ajouter', :url => new_person_path(:sheet_id => @sheet), :update => "new_sheet_people", :method => :get, :remote => true #if has_permission?('adherent.edit') - #new_sheet_people - #sheet_peoples - =render @sheet.people - - - %h2 Informations principales - - #sheet_detail.sheet_block=render :partial => "sheet_detail" - - - - - %h2 Années d'adhésion - #new_sheet_years - #sheet_years - =render @sheet.sheet_years - - %h2 Dons - - #new_donates - #donates - =render @sheet.donates - - - - - %br - %br - %br - - +#sheet_show.show .links - = link_to 'Retour', sheets_path + = link_to 'Modifier', edit_sheet_path(@sheet), :class => "button", :method => :get, :remote => true + = link_to 'Fermer', "#", :class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;" + + + + .content + %h1 + Fiche n° + =@sheet.id + Adhérent depuis + =@sheet.first_year + ="/" + =@sheet.last_year + + -if @sheet.plume + %p{:style => "background:red;"} Souhaite recevoir la plume par courrier. + + + + %h2 Cette adhésion regroupe : + = link_to 'Ajouter', :class => "button", :url => new_person_path(:sheet_id => @sheet), :update => "new_sheet_people", :method => :get, :remote => true #if has_permission?('adherent.edit') + #new_sheet_people + #sheet_peoples + =render @sheet.people + + + %h2 Informations principales + + #sheet_detail.sheet_block=render :partial => "sheet_detail" + + %h2 Années d'adhésion + #new_sheet_years + #sheet_years + =render @sheet.sheet_years + + %h2 Dons + + #new_donates + #donates + =render @sheet.donates + + + + + %br + %br + %br + + + + diff --git a/app/views/sheets/show.js.erb b/app/views/sheets/show.js.erb index 1246727..cf6425a 100644 --- a/app/views/sheets/show.js.erb +++ b/app/views/sheets/show.js.erb @@ -1,2 +1,3 @@ $('#sheet_show').remove(); -$('body').append("<%= escape_javascript(render(:template => "sheets/show.html.haml")); %>"); \ No newline at end of file +$('body').append("<%= escape_javascript(render(:template => "sheets/show.html.haml")); %>"); +$("body").css("overflow", "hidden"); \ No newline at end of file diff --git a/app/views/sheets/update.js.erb b/app/views/sheets/update.js.erb index 6e04659..f4594ea 100644 --- a/app/views/sheets/update.js.erb +++ b/app/views/sheets/update.js.erb @@ -1,3 +1,3 @@ $('#sheet_show').remove(); - +$("body").css("overflow", "auto"); $('#sheet_line_<%= @sheet.id %>').replaceWith("<%= escape_javascript(render(@sheet)) %>");