This commit is contained in:
Nicolas Bally 2013-12-09 23:33:43 +01:00
parent 8ce52b0d9f
commit 588481e4b8
3 changed files with 39 additions and 40 deletions

View File

@ -93,13 +93,12 @@ function flash_alert(text) {
function set_busy(){ function set_busy(){
$('body').append('<div id="busy"></div>');
$('#busy').activity({segments: 8, steps: 5, opacity: 0.5, width: 10, space: 0, length: 10, color: '#212222', speed: 1.5});
} }
function unset_busy(){ function unset_busy(){
$('#busy').remove();
} }

View File

@ -1,41 +1,41 @@
= semantic_form_for [:admin,@event], :remote => true do |form| = semantic_form_for [:admin,@event], :remote => true do |form|
.content .content
= form.inputs do = form.inputs do
= form.input :image_file_id, :label => "Image :", :as => :qi_image_select = form.input :image_file_id, :label => "Image :", :as => :qi_image_select
= form.input :title, :label => "Titre :" = form.input :title, :label => "Titre :"
= form.hidden_field :event_id = form.hidden_field :event_id
.event_date_form .event_date_form
-if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time] -if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time]
%p.errors %p.errors
Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm. Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm.
%p %p
=form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px" =form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px"
=form.text_field :start_at_date, :id => "event_start_at_date", :class => "datepicker" =form.text_field :start_at_date, :id => "event_start_at_date", :class => "datepicker"
%span.event_time %span.event_time
=form.label :start_at_time, "heure :" =form.label :start_at_time, "heure :"
=form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker", :style => "width:50px" =form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker", :style => "width:50px"
=form.check_box :entire_day, :id => "event_entire_day" =form.check_box :entire_day, :id => "event_entire_day"
=form.label :entire_day, "jour entier ?" =form.label :entire_day, "jour entier ?"
%p %p
%span.stop_at %span.stop_at
=form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px" =form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px"
=form.text_field :stop_at_date, :id => "event_stop_at_date", :class => "datepicker" =form.text_field :stop_at_date, :id => "event_stop_at_date", :class => "datepicker"
%span.event_time %span.event_time
=form.label :stop_at_time, "heure :" =form.label :stop_at_time, "heure :"
=form.text_field :stop_at_time, :id => "event_stop_at_time", :class => "timepicker", :style => "width:50px" =form.text_field :stop_at_time, :id => "event_stop_at_time", :class => "timepicker", :style => "width:50px"
=form.check_box :stop_date, :id => "event_stop_date" =form.check_box :stop_date, :id => "event_stop_date"
=form.label :stop_date, "fin précisée ?" =form.label :stop_date, "fin précisée ?"
= form.inputs do = form.inputs do
= form.input :description, :label => "Description courte :", :as => :text = form.input :description, :label => "Description courte :", :as => :text
.actions .actions
= form.submit "Sauvegarder" = form.submit "Sauvegarder"
:javascript :javascript
update_event_form(); update_event_form();

View File

@ -92,7 +92,7 @@ set :application, 'jfn_app'
sudo "service #{application} restart" sudo "service #{application} restart"
end end
task :migrate do task :migrate do
run "cd #{deploy_to}current && rake db:migrate RAILS_ENV=#{rails_env}" run "cd #{deploy_to}current && bundle exec rake db:migrate RAILS_ENV=#{rails_env}"
end end