From 5f5f6436fa456f54d2ccf7ad057ab195305a4c45 Mon Sep 17 00:00:00 2001 From: Leif Hanson Date: Mon, 17 Feb 2014 16:57:27 +0000 Subject: [PATCH] Minor updates. --- Toolkit/Maps/Map.php | 64 ++++++------ Toolkit/Page.php | 5 + libjs/external.js | 27 +++++ libjs/pagefunctions.js | 13 +++ libjs/respond.min.js | 6 ++ styles.css | 10 ++ templates/template.html | 224 +++++++++++++++++++--------------------- 7 files changed, 197 insertions(+), 152 deletions(-) create mode 100755 libjs/external.js create mode 100755 libjs/pagefunctions.js create mode 100755 libjs/respond.min.js diff --git a/Toolkit/Maps/Map.php b/Toolkit/Maps/Map.php index da32eca..10f9b97 100644 --- a/Toolkit/Maps/Map.php +++ b/Toolkit/Maps/Map.php @@ -29,25 +29,25 @@ class Toolkit_Maps_Map { private $googleMapScript = 'google-map.js'; - // {{{ __construct() + // {{{ __construct() /** * Class constructor * * @access public */ - public function __construct() - { - } + public function __construct() + { + } - // }}} + // }}} public function setGoogleMapScript($script) { $this->googleMapScript = $script; } - // {{{ getMemberXML() + // {{{ getMemberXML() /** * Description of getMemberXML @@ -57,28 +57,28 @@ class Toolkit_Maps_Map * @return DOMDocument * @access public */ - public function getMemberXML(array $members) - { - $dom = new DOMDocument("1.0"); + public function getMemberXML(array $members) + { + $dom = new DOMDocument("1.0"); - $node = $dom->createElement("markers"); - $parNode = $dom->appendChild($node); + $node = $dom->createElement("markers"); + $parNode = $dom->appendChild($node); - foreach ($members as $i) { - $node = $dom->createElement("marker"); - $newNode = $parNode->appendChild($node); + foreach ($members as $i) { + $node = $dom->createElement("marker"); + $newNode = $parNode->appendChild($node); - foreach ($i as $k => $v) { - $newNode->setAttribute($k, $v); - } - } + foreach ($i as $k => $v) { + $newNode->setAttribute($k, $v); + } + } - return $dom->saveXML(); - } + return $dom->saveXML(); + } - // }}} + // }}} - // {{{ toHtml() + // {{{ toHtml() /** * Description for toHtml @@ -89,18 +89,18 @@ class Toolkit_Maps_Map * * @return string */ - public function toHtml($id = "map-canvas", $w = "100%", $h = "400px") - { - $GLOBALS['topScripts'][] - = 'http://maps.google.com/maps/api/js?sensor=false'; - $GLOBALS['bottomScripts'][] - = BASE_URL . 'Toolkit/Maps/js/' . $this->googleMapScript; + public function toHtml($id = "map-canvas", $w = "100%", $h = "400px") + { + $GLOBALS['scripts'][] + = 'http://maps.google.com/maps/api/js?sensor=false'; + $GLOBALS['scripts'][] + = BASE_URL . 'Toolkit/Maps/js/' . $this->googleMapScript; - $format = '
'; + $format = '
'; - return sprintf($format, $id, $w, $h); - } + return sprintf($format, $id, $w, $h); + } - // }}} + // }}} } diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 6f7c309..6e9fd7b 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -145,9 +145,14 @@ class Toolkit_Page // Resources needed for every page. $GLOBALS['styleSheets'] = array(JQUERY_UI_CDN_CSS); + $GLOBALS['styleSheets'][] = $this->mediaBaseURL . 'fancybox/jquery.fancybox.css'; // Resources needed for every page. $GLOBALS['topScripts'][] = JQUERY_CDN_JS; $GLOBALS['topScripts'][] = JQUERY_UI_CDN_JS; + $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "libjs/respond.min.js"; + $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "libjs/external.js"; + $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "fancybox/jquery.fancybox.js"; + $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "libjs/pagefunctions.js"; } private function _video() diff --git a/libjs/external.js b/libjs/external.js new file mode 100755 index 0000000..22d4a08 --- /dev/null +++ b/libjs/external.js @@ -0,0 +1,27 @@ +/* + * Open all links that are not of the site to open in new window + */ + + +$('a').each(function() { + var urlPattern = new RegExp('/' + window.location.host + '/'); + //console.log($(this).attr('href')); + //console.log($(this).attr('href').indexOf("javascript")); + if( !urlPattern.test(this.href) + && !$(this).hasClass('thickbox') + && !$(this).hasClass('colorbox') + && !$(this).hasClass('various') + && !$(this).hasClass('phototitle') + && !$(this).hasClass('photoimg') + && ($(this).attr('href') != "#") + && ($(this).attr('href') != "") + && ($(this).attr('href') != null) + && ($(this).attr('href').indexOf("javascript") == -1) + ) { + $(this).click(function(event) { + event.preventDefault(); + event.stopPropagation(); + window.open(this.href, '_blank'); + }); + } +}); \ No newline at end of file diff --git a/libjs/pagefunctions.js b/libjs/pagefunctions.js new file mode 100755 index 0000000..d1d38e7 --- /dev/null +++ b/libjs/pagefunctions.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + $(".various").fancybox({ + maxWidth : 1200, + maxHeight : 800, + fitToView : true, + width : '90%', + height : '90%', + autoSize : true, + closeClick : false, + openEffect : 'none', + closeEffect : 'none' + }); +}); \ No newline at end of file diff --git a/libjs/respond.min.js b/libjs/respond.min.js new file mode 100755 index 0000000..8353e99 --- /dev/null +++ b/libjs/respond.min.js @@ -0,0 +1,6 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ +window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); + +/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this); diff --git a/styles.css b/styles.css index 21a80b0..4b587fb 100755 --- a/styles.css +++ b/styles.css @@ -365,7 +365,17 @@ ul#mainnav li a:hover { -moz-opacity: 1; -khtml-opacity: 1; opacity: 1; + padding: 0 10px; + overflow: hidden; } +#slideshow_wrapper .theme-default .nivo-caption strong { + float: left; + padding: 5px 0; +} + #slideshow_wrapper .theme-default .nivo-caption span { + float: right; + padding: 5px 0; + } /* Homepage Blocks */ #hHlines { display: block; diff --git a/templates/template.html b/templates/template.html index 5d8ac1b..da4e5ec 100755 --- a/templates/template.html +++ b/templates/template.html @@ -10,7 +10,7 @@ {styles:h} - + {topScripts:h} {if:isHomePage} @@ -18,131 +18,115 @@ {else:} {end:} -
- -
-
- {if:rotatingImages}{rotatingImages:h}{end:} -
-
-

Make A Reservation:

- -
-
- - -
- {if:sideNav} -
- {else:} -
- {end:} -
- +
+ +
+
+ {if:rotatingImages}{rotatingImages:h}{end:} +
+
+

Make A Reservation:

+ +
+
+ + +
+ {if:sideNav} +
+ {else:} +
+ {end:} + +
+

This text says something about watching videos.

+ + -
-

This text says something about watching videos.

- - - -
-
-
- {toolboxContent:h} -
-
-
+
+
+ {toolboxContent:h} +
+
+ -
-
-
- -
- + {end:} +
{v[descr]:h}More Info >>
+ + +
+
+
+ +
+ - - +
{bottomScripts:h} -- 2.17.1