-- cgit v1.2.3 From f32c3d74a4a70d871a5f0f166bbe67fe9dcea26f Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sun, 6 May 2012 06:05:31 -0400 Subject: fixing widths to be more dynamic where possible. font size fixes. add README.md Signed-off-by: Simon L'nu --- view/theme/dispy/README.md | 29 +++++ view/theme/dispy/css/media.less | 71 ++++++++++++ view/theme/dispy/css/reset.less | 66 +++++++++++ view/theme/dispy/dark/_base.less | 5 +- view/theme/dispy/dark/style.css | 54 +++++---- view/theme/dispy/dark/style.less | 237 +++++++++++++++----------------------- view/theme/dispy/light/style.less | 11 +- view/theme/dispy/theme.php | 32 +++-- 8 files changed, 320 insertions(+), 185 deletions(-) create mode 100644 view/theme/dispy/README.md create mode 100644 view/theme/dispy/css/media.less create mode 100644 view/theme/dispy/css/reset.less diff --git a/view/theme/dispy/README.md b/view/theme/dispy/README.md new file mode 100644 index 000000000..a058d9d50 --- /dev/null +++ b/view/theme/dispy/README.md @@ -0,0 +1,29 @@ +## Dispy Themes ## + +**Dispy**: Light, Spartan, Sleek, and Functional + +**Dispy Dark**: Dark, Spartan, Sleek, and Functional + + +### A Brief History ### + +Their beginnings are unknown to me, but they are part of the themes +that Mike Macgirvin, Emmanual Revah, put together for Friendica, I *think*. + +Later on, in the fall and winter of 2011-2012, I took over maintaining +the original dispy (now called dispy light). It went through a minor re-vamp, +keeping to its spartan look as much as possible. + +I added more rounded corners, and as Friendica grew in capabilities and +features, so did it - but, I always wanted to keep the features down, so as +to be fast and spartan, which seems to appeal to a lot of the geekier +users (like myself). + +Soon after I started maintaining dispy light, I developed its sister +theme - dark - according to another user's request (and other "+1" +votes for one like it). So *dark* was "born". + +Anyway, I've added a few more things since, and I hope I haven't +over-done it ;-). + +Simon diff --git a/view/theme/dispy/css/media.less b/view/theme/dispy/css/media.less new file mode 100644 index 000000000..28cf3f054 --- /dev/null +++ b/view/theme/dispy/css/media.less @@ -0,0 +1,71 @@ +// +//* media stuff */ +@media handheld and screen { + body { + font-size: 15pt; + } +} +//* Smartphones (portrait and landscape) ----------- */ +@media only screen and (min-device-width: 320px) + and (max-device-width: 480px) { + body { + font-size: 12pt; + } +} +//* Smartphones (landscape) ----------- */ +@media only screen and (min-width: 321px) { + body { + font-size: 12pt; + } +} +//* Smartphones (portrait) ----------- */ +@media only screen and (max-width: 320px) { + body { + font-size: 12pt; + } +} +//* iPads (portrait and landscape) ----------- */ +@media only screen and (min-device-width: 768px) + and (max-device-width: 1024px) { + body { + font-size: 14pt; + } +} +//* iPads (landscape) ----------- */ +@media only screen and (min-device-width: 768px) + and (max-device-width: 1024px) + and (orientation: landscape) { + body { + font-size: 14pt; + } +} +//* iPads (portrait) ----------- */ +@media only screen and (min-device-width: 768px) + and (max-device-width: 1024px) + and (orientation: portrait) { + body { + font-size: 14pt; + } +} +//* Desktops and laptops ----------- */ +//adjusted to 1024 from 1224. +//not everybody has a fucking big screen ffs +@media only screen and (min-width: 1024px) { + body { + font-size: 14pt; + } +} +//* Large screens - */ +@media only screen and (min-width: 1520px) { + body { + font-size: 16pt; + } +} +//* iPhone 4 ----------- */ +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), + only screen and (min-device-pixel-ratio: 1.5) { + body { + font-size: 14pt; + } +} + diff --git a/view/theme/dispy/css/reset.less b/view/theme/dispy/css/reset.less new file mode 100644 index 000000000..0cac48d8e --- /dev/null +++ b/view/theme/dispy/css/reset.less @@ -0,0 +1,66 @@ +///* http://meyerweb.com/eric/tools/css/reset/ +// v2.0 | 20110126 +// License: none (public domain) +//*/ + +html, body, div, span, +applet, object, iframe, +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, a, +abbr, acronym, address, +big, cite, code, del, +dfn, em, img, ins, kbd, +q, s, samp, small, strike, +strong, sub, sup, tt, var, +b, u, i, center, dl, dt, +dd, ol, ul, li, fieldset, +form, label, legend, table, +caption, tbody, tfoot, thead, +tr, th, td, article, aside, +canvas, details, embed, +figure, figcaption, footer, +header, hgroup, menu, nav, +output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +///* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ul, ol { + .list_reset; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +///* de-italicize address */ +address { + font-style: normal; +} +a img, +:link img, +:visited img { + border: none; +} +q { + quotes: "" ""; +} diff --git a/view/theme/dispy/dark/_base.less b/view/theme/dispy/dark/_base.less index 77472a2f5..aee933135 100644 --- a/view/theme/dispy/dark/_base.less +++ b/view/theme/dispy/dark/_base.less @@ -13,6 +13,9 @@ // you "compile" the css (with `lessc`), but css (/**/) comments // do. i use them to our advantage :). +// import our reset styles first +@import "../css/reset"; + //* backgrounds */ @dk_bg_colour: #1d1f1d; @bg_colour: #2e2f2e; @@ -138,7 +141,7 @@ } //* font size sizing */ .default_font () { - font-size: 16px; + font-size: 14pt; line-height: 1.1em; font-family: sans-serif; } diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css index c840b2b3b..f1131cdd5 100644 --- a/view/theme/dispy/dark/style.css +++ b/view/theme/dispy/dark/style.css @@ -1,12 +1,21 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;} +article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;} +body{line-height:1;} +ul,ol{margin:0px;padding:0px;list-style:none;list-style-position:inside;} +blockquote,q{quotes:none;} +blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;} +table{border-collapse:collapse;border-spacing:0;} +address{font-style:normal;} +a img,:link img,:visited img{border:none;} +q{quotes:"" "";} article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} audio,canvas,video,time{display:inline-block;*display:inline;*zoom:1;} audio:not([controls]),[hidden]{display:none;} html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} -body{margin:0;padding:0;font-size:16px;line-height:1.1em;font-family:sans-serif;color:#eeeecc;background-color:#2e2f2e;} +body{margin:0;padding:0;font-size:14pt;line-height:1.1em;font-family:sans-serif;color:#eeeecc;background-color:#2e2f2e;} button,input,select,textarea{color:#eeeecc;background-color:#2e2f2e;} -select{border:1px #555 dotted;padding:1px;margin:3px;color:#eeeecc;background:#2e2f2e;} +select{border:1px dotted #555555;padding:1px;margin:3px;color:#eeeecc;background:#2e2f2e;max-width:85%;min-width:85px;} option{padding:1px;color:#eeeecc;background:#2e2f2e;}option[selected="selected"]{color:#2e2f2e;background:#eeeecc;} -ul,ol{margin:0px;padding:0px;list-style:none;list-style-position:inside;} tr:nth-child(even){background-color:#474947;} :focus{outline:0;} [disabled="disabled"]{background:#4e4f4e;color:#ddddbb;} @@ -23,7 +32,12 @@ sup{top:-0.5em;} img{border:0 none;} a{color:#88a9d2;text-decoration:none;margin-bottom:1px;}a:hover{color:#638ec4;border-bottom:1px dotted #638ec4;} a:hover img{text-decoration:none;} -blockquote{background:#444;color:#eeeecc;text-indent:5px;padding:5px;border:1px #aaa solid;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;} +blockquote{background:#444444;color:#eeeecc;text-indent:5px;padding:5px;border:1px solid #9a9a9a;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;} +label{width:38%;display:inline-block;font-size:0.95em;margin:0 10px 1em 0;border:1px solid #2e2f2e;padding:5px;background:#eeeecc;color:#111111;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;} +input{width:250px;height:25px;border:1px solid #999999;}input[type="checkbox"],input[type="radio"]{margin:0;width:15px;height:15px;} +input[type="submit"],input[type="button"]{background-color:#eeeeee;border:2px outset #b1b1b1;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 3px 4px 0 #111111;-o-box-shadow:1px 3px 4px 0 #111111;-webkit-box-shadow:1px 3px 4px 0 #111111;-ms-box-shadow:1px 3px 4px 0 #111111;box-shadow:1px 3px 4px 0 #111111;color:#2e302e;cursor:pointer;font-weight:bold;width:auto;-moz-text-shadow:1px 1px #111111;-o-text-shadow:1px 1px #111111;-webkit-text-shadow:1px 1px #111111;-ms-text-shadow:1px 1px #111111;text-shadow:1px 1px #111111;} +input[type="submit"]:active,input[type="button"]:active{-moz-box-shadow:0 0 0 0 #111111;-o-box-shadow:0 0 0 0 #111111;-webkit-box-shadow:0 0 0 0 #111111;-ms-box-shadow:0 0 0 0 #111111;box-shadow:0 0 0 0 #111111;} +h1,h2,h3,h4,h5,h6{margin:10px 0px;} .required{display:inline;color:#ff0;font-size:16px;font-weight:bold;margin:3px;} .fakelink,.lockview{color:#88a9d2;cursor:pointer;} .fakelink:hover{color:#638ec4;} @@ -34,7 +48,7 @@ blockquote{background:#444;color:#eeeecc;text-indent:5px;padding:5px;border:1px .action{margin:5px 0;} .tool{margin:5px 0;list-style:none;} #articlemain{width:100%;height:100%;margin:0 auto;} -[class$="-desc"],[id$="-desc"]{color:#2e2f2e;background:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;padding:3px;margin:5px 0;font-weight:bold;} +[class$="-desc"],[id$="-desc"]{color:#2e2f2e;background:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;margin:3px 10px 7px 0;padding:6px 7px;font-weight:bold;font-size:smaller;} #asidemain .field{overflow:hidden;width:200px;} #login-extra-links{overflow:auto !important;padding-top:60px !important;width:100% !important;}#login-extra-links a{margin-right:20px;} #login_standard{display:block !important;float:none !important;height:100% !important;position:relative !important;width:100% !important;}#login_standard .field label{width:200px !important;} @@ -46,7 +60,7 @@ blockquote{background:#444;color:#eeeecc;text-indent:5px;padding:5px;border:1px #login_openid label{width:180px !important;} nav{height:60px;background-color:#1d1f1d;color:#eeeeee;position:relative;padding:20px 20px 10px 95px;}nav a{text-decoration:none;color:#eeeeee;border:0px;}nav a:hover{text-decoration:none;color:#eeeeee;border:0px;} nav #banner{display:block;position:absolute;left:51px;top:25px;}nav #banner #logo-text a{font-size:40px;font-weight:bold;margin-left:3px;} -ul#user-menu-popup{display:none;position:absolute;background-color:#555753;width:100%;padding:10px 0px;margin:0px;top:20px;left:0;-o-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-ms-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-moz-box-shadow:5px 5px 10px 0px #111111;-o-box-shadow:5px 5px 10px 0px #111111;-webkit-box-shadow:5px 5px 10px 0px #111111;-ms-box-shadow:5px 5px 10px 0px #111111;box-shadow:5px 5px 10px 0px #111111;z-index:10000;}ul#user-menu-popup li{display:block;}ul#user-menu-popup li a{display:block;padding:5px;}ul#user-menu-popup li a:hover{color:#eeeecc;background-color:#2e302e;} +ul#user-menu-popup{display:none;position:absolute;background-color:#555753;width:100%;padding:10px 0px;margin:0px;top:20px;left:0;font-size:small;line-height:1;-o-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-ms-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-moz-box-shadow:5px 5px 10px 0px #111111;-o-box-shadow:5px 5px 10px 0px #111111;-webkit-box-shadow:5px 5px 10px 0px #111111;-ms-box-shadow:5px 5px 10px 0px #111111;box-shadow:5px 5px 10px 0px #111111;z-index:10000;}ul#user-menu-popup li{display:block;}ul#user-menu-popup li a{display:block;padding:5px;}ul#user-menu-popup li a:hover{color:#eeeecc;background-color:#2e302e;} ul#user-menu-popup li a.nav-sep{border-top:1px solid #2e302e;} nav .nav-link{display:inline-block;width:22px;height:22px;overflow:hidden;margin:0px 5px 5px;text-indent:50px;background:transparent url(dark/icons.png) 0 0 no-repeat;} #nav-apps-link{background-position:0 -66px;}#nav-apps-link:hover{background-position:-22px -66px;} @@ -79,7 +93,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm #search-text{border:1px solid #eeeecc;background:#2e2f2e;color:#eeeecc;font-size:8pt;margin:8px;width:10em;height:14px;} #scrollup{position:fixed;right:5px;bottom:40px;z-index:100;}#scrollup a:hover{text-decoration:none;border:0;} #user-menu{-moz-box-shadow:5px 0 10px 0 #111111;-o-box-shadow:5px 0 10px 0 #111111;-webkit-box-shadow:5px 0 10px 0 #111111;-ms-box-shadow:5px 0 10px 0 #111111;box-shadow:5px 0 10px 0 #111111;display:block;width:75%;margin:3px 0 0 0;position:relative;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;background-color:#555753;background-image:url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAIAAwDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAMH/8QAIhAAAQMEAgIDAAAAAAAAAAAAAQIDBAAFBhESIQdBMVFh/8QAFQEBAQAAAAAAAAAAAAAAAAAAAgP/xAAXEQEBAQEAAAAAAAAAAAAAAAABAAIR/9oADAMBAAIRAxEAPwCXiHO8dbsEi35BEhIehNlbUhxhBU82O+G9bKgToD2D+VlmZX9OWZBJuAiMxGlni0w0gJCED4HXv7pSi6eFML//2Q==");background-position:98% center;background-repeat:no-repeat;clear:both;top:4px;left:10px;padding:2px;}#user-menu>a{vertical-align:top;} -#user-menu-label{font-size:12px;padding:3px 20px 9px 5px;height:10px;} +#user-menu-label{font-size:small;padding:3px 20px 9px 5px;height:10px;} .nav-ajax-update,.nav-ajax-left{width:30px;height:19px;background:transparent url(dark/notifications.png) 0 0 no-repeat;color:#222;font-weight:bold;font-size:0.8em;padding-top:0.2em;text-align:center;float:left;margin:0 -1px 0 3px;display:block;visibility:hidden;} .nav-ajax-update.show,.nav-ajax-left.show{visibility:visible;} #net-update{background-position:0px 0px;} @@ -99,14 +113,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm #sysmsg_info{position:fixed;bottom:0;-moz-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-o-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-webkit-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-ms-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;padding:10px;background-color:#fcaf3e;border:2px solid #f8911b;border-bottom:0;padding-bottom:50px;z-index:1000;} #sysmsg{position:fixed;bottom:0;-moz-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-o-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-webkit-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;-ms-box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;box-shadow:3px 3px 3px 10px 0 #111111 5px 5px 0px #111111;padding:10px;background-color:#fcaf3e;border:2px solid #f8911b;border-bottom:0;padding-bottom:50px;z-index:1000;} #sysmsg_info br,#sysmsg br{display:block;margin:2px 0px;border-top:1px solid #eeeecc;} -#asidemain{float:left;font-size:smaller;margin:20px 0 20px 35px;width:25%;display:inline;} +#asidemain{float:left;font-size:0.75em;margin:20px 0 20px 35px;width:25%;display:inline;} #asideright,#asideleft{display:none;} -.vcard .fn{font-size:1.7em;font-weight:bold;border-bottom:1px solid #729fcf;padding-bottom:3px;} +.vcard .fn{font-size:1.5em;font-weight:bold;border-bottom:1px solid #638ec4;padding-bottom:3px;} .vcard #profile-photo-wrapper{margin:20px;}.vcard #profile-photo-wrapper img{-moz-box-shadow:3px 3px 10px 0 #111111;-o-box-shadow:3px 3px 10px 0 #111111;-webkit-box-shadow:3px 3px 10px 0 #111111;-ms-box-shadow:3px 3px 10px 0 #111111;box-shadow:3px 3px 10px 0 #111111;} #asidemain h4{font-size:1.2em;} #asidemain #viewcontacts{text-align:right;} #asidemain #contact-block{width:99%;}#asidemain #contact-block .contact-block-content{width:99%;}#asidemain #contact-block .contact-block-content .contact-block-div{float:left;margin:0 5px 5px 0;width:50px;height:50px;padding:3px;position:relative;} -.aprofile dt{background:#eeeecc;color:#2e2f2e;font-weight:bold;-moz-box-shadow:1px 1px 5px 0 5px 5px 0px #111111;-o-box-shadow:1px 1px 5px 0 5px 5px 0px #111111;-webkit-box-shadow:1px 1px 5px 0 5px 5px 0px #111111;-ms-box-shadow:1px 1px 5px 0 5px 5px 0px #111111;box-shadow:1px 1px 5px 0 5px 5px 0px #111111;margin:15px 0 5px;padding-left:5px;} +.aprofile dt{background:#eeeecc;color:#2e2f2e;font-weight:bold;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:15px 0 5px;padding-left:5px;} #profile-extra-links ul{margin-left:0px;padding-left:0px;list-style:none;} #dfrn-request-link{-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;color:#eeeecc;display:block;font-size:1.2em;padding:0.2em 0.5em;background-color:#3465a4;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE4SURBVCiRpZKxLgRRFIa//64dKruZFRIlolBviFKiVHsHrRaFikTCC+hEQtRegMQDqDUKJOPOvauSMJmjYEU2M0viT071/+fLOTlHZkadQgjLkh1LPEoj661WKw5mXG034JxtAgtmrJoVK5WZYYCy1AVQSOYbjeSqMmRmQ8v755Ne77lb5w+d4HMNJopCT7X+bwDQZKfTyf4BIAHeawHe+/kQ/FGM+QagvpFl2VSM/tyMmV7PV14AYMQ5nUp0AULIp0HXzpVvSdLYMmNVAjNdAuNAUQHgxy/ZvEQTSMw0A33DxkIIi2ma3gwC9PKSzRWF2wbdpml62DfyPF9yjlNgAnQGLJjZnXON3Xa7ff8NGPbKQPNrbAOI0a9J2ilLEzAL7P0GqJJizF+BUeDhL2cclJnZPvAg6eADf+imKjSMX1wAAAAASUVORK5CYII=");background-repeat:no-repeat;background-position:95% center;} #wallmessage-link{color:#eeeeee;display:block;font-size:1.2em;padding:0.2em 0.5em;} @@ -166,7 +180,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .shiny{background:#2e3436;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;} .wall-outside-wrapper .shiny{-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;} .heart{color:red;} -.wall-item-content{overflow-x:auto;margin:0px 15px 0px 5px;} +.wall-item-content{overflow-x:auto;margin:0px 4em 0px 5px;} [id^="tread-wrapper"],[class^="tread-wrapper"]{margin:15px 0 0 0;padding:0px;} .wall-item-photo-menu{display:none;} .wall-item-photo-menu-button{display:none;text-indent:-99999px;background:#555753 url(dark/menu-user-pin.jpg) no-repeat 75px center;position:absolute;overflow:hidden;width:90px;height:20px;top:85px;left:0;-o-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-ms-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;} @@ -174,13 +188,13 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .wall-item-photo-wrapper{width:80px;height:80px;position:relative;padding:5px;background-color:#555753;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;} [class^="wall-item-tools"] *{}[class^="wall-item-tools"] *>*{} .wall-item-tools{float:right;opacity:0.4;-webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out;}.wall-item-tools:hover{opacity:1;-webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out;} -.wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:20px 0 30px -20px;padding:0;} -.wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-75px 0 0 5px;padding:0;} +.wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:18px 0 30px -20px;padding:0;} +.wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-78px 0 0 5px;padding:0;} .wall-item-title{font-size:1.2em;font-weight:bold;margin-bottom:1em;} .wall-item-body{margin:20px 20px 10px 0px;text-align:left;overflow-x:auto;} .wall-item-lock-wrapper{float:right;width:22px;height:22px;margin:0 -5px 0 0;opacity:1;} .wall-item-dislike,.wall-item-like{clear:left;font-size:0.8em;color:#888b85;margin:5px 0 5px 120px;} -.wall-item-author,.wall-item-actions-author{clear:left;font-size:0.8em;color:#888b85;margin:20px 20px 0 110px;} +.wall-item-author,.wall-item-actions-author{clear:left;font-size:0.8em;color:#888b85;margin:20px auto 0 0.2em;} .wall-item-ago{display:inline;padding-left:10px;} .wall-item-wrapper-end{clear:both;} .wall-item-location{margin-top:15px;width:100px;overflow:hidden;-moz-text-overflow:ellipsis;-ms-text-verflow:ellipsis;-o-text-overflow:ellipsis;-webkit-text-overflow:ellipsis;text-overflow:ellipsis;}.wall-item-location .icon{float:left;} @@ -198,7 +212,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .wall-item-outside-wrapper.comment .wall-item-photo-menu-button{width:50px;top:45px;background-position:35px center;} .wall-item-outside-wrapper.comment .wall-item-info{width:60px;} .wall-item-outside-wrapper.comment .wall-item-body{margin-left:10px;} -.wall-item-outside-wrapper.comment .wall-item-author{margin-left:50px;} +.wall-item-outside-wrapper.comment .wall-item-author{margin-left:0.2em;} .wall-item-outside-wrapper.comment .wall-item-photo-menu{min-width:50px;top:60px;} .comment-wwedit-wrapper{} .comment-edit-wrapper{border-top:1px #aaa solid;} @@ -206,7 +220,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm .comment-wwedit-wrapper img,.comment-edit-wrapper img{width:20px;height:20px;} .comment-edit-photo-link,.comment-edit-photo{margin-left:10px;} .my-comment-photo{width:40px;height:40px;padding:5px;} -[class^="comment-edit-text"]{margin:5px 0 10px 20px;width:84.5%;} +[class^="comment-edit-text"]{margin:5px 0 10px 20px;width:94%;} .comment-edit-text-empty{height:20px;border:2px #c8bebe solid;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;color:#c8bebe;-webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out;}.comment-edit-text-empty:hover{color:#999999;} .comment-edit-text-full{height:10em;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out;} .comment-edit-submit-wrapper{width:90%;margin:5px 5px 10px 50px;text-align:right;} @@ -395,7 +409,7 @@ div[id$="wrapper"]{height:100%;margin-bottom:1em;}div[id$="wrapper"] br{clear:le #adminpage .selectall{text-align:right;} #adminpage #users a{color:#eeeecc;text-decoration:underline;} #users .name{color:#eeeecc;} -.field{overflow:auto;}.field label{width:38%;display:inline-block;font-size:1.077em;margin:0 10px 1em 0;border:1px #2e2f2e solid;padding:5px;background:#eeeecc;color:#111;} +.field{overflow:auto;}.field label{width:38%;display:inline-block;margin:0 10px 1em 0;border:1px #2e2f2e solid;padding:5px;background:#eeeecc;color:#111;} .field .onoff{float:right;margin:0 330px 0 auto;width:80px;}.field .onoff a{display:block;border:1px solid #666666;padding:3px 6px 4px 10px;height:16px;text-decoration:none;} .field .onoff .on,.field .onoff .off{background-image:url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAUACIDASIAAhEBAxEB/8QAGgABAQACAwAAAAAAAAAAAAAAAAQDBQEGCf/EACgQAAIBAwIFAwUAAAAAAAAAAAECAAMEERIUBRMxUpEhIoEjM1Nxkv/EABcBAAMBAAAAAAAAAAAAAAAAAAABAgT/xAAaEQEAAgMBAAAAAAAAAAAAAAAAAQIRMVES/9oADAMBAAIRAxEAPwD1ERKFNFVaNNVUYACgACcNVt1dEKUwzZwNI9cSDczDVdnuKDjomrPyJOQ2SXNq/L0rTPMzp9vXHWZfo/jT+RNFQV6e2yPt6s/Ms3EWQofhnDqjszWFqzMcljRUknxEn3ES/dup8xxPZ0hXtKFViQzorEDpkiZtqvc3mIkzs40bVe5vMbVe5vMREbrN3xy4t7utSVaZVHZQSDnAP7iIm+K1xpkm09f/2Q==');background-repeat:no-repeat;} .field .onoff .on{background-position:42px 1px;background-color:#999999;color:#111111;text-align:left;} @@ -404,10 +418,6 @@ div[id$="wrapper"]{height:100%;margin-bottom:1em;}div[id$="wrapper"] br{clear:le .field textarea{width:80%;height:100px;} .field_help{display:block;margin-left:297px;color:#b1b1b1;} .field.radio .field_help{margin-left:297px;} -label{width:38%;display:inline-block;font-size:1.077em;margin:0 10px 1em 0;border:1px solid #2e2f2e;padding:5px;background:#eeeecc;color:#111111;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;} -input{width:250px;height:25px;border:1px solid #999999;}input[type="checkbox"],input[type="radio"]{margin:0;width:15px;height:15px;} -input[type="submit"],input[type="button"]{background-color:#eeeeee;border:2px outset #b1b1b1;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 3px 4px 0 #111111;-o-box-shadow:1px 3px 4px 0 #111111;-webkit-box-shadow:1px 3px 4px 0 #111111;-ms-box-shadow:1px 3px 4px 0 #111111;box-shadow:1px 3px 4px 0 #111111;color:#2e302e;cursor:pointer;font-weight:bold;width:auto;-moz-text-shadow:1px 1px #111111;-o-text-shadow:1px 1px #111111;-webkit-text-shadow:1px 1px #111111;-ms-text-shadow:1px 1px #111111;text-shadow:1px 1px #111111;} -input[type="submit"]:active,input[type="button"]:active{-moz-box-shadow:0 0 0 0 #111111;-o-box-shadow:0 0 0 0 #111111;-webkit-box-shadow:0 0 0 0 #111111;-ms-box-shadow:0 0 0 0 #111111;box-shadow:0 0 0 0 #111111;} .popup{width:100%;height:100%;top:0px;left:0px;position:absolute;display:none;}.popup .background{background-color:#111111;opacity:0.5;width:100%;height:100%;position:absolute;top:0px;left:0px;} .popup .panel{top:25%;left:25%;width:50%;height:50%;padding:1em;position:absolute;border:4px solid #000000;background-color:white;} #panel{z-index:100;} @@ -513,4 +523,4 @@ footer{display:block;clear:both;} #sidebar-page-list ul{padding:0;margin:5px 0;} #sidebar-page-list li{list-style:none;} #jappix_mini{margin-left:130px;position:fixed;bottom:0;right:175px !important;z-index:999;} -@media handheld{body{font-size:15pt;}}@media only screen and (min-device-width:320px) and (max-device-width:480px){body{font-size:10px;}}@media only screen and (min-width:321px){body{font-size:10px;}}@media only screen and (max-width:320px){body{font-size:10px;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px){body{font-size:16px;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px) and (orientation:landscape){body{font-size:16px;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px) and (orientation:portrait){body{font-size:16px;}}@media only screen and (min-width:1024px){body{font-size:16px;}}@media only screen and (min-width:1520px){body{font-size:18px;}}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){body{font-size:16px;}} +@media handheld and screen{body{font-size:15pt;}}@media only screen and (min-device-width:320px) and (max-device-width:480px){body{font-size:12pt;}}@media only screen and (min-width:321px){body{font-size:12pt;}}@media only screen and (max-width:320px){body{font-size:12pt;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px){body{font-size:14pt;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px) and (orientation:landscape){body{font-size:14pt;}}@media only screen and (min-device-width:768px) and (max-device-width:1024px) and (orientation:portrait){body{font-size:14pt;}}@media only screen and (min-width:1024px){body{font-size:14pt;}}@media only screen and (min-width:1520px){body{font-size:16pt;}}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){body{font-size:14pt;}} diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less index 40c8835e6..522c909a6 100644 --- a/view/theme/dispy/dark/style.less +++ b/view/theme/dispy/dark/style.less @@ -1,19 +1,19 @@ /* - * dispy-dark - * + * dispy dark + * Description: Dispy Dark: dark, sleek, functional * author, maintainer: simon * * Author's notes: * A few things of note here. The less file is our working copy, * and the CSS is *generated* from it. The CSS is the one that's * included in the HTML, and not the less one. This is to save - * bandwidth and processing time. + * bandwidth and processing time, by not including less.js. */ -/* from html5boilerplate */ -/* these are to tell browsers they should be displayed a certain way */ @import "_base"; +///* from html5boilerplate */ +///* these are to tell browsers they should be displayed a certain way */ article, aside, details, @@ -37,12 +37,12 @@ time { audio:not([controls]), [hidden] { display: none; } -/* - * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units - * 2. Force vertical scrollbar in non-IE - * 3. Prevent iOS text size adjust on device orientation change, - * without disabling user zoom: h5bp.com/g - */ +///* +// * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units +// * 2. Force vertical scrollbar in non-IE +// * 3. Prevent iOS text size adjust on device orientation change, +// * without disabling user zoom: h5bp.com/g +// */ html { font-size: 100%; overflow-y: scroll; @@ -61,11 +61,13 @@ button, input, select, textarea { background-color: @bg_colour; } select { - border: 1px #555 dotted; + .borders(1px, dotted, darken(@main_alt_colour, 60%)); padding: 1px; margin: 3px; color: @main_colour; background: @bg_colour; + max-width: 85%; + min-width: 85px; } option { padding: 1px; @@ -76,13 +78,10 @@ option { background: @main_colour; } } -ul, ol { - .list_reset; -} tr:nth-child(even) { background-color: lighten(@bg_colour, 10%); } -/* remember to define focus styles! */ +///* remember to define focus styles! */ :focus { outline: 0; } @@ -90,7 +89,7 @@ tr:nth-child(even) { background: @med_bg_colour; color: @disabled_colour; } -/* remember to highlight inserts somehow! */ +///* remember to highlight inserts somehow! */ ins, mark { background-color: @bg_alt_colour; color: @lt_main_colour; @@ -102,14 +101,19 @@ mark { font-style: italic; font-weight: bold; } -/* Redeclare monospace font family: h5bp.com/j */ -pre, code, kbd, samp, .wall-item-body code { +///* Redeclare monospace font family: h5bp.com/j */ +pre, +code, +kbd, +samp, +.wall-item-body code { font-family: monospace, monospace; _font-family: monospace; font-size: 1em; } -/* Improve readability of pre-formatted text in all browsers */ -pre, .wall-item-body code { +///* Improve readability of pre-formatted text in all browsers */ +pre, +.wall-item-body code { .wrap; } q { @@ -122,7 +126,8 @@ q { small { font-size: 85%; } -/* Position subscript and superscript content without affecting line-height: h5bp.com/k */ +///* Position subscript and superscript content without affecting +// * line-height: h5bp.com/k */ sub, sup { font-size: 75%; line-height: 0; @@ -151,13 +156,55 @@ a { } } blockquote { - background: #444; + background: darken(@main_alt_colour, 66.5%); color: @main_colour; text-indent: 5px; padding: 5px; - border: 1px #aaa solid; + .borders(1px, solid, darken(@main_alt_colour, 33%)); .rounded_corners; } +label { + width: 38%; + display: inline-block; + font-size: 0.95em; + margin: 0 10px 1em 0; + .borders(1px, solid, @bg_colour); + padding: 5px; + background: @main_colour; + color: darken(@main_alt_colour, 86.5%); + .box_shadow(3px, 3px, 5px); +} +input { + .box(250px, 25px); + .borders(1px, solid, darken(@main_alt_colour, 33.5%)); + &[type="checkbox"], + &[type="radio"] { + margin: 0; + .box(15px, 15px); + } + &[type="submit"], + &[type="button"] { + background-color: @main_alt_colour; + .borders(2px, outset, darken(@main_alt_colour, 24%)); + .rounded_corners; + .box_shadow(1px, 3px, 4px, 0); + color: @bg_alt_colour; + cursor: pointer; + font-weight: bold; + width: auto; + .text_shadow; + } + &[type="submit"]:active, + &[type="button"]:active { + .box_shadow(0, 0, 0, 0); + } +} +h1, h2, h3, +h4, h5, h6 { + margin: 10px 0px; +} + +// .required { display: inline; color: #ff0; @@ -219,9 +266,10 @@ blockquote { background: @main_colour; .rounded_corners; .box_shadow(3px, 3px, 5px); - padding: 3px; - margin: 5px 0; + margin: 3px 10px 7px 0; + padding: 6px 7px; font-weight: bold; + font-size: smaller; } @@ -276,7 +324,8 @@ blockquote { overflow: hidden !important; } label { width: 180px !important; - } } + } +} /** @@ -315,6 +364,8 @@ ul#user-menu-popup { margin: 0px; top: 20px; left: 0; + font-size: small; + line-height: 1; .rounded_corners(0 0 5px 5px); .box_shadow(5px, 5px, 10px, 0px); z-index: 10000; @@ -560,7 +611,7 @@ nav #nav-notifications-linkmenu { } } #user-menu-label { - font-size: 12px; + font-size: small; padding: 3px 20px 9px 5px; height: 10px; } @@ -700,7 +751,7 @@ nav #nav-notifications-linkmenu { */ #asidemain { float: left; - font-size: smaller; + font-size: 0.75em; margin: 20px 0 20px 35px; width: 25%; display: inline; @@ -712,9 +763,9 @@ nav #nav-notifications-linkmenu { } .vcard { .fn { - font-size: 1.7em; + font-size: 1.5em; font-weight: bold; - border-bottom: 1px solid #729fcf; + border-bottom: 1px solid @hover_colour; padding-bottom: 3px; } #profile-photo-wrapper { @@ -746,7 +797,8 @@ nav #nav-notifications-linkmenu { background: @main_colour; color: @bg_colour; font-weight: bold; - .box_shadow(1px 1px 5px 0); + .box_shadow(3px, 3px, 5px); + .rounded_corners; margin: 15px 0 5px; padding-left: 5px; } @@ -1133,7 +1185,7 @@ nav #nav-notifications-linkmenu { } .wall-item-content { overflow-x: auto; - margin: 0px 15px 0px 5px; + margin: 0px 4em 0px 5px; } [id^="tread-wrapper"], [class^="tread-wrapper"] { margin: 15px 0 0 0; @@ -1182,13 +1234,13 @@ nav #nav-notifications-linkmenu { .wall-item-subtools1 { .box(30px, 30px); list-style: none outside none; - margin: 20px 0 30px -20px; + margin: 18px 0 30px -20px; padding: 0; } .wall-item-subtools2 { .box(25px, 25px); list-style: none outside none; - margin: -75px 0 0 5px; + margin: -78px 0 0 5px; padding: 0; } .wall-item-title { @@ -1219,7 +1271,7 @@ nav #nav-notifications-linkmenu { clear: left; font-size: 0.8em; color: lighten(@menu_bg_colour, 20%); - margin: 20px 20px 0 110px; + margin: 20px auto 0 0.2em; } .wall-item-ago { display: inline; @@ -1332,7 +1384,7 @@ nav #nav-notifications-linkmenu { margin-left: 10px; } .wall-item-author { - margin-left: 50px; + margin-left: 0.2em; } .wall-item-photo-menu { min-width: 50px; @@ -1371,7 +1423,7 @@ nav #nav-notifications-linkmenu { [class^="comment-edit-text"] { margin: 5px 0 10px 20px; - width: 84.5%; + width: 94%; } .comment-edit-text-empty { height: 20px; @@ -2346,7 +2398,6 @@ div { label { width: 38%; display: inline-block; - font-size: 1.077em; margin: 0 10px 1em 0; border: 1px @bg_colour solid; padding: 5px; @@ -2396,42 +2447,6 @@ div { .field.radio .field_help { margin-left: 297px; } -label { - width: 38%; - display: inline-block; - font-size: 1.077em; - margin: 0 10px 1em 0; - .borders(1px, solid, @bg_colour); - padding: 5px; - background: @main_colour; - color: darken(@main_alt_colour, 86.5%); - .box_shadow(3px, 3px, 5px); -} -input { - .box(250px, 25px); - .borders(1px, solid, darken(@main_alt_colour, 33.5%)); - &[type="checkbox"], - &[type="radio"] { - margin: 0; - .box(15px, 15px); - } - &[type="submit"], - &[type="button"] { - background-color: @main_alt_colour; - .borders(2px, outset, darken(@main_alt_colour, 24%)); - .rounded_corners; - .box_shadow(1px, 3px, 4px, 0); - color: @bg_alt_colour; - cursor: pointer; - font-weight: bold; - width: auto; - .text_shadow; - } - &[type="submit"]:active, - &[type="button"]:active { - .box_shadow(0, 0, 0, 0); - } -} /* @@ -2986,74 +3001,4 @@ footer { z-index: 999; } - -//* media stuff */ -@media handheld { - body { - font-size: 15pt; - } -} -//* Smartphones (portrait and landscape) ----------- */ -@media only screen and (min-device-width: 320px) - and (max-device-width: 480px) { - body { - font-size: 10px; - } -} -//* Smartphones (landscape) ----------- */ -@media only screen and (min-width: 321px) { - body { - font-size: 10px; - } -} -//* Smartphones (portrait) ----------- */ -@media only screen and (max-width: 320px) { - body { - font-size: 10px; - } -} -//* iPads (portrait and landscape) ----------- */ -@media only screen and (min-device-width: 768px) - and (max-device-width: 1024px) { - body { - font-size: 16px; - } -} -//* iPads (landscape) ----------- */ -@media only screen and (min-device-width: 768px) - and (max-device-width: 1024px) - and (orientation: landscape) { - body { - font-size: 16px; - } -} -//* iPads (portrait) ----------- */ -@media only screen and (min-device-width: 768px) - and (max-device-width: 1024px) - and (orientation: portrait) { - body { - font-size: 16px; - } -} -//* Desktops and laptops ----------- */ -//adjusted to 1024 from 1224. -//not everybody has a fucking big screen ffs -@media only screen and (min-width: 1024px) { - body { - font-size: 16px; - } -} -//* Large screens - */ -@media only screen and (min-width: 1520px) { - body { - font-size: 18px; - } -} -//* iPhone 4 ----------- */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), - only screen and (min-device-pixel-ratio: 1.5) { - body { - font-size: 16px; - } -} - +@import "../css/media"; diff --git a/view/theme/dispy/light/style.less b/view/theme/dispy/light/style.less index 8968da42e..848e4f16d 100644 --- a/view/theme/dispy/light/style.less +++ b/view/theme/dispy/light/style.less @@ -59,7 +59,8 @@ select { padding: 3px; margin: 3px; color: #222; - background: #eee; } + background: #eee; +} option { padding: 3px; @@ -67,13 +68,13 @@ option { background: #eee; &[selected="selected"] { color: #111; - background: #cca; } } - + background: #cca; } +} ul, ol { - padding: 0; } + padding: 0; +} /* remember to define focus styles! */ - :focus { outline: 0; } diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index ee8698cc0..deedc86f7 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -2,13 +2,21 @@ /* * Name: Dispy - * Description:

Dispy: Light, Spartan, Sleek, and Functional
Dispy Dark: Dark, Spartan, Sleek, and Functional

- * Version: 1.2 + * Description: Dispy family (light, dark): Sleek and Functional Themes + * Version: 1.2.1 * Author: Simon * Maintainer: Simon * Screenshot: Screenshot */ +/* If you borrow any of these functions, make sure to + * RENAME your functions, otherwise both themes get conflicts, + * and the friendica instance will get HTTP 500 errors. + * To paraphrase Mike: "Might wish to wrap + * function_name with "if(! function_exists('function_name')) ... " + * or rename to prefix1_function_name (prefix2_function_name), etc. + */ + $a = get_app(); $a->theme_info = array( 'family' => 'dispy', @@ -165,7 +173,7 @@ EOT; $a->page['htmlhead'] .= sprintf('', $cssFile); } - js_in_foot(); + _js_in_foot(); } function dispy_community_info() { @@ -179,13 +187,15 @@ function dispy_community_info() { return $a->page['aside_bottom'] = replace_macros($tpl, $aside); } -function js_in_foot() { - /** @purpose insert stuff in bottom of page - */ - $a = get_app(); - $baseurl = $a->get_baseurl($ssl_state); - $bottom['$baseurl'] = $baseurl; - $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl'); +if(! function_exists('_js_in_foot')) { + function _js_in_foot() { + /** @purpose insert stuff in bottom of page + */ + $a = get_app(); + $baseurl = $a->get_baseurl($ssl_state); + $bottom['$baseurl'] = $baseurl; + $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl'); - return $a->page['bottom'] = replace_macros($tpl, $bottom); + return $a->page['bottom'] = replace_macros($tpl, $bottom); + } } -- cgit v1.2.3 From abbb4c2f367874e4cc777dd9e623063b4ab48a43 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 6 May 2012 12:08:46 +0200 Subject: diabook-theme: bugfix --- view/theme/diabook/theme.php | 52 +++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 2880df2d5..6a2e55179 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -8,16 +8,13 @@ */ $a = get_app(); -$a->theme_info = array( - 'family' => 'diabook', - 'version' => '1.025' -); + function diabook_init(&$a) { //print diabook-version for debugging $diabook_version = "Diabook (Version: 1.025)"; -$a->page['htmlhead'] .= sprintf('', $diabook_version); +$a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages $cssFile = null; @@ -131,12 +128,16 @@ if ($color=="dark") $color_path = "/diabook-dark/"; //load jquery.mapquery.js $_COOKIE['close_mapquery'] = "1"; if($_COOKIE['close_mapquery'] != "1") { + $mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js"; + $a->page['htmlhead'] .= sprintf('', $mqtmplJS); $mapqueryJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.core.js"; $a->page['htmlhead'] .= sprintf('', $mapqueryJS); $openlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/OpenLayers.js"; $a->page['htmlhead'] .= sprintf('', $openlayersJS); - $qlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqLayerControl.js"; - $a->page['htmlhead'] .= sprintf('', $mqlayersJS); + $mqmouseposJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js"; + $a->page['htmlhead'] .= sprintf('', $mqmouseposJS); + $mqzoomsliderJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js"; + $a->page['htmlhead'] .= sprintf('', $mqzoomsliderJS); } @@ -146,6 +147,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $(function() { $("a.lightbox").fancybox(); // Select all links with lightbox class $("a.#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} ); + $("a.#mapcontrol-link").fancybox({onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} ); }); $(window).load(function() { @@ -163,16 +165,30 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $("#map").mapQuery({ layers:[{ //add layers to your map; you need to define at least one to be able to see anything on the map type:"osm" //add a layer of the type osm (OpenStreetMap) - }] - }); - $("#map2").mapQuery({ - layers:[{ //add layers to your map; you need to define at least one to be able to see anything on the map - type:"osm" //add a layer of the type osm (OpenStreetMap) - }] - }); + }], + center:({zoom:8,position:[11.7,52.2]}), + }); }); - + + function open_mapcontrol() { + $("div#mapcontrol").attr("style","display: block;width:900px;height:600px;"); + $("#map2").mapQuery({layers:[{type:"osm"}], + center:({zoom:8,position:[11.7,52.2]})}); + + $("#mouseposition").mqMousePosition({ + map: "#map2", + x:"lon", + y:"lat", + precision:2 + }); + + + map = $("#map2").mapQuery().data("mapQuery"); + alert(map.center().zoom); + + + }; '; } //check if twitterbox is active and print @@ -366,7 +382,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['footer'] .= replace_macros($tpl, array()); // - js_in_foot(); + js_diabook_footer(); } @@ -562,7 +578,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $_COOKIE['close_mapquery'] = "1"; if($_COOKIE['close_mapquery'] != "1") { $mapquery = array(); - $mapquery['title'] = Array("", t('Earth View'), "", ""); + $mapquery['title'] = Array("", "".t('Earth View')."", "", ""); $aside['$mapquery'] = $mapquery; } //end mapquery @@ -607,7 +623,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } - function js_in_foot() { + function js_diabook_footer() { /** @purpose insert stuff in bottom of page */ $a = get_app(); -- cgit v1.2.3 From f09b3cfbf8cd125909552dc5d15fc8844156b60b Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 6 May 2012 12:25:09 +0200 Subject: diabook: small fix --- view/theme/diabook/communityhome.tpl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 3c6fb5a82..f7463df7c 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -22,6 +22,7 @@
{{ if $helpers }}

$helpers.title.1

+How-To Guides
NewHere
Friendica Support
Let's talk
@@ -116,12 +117,14 @@ $nv.search
{{ if $mapquery }}

$mapquery.title.1

-
+
-
Data CC-By-SA by OpenStreetMap
-'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.20"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('
')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$(''+c+""),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('').addClass(this._triggerClass).html(g==""?f:$("").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;db&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$(''),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&pp)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?''+q+"":e?"":''+q+"",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?''+s+"":e?"":''+s+"",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'",x=d?'
'+(c?w:"")+(this._isInRange(a,v)?'":"")+(c?"":w)+"
":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='
'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'
'+"";var R=z?'":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="=5?' class="ui-datepicker-week-end"':"")+">"+''+C[T]+""}Q+=R+"";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z";var _=z?'":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Ym;_+='",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+""}n++,n>11&&(n=0,o++),Q+="
'+this._get(a,"weekHeader")+"
'+this._get(a,"calculateWeek")(Y)+""+(bb&&!G?" ":bc?''+Y.getDate()+"":''+Y.getDate()+"")+"
"+(j?"
"+(g[0]>0&&N==g[1]-1?'
':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.20",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.progressbar.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.20"})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.core.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.20",save:function(a,b){for(var c=0;c
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h
").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fade.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fold.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.highlight.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.pulsate.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);; \ No newline at end of file diff --git a/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js new file mode 100644 index 000000000..54d0c5309 --- /dev/null +++ b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js @@ -0,0 +1,107 @@ +/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for + * full list of contributors). Published under the MIT license. + * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the + * full text of the license. */ + +/** +#jquery.mapquery.mqMousePosition.js +The file containing the mqMousePosition Widget + +### *$('selector')*.`mqMousePosition([options])` +_version added 0.1_ +####**Description**: create a widget to show the location under the mouse pointer + + + **options** + - **map**: the mapquery instance + - **precision**: the number of decimals (default 2) + - **x**: the label for the x-coordinate (default x) + - **y**: the label for the y-coordinate (default y) + + +>Returns: widget + + +The mqMousePosition allows us to show the coordinates under the mouse pointer + + + $('#mousepointer').mqMousePointer({ + map: '#map' + }); + + */ +(function($) { +$.template('mqMousePosition', + '
'+ + ''+ + '
'+ + '
'+ + '
'); + +$.widget("mapQuery.mqMousePosition", { + options: { + // The MapQuery instance + map: undefined, + + // The number of decimals for the coordinates + // default: 2 + // TODO: JCB20110630 use dynamic precision based on the pixel + // resolution, no need to configure precision + precision: 2, + + // The label of the x-value + // default: 'x' + x: 'x', + // The label of the y-value + // default: 'y' + y: 'y' + + }, + _create: function() { + var map; + var self = this; + var element = this.element; + var mousepos; + + //get the mapquery object + map = $(this.options.map).data('mapQuery'); + + map.bind("mousemove", + {widget:self,map:map}, + self._onMouseMove); + + + $.tmpl('mqMousePosition',{ + mouseposition:mousepos + }).appendTo(element); + + }, + _destroy: function() { + this.element.removeClass(' ui-widget ui-helper-clearfix ' + + 'ui-corner-all') + .empty(); + }, + _mouseMoved: function(data, element, map) { + var x = data.layerX; + var y = data.layerY; + var mapProjection = map.options.projection; + var displayProjection = map.options.projection; + //if the coordinates should be displayed in something else, + //set them via the map displayProjection option + var pos = map.olMap.getLonLatFromLayerPx(new OpenLayers.Pixel(x,y)); + if(map.options.displayProjection) { + displayProjection = map.options.displayProjection; + pos=pos.transform( + new OpenLayers.Projection(mapProjection), + new OpenLayers.Projection(displayProjection)); + } + $("#mq-mouseposition-x", element).html( + this.options.x+': '+pos.lon.toFixed(this.options.precision)); + $("#mq-mouseposition-y", element).html( + this.options.y+': '+pos.lat.toFixed(this.options.precision)); + }, + + _onMouseMove: function(evt, data) { + evt.data.widget._mouseMoved(data,evt.data.control,evt.data.map); + } +}); +})(jQuery); diff --git a/view/theme/diabook/js/jquery.tmpl.js b/view/theme/diabook/js/jquery.tmpl.js new file mode 100644 index 000000000..1c5b2d62f --- /dev/null +++ b/view/theme/diabook/js/jquery.tmpl.js @@ -0,0 +1,486 @@ +/* + * jQuery Templating Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + */ +(function( jQuery, undefined ){ + var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, + newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = []; + + function newTmplItem( options, parentItem, fn, data ) { + // Returns a template item data structure for a new rendered instance of a template (a 'template item'). + // The content field is a hierarchical array of strings and nested items (to be + // removed and replaced by nodes field of dom elements, once inserted in DOM). + var newItem = { + data: data || (parentItem ? parentItem.data : {}), + _wrap: parentItem ? parentItem._wrap : null, + tmpl: null, + parent: parentItem || null, + nodes: [], + calls: tiCalls, + nest: tiNest, + wrap: tiWrap, + html: tiHtml, + update: tiUpdate + }; + if ( options ) { + jQuery.extend( newItem, options, { nodes: [], parent: parentItem } ); + } + if ( fn ) { + // Build the hierarchical content to be used during insertion into DOM + newItem.tmpl = fn; + newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem ); + newItem.key = ++itemKey; + // Keep track of new template item, until it is stored as jQuery Data on DOM element + (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem; + } + return newItem; + } + + // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core). + jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems, + parent = this.length === 1 && this[0].parentNode; + + appendToTmplItems = newTmplItems || {}; + if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { + insert[ original ]( this[0] ); + ret = this; + } else { + for ( i = 0, l = insert.length; i < l; i++ ) { + cloneIndex = i; + elems = (i > 0 ? this.clone(true) : this).get(); + jQuery.fn[ original ].apply( jQuery(insert[i]), elems ); + ret = ret.concat( elems ); + } + cloneIndex = 0; + ret = this.pushStack( ret, name, insert.selector ); + } + tmplItems = appendToTmplItems; + appendToTmplItems = null; + jQuery.tmpl.complete( tmplItems ); + return ret; + }; + }); + + jQuery.fn.extend({ + // Use first wrapped element as template markup. + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( data, options, parentItem ) { + return jQuery.tmpl( this[0], data, options, parentItem ); + }, + + // Find which rendered template item the first wrapped DOM element belongs to + tmplItem: function() { + return jQuery.tmplItem( this[0] ); + }, + + // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template. + template: function( name ) { + return jQuery.template( name, this[0] ); + }, + + domManip: function( args, table, callback, options ) { + // This appears to be a bug in the appendTo, etc. implementation + // it should be doing .call() instead of .apply(). See #6227 + if ( args[0] && args[0].nodeType ) { + var dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem; + while ( i < argsLength && !(tmplItem = jQuery.data( args[i++], "tmplItem" ))) {} + if ( argsLength > 1 ) { + dmArgs[0] = [jQuery.makeArray( args )]; + } + if ( tmplItem && cloneIndex ) { + dmArgs[2] = function( fragClone ) { + // Handler called by oldManip when rendered template has been inserted into DOM. + jQuery.tmpl.afterManip( this, fragClone, callback ); + }; + } + oldManip.apply( this, dmArgs ); + } else { + oldManip.apply( this, arguments ); + } + cloneIndex = 0; + if ( !appendToTmplItems ) { + jQuery.tmpl.complete( newTmplItems ); + } + return this; + } + }); + + jQuery.extend({ + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( tmpl, data, options, parentItem ) { + var ret, topLevel = !parentItem; + if ( topLevel ) { + // This is a top-level tmpl call (not from a nested template using {{tmpl}}) + parentItem = topTmplItem; + tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl ); + wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level + } else if ( !tmpl ) { + // The template item is already associated with DOM - this is a refresh. + // Re-evaluate rendered template for the parentItem + tmpl = parentItem.tmpl; + newTmplItems[parentItem.key] = parentItem; + parentItem.nodes = []; + if ( parentItem.wrapped ) { + updateWrapped( parentItem, parentItem.wrapped ); + } + // Rebuild, without creating a new template item + return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) )); + } + if ( !tmpl ) { + return []; // Could throw... + } + if ( typeof data === "function" ) { + data = data.call( parentItem || {} ); + } + if ( options && options.wrapped ) { + updateWrapped( options, options.wrapped ); + } + ret = jQuery.isArray( data ) ? + jQuery.map( data, function( dataItem ) { + return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; + }) : + [ newTmplItem( options, parentItem, tmpl, data ) ]; + return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret; + }, + + // Return rendered template item for an element. + tmplItem: function( elem ) { + var tmplItem; + if ( elem instanceof jQuery ) { + elem = elem[0]; + } + while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {} + return tmplItem || topTmplItem; + }, + + // Set: + // Use $.template( name, tmpl ) to cache a named template, + // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc. + // Use $( "selector" ).template( name ) to provide access by name to a script block template declaration. + + // Get: + // Use $.template( name ) to access a cached template. + // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString ) + // will return the compiled template, without adding a name reference. + // If templateString includes at least one HTML tag, $.template( templateString ) is equivalent + // to $.template( null, templateString ) + template: function( name, tmpl ) { + if (tmpl) { + // Compile template and associate with name + if ( typeof tmpl === "string" ) { + // This is an HTML string being passed directly in. + tmpl = buildTmplFn( tmpl ) + } else if ( tmpl instanceof jQuery ) { + tmpl = tmpl[0] || {}; + } + if ( tmpl.nodeType ) { + // If this is a template block, use cached copy, or generate tmpl function and cache. + tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML )); + } + return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl; + } + // Return named compiled template + return name ? (typeof name !== "string" ? jQuery.template( null, name ): + (jQuery.template[name] || + // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) + jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; + }, + + encode: function( text ) { + // Do HTML encoding replacing < > & and ' and " by corresponding entities. + return ("" + text).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'"); + } + }); + + jQuery.extend( jQuery.tmpl, { + tag: { + "tmpl": { + _default: { $2: "null" }, + open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" + // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions) + // This means that {{tmpl foo}} treats foo as a template (which IS a function). + // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}. + }, + "wrap": { + _default: { $2: "null" }, + open: "$item.calls(_,$1,$2);_=[];", + close: "call=$item.calls();_=call._.concat($item.wrap(call,_));" + }, + "each": { + _default: { $2: "$index, $value" }, + open: "if($notnull_1){$.each($1a,function($2){with(this){", + close: "}});}" + }, + "if": { + open: "if(($notnull_1) && $1a){", + close: "}" + }, + "else": { + _default: { $1: "true" }, + open: "}else if(($notnull_1) && $1a){" + }, + "html": { + // Unecoded expression evaluation. + open: "if($notnull_1){_.push($1a);}" + }, + "=": { + // Encoded expression evaluation. Abbreviated form is ${}. + _default: { $1: "$data" }, + open: "if($notnull_1){_.push($.encode($1a));}" + }, + "!": { + // Comment tag. Skipped by parser + open: "" + } + }, + + // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events + complete: function( items ) { + newTmplItems = {}; + }, + + // Call this from code which overrides domManip, or equivalent + // Manage cloning/storing template items etc. + afterManip: function afterManip( elem, fragClone, callback ) { + // Provides cloned fragment ready for fixup prior to and after insertion into DOM + var content = fragClone.nodeType === 11 ? + jQuery.makeArray(fragClone.childNodes) : + fragClone.nodeType === 1 ? [fragClone] : []; + + // Return fragment to original caller (e.g. append) for DOM insertion + callback.call( elem, fragClone ); + + // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data. + storeTmplItems( content ); + cloneIndex++; + } + }); + + //========================== Private helper functions, used by code above ========================== + + function build( tmplItem, nested, content ) { + // Convert hierarchical content into flat string array + // and finally return array of fragments ready for DOM insertion + var frag, ret = content ? jQuery.map( content, function( item ) { + return (typeof item === "string") ? + // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM. + (tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) : + // This is a child template item. Build nested template. + build( item, tmplItem, item._ctnt ); + }) : + // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. + tmplItem; + if ( nested ) { + return ret; + } + + // top-level template + ret = ret.join(""); + + // Support templates which have initial or final text nodes, or consist only of text + // Also support HTML entities within the HTML markup. + ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) { + frag = jQuery( middle ).get(); + + storeTmplItems( frag ); + if ( before ) { + frag = unencode( before ).concat(frag); + } + if ( after ) { + frag = frag.concat(unencode( after )); + } + }); + return frag ? frag : unencode( ret ); + } + + function unencode( text ) { + // Use createElement, since createTextNode will not render HTML entities correctly + var el = document.createElement( "div" ); + el.innerHTML = text; + return jQuery.makeArray(el.childNodes); + } + + // Generate a reusable function that will serve to render a template against data + function buildTmplFn( markup ) { + return new Function("jQuery","$item", + "var $=jQuery,call,_=[],$data=$item.data;" + + + // Introduce the data as local variables using with(){} + "with($data){_.push('" + + + // Convert the template into pure JavaScript + jQuery.trim(markup) + .replace( /([\\'])/g, "\\$1" ) + .replace( /[\r\t\n]/g, " " ) + .replace( /\$\{([^\}]*)\}/g, "{{= $1}}" ) + .replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g, + function( all, slash, type, fnargs, target, parens, args ) { + var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect; + if ( !tag ) { + throw "Template command not found: " + type; + } + def = tag._default || []; + if ( parens && !/\w$/.test(target)) { + target += parens; + parens = ""; + } + if ( target ) { + target = unescape( target ); + args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : ""); + // Support for target being things like a.toLowerCase(); + // In that case don't call with template item as 'this' pointer. Just evaluate... + expr = parens ? (target.indexOf(".") > -1 ? target + parens : ("(" + target + ").call($item" + args)) : target; + exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))"; + } else { + exprAutoFnDetect = expr = def.$1 || "null"; + } + fnargs = unescape( fnargs ); + return "');" + + tag[ slash ? "close" : "open" ] + .split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" ) + .split( "$1a" ).join( exprAutoFnDetect ) + .split( "$1" ).join( expr ) + .split( "$2" ).join( fnargs ? + fnargs.replace( /\s*([^\(]+)\s*(\((.*?)\))?/g, function( all, name, parens, params ) { + params = params ? ("," + params + ")") : (parens ? ")" : ""); + return params ? ("(" + name + ").call($item" + params) : all; + }) + : (def.$2||"") + ) + + "_.push('"; + }) + + "');}return _;" + ); + } + function updateWrapped( options, wrapped ) { + // Build the wrapped content. + options._wrap = build( options, true, + // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string. + jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()] + ).join(""); + } + + function unescape( args ) { + return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null; + } + function outerHtml( elem ) { + var div = document.createElement("div"); + div.appendChild( elem.cloneNode(true) ); + return div.innerHTML; + } + + // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance. + function storeTmplItems( content ) { + var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m; + for ( i = 0, l = content.length; i < l; i++ ) { + if ( (elem = content[i]).nodeType !== 1 ) { + continue; + } + elems = elem.getElementsByTagName("*"); + for ( m = elems.length - 1; m >= 0; m-- ) { + processItemKey( elems[m] ); + } + processItemKey( elem ); + } + function processItemKey( el ) { + var pntKey, pntNode = el, pntItem, tmplItem, key; + // Ensure that each rendered template inserted into the DOM has its own template item, + if ( (key = el.getAttribute( tmplItmAtt ))) { + while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { } + if ( pntKey !== key ) { + // The next ancestor with a _tmplitem expando is on a different key than this one. + // So this is a top-level element within this template item + // Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment. + pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0; + if ( !(tmplItem = newTmplItems[key]) ) { + // The item is for wrapped content, and was copied from the temporary parent wrappedItem. + tmplItem = wrappedItems[key]; + tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true ); + tmplItem.key = ++itemKey; + newTmplItems[itemKey] = tmplItem; + } + if ( cloneIndex ) { + cloneTmplItem( key ); + } + } + el.removeAttribute( tmplItmAtt ); + } else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) { + // This was a rendered element, cloned during append or appendTo etc. + // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem. + cloneTmplItem( tmplItem.key ); + newTmplItems[tmplItem.key] = tmplItem; + pntNode = jQuery.data( el.parentNode, "tmplItem" ); + pntNode = pntNode ? pntNode.key : 0; + } + if ( tmplItem ) { + pntItem = tmplItem; + // Find the template item of the parent element. + // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string) + while ( pntItem && pntItem.key != pntNode ) { + // Add this element as a top-level node for this rendered template item, as well as for any + // ancestor items between this item and the item of its parent element + pntItem.nodes.push( el ); + pntItem = pntItem.parent; + } + // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering... + delete tmplItem._ctnt; + delete tmplItem._wrap; + // Store template item as jQuery data on the element + jQuery.data( el, "tmplItem", tmplItem ); + } + function cloneTmplItem( key ) { + key = key + keySuffix; + tmplItem = newClonedItems[key] = + (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true )); + } + } + } + + //---- Helper functions for template item ---- + + function tiCalls( content, tmpl, data, options ) { + if ( !content ) { + return stack.pop(); + } + stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options }); + } + + function tiNest( tmpl, data, options ) { + // nested template, using {{tmpl}} tag + return jQuery.tmpl( jQuery.template( tmpl ), data, options, this ); + } + + function tiWrap( call, wrapped ) { + // nested template, using {{wrap}} tag + var options = call.options || {}; + options.wrapped = wrapped; + // Apply the template, which may incorporate wrapped content, + return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item ); + } + + function tiHtml( filter, textOnly ) { + var wrapped = this._wrap; + return jQuery.map( + jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ), + function(e) { + return textOnly ? + e.innerText || e.textContent : + e.outerHTML || outerHtml(e); + }); + } + + function tiUpdate() { + var coll = this.nodes; + jQuery.tmpl( null, null, null, this).insertBefore( coll[0] ); + jQuery( coll ).remove(); + } +})( jQuery ); diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 6a2e55179..f6c9dd7c1 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -223,6 +223,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; '; } @@ -390,7 +391,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a = get_app(); // comunity_profiles if($_COOKIE['close_profiles'] != "1") { - $aside['$comunity_profilest_title'] = t('Community Profiles'); + $aside['$comunity_profiles_title'] = t('Community Profiles'); $aside['$comunity_profiles_items'] = array(); $r = q("select gcontact.* from gcontact left join glink on glink.gcid = gcontact.id where glink.cid = 0 and glink.uid = 0 order by rand() limit 9"); @@ -603,12 +604,13 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $twitter['title'] = Array("", "".t('Last Tweets')."", "", ""); $aside['$twitter'] = $twitter; $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); - $aside['$submit'] = t('Submit'); + $aside['$sub'] = t('Submit'); $aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm); - $baseurl = $a->get_baseurl(); + $baseurl = $a->get_baseurl($ssl_state); $aside['$baseurl'] = $baseurl; - if (isset($_POST['diabook-settings-submit'])){ + if (isset($_POST['diabook-settings-sub']) && $_POST['diabook-settings-sub']!=''){ set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + header("Location: network"); } } //end twitter -- cgit v1.2.3 From 3d0a0b6abfcb2e2fcb28a0b415d026c25de260d5 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 7 May 2012 02:24:43 +0200 Subject: diabook-theme: add "Earth Layers"-box at right_side --- view/theme/diabook/communityhome.tpl | 34 +++++++-- view/theme/diabook/config.php | 21 +++++- .../diabook/js/jquery.mapquery.mqZoomSlider.js | 85 ++++++++++++++++++++++ view/theme/diabook/js/jquery.mousewheel.js | 84 +++++++++++++++++++++ view/theme/diabook/theme.php | 63 ++++++++++++---- view/theme/diabook/theme_settings.tpl | 6 ++ 6 files changed, 269 insertions(+), 24 deletions(-) create mode 100644 view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js create mode 100644 view/theme/diabook/js/jquery.mousewheel.js diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 1749181fc..eb4385722 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -8,6 +8,32 @@ + +
@@ -17,6 +43,7 @@ {{ if $page }}
$page
{{ endif }} +
{{ if $comunity_profiles_title }} @@ -122,13 +149,6 @@ $nv.search
Data CC-By-SA by OpenStreetMap
- -
{{ endif }} \ No newline at end of file diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index e6c2681e3..40a539079 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -14,8 +14,11 @@ function theme_content(&$a){ $resolution = get_pconfig(local_user(), 'diabook', 'resolution' ); $color = get_pconfig(local_user(), 'diabook', 'color' ); $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); + $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); + $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); + $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); } function theme_post(&$a){ @@ -28,6 +31,9 @@ function theme_post(&$a){ set_pconfig(local_user(), 'diabook', 'resolution', $_POST['diabook_resolution']); set_pconfig(local_user(), 'diabook', 'color', $_POST['diabook_color']); set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); + set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); + set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']); } } @@ -38,8 +44,11 @@ function theme_admin(&$a){ $resolution = get_config('diabook', 'resolution' ); $color = get_config('diabook', 'color' ); $TSearchTerm = get_config('diabook', 'TSearchTerm' ); + $ELZoom = get_config('diabook', 'ELZoom' ); + $ELPosX = get_config('diabook', 'ELPosX' ); + $ELPosY = get_config('diabook', 'ELPosY' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); } function theme_admin_post(&$a){ @@ -49,11 +58,14 @@ function theme_admin_post(&$a){ set_config('diabook', 'resolution', $_POST['diabook_resolution']); set_config('diabook', 'color', $_POST['diabook_color']); set_config('diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + set_config('diabook', 'ELZoom', $_POST['diabook_ELZoom']); + set_config('diabook', 'ELPosX', $_POST['diabook_ELPosX']); + set_config('diabook', 'ELPosY', $_POST['diabook_ELPosY']); } } -function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm){ +function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY){ $line_heights = array( "1.3"=>"1.3", "---"=>"---", @@ -100,6 +112,9 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$resolution' => array('diabook_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions), '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors), '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm), + '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), + '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), + '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), )); return $o; } diff --git a/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js b/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js new file mode 100644 index 000000000..ebdce3bf3 --- /dev/null +++ b/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js @@ -0,0 +1,85 @@ +/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for + * full list of contributors). Published under the MIT license. + * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the + * full text of the license. */ + + +/** +#jquery.mapquery.mqZoomSlider.js +The file containing the mqZoomSlider Widget + +### *$('selector')*.`mqZoomSlider([options])` +_version added 0.1_ +####**Description**: create a widget to show a zoom slider + + + **options**: + - **map**: the mapquery instance + +>Returns: widget + + +The mqZoomSlider widget allows us to display a vertical zoom slider. + + + $('#zoomslider').mqZoomSlider({ + map: '#map' + }); + + */ +(function($) { +$.template('mqZoomSlider', + '
'+ + '
'+ + '
'); + +$.widget("mapQuery.mqZoomSlider", { + options: { + // The MapQuery instance + map: undefined + + }, + _create: function() { + var map; + var zoom; + var numzoomlevels; + var self = this; + var element = this.element; + + //get the mapquery object + map = $(this.options.map).data('mapQuery'); + + $.tmpl('mqZoomSlider').appendTo(element); + + numzoomlevels = map.options.numZoomLevels; + $(".mq-zoomslider-slider", element).slider({ + max: numzoomlevels, + min:2, + orientation: 'vertical', + step: 1, + value: numzoomlevels - map.center().zoom, + slide: function(event, ui) { + map.center({zoom:numzoomlevels-ui.value}); + }, + change: function(event, ui) { + map.center({zoom:numzoomlevels-ui.value}); + } + }); + map.bind("zoomend", + {widget:self,map:map,control:element}, + self._onZoomEnd); + + }, + _destroy: function() { + this.element.removeClass(' ui-widget ui-helper-clearfix ' + + 'ui-corner-all') + .empty(); + }, + _zoomEnd: function (element,map) { + var slider = element.find('.mq-zoomslider-slider'); + slider.slider('value',map.options.numZoomLevels-map.center().zoom); + }, + _onZoomEnd: function(evt) { + evt.data.widget._zoomEnd(evt.data.control,evt.data.map); + } +}); +})(jQuery); \ No newline at end of file diff --git a/view/theme/diabook/js/jquery.mousewheel.js b/view/theme/diabook/js/jquery.mousewheel.js new file mode 100644 index 000000000..f1d5f72fd --- /dev/null +++ b/view/theme/diabook/js/jquery.mousewheel.js @@ -0,0 +1,84 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ + +(function($) { + +var types = ['DOMMouseScroll', 'mousewheel']; + +if ($.event.fixHooks) { + for ( var i=types.length; i; ) { + $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; + } +} + +$.event.special.mousewheel = { + setup: function() { + if ( this.addEventListener ) { + for ( var i=types.length; i; ) { + this.addEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i=types.length; i; ) { + this.removeEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + + +function handler(event) { + var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; + event = $.event.fix(orgEvent); + event.type = "mousewheel"; + + // Old school scrollwheel delta + if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } + if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } + + // New school multidimensional scroll (touchpads) deltas + deltaY = delta; + + // Gecko + if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaY = 0; + deltaX = -1*delta; + } + + // Webkit + if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } + if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + return ($.event.dispatch || $.event.handle).apply(this, args); +} + +})(jQuery); \ No newline at end of file diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index f6c9dd7c1..dc9800343 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.025) + * Version: (Version: 1.026) * Author: */ @@ -13,7 +13,7 @@ $a = get_app(); function diabook_init(&$a) { //print diabook-version for debugging -$diabook_version = "Diabook (Version: 1.025)"; +$diabook_version = "Diabook (Version: 1.026)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -114,7 +114,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $imageresizeJS); //load jquery.ui.js - if($ccCookie != "9") { + if($ccCookie != "10") { $jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js"; $a->page['htmlhead'] .= sprintf('', $jqueryuiJS); } @@ -126,7 +126,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } //load jquery.mapquery.js - $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { $mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js"; $a->page['htmlhead'] .= sprintf('', $mqtmplJS); @@ -136,8 +136,8 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $openlayersJS); $mqmouseposJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js"; $a->page['htmlhead'] .= sprintf('', $mqmouseposJS); - $mqzoomsliderJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js"; - $a->page['htmlhead'] .= sprintf('', $mqzoomsliderJS); + $mousewheelJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mousewheel.js"; + $a->page['htmlhead'] .= sprintf('', $mousewheelJS); } @@ -156,8 +156,23 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); '; //check if mapquerybox is active and print - $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { + $ELZoom=false; + $ELPosX=false; + $ELPosy=false; + $site_ELZoom = get_config("diabook", "ELZoom" ); + $site_ELPosX = get_config("diabook", "ELPosX" ); + $site_ELPosY = get_config("diabook", "ELPosY" ); + $ELZoom = get_pconfig(local_user(), "diabook", "ELZoom"); + $ELPosX = get_pconfig(local_user(), "diabook", "ELPosX"); + $ELPosY = get_pconfig(local_user(), "diabook", "ELPosY"); + if ($ELZoom===false) $ELZoom=$site_ELZoom; + if ($ELPosX===false) $ELPosX=$site_ELPosX; + if ($ELPosY===false) $ELPosY=$site_ELPosY; + if ($ELZoom===false) $ELZoom="0"; + if ($ELPosX===false) $ELPosX="0"; + if ($ELPosY===false) $ELPosY="0"; $a->page['htmlhead'] .= ' '; @@ -265,7 +285,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); '; - if($ccCookie != "9") { + if($ccCookie != "10") { $a->page['htmlhead'] .= '