Skip to content

Instantly share code, notes, and snippets.

@derekeder
Created November 12, 2013 20:23
Show Gist options
  • Save derekeder/7438001 to your computer and use it in GitHub Desktop.
Save derekeder/7438001 to your computer and use it in GitHub Desktop.
Zija Events date format
displayList: function(json) {
MapsLib.handleError(json);
var data = json["rows"];
var template = "";
var results = $("#results_list");
results.hide().empty(); //hide the existing list and empty it out first
if (data == null) {
//clear results list
results.append("<li><span class='lead'>No Results Found</span></li>");
}
else {
for (var row in data) {
template = "<event_btn>\
<div class='row-fluid item-list'>\
<div class='span12'>\
<div style='float: left;'>\
<l_date>" + moment(data[row][1]).format("dddd, MMMM Do YYYY") + "</l_date>\
<br clear='all' />\
<l_speaker>" + data[row][9] + "</l_speaker>\
<br />\
</div>\
<div style='float: right;'>\
<l_city_state>" + data[row][10] + "</l_city_state>\
<br clear='all' />\
<l_type>" + data[row][5] + "</l_type>\
<l_event>" + data[row][0] + "</l_event>\
<l_event_img>" + data[row][8] + "</l_event_img>\
</div>\
<br clear='all' />\
<div style='float: left; margin: 30px 0 0; width: 390px;'>\
<div style='float: left; margin-right: 10px; height: 70px;'>Where:</div>\
<l_place>" + data[row][3] + "</l_place>\
<br />\
<l_place>" + data[row][4] + "</l_place>\
<br />\
<l_geo><a target='_blank' href='http://maps.google.com/?q=" + data[row][4] + "'>Google Map</a></l_geo>\
<br />\
</div>\
<div style='float: left; margin: 30px 0 0 100px;'>\
<l_geo>" + '<b>Time:</b> ' + data[row][2] + "</l_geo>\
<br />\
<l_geo>" + '<b>Contact:</b> ' + data[row][6] + "</l_geo>\
<br />\
<l_geo>" + '<b>Cost:</b> ' + data[row][7] + "</l_geo>\
<br />\
</div>\
</div>\
</div></event_btn>"
results.append(template);
}
}
results.fadeIn();
$(function () {
$("event_btn").click(function(){
$(this).toggleClass("event_full");
});
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment