Browse Source

Use string date instead or reparsing

pull/127/head
Zach Wise 13 years ago
parent
commit
76f89d62f1
  1. 4
      source/js/VMM.Slider.Slide.js
  2. 4
      source/js/VMM.Slider.js

4
source/js/VMM.Slider.Slide.js

@ -84,8 +84,8 @@ if (typeof VMM.Slider != 'undefined') {
if (data.startdate != null && data.startdate != "") { if (data.startdate != null && data.startdate != "") {
if (type.of(data.startdate) == "date") { if (type.of(data.startdate) == "date") {
if (data.type != "start") { if (data.type != "start") {
var st = VMM.Util.date.prettyDate(data.startdate); var st = data.startdate_str;
var en = VMM.Util.date.prettyDate(data.enddate); var en = data.enddate_str;
if (st != en) { if (st != en) {
c.text += VMM.createElement("h2", st + " — " + en + "", "date"); c.text += VMM.createElement("h2", st + " — " + en + "", "date");
} else { } else {

4
source/js/VMM.Slider.js

@ -495,7 +495,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.attachElement(navigation.prevDate, _title); VMM.attachElement(navigation.prevDate, _title);
VMM.attachElement(navigation.prevTitle, ""); VMM.attachElement(navigation.prevTitle, "");
} else { } else {
VMM.attachElement(navigation.prevDate, data[current_slide - 1].date); VMM.attachElement(navigation.prevDate, data[current_slide - 1].startdate_str);
VMM.attachElement(navigation.prevTitle, _title); VMM.attachElement(navigation.prevTitle, _title);
} }
} else { } else {
@ -513,7 +513,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.attachElement(navigation.nextDate, _title); VMM.attachElement(navigation.nextDate, _title);
VMM.attachElement(navigation.nextTitle, ""); VMM.attachElement(navigation.nextTitle, "");
} else { } else {
VMM.attachElement(navigation.nextDate, data[current_slide + 1].date); VMM.attachElement(navigation.nextDate, data[current_slide + 1].startdate_str);
VMM.attachElement(navigation.nextTitle, _title); VMM.attachElement(navigation.nextTitle, _title);
} }
} else { } else {

Loading…
Cancel
Save