Browse Source

Bringing z-index into a reasonable range and hyphenate long link text

pull/23/merge
Zach Wise 13 years ago
parent
commit
5ab19a2a65
  1. 4
      locale/de.js
  2. 4
      locale/en.js
  3. 4
      locale/es.js
  4. 4
      locale/fr.js
  5. 4
      locale/is.js
  6. 4
      locale/it.js
  7. 4
      locale/kr.js
  8. 4
      locale/nl.js
  9. 4
      locale/pt-br.js
  10. 4
      locale/zh-ch.js
  11. 4
      locale/zh-tw.js
  12. 14
      source/js/VMM.Util.js
  13. 4
      source/less/VMM.Slider.less
  14. 12
      source/less/VMM.Timeline.Core.less
  15. 8
      source/less/VMM.Timeline.TimeNav.less
  16. 2
      source/less/VMM.Timeline.Tooltip.less
  17. 25
      timeline-dark.css
  18. 4
      timeline-min.js
  19. 25
      timeline.css
  20. 14
      timeline.js

4
locale/de.js

File diff suppressed because one or more lines are too long

4
locale/en.js

File diff suppressed because one or more lines are too long

4
locale/es.js

File diff suppressed because one or more lines are too long

4
locale/fr.js

File diff suppressed because one or more lines are too long

4
locale/is.js

File diff suppressed because one or more lines are too long

4
locale/it.js

File diff suppressed because one or more lines are too long

4
locale/kr.js

File diff suppressed because one or more lines are too long

4
locale/nl.js

File diff suppressed because one or more lines are too long

4
locale/pt-br.js

File diff suppressed because one or more lines are too long

4
locale/zh-ch.js

File diff suppressed because one or more lines are too long

4
locale/zh-tw.js

File diff suppressed because one or more lines are too long

14
source/js/VMM.Util.js

@ -272,12 +272,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
var url_pattern = /(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img;
var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14">$2$5$8$11$14</a>$3$6$9$12';
//return text.replace(url_pattern, url_replace);
var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14" class="hyphenate">$2$5$8$11$14</a>$3$6$9$12';
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#%?=~_|!:,.;]*)([-A-Z0-9+&@#%?\/=~_|!:,.;]*)[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp, "<a href='$1' target='_blank'>$3</a>");
}
// Email addresses
var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
@ -288,7 +290,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return text
//.replace(urlPattern, "<a target='_blank' href='$&' onclick='void(0)'>$&</a>")
.replace(url_pattern, url_replace)
.replace(pseudoUrlPattern, "$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>")
.replace(pseudoUrlPattern, "$1<a target='_blank' class='hyphenate' onclick='void(0)' href='http://$2'>$2</a>")
.replace(emailAddressPattern, "<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>")
.replace(twitterHandlePattern, "<a href='http://twitter.com/$2' target='_blank' onclick='void(0)'>$1</a>")
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>");
@ -520,7 +522,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank'>$1</a>");
};
};
//str.substr(3,4)
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>

4
source/less/VMM.Slider.less

@ -192,7 +192,7 @@
.map {
line-height: normal;
border: 1px solid @color-line;
z-index:500;
z-index:200;
text-align:left;
background-color:@white;
img {
@ -205,7 +205,7 @@
}
.map-attribution {
position: absolute;
z-index: 1000003;
z-index: 201;
//right: 0px;
bottom: 0px;
width:100%;

12
source/less/VMM.Timeline.Core.less

@ -37,7 +37,13 @@
clear:both;
overflow:hidden;
.hyphenate {
white-space:nowrap;
width:200px;
overflow:hidden;
display:inline-block;
height:@base-line;
}
/* FEATURE
================================================== */
.feature {
@ -61,7 +67,7 @@
overflow:hidden;
top:0px;
left:0px;
z-index:2000;
z-index:205;
width: 100%;
height:100%;
background-color:@color-background-dark;
@ -239,7 +245,7 @@
}
.zFront {
z-index:500;
z-index:204;
}
}

8
source/less/VMM.Timeline.TimeNav.less

@ -20,7 +20,7 @@
//top: -1px;
top:45px;
left:0px;
z-index:1000;
z-index:202;
background-color: @white;
//width:59px;
//height:150px;
@ -37,7 +37,7 @@
//position:absolute;
//display:inline-block;
top: 0px;
z-index:1000;
z-index:202;
width: 18px;
height: 18px;
color: @color-navigation-major-time;//@color-nav-description;
@ -125,7 +125,7 @@
width:3px;
height:150px;
background: @color-theme;
z-index:500;
z-index:201;
.box-shadow();
}
}
@ -200,7 +200,7 @@
}
.marker:hover {
.line {
z-index:500;
z-index:201;
background:@color-nav-title;
}
}

2
source/less/VMM.Timeline.Tooltip.less

@ -5,7 +5,7 @@
.tooltip {
position: absolute;
z-index: 1020;
z-index: 205;
display: block;
visibility: visible;
padding: 5px;

25
timeline-dark.css

@ -246,6 +246,13 @@
================================================== */
}
#timeline .hyphenate {
white-space: nowrap;
width: 200px;
overflow: hidden;
display: inline-block;
height: 20px;
}
#timeline .feature {
width: 100%;
}
@ -265,7 +272,7 @@
overflow: hidden;
top: 0px;
left: 0px;
z-index: 2000;
z-index: 205;
width: 100%;
height: 100%;
background-color: #e9e9e9;
@ -452,7 +459,7 @@
height: 24px;
}
#timeline .zFront {
z-index: 500;
z-index: 204;
}
/* Slider
------------------------------------------------------------------------------------------- */
@ -642,7 +649,7 @@
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map {
line-height: normal;
border: 1px solid #cccccc;
z-index: 500;
z-index: 200;
text-align: left;
background-color: #ffffff;
}
@ -656,7 +663,7 @@
}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution {
position: absolute;
z-index: 1000003;
z-index: 201;
bottom: 0px;
width: 100%;
overflow: hidden;
@ -764,7 +771,7 @@
position: absolute;
top: 45px;
left: 0px;
z-index: 1000;
z-index: 202;
background-color: #ffffff;
border: 1px solid #cccccc;
-webkit-box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
@ -779,7 +786,7 @@
font-weight: normal;
line-height: 20px;
top: 0px;
z-index: 1000;
z-index: 202;
width: 18px;
height: 18px;
color: #333333;
@ -863,7 +870,7 @@
width: 3px;
height: 150px;
background: #0088cc;
z-index: 500;
z-index: 201;
-webkit-box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
@ -922,7 +929,7 @@
color: #999999;
}
#timeline .navigation .timenav .content .marker:hover .line {
z-index: 500;
z-index: 201;
background: #999999;
}
#timeline .navigation .timenav .content .marker {
@ -1355,7 +1362,7 @@
* ------------------------------------------------------------------------------------------- */
.tooltip {
position: absolute;
z-index: 1020;
z-index: 205;
display: block;
visibility: visible;
padding: 5px;

4
timeline-min.js vendored

File diff suppressed because one or more lines are too long

25
timeline.css

@ -246,6 +246,13 @@
================================================== */
}
#timeline .hyphenate {
white-space: nowrap;
width: 200px;
overflow: hidden;
display: inline-block;
height: 20px;
}
#timeline .feature {
width: 100%;
}
@ -265,7 +272,7 @@
overflow: hidden;
top: 0px;
left: 0px;
z-index: 2000;
z-index: 205;
width: 100%;
height: 100%;
background-color: #e9e9e9;
@ -452,7 +459,7 @@
height: 24px;
}
#timeline .zFront {
z-index: 500;
z-index: 204;
}
/* Slider
------------------------------------------------------------------------------------------- */
@ -642,7 +649,7 @@
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map {
line-height: normal;
border: 1px solid #cccccc;
z-index: 500;
z-index: 200;
text-align: left;
background-color: #ffffff;
}
@ -656,7 +663,7 @@
}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution {
position: absolute;
z-index: 1000003;
z-index: 201;
bottom: 0px;
width: 100%;
overflow: hidden;
@ -764,7 +771,7 @@
position: absolute;
top: 45px;
left: 0px;
z-index: 1000;
z-index: 202;
background-color: #ffffff;
border: 1px solid #cccccc;
-webkit-box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
@ -779,7 +786,7 @@
font-weight: normal;
line-height: 20px;
top: 0px;
z-index: 1000;
z-index: 202;
width: 18px;
height: 18px;
color: #333333;
@ -863,7 +870,7 @@
width: 3px;
height: 150px;
background: #0088cc;
z-index: 500;
z-index: 201;
-webkit-box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3);
@ -922,7 +929,7 @@
color: #999999;
}
#timeline .navigation .timenav .content .marker:hover .line {
z-index: 500;
z-index: 201;
background: #999999;
}
#timeline .navigation .timenav .content .marker {
@ -1355,7 +1362,7 @@
* ------------------------------------------------------------------------------------------- */
.tooltip {
position: absolute;
z-index: 1020;
z-index: 205;
display: block;
visibility: visible;
padding: 5px;

14
timeline.js

@ -3277,12 +3277,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
var url_pattern = /(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img;
var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14">$2$5$8$11$14</a>$3$6$9$12';
//return text.replace(url_pattern, url_replace);
var url_replace = '$1$4$7$10$13<a href="$2$5$8$11$14" class="hyphenate">$2$5$8$11$14</a>$3$6$9$12';
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#%?=~_|!:,.;]*)([-A-Z0-9+&@#%?\/=~_|!:,.;]*)[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp, "<a href='$1' target='_blank'>$3</a>");
}
// Email addresses
var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
@ -3293,7 +3295,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
return text
//.replace(urlPattern, "<a target='_blank' href='$&' onclick='void(0)'>$&</a>")
.replace(url_pattern, url_replace)
.replace(pseudoUrlPattern, "$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>")
.replace(pseudoUrlPattern, "$1<a target='_blank' class='hyphenate' onclick='void(0)' href='http://$2'>$2</a>")
.replace(emailAddressPattern, "<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>")
.replace(twitterHandlePattern, "<a href='http://twitter.com/$2' target='_blank' onclick='void(0)'>$1</a>")
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>");
@ -3525,7 +3527,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
.replace(twitterSearchPattern, "<a href='http://twitter.com/#search?q=%23$2' target='_blank'>$1</a>");
};
};
//str.substr(3,4)
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>

Loading…
Cancel
Save