[temp]Ajax request of happening now JSON in progress
This commit is contained in:
parent
093241fd0a
commit
9bfe64c28f
2 changed files with 23 additions and 2 deletions
|
|
@ -69,6 +69,9 @@ class ConferencesController < ApplicationController
|
||||||
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
).order('sponsorship_levels.position ASC', 'sponsors.name')
|
||||||
@sponsors = @conference.sponsors
|
@sponsors = @conference.sponsors
|
||||||
end
|
end
|
||||||
|
if splashpage.include_happening_now
|
||||||
|
@happening_now_url = happening_now_conference_schedule_path(conference_id: @conference.short_title, format: :json)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def calendar
|
def calendar
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,7 @@
|
||||||
|
|
||||||
-# happening now events
|
-# happening now events
|
||||||
- if @conference.splashpage.include_happening_now
|
- if @conference.splashpage.include_happening_now
|
||||||
= 'Hello Word'
|
= 'test'
|
||||||
|
|
||||||
-# calls for content, or program
|
-# calls for content, or program
|
||||||
- if @conference.splashpage.include_cfp
|
- if @conference.splashpage.include_cfp
|
||||||
= render 'call_for_content', conference: @conference,
|
= render 'call_for_content', conference: @conference,
|
||||||
|
|
@ -86,3 +85,22 @@
|
||||||
- if @conference.contact.has_social_media?
|
- if @conference.contact.has_social_media?
|
||||||
= render 'social_media', contact: @conference.contact
|
= render 'social_media', contact: @conference.contact
|
||||||
= render 'footer'
|
= render 'footer'
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
var loadData = function() {
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
contentType: 'application/json; charset=utf-8',
|
||||||
|
url: '#{@happening_now_url}',
|
||||||
|
dataType: 'json',
|
||||||
|
success: renderTemplate,
|
||||||
|
failure: function(){
|
||||||
|
console.log('error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var renderTemplate = function(data) {
|
||||||
|
console.log(data);
|
||||||
|
console.log("template rendered");
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue