Browse Source

Dates now show both start and end in slide if they are different

pull/75/head
Zach Wise 13 years ago
parent
commit
98b58083dc
  1. 8
      locale/de.js
  2. 8
      locale/en.js
  3. 8
      locale/es.js
  4. 8
      locale/fr.js
  5. 8
      locale/is.js
  6. 8
      locale/it.js
  7. 8
      locale/kr.js
  8. 8
      locale/nl.js
  9. 8
      locale/pt-br.js
  10. 8
      locale/zh-ch.js
  11. 8
      locale/zh-tw.js
  12. 12
      source/js/VMM.MediaElement.js
  13. 19
      source/js/VMM.Slider.Slide.js
  14. 2
      source/js/VMM.Timeline.js
  15. 13
      source/less/VMM.Slider.less
  16. 1
      themes/dark.css
  17. 8
      timeline-min.js
  18. 1
      timeline.css
  19. 33
      timeline.js

8
locale/de.js

File diff suppressed because one or more lines are too long

8
locale/en.js

File diff suppressed because one or more lines are too long

8
locale/es.js

File diff suppressed because one or more lines are too long

8
locale/fr.js

File diff suppressed because one or more lines are too long

8
locale/is.js

File diff suppressed because one or more lines are too long

8
locale/it.js

File diff suppressed because one or more lines are too long

8
locale/kr.js

File diff suppressed because one or more lines are too long

8
locale/nl.js

File diff suppressed because one or more lines are too long

8
locale/pt-br.js

File diff suppressed because one or more lines are too long

8
locale/zh-ch.js

File diff suppressed because one or more lines are too long

8
locale/zh-tw.js

File diff suppressed because one or more lines are too long

12
source/js/VMM.MediaElement.js

@ -79,7 +79,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
if (data.caption != null && data.caption != "") {
captionElem = "<div class='caption'>" + VMM.Util.linkify_with_twitter(data.caption, "_blank") + "</div>";
}
// IMAGE
if (m.type == "image") {
mediaElem = "<img src='" + m.id + "'>";
@ -91,13 +90,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
/*
if (m.id.match(/docs.google.com/i)) {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='" + m.id + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + m.id + "&embedded=true'></iframe>";
}
*/
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'>Loading Document</span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
// YOUTUBE
@ -128,10 +120,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");
mediaElem = VMM.Util.properQuotes(m.id);
mediaElem = "<div class='media-frame plain-text'><div class='container'>" + VMM.Util.properQuotes(m.id) + "</div></div>";
// WEBSITE
} else if (m.type == "website") {
mediaElem = "<iframe class='media-frame' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>";
mediaElem = "<iframe class='media-frame website' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>";
//mediaElem = "<a href='" + m.id + "' target='_blank'>" + "<img src='http://api.snapito.com/free/lc?url=" + m.id + "'></a>";
// NO MATCH
} else {

19
source/js/VMM.Slider.Slide.js

@ -13,7 +13,6 @@ if (typeof VMM.Slider != 'undefined') {
/* PUBLIC
================================================== */
this.show = function() {
trace("LOADED: " + loaded);
if (!loaded) {
render();
}
@ -65,7 +64,6 @@ if (typeof VMM.Slider != 'undefined') {
/* PRIVATE
================================================== */
var render = function() {
trace(data);
VMM.attachElement(element, "");
VMM.appendElement(element, buildSlide() );
loaded = true;
@ -78,7 +76,7 @@ if (typeof VMM.Slider != 'undefined') {
}
var buildSlide = function() {
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { text: false, media: false }};
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { headline: false, text: false, media: false }};
var b_slide, c_wrap;
/* DATE
@ -86,7 +84,15 @@ if (typeof VMM.Slider != 'undefined') {
if (data.startdate != null && data.startdate != "") {
if (type.of(data.startdate) == "date") {
if (data.type != "start") {
c.text += VMM.createElement("h2", VMM.Util.date.prettyDate(data.startdate), "date");
var st = VMM.Util.date.prettyDate(data.startdate);
var en = VMM.Util.date.prettyDate(data.enddate);
if (st != en) {
//st = VMM.Util.date.prettyDate(data.startdate, true);
//en = VMM.Util.date.prettyDate(data.enddate, true);
c.text += VMM.createElement("h2", st + "<small> &mdash; " + en + "</small>", "date");
} else {
c.text += VMM.createElement("h2", st, "date");
}
}
}
}
@ -94,6 +100,7 @@ if (typeof VMM.Slider != 'undefined') {
/* HEADLINE
================================================== */
if (data.headline != null && data.headline != "") {
c.has.headline = true;
if (data.type == "start") {
c.text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(data.headline, "_blank"), "start");
} else {
@ -106,6 +113,9 @@ if (typeof VMM.Slider != 'undefined') {
if (data.text != null && data.text != "") {
c.has.text = true;
c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank"));
}
if (c.has.text || c.has.headline) {
c.text = VMM.createElement("div", c.text, "container");
c.text = VMM.createElement("div", c.text, "text");
}
@ -118,6 +128,7 @@ if (typeof VMM.Slider != 'undefined') {
c.media = VMM.MediaElement.create(data.asset);
}
}
/* COMBINE
================================================== */
if (c.has.text) { c.layout += "-text" };

2
source/js/VMM.Timeline.js

@ -58,7 +58,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
timeline_id = "#timeline";
}
version = "0.99.00";
version = "1.01";
trace("TIMELINE VERSION " + version);

13
source/less/VMM.Slider.less

@ -198,6 +198,19 @@
font-weight: bold;
text-transform: uppercase;
}
.plain-text {
display:table;
.container {
display:table-cell;
vertical-align:middle;
font-size: @base-font;
line-height:@base-line;
color: @color-feature-description;
p {
margin-bottom:@base-line;
}
}
}
img, iframe {
border: 1px solid @color-line;
//max-height:350px;

1
themes/dark.css

@ -69,6 +69,7 @@
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text{display:table;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container{display:table-cell;vertical-align:middle;font-size:15px;line-height:20px;color:#aaaaaa;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container p{margin-bottom:20px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #333333;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #333333;z-index:200;text-align:left;background-color:#1a1a1a;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map img{max-height:none !important;max-width:none !important;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .google-map{height:100%;width:100%;}

8
timeline-min.js vendored

File diff suppressed because one or more lines are too long

1
timeline.css

@ -69,6 +69,7 @@
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text{display:table;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container{display:table-cell;vertical-align:middle;font-size:15px;line-height:20px;color:#666666;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .plain-text .container p{margin-bottom:20px;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #cccccc;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #cccccc;z-index:200;text-align:left;background-color:#ffffff;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map img{max-height:none !important;max-width:none !important;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .google-map{height:100%;width:100%;}

33
timeline.js

@ -1843,7 +1843,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
if (data.caption != null && data.caption != "") {
captionElem = "<div class='caption'>" + VMM.Util.linkify_with_twitter(data.caption, "_blank") + "</div>";
}
// IMAGE
if (m.type == "image") {
mediaElem = "<img src='" + m.id + "'>";
@ -1855,13 +1854,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
/*
if (m.id.match(/docs.google.com/i)) {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='" + m.id + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + m.id + "&embedded=true'></iframe>";
}
*/
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'>Loading Document</span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
// YOUTUBE
@ -1892,10 +1884,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");
mediaElem = VMM.Util.properQuotes(m.id);
mediaElem = "<div class='media-frame plain-text'><div class='container'>" + VMM.Util.properQuotes(m.id) + "</div></div>";
// WEBSITE
} else if (m.type == "website") {
mediaElem = "<iframe class='media-frame' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>";
mediaElem = "<iframe class='media-frame website' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>";
//mediaElem = "<a href='" + m.id + "' target='_blank'>" + "<img src='http://api.snapito.com/free/lc?url=" + m.id + "'></a>";
// NO MATCH
} else {
@ -3892,7 +3884,6 @@ if (typeof VMM.Slider != 'undefined') {
/* PUBLIC
================================================== */
this.show = function() {
trace("LOADED: " + loaded);
if (!loaded) {
render();
}
@ -3944,7 +3935,6 @@ if (typeof VMM.Slider != 'undefined') {
/* PRIVATE
================================================== */
var render = function() {
trace(data);
VMM.attachElement(element, "");
VMM.appendElement(element, buildSlide() );
loaded = true;
@ -3957,7 +3947,7 @@ if (typeof VMM.Slider != 'undefined') {
}
var buildSlide = function() {
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { text: false, media: false }};
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { headline: false, text: false, media: false }};
var b_slide, c_wrap;
/* DATE
@ -3965,7 +3955,15 @@ if (typeof VMM.Slider != 'undefined') {
if (data.startdate != null && data.startdate != "") {
if (type.of(data.startdate) == "date") {
if (data.type != "start") {
c.text += VMM.createElement("h2", VMM.Util.date.prettyDate(data.startdate), "date");
var st = VMM.Util.date.prettyDate(data.startdate);
var en = VMM.Util.date.prettyDate(data.enddate);
if (st != en) {
//st = VMM.Util.date.prettyDate(data.startdate, true);
//en = VMM.Util.date.prettyDate(data.enddate, true);
c.text += VMM.createElement("h2", st + "<small> &mdash; " + en + "</small>", "date");
} else {
c.text += VMM.createElement("h2", st, "date");
}
}
}
}
@ -3973,6 +3971,7 @@ if (typeof VMM.Slider != 'undefined') {
/* HEADLINE
================================================== */
if (data.headline != null && data.headline != "") {
c.has.headline = true;
if (data.type == "start") {
c.text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(data.headline, "_blank"), "start");
} else {
@ -3985,6 +3984,9 @@ if (typeof VMM.Slider != 'undefined') {
if (data.text != null && data.text != "") {
c.has.text = true;
c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank"));
}
if (c.has.text || c.has.headline) {
c.text = VMM.createElement("div", c.text, "container");
c.text = VMM.createElement("div", c.text, "text");
}
@ -3997,6 +3999,7 @@ if (typeof VMM.Slider != 'undefined') {
c.media = VMM.MediaElement.create(data.asset);
}
}
/* COMBINE
================================================== */
if (c.has.text) { c.layout += "-text" };
@ -5094,7 +5097,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
timeline_id = "#timeline";
}
version = "0.99.00";
version = "1.01";
trace("TIMELINE VERSION " + version);

Loading…
Cancel
Save