Multiple ajax calls fixed
This commit is contained in:
parent
220e816155
commit
1244f937e6
8 changed files with 18 additions and 7 deletions
|
|
@ -15,8 +15,18 @@
|
|||
|
||||
|
||||
:javascript
|
||||
var count = 0;
|
||||
$('#gallery-btn').click(function(){
|
||||
$('#gallery .modal-body').append('<i class="fa fa-spinner fa-spin fa-4x"></i>');
|
||||
if(count == 0){
|
||||
$('#gallery').modal('show');
|
||||
$('#gallery .modal-body').append('<i class="fa fa-spinner fa-spin fa-4x"></i>');
|
||||
count +=1;
|
||||
}
|
||||
else{
|
||||
$('#gallery').modal('show');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
- photos.each_with_index do |photo,index|
|
||||
%div.item{ class: (index==0? 'active' : '') }
|
||||
= image_tag(photo.picture)
|
||||
= image_tag(photo.picture(:banner))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
$('#gallery .carousel-inner').append("#{escape_javascript(render('gallery_photo', photos: @photos)) }");
|
||||
$('#gallery .modal-body').children('.fa').remove();
|
||||
$('#gallery #carousel-example-generic').css('visibility','visible');
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
.row-fluid
|
||||
.col-md-12.lead
|
||||
%p= @conference.description
|
||||
= link_to 'Gallery', fetch_gallery_photos_conference_path(@conference.id), class: 'btn btn-primary btn-lg', id: 'gallery-btn', data: {toggle: 'modal', target: '#gallery' }, remote: true
|
||||
= link_to 'Gallery', fetch_gallery_photos_conference_path(@conference.id), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
|
||||
= render 'gallery'
|
||||
- if @conference.include_program_in_splash?
|
||||
%section{ id: 'program' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue