|
|
@ -1821,7 +1821,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') { |
|
|
|
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id); |
|
|
|
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id); |
|
|
|
// YOUTUBE
|
|
|
|
// YOUTUBE
|
|
|
|
} else if (m.type == "youtube") { |
|
|
|
} else if (m.type == "youtube") { |
|
|
|
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'>Loading YouTube video...</div>"; |
|
|
|
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'><span class='messege'>Loading YouTube video</span></div>"; |
|
|
|
VMM.ExternalAPI.youtube.get(m.id); |
|
|
|
VMM.ExternalAPI.youtube.get(m.id); |
|
|
|
// VIMEO
|
|
|
|
// VIMEO
|
|
|
|
} else if (m.type == "vimeo") { |
|
|
|
} else if (m.type == "vimeo") { |
|
|
@ -3891,9 +3891,7 @@ if (typeof VMM.Slider != 'undefined') { |
|
|
|
var st = VMM.Util.date.prettyDate(data.startdate); |
|
|
|
var st = VMM.Util.date.prettyDate(data.startdate); |
|
|
|
var en = VMM.Util.date.prettyDate(data.enddate); |
|
|
|
var en = VMM.Util.date.prettyDate(data.enddate); |
|
|
|
if (st != en) { |
|
|
|
if (st != en) { |
|
|
|
//st = VMM.Util.date.prettyDate(data.startdate, true);
|
|
|
|
c.text += VMM.createElement("h2", st + " — " + en + "", "date"); |
|
|
|
//en = VMM.Util.date.prettyDate(data.enddate, true);
|
|
|
|
|
|
|
|
c.text += VMM.createElement("h2", st + "<small> — " + en + "</small>", "date"); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
c.text += VMM.createElement("h2", st, "date"); |
|
|
|
c.text += VMM.createElement("h2", st, "date"); |
|
|
|
} |
|
|
|
} |
|
|
@ -4065,6 +4063,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
date: { |
|
|
|
date: { |
|
|
|
|
|
|
|
|
|
|
|
dateformats: { |
|
|
|
dateformats: { |
|
|
|
year: "yyyy", |
|
|
|
year: "yyyy", |
|
|
|
month_short: "mmm", |
|
|
|
month_short: "mmm", |
|
|
@ -4072,10 +4071,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') { |
|
|
|
full_short: "mmm d", |
|
|
|
full_short: "mmm d", |
|
|
|
full: "mmmm d',' yyyy", |
|
|
|
full: "mmmm d',' yyyy", |
|
|
|
time_no_seconds_short: "h:MM TT", |
|
|
|
time_no_seconds_short: "h:MM TT", |
|
|
|
time_no_seconds_small_date: "dddd', 'h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'", |
|
|
|
time_no_seconds_small_date: "'h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'", |
|
|
|
full_long: "dddd',' mmm d',' yyyy 'at' hh:MM TT", |
|
|
|
full_long: "mmm d',' yyyy 'at' hh:MM TT", |
|
|
|
full_long_small_date: "hh:MM TT'<br/><small>'dddd',' mmm d',' yyyy'</small>'", |
|
|
|
full_long_small_date: "hh:MM TT'<br/><small>mmm d',' yyyy'</small>'", |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], |
|
|
|
month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], |
|
|
|
month_abbr: ["Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."], |
|
|
|
month_abbr: ["Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."], |
|
|
|
day: ["Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], |
|
|
|
day: ["Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], |
|
|
@ -4166,72 +4166,92 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//VMM.Util.date.prettyDate(d, is_abbr)
|
|
|
|
prettyDate: function(d, is_abbr, d2) { |
|
|
|
prettyDate: function(d, is_abbr, date_type) { |
|
|
|
|
|
|
|
var _date; |
|
|
|
var _date; |
|
|
|
|
|
|
|
var _date2; |
|
|
|
|
|
|
|
var format; |
|
|
|
var bc_check; |
|
|
|
var bc_check; |
|
|
|
|
|
|
|
var is_pair = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (d2 != null) { |
|
|
|
|
|
|
|
is_pair = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (type.of(d) == "date") { |
|
|
|
if (type.of(d) == "date") { |
|
|
|
if (d.getMonth() === 0 && d.getDate() == 1 && d.getHours() === 0 && d.getMinutes() === 0 ) { |
|
|
|
if (d.getMonth() === 0 && d.getDate() == 1 && d.getHours() === 0 && d.getMinutes() === 0 ) { |
|
|
|
// trace("YEAR ONLY");
|
|
|
|
// YEAR ONLY
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.year); |
|
|
|
format = VMM.Util.date.dateformats.year; |
|
|
|
|
|
|
|
} else if (d.getDate() <= 1 && d.getHours() === 0 && d.getMinutes() === 0) { |
|
|
|
|
|
|
|
// YEAR MONTH
|
|
|
|
|
|
|
|
if (is_abbr) { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.month_short; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.month; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (d.getHours() === 0 && d.getMinutes() === 0) { |
|
|
|
|
|
|
|
// YEAR MONTH DAY
|
|
|
|
|
|
|
|
if (is_abbr) { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.full_short; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.full; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (d.getMinutes() === 0) { |
|
|
|
|
|
|
|
// YEAR MONTH DAY HOUR
|
|
|
|
|
|
|
|
if (is_abbr) { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.time_no_seconds_short; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
format = VMM.Util.date.dateformats.time_no_seconds_small_date; |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (d.getDate() <= 1 && d.getHours() === 0 && d.getMinutes() === 0) { |
|
|
|
// YEAR MONTH DAY HOUR MINUTE
|
|
|
|
// trace("YEAR MONTH");
|
|
|
|
if (is_abbr){ |
|
|
|
if (is_abbr) { |
|
|
|
format = VMM.Util.date.dateformats.time_no_seconds_short;
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.month_short ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.month); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (d.getHours() === 0 && d.getMinutes() === 0) { |
|
|
|
|
|
|
|
// trace("YEAR MONTH DAY");
|
|
|
|
|
|
|
|
if (is_abbr) { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.full_short); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.full); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (d.getMinutes() === 0) { |
|
|
|
|
|
|
|
// trace("YEAR MONTH DAY HOUR");
|
|
|
|
|
|
|
|
if (is_abbr) { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.time_no_seconds_short); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.time_no_seconds_small_date ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// trace("YEAR MONTH DAY HOUR MINUTE");
|
|
|
|
format = VMM.Util.date.dateformats.full_long;
|
|
|
|
if (is_abbr){ |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.time_no_seconds_short);
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_date = dateFormat(d, VMM.Util.date.dateformats.full_long); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_date = dateFormat(d, format); |
|
|
|
bc_check = _date.split(" "); |
|
|
|
bc_check = _date.split(" "); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// BC TIME SUPPORT
|
|
|
|
for(var i = 0; i < bc_check.length; i++) { |
|
|
|
for(var i = 0; i < bc_check.length; i++) { |
|
|
|
if ( parseInt(bc_check[i]) < 0 ) { |
|
|
|
if ( parseInt(bc_check[i]) < 0 ) { |
|
|
|
trace("YEAR IS BC"); |
|
|
|
trace("YEAR IS BC"); |
|
|
|
var bc_original = bc_check[i]; |
|
|
|
var bc_original = bc_check[i]; |
|
|
|
var bc_number = Math.abs( parseInt(bc_check[i]) ); |
|
|
|
var bc_number = Math.abs( parseInt(bc_check[i]) ); |
|
|
|
var bc_string = bc_number.toString() + " B.C."; |
|
|
|
var bc_string = bc_number.toString() + " B.C."; |
|
|
|
|
|
|
|
|
|
|
|
_date = _date.replace(bc_original, bc_string); |
|
|
|
_date = _date.replace(bc_original, bc_string); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (is_pair) { |
|
|
|
|
|
|
|
_date2 = dateFormat(d2, format); |
|
|
|
|
|
|
|
bc_check = _date2.split(" "); |
|
|
|
|
|
|
|
// BC TIME SUPPORT
|
|
|
|
|
|
|
|
for(var i = 0; i < bc_check.length; i++) { |
|
|
|
|
|
|
|
if ( parseInt(bc_check[i]) < 0 ) { |
|
|
|
|
|
|
|
trace("YEAR IS BC"); |
|
|
|
|
|
|
|
var bc_original = bc_check[i]; |
|
|
|
|
|
|
|
var bc_number = Math.abs( parseInt(bc_check[i]) ); |
|
|
|
|
|
|
|
var bc_string = bc_number.toString() + " B.C."; |
|
|
|
|
|
|
|
_date2 = _date2.replace(bc_original, bc_string); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
trace("NOT A VALID DATE?"); |
|
|
|
trace("NOT A VALID DATE?"); |
|
|
|
trace(d); |
|
|
|
trace(d); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (is_pair) { |
|
|
|
return _date; |
|
|
|
return _date + " — " + _date2; |
|
|
|
}, |
|
|
|
} else { |
|
|
|
|
|
|
|
return _date; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -4953,9 +4973,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Language == 'undefined') { |
|
|
|
full_short: "mmm d", |
|
|
|
full_short: "mmm d", |
|
|
|
full: "mmmm d',' yyyy", |
|
|
|
full: "mmmm d',' yyyy", |
|
|
|
time_no_seconds_short: "h:MM TT", |
|
|
|
time_no_seconds_short: "h:MM TT", |
|
|
|
time_no_seconds_small_date: "dddd', 'h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'", |
|
|
|
time_no_seconds_small_date: "'h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'", |
|
|
|
full_long: "dddd',' mmm d',' yyyy 'at' hh:MM TT", |
|
|
|
full_long: "mmm d',' yyyy 'at' hh:MM TT", |
|
|
|
full_long_small_date: "hh:MM TT'<br/><small>'dddd',' mmm d',' yyyy'</small>'", |
|
|
|
full_long_small_date: "hh:MM TT'<br/><small>mmm d',' yyyy'</small>'", |
|
|
|
}, |
|
|
|
}, |
|
|
|
messages: { |
|
|
|
messages: { |
|
|
|
loading_timeline: "Loading Timeline... ", |
|
|
|
loading_timeline: "Loading Timeline... ", |
|
|
@ -6326,7 +6346,7 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.TimeNav == 'undefin |
|
|
|
_interval.date.setSeconds(_interval.date.getSeconds() + inc_time); |
|
|
|
_interval.date.setSeconds(_interval.date.getSeconds() + inc_time); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_idd = VMM.Util.date.prettyDate(_interval.date, true, _interval.type); |
|
|
|
_idd = VMM.Util.date.prettyDate(_interval.date, true); |
|
|
|
|
|
|
|
|
|
|
|
inc_time = 1; |
|
|
|
inc_time = 1; |
|
|
|
|
|
|
|
|
|
|
|