From: Olga Brani Date: Wed, 2 May 2012 14:14:18 +0000 (+0300) Subject: New html styles X-Git-Tag: astakos/v0.7.0~4^2~21 X-Git-Url: https://code.grnet.gr/git/astakos/commitdiff_plain/0f4a8a683745a60d22a61d702d489915feef1dcc New html styles --- diff --git a/.gitignore b/.gitignore index 97cbc26..7648fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ docs/build *.pyc *.egg-info .DS_Store +.project +.pydevproject snf-astakos-app/astakos/version.py diff --git a/snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js b/snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js index a1f1a34..c936146 100644 --- a/snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js +++ b/snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js @@ -32,8 +32,8 @@ $(document).ready(function(){ } var root = $('body'); - var bar = $('
'); - var services = $('
'); + var bar = $('
'); + var services = $(''); var profile = $('
'); var get_services_url = window.GET_SERVICES_URL || window.CLOUDBAR_SERVICES; @@ -41,6 +41,7 @@ $(document).ready(function(){ // create services links and set the active class to the current service $.getJSON(get_services_url + "?callback=?", function(data) { $.each(data, function(i, el){ + var sli = $("
  • "); var slink = $(""); if (el.icon) { slink.append($('')); @@ -50,9 +51,10 @@ $(document).ready(function(){ } slink.attr('href', el.url); slink.attr('title', el.name); - services.append(slink); + sli.append(slink); + services.append(sli); if (el.id == ACTIVE_MENU) { - slink.addClass("active"); + sli.addClass("active"); } }); }); @@ -86,7 +88,7 @@ $(document).ready(function(){ user.append(username); user.append(usermenu); profile.append(user); - bar.append(services).append(profile); + bar.append(profile).append(services); root.prepend(bar); diff --git a/snf-astakos-app/astakos/im/static/im/cloudbar/home-icon.png b/snf-astakos-app/astakos/im/static/im/cloudbar/home-icon.png index 2901845..107f213 100644 Binary files a/snf-astakos-app/astakos/im/static/im/cloudbar/home-icon.png and b/snf-astakos-app/astakos/im/static/im/cloudbar/home-icon.png differ diff --git a/snf-astakos-app/astakos/im/static/im/css/browser-fixes.css b/snf-astakos-app/astakos/im/static/im/css/browser-fixes.css new file mode 100644 index 0000000..806deba --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/browser-fixes.css @@ -0,0 +1,27 @@ +body { -webkit-text-size-adjust:100%; } + +/* Mozilla */ +@-moz-document url-prefix() { + button::-moz-focus-inner, + input[type="image"]::-moz-focus-inner, + input[type="submit"]::-moz-focus-inner, + input[type="reset"]::-moz-focus-inner, + input[type="button"]::-moz-focus-inner { border:0; } + textarea { resize:none; } +} + +/* Webkit */ +@media screen and (-webkit-min-device-pixel-ratio:0) { + button, + input[type="submit"], + input[type="reset"], + input[type="button"] { -webkit-appearance:button; } + input[type="text"]:focus, + input[type="password"]:focus, + textarea:focus { outline:0 none; } + textarea { resize:none; } + input[type="checkbox"], + input[type="radio"] { vertical-align:-2px; } + input[type="search"] { -webkit-appearance:textfield; } + input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; } +} diff --git a/snf-astakos-app/astakos/im/static/im/css/colorbox.css b/snf-astakos-app/astakos/im/static/im/css/colorbox.css new file mode 100644 index 0000000..eb6f6f2 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/colorbox.css @@ -0,0 +1,127 @@ + +#colorbox, #cboxOverlay, #cboxWrapper { + left: 0; + overflow: hidden; + position: absolute; + top: 0; + z-index: 9999; +} +#cboxOverlay { + height: 100%; + position: fixed; + width: 100%; +} +#cboxMiddleLeft, #cboxBottomLeft { + clear: left; +} +#cboxContent { + position: relative; +} +#cboxLoadedContent { + overflow: auto; +} +#cboxTitle { + margin: 0; +} +#cboxLoadingOverlay, #cboxLoadingGraphic { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow { + cursor: pointer; +} +.cboxPhoto { + border: 0 none; + display: block; + float: left; + margin: auto; +} +.cboxIframe { + border: 0 none; + display: block; + height: 100%; + width: 100%; +} +#cboxOverlay { + background: none repeat scroll 0 0 #000000; +} +#cboxContent { + margin-top: 20px; +} +.cboxIframe { + background: none repeat scroll 0 0 #FFFFFF; +} +#cboxError { + border: 1px solid #CCCCCC; + padding: 50px; +} +#cboxLoadedContent { + background: none repeat scroll 0 0 #FFFFFF; + border: 5px solid #000000; +} +#cboxTitle { + color: #CCCCCC; + left: 0; + position: absolute; + top: -20px; +} +#cboxCurrent { + color: #CCCCCC; + position: absolute; + right: 0; + top: -20px; +} +#cboxSlideshow { + color: #FFFFFF; + position: absolute; + right: 90px; + top: -20px; +} +#cboxPrevious { + background: url("../images/colorbox/controls.png") no-repeat scroll left top transparent; + height: 65px; + left: 5px; + margin-top: -32px; + position: absolute; + text-indent: -9999px; + top: 50%; + width: 28px; +} +#cboxPrevious:hover { + background-position: left bottom; +} +#cboxNext { + background: url("../images/colorbox/controls.png") no-repeat scroll right top transparent; + height: 65px; + margin-top: -32px; + position: absolute; + right: 5px; + text-indent: -9999px; + top: 50%; + width: 28px; +} +#cboxNext:hover { + background-position: right bottom; +} +#cboxLoadingOverlay { + background: none repeat scroll 0 0 #000000; +} +#cboxLoadingGraphic { + background: url("../images/colorbox/loading.gif") no-repeat scroll center center transparent; +} +#cboxClose { + background: url("../images/colorbox/controls.png") no-repeat scroll center top transparent; + display: block; + height: 19px; + position: absolute; + right: 5px; + text-indent: -9999px; + top: 5px; + width: 38px; +} +#cboxClose:hover { + background-position: center bottom; +} \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/css/dropkick.css b/snf-astakos-app/astakos/im/static/im/css/dropkick.css new file mode 100644 index 0000000..fabb1e1 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/dropkick.css @@ -0,0 +1,167 @@ +/** + * Default DropKick theme + * + * Feel free to edit the default theme + * or even add your own. + * + * See the readme for themeing help + * + */ + +/***** Begin Theme, feel free to edit in here! ******/ + +/* One container to bind them... */ +.dk_container { + font-family: 'Antic', sans-serif; + + font-weight: normal; + line-height: 42px; + letter-spacing: 1px; + border: 1px solid #808080; + height:42px; + display: inline-block; + margin-bottom: -1px; + padding-left:21px; + + z-index: 2; + width:308px; +} + .dk_container:focus { + outline: 0; + } + .dk_container a { + cursor: pointer; + text-decoration: none; + color:#808080; + + } + +/* Opens the dropdown and holds the menu label */ +.dk_toggle { + /** + * Help: Arrow image not appearing + * Try updating this property to your correct dk_arrows.png path + */ + background:url(../images/arrow_02.jpg) no-repeat 276px center; + +} + .dk_toggle:hover { + + } + /* Applied when the dropdown is focused */ + .dk_focus .dk_toggle { + + } + .dk_focus .dk_toggle { + + } + +/* Applied whenever the dropdown is open */ +.dk_open { + + /** + * Help: Dropdown menu is covered by something + * Try setting this value higher + */ + z-index: 10; +} + .dk_open .dk_toggle { + + + } + +/* The outer container of the options */ +.dk_options { + +} + .dk_options a { + background-color: #fff; + border-bottom: 1px solid #999; + padding: 8px 20px; + } + .dk_options li:last-child a { + border-bottom: none; + } + .dk_options a:hover, + .dk_option_current a { + + } + +/* Inner container for options, this is what makes the scrollbar possible. */ +.dk_options_inner { + padding:0; + margin:0; + border: 1px solid #808080; + border-top:0 none; +} +.dk_options_inner li { list-style:none outside;} + +/* Set a max-height on the options inner */ +.dk_options_inner, +.dk_touch .dk_options { + max-height: 250px; +} + +/****** End Theme ******/ + +/***** Critical to the continued enjoyment of working dropdowns ******/ + +.dk_container { + display: none; + position: relative; +} + .dk_container a { + outline: 0; + } + +.dk_toggle { + display: -moz-inline-stack; + display: inline-block; + *display: inline; + position: relative; + zoom: 1; +} + +.dk_open { + position: relative; +} + .dk_open .dk_options { + display: block; + } + .dk_open .dk_label { + color: inherit; + } + +.dk_options { + display: none; + margin-top: -1px; + position: absolute; + right: 0; + width: 100%; +} + .dk_options a, + .dk_options a:link, + .dk_options a:visited { + display: block; + } + .dk_options_inner { + overflow: auto; + position: relative; + } + +.dk_touch .dk_options { + overflow: hidden; +} + +.dk_touch .dk_options_inner { + max-height: none; + overflow: visible; +} + +.dk_fouc select { + position: relative; + top: -99999em; + visibility: hidden; +} + +/***** End Critical to the continued enjoyment of working dropdowns ******/ diff --git a/snf-astakos-app/astakos/im/static/im/css/formating.css b/snf-astakos-app/astakos/im/static/im/css/formating.css new file mode 100644 index 0000000..310b486 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/formating.css @@ -0,0 +1,105 @@ +/* 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 { border:0; margin:0; padding: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; } + +/* defaults -----------------------------------*/ +:link, a, a:visited { color:#F89A1C; text-decoration:none; } +a:hover { outline:0; text-decoration:underline; } +a:focus { outline:0 none; text-decoration:none; } +a:active { outline:0; text-decoration:none; } +a img, :link img, :visited img { border:none; } +a span { cursor:pointer; } +abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; } +address { font-style:italic; margin:0 0 1.5em 0; } +body { background:white; color:#222; font-family: Antic, Arial, sans-serif; font-size:81.3%; line-height:1.5; text-align:left; letter-spacing:1px; } +code, kbd, pre, samp { font-family:monospace, sans-serif; } +del { text-decoration:line-through; } +dl { margin:1em 0; } +dl dd { margin-left:1em; } +dt { font-weight:bold; } +em, i { font-style:italic; font-weight:inherit; } +h1, h2, h3, h4, h5, h6 { font-weight:bold; line-height:1.4; margin-bottom:0; } +/* Typographic scale based on 12px body size */ +h1 { font-size:4em; } +h2 { font-size:1.231em; } +h3 { font-size:1.154em; } +h4 { font-size:1.5em; } +h5 { font-size:1.333em; } +h6 { font-size:1.167em; } +hr { border:0; border-top:1px solid; display:block; height:1px; margin:1em 0; padding:0; } +img { border:0; vertical-align:middle; } +ins { text-decoration:none; } +p { margin-bottom:1em; } +pre { overflow:auto; line-height:24px; } +strong, b { font-weight:bold; font-style:inherit; } +sub, sup { font-size:75%; line-height:0; position:relative; vertical-align:baseline; } +sub { bottom:-0.25em; } +sup { top:-0.5em; } + +button, input, select, textarea { font-size:100%; margin:0; vertical-align:baseline; } +button, input { line-height:normal; } +button[disabled], input[disabled] { cursor:default; } +button, +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"] { cursor:pointer; overflow:visible; } +input[type="checkbox"], +input[type="radio"] { box-sizing:border-box; padding:0; } +legend { border:0; white-space:normal; } +optgroup { font-style:normal; font-weight:bold; } +textarea { overflow:auto; vertical-align:top; } + +q { quotes:"‘" "’" "“" "”"; } /* http://html5doctor.com/blockquote-q-cite/ */ +q:before { content:"‘"; content:open-quote; } +q:after { content:"’"; content:close-quote; } +q q:before { content: "“"; content: open-quote; } +q q:after { content: "”"; content: close-quote; } +blockquote { quotes: "“" "”"; margin:1em 40px; } +blockquote p:before { content: "“"; content: open-quote; } +blockquote p:after { content: ""; content: no-close-quote; } +blockquote p:last-of-type:after { content: "”"; content: close-quote; } +blockquote { font-style:italic; margin:1em; } + +caption { font-weight:bold; text-align:left; margin-bottom:.2em; padding:0; } +table { border-collapse:collapse; border-spacing:0; margin-bottom:1em; } +tfoot { font-style:italic; } +thead td, th { font-weight:bold; vertical-align:top; } + +ol { list-style-type:decimal; margin:1em 0; padding-left:2em; } +ol li { list-style:decimal outside; } +ol ol li { list-style-type:lower-alpha; } +ol ol ol li { list-style-type:lower-roman; } + +ul { list-style-type:disc; margin:1em 0; padding-left:2em; } +ul li { list-style:disc outside; } +ul ul li { list-style-type:circle; } +ul ul ul li { list-style-type:square; } + +/* helpers ------------------------------------*/ +.clearfix:before, +.clearfix:after { content:" "; display:block; height:0; visibility:hidden; } /* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/ */ +.clearfix:after { clear:both; } +.visuallyhidden { position:absolute !important; clip:rect(0 0 0 0); } + +/* misc ---------------------------------------*/ +img[align="left"] { margin:0 1em 0.5em 0; } +img[align="right"] { margin:0 0 0.5em 1em; } diff --git a/snf-astakos-app/astakos/im/static/im/css/forms.css b/snf-astakos-app/astakos/im/static/im/css/forms.css new file mode 100644 index 0000000..5b1adc3 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/forms.css @@ -0,0 +1,308 @@ +/* generic form styles */ +input, textarea, .form-widget { + background-color: #ffffff; + color: #000; + border-color: #000000; +} +#forms .input, #forms input { + font-family: 'Antic', sans-serif; + font-size: 14px; + font-weight: normal; + line-height: 22px; + letter-spacing: 1px; + border: 1px solid #808080; + height: 21px; + display: inline-block; + margin-bottom: -1px; + padding: 0.8em; + padding-left: 1.5em; + z-index: 2; +} +#forms .input:focus, #forms input:focus { + position: relative; + border: 1px solid #000; + z-index: 100; +} +#forms .input:focus label, #forms input:focus label { + z-index: 300; +} +.altcol { + background-color: #c3c3b9 !important; +} +.altcol:hover { + background-color: #f89a1c !important; +} + +form.withlabels label { + width: 224px; + display: block; + float: left; + padding-top: 1em; +} +form.withlabels input[type=text], form.withlabels input[type=password] { + width: 224px; +} +form.withlabels input[type=text].long, form.withlabels input[type=password].long, form.withlabels textarea.long { + width: 224px; +} +.login-section a.button { + margin-bottom: 12px; +} +.login-section a.button:last-child { + margin-bottom: none; +} +.login-section a.button.withicon { + background-repeat: no-repeat; + background-position: 15px 50%; + padding-left: 40px; +} +.login-section.loggedin { + padding-bottom: 0 !important; + background-image: none !important; +} +form.login { + margin-bottom: 22px; + width:340px; +} + +form h2 span { + padding-bottom: 3px; +} +form .form-row { + min-height: 29.333333333333332px; + position: relative; +} +form .form-row.submit { + margin: 22px 0 ; +} +form .form-row .extra-link { + color: #808080; + text-decoration: none; + border: none; + + line-height:42px; + float: right; +} +form .form-row .extra-link:hover { text-decoration:underline;} +form .form-row label { + font-size: 1.1em; +} +form.innerlabels label { + position: absolute; + top: 1.1em; + left: 1.5em; + color: #808080 ; +} +form.innerlabels p { + margin:0; + position: relative; +} +form.innerlabels p.p15px { font-size:1.154em;} +form.innerlabels p.p15px a { margin:0 5px;} +form.innerlabels p.p15px a:hover { text-decoration:underline;} +form.innerlabels a, +form.innerlabels a:hover { border:0 none;} +form textarea, +form input.text, +form input[type="text"], +form input[type="password"] { + color:#808080; + font-family: 'Antic', sans-serif; + font-weight: normal; + line-height: 22px; + letter-spacing: 1px; + border: 1px solid #808080; + height: 21px; + display: inline-block; + margin-bottom: -1px; + padding: 0.8em; + padding-left: 1.5em; + z-index: 2; + width:300px; +} + +form select { + font-family: 'Antic', sans-serif; + font-weight: normal; + line-height: 22px; + letter-spacing: 1px; + border: 1px solid #808080; + display:block; + margin-bottom: -1px; + padding: 0.8em; + padding-left: 1.5em; + z-index: 2; + width:331px; +} +form textarea:focus, +form input.text:focus, +form input[type="text"]:focus, +form input[type="password"]:focus { + position: relative; + border: 1px solid #000; + z-index: 100; +} +form textarea:focus label, +form input.text:focus label, +form input[type="text"]:focus label, +form input[type="password"]:focus label { + z-index: 300; +} +form input.submit, form input[type="submit"] { + font-family: 'Antic', sans-serif; + font-size: 14px; + font-weight: normal; + line-height: 22px; + letter-spacing:1px; + background-color: #3582ac; + color: #ffffff; + border: none; + padding: 10px 22px; + font-size: 1em; + +} +form input.submit:hover, form input[type="submit"]:hover { + background-color: #f89a1c; +} +form input.submit.back, form input[type="submit"].back { + text-decoration: none; + bottom: 0; + float: right; + z-index: 500; +} +form input.submit.back.right, form input[type="submit"].back.right { + right: 0; +} +form input.submit:hover, form input[type="submit"]:hover { + background-color: #f89a1c; +} +form input.submit.back, form input[type="submit"].back { + text-decoration: none; + bottom: 0; + float: right; + z-index: 500; +} +form input.submit.back.right, form input[type="submit"].back.right { + right: 0; +} +form textarea { + height: 150px; + width: 350px; + max-height:150px; + max-width:350px; +} +form .with-errors input, form .with-errors textarea, form .with-errors select { + color: #9d261d; +} +form .with-errors label { + color: #e4776f; +} +.form-error { + background-color: #9d261d; + color: #fff; + font-size: 0.8em; + padding: 5px 5px; +} +.form-errors.all .form-error { + position: relative; + border-radius: 0; + margin-bottom: 1.3em; + padding: 0.5em; +} +div.form-stacked { + margin-bottom: 4em; +} + +.checkbox-widget.checked { + background-color: #FF0000; + background-image: url("../images/checkbox.png"); + background-position: 50% 50%; +} +.checkbox-widget { + border: 1px solid #808080; + cursor: pointer; + display: block; + float: left; + height: 25px; + margin:5px 20px 0 0 ; + width: 25px; + +} + + +form.withlabels .checkbox-widget{ + margin-top:20px; +} + +form.innerlabels .checkbox-widget + label { + position:static; + line-height:36px; + color:#808080; + +} + +form.innerlabels .checkbox-widget + label + a { + border-bottom:1px solid #F89A1C; + font-size: 1.1em; + +} + +form span.info{ + position:absolute; + z-index:10; + top:8px; + left: 260px; + +} +form span.info em { + display:block; + overflow:hidden; + position:absolute; + left:0; + text-indent:-100px; + top:0; + height:28px; + width:28px; + background:url(../images/question-mark.jpg) no-repeat left bottom; + cursor:pointer; +} + +form span.info:hover em { + background-position:left top; +} + +form span.info span { + position:relative; + left:42px; + top:2px; + width:150px; + padding-left:55px; + background:url(../images/black-line.jpg ) no-repeat left 12px; + min-height:50px; + display:none; + color:#b3b3b3; +} + +form span.info span a { + color:#b3b3b3; + border-bottom:1px solid #F89A1C; +} + +form span.info:hover span { + display:block; +} + +form p { + margin-bottom:0; +} + + +form input[readonly=true] { + background-color: #ddd; + color: #5e5e5e; +} + +#recaptcha_area { + margin-top:20px; +} + \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/css/global.css b/snf-astakos-app/astakos/im/static/im/css/global.css new file mode 100644 index 0000000..709ac42 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/global.css @@ -0,0 +1,6 @@ +@import url(formating.css); +@import url(modules.css); +@import url(colorbox.css); +@import url(browser-fixes.css); +@import url(forms.css); +@import url(dropkick.css); \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/css/ie7.css b/snf-astakos-app/astakos/im/static/im/css/ie7.css index d9f8201..f406a35 100644 --- a/snf-astakos-app/astakos/im/static/im/css/ie7.css +++ b/snf-astakos-app/astakos/im/static/im/css/ie7.css @@ -1,13 +1,11 @@ -.navigation { - min-width: 660px; -} - -.mainnav.inline { - position: absolute; - right: -10px; -} - -.mainnav.inline.subnav { - position: relative; - top: 50px; -} +button, input, select, textarea { vertical-align:middle; } +input[type="button"], input[type="submit"] { overflow:visible; } +input[type="checkbox"], +input[type="radio"] { width:13px; height:13px; } +legend { margin-left:-7px; } +textarea { overflow:auto; } +img { -ms-interpolation-mode:bicubic; } + +.clearfix { zoom:1; } +.container .navigation ul li { display:inline;} +.lt .box-more ul.col { display:inline;} \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/css/modules.css b/snf-astakos-app/astakos/im/static/im/css/modules.css new file mode 100644 index 0000000..53104d3 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/css/modules.css @@ -0,0 +1,191 @@ +.wrapper { margin:0 auto; position:relative; width:820px; padding:36px 70px; } +.container .wrapper, +.footer .wrapper { border: 1px solid #808080; border-top:0 none;} +.centered { text-align:center;} +img.left { margin:0 1em 1em 0; float:left;} +img.right { margin:0 0 1em 1em; float:right;} + + +/* header */ +.header { background:#000; color:#fff; height:35px; line-height:35px; } +.header .wrapper { width:auto; padding:0;} +.header a { color:#fff; text-decoration:none;} +.header .profile { float:right; background:#01A1AE; width:150px; padding:0 20px; text-align:right; } +.header .profile a { text-decoration:none; color:#fff; } +.header .profile ul { position:absolute; right:0; top:35px; padding:0; margin:0; background:#01A1AE; width:190px; display:none; } +.header .profile ul li { list-style:none outside; line-height:35px; border-top:1px solid #000; padding:0 20px;} +.header .profile ul li:hover { background:#000;} +.header .profile:hover ul { display:block; } +.header ul.services { margin:0; padding:0; } +.header ul.services li { float:left; height:35px; line-height:35px; text-align:center; padding: 0 30px; list-style:none outside;} +.header ul.services li:first-child { padding:0 5px;} +.header ul.services li.active { background:#333;} +.header ul.services li:hover { background:#444; } + + +/* footer */ +.footer { font-size:0.923em;color:#B3B3B3; } +.footer a { color:#B3B3B3; text-decoration:none; transition:color 0.15s ease-in-out 0s; -moz-transition: color 0.15s ease-in-out 0s; -webkit-transition: color 0.15s ease-in-out 0s; -o-transition: color 0.15s ease-in-out 0s; } +.footer:hover a { color:#808080;} +.footer a:hover { color:#000;} +.footer ul { float:left; margin:0 0 0 22px; width:140px; padding:0;} +.footer ul li { padding:0; margin:0 0 0.5em 0; list-style:none outside;} +.footer ul li:first-child { margin-bottom:1em; } +.footer .clearfix { padding-bottom:20px;} +.footer .clearfix ul:first-child { margin-left:0;} + + +/*top message*/ +.top-msg { margin:-36px -70px 40px; background:blue; padding:100px 200px; color:#fff; display:none; position:relative;} +.top-msg p { font-size:1.5em;} +.top-msg p.title { font-size:2em; } +.top-msg p.title span { border-bottom:2px dotted #fff; padding:0 0 10px 0;} +.top-msg.active { display:block;} +.active+h1 { display:none;} +.top-msg .close { position:absolute; bottom:20px; right:20px; font-size:2em; font-weight:bold; border:0 none; color:#fff; text-decoration:none;} + +/* container */ +.container h1 { margin:0; line-height:100%;} +.container .wrapper { padding-bottom:100px;} +.container .navigation { margin:20px 0 40px; font-size:1.231em;} +.container .navigation ul { margin:5px 0; padding:0;} +.container .navigation ul li { list-style:none outside; padding:0; margin:0 0 0 1em; display:inline-block;} +.container .navigation ul li:first-child { margin-left:0;} +.container .navigation ul li a { color:#000; text-decoration:none; } +.container .navigation ul li a:hover { border-bottom:1px solid #F89A1C;} +.container .navigation ul li.active a { color:#F89A1C; } +.dotted { background:url(../images/double-dots.jpg) no-repeat bottom center; padding:30px 0; margin-bottom:30px;} +.two-cols .rt { float:right; width:390px;} +.two-cols .lt { float:left; width:390px;} +.two-cols .lt p { padding-right:40px;} +.two-cols-lt580 .rt { float:right; width:200px; margin-left:40px;} +.two-cols-lt580 .lt { overflow:hidden;} +.container h2, .container h3 { font-weight:normal; margin-bottom:1em; } +.container h2 em { color: #3582AC; font-style:normal; } +.content a { border-bottom: 1px solid #F89A1C; text-decoration:none; color:#000; } +.content a:hover { border-bottom: 1px solid #F89A1C; text-decoration:none; color:#F89A1C; } +.container ul.options { font-size:1.231em; padding:0; margin:0;} +.container ul.options li { list-style:none outside; margin:0 0 1em 0;padding:0;} +.container ul.options li a { border:0 none;} +.container ul.options li a:hover { text-decoration:underline;} +.landing h2, .landing a:hover { color:#01A1AE;} +.faq h2, .faq a:hover { color:#EF4F54; border:0 none;} +.faq ul { padding:0; margin:0; } +.faq ul li { list-style:none outside; padding:0 0 0 5px; margin:0; } +.faq ul li a { color:#222222; border:0 none;} +.follow h3 a { color:#4085A6;} +.follow a { border:0 none;} +.follow ul { margin:0; padding:0;} +.follow ul li { list-style:none outside; padding:0; margin:0 0 20px 0; font-size:0.923em; color:#808080;} +.follow ul li p.title { margin-bottom:0; color:#000;} +.follow ul li p.title a { color:#000;} +.follow ul li p a { color:#808080;} +.posts ul { margin:0;padding:0; } +.posts ul li { padding:0; margin:0 0 50px; list-style:none outside; } +.posts ul li .img-div { float:left; width:160px; margin-right:20px; } +.posts ul li .img-div img { max-width:160px;} +.posts ul li .img-div p { font-size:1.154em; color:#01A1AE;} +.posts ul li .txt { overflow:hidden;} +.posts ul li .txt h3 { color:#F89A1C;} +.posts ul li .txt h3 a { color:#F89A1C; border:0 none; } +.posts ul li p.info { background:url(../images/blog-dots.jpg) no-repeat top; padding-top:10px; margin-top:20px; font-size:0.923em; color:#808080;} +.article p.info { margin-top:20px; padding-top:10px; font-size:0.923em; color:#808080; border-top:1px dashed #ccc;} +p.info a { color:#808080; } +.bg-wrap { background-position:right top; background-repeat:no-repeat;} +.bg-wrap .extra { display:none;} +.bg-wrap.open .extra { display:block;} +.bg-wrap .extra .hide-extra { display:block; text-align:right; border:0 none; height:16px; overflow:hidden;} +.bg-wrap .extra .hide-extra img { margin-top:0; vertical-align:top; display:inline; } +.bg-wrap .extra .hide-extra:hover img { margin-top:-16px;} +.cyclades .bg-wrap .extra .hide-extra:hover img { margin-top:-32px;} +.pithos h2, .pithos a:hover, +.pithos .extra .options li { color:#F89A1C; } +.cyclades h2, .cyclades a:hover, +.cyclades .extra .options li { color:#4085A6; } +.cyclades a { border-bottom:1px solid #4085A6; } +.cyclades a:hover { border-bottom:1px solid #4085A6; } +a.btn_01 { display:block; text-align:center; background:#F6921E; color:#000; padding:10px; text-decoration:none; border:0 none;} +a.btn_01:hover { background:#01A1AE; color:#000; border:0 none;} +a.btn_01 em { font-style:normal; display:block; } +a.btn_01 span { color:#fff; } +.lt .box-more { text-align:center; padding:5px 10px; } +.lt .box-more.border { border:1px solid #ccc;} +.lt .box-more p { cursor:pointer; background:url(../images/arrow_02.jpg) no-repeat right center; padding-right:20px; } +a.btn_01, .box-more { width:80%; margin:0 auto 20px; } +.lt .box-more ul.col { width:30%; margin:0; padding:0; vertical-align:top; text-align:left; display:inline-block;} +.lt .box-more .clearfix { display:none; } +.lt .box-more ul.col li { list-style:none outside; } +.lt .box-more ul.col li a { color:#B3B3B3; text-decoration:none; border:0 none;} +.lt .box-more ul.col li a:hover { color:#000;} +.article img { margin-bottom:1em; max-width:100%;} +a.videolink { border: 0 none; display:block; width:367px; height:207px; background:url(../images/video_image_hover.png) no-repeat; text-decoration:none;} +a.videolink:hover { background:url(../images/video_image.png)no-repeat; text-decoration:none; border:0 none;} +.container .full { position:relative;} + + + +/* resources*/ +.resources .categories .clear { color: #000000; float: right; margin-right: 4px;} +.resources a, .resources a:hover { border:0 none;} +.resources .categories ul { margin:0;padding:0;} +.resources .categories ul li { float: left; list-style:none outside;} +.resources .categories .title { margin-bottom: 0.5em; } +.resources .categories ul li a { color: #000000; margin-right: 22px; text-decoration: none; } +.resources .categories ul li a:hover, +.resources .categories ul li a.selected { color: #000000 } +.resources .categories ul li.inactive { opacity: 0.3; } +.resources .categories ul li.active { font-weight: bold; opacity: 1; } +.resources .list { line-height: 1em; margin-top: 60px; position: relative; width:855px; } +.resources .list .resource-wrapper.first .resource { margin-left: 0; } +.resources .list .resource-wrapper { float: left; height: 250px; margin-bottom: 22px; margin-right: 35px; overflow: hidden; position: relative; width: 250px; } +.resources .list .resource-wrapper.first { margin-left: 0; } +.resources .list .resource-wrapper.hidden { display: none; } +.resources .list .resource { border: 1px solid #000000; height: 188px; overflow: hidden; padding: 30px; } +.resources .list .resource .date { color: #808080; margin-bottom: 3px; } +.resources .list .resource .description { transition:color top 0.35s ease-in-out 0s; -moz-transition: top 0.35s ease-in-out 0s; -webkit-transition: top 0.35s ease-in-out 0s; -o-transition: top 0.35s ease-in-out 0s; color: #FFFFFF; font-size: 1.1em; height: 150px; margin-left: -30px; padding: 30px; position: absolute; top: -270px; width: 190px; } +.resources .list .resource .title { line-height: 1.4em; } +.resources .list .resource .category { color: #808080; margin-top: 30px; } +.resources .list .resource .category a { color: #808080; } +.resources .list .resource .download { bottom: 0; cursor: pointer; font-size: 1.1em; margin-bottom: 3px; margin-left: -10px; position: absolute; width: 190px; } +.resources .list .resource .download a { color: #000000; display: block; padding: 5px 5px 5px 15px; text-decoration: none; } +.resources .list .resource .download a:hover, +.resources .list .resource .download a .hovered { color: #FF5D00;} +.resources .list .resource .download a:hover .download-image, +.resources .list .resource .download a .hovered .download-image { background-image: url(../images/resource_down_arrow-active.png); } +.resources .list .resource .download a .download-image { background: url(../images/resource_down_arrow.png) no-repeat; display: block; float: left; height: 30px; margin-right: 10px; margin-top: -7px; width: 30px; } +.resources .list .resource .download img { margin-right: 10px; vertical-align: middle;} +.resources .list .resource:hover .description, +.resources .list .resource .hover .description { display: block; top: 0; } +.resources .list .resource-cat-1.resource { border-color: #4085A5 } +.resources .list .resource-cat-1.resource .title { color: #4085A5 } +.resources .list .resource-cat-1.resource .description { background-color: #4085A5 } +.resources .resource-cat-1.filter-item a { color: #4085A5 } +.resources .list .resource-cat-2.resource { border-color: #FF6F00 } +.resources .list .resource-cat-2.resource .title { color: #FF6F00 } +.resources .list .resource-cat-2.resource .description { background-color: #FF6F00 } +.resources .resource-cat-2.filter-item a { color: #FF6F00 } + +table { width:100%;} +table th, table td { padding:10px; } +table td { border-top: 1px solid #DDDDDD; } +table td.consumed { color: #9D261D; } + +.zebra-striped tbody tr:nth-child(2n+1) td, +.zebra-striped tbody tr:nth-child(2n+1) th { background-color: #F9F9F9; } +.zebra-striped tbody tr:hover td, +.zebra-striped tbody tr:hover th { background-color: #F5F5F5; } + +.buttons-list.fixpos { position:absolute; bottom:0; right:0; } +.button.back.right { right: 0; } +.buttons-list .button { margin-left: 10px; } +.button.back { z-index: 500; } +a.button { border:0 none; color: #FFFFFF; display: block; text-align: center; background-color: #3582AC; letter-spacing: 1px; line-height: 22px; padding: 0.8em 22px; text-decoration: none;} +a.button:hover { background-color: #F89A1C; border:0 none; color:#fff;} + +/*pagination*/ +.pagination a { border:0 none;} +.pagination .next-prev { float:left; } +.pagination .nums { text-align:right;} +.pagination .nums span { color:#F89A1C;} + + diff --git a/snf-astakos-app/astakos/im/static/im/images/accounts-logo.png b/snf-astakos-app/astakos/im/static/im/images/accounts-logo.png new file mode 100644 index 0000000..765058c Binary files /dev/null and b/snf-astakos-app/astakos/im/static/im/images/accounts-logo.png differ diff --git a/snf-astakos-app/astakos/im/static/im/images/black-line.jpg b/snf-astakos-app/astakos/im/static/im/images/black-line.jpg new file mode 100644 index 0000000..fc27f69 Binary files /dev/null and b/snf-astakos-app/astakos/im/static/im/images/black-line.jpg differ diff --git a/snf-astakos-app/astakos/im/static/im/images/pictures/signup_pic.png b/snf-astakos-app/astakos/im/static/im/images/pictures/signup_pic.png index 617e72a..b1b2627 100644 Binary files a/snf-astakos-app/astakos/im/static/im/images/pictures/signup_pic.png and b/snf-astakos-app/astakos/im/static/im/images/pictures/signup_pic.png differ diff --git a/snf-astakos-app/astakos/im/static/im/images/porta.png b/snf-astakos-app/astakos/im/static/im/images/porta.png new file mode 100644 index 0000000..50947a6 Binary files /dev/null and b/snf-astakos-app/astakos/im/static/im/images/porta.png differ diff --git a/snf-astakos-app/astakos/im/static/im/images/question-mark.jpg b/snf-astakos-app/astakos/im/static/im/images/question-mark.jpg new file mode 100644 index 0000000..6096ffc Binary files /dev/null and b/snf-astakos-app/astakos/im/static/im/images/question-mark.jpg differ diff --git a/snf-astakos-app/astakos/im/static/im/js/common.js b/snf-astakos-app/astakos/im/static/im/js/common.js new file mode 100644 index 0000000..d0e6174 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/js/common.js @@ -0,0 +1,76 @@ +function setContainerMinHeight(){ + + var h = $('.header').height(); + var f = $('.footer').height(); + var w = $(window).height(); + var pTop = parseInt (($('.container .wrapper').css('padding-top').replace("px", "")) ); + var pBottom = parseInt (($('.container .wrapper').css('padding-bottom').replace("px", ""))); + + var c = w - ( h+f+pTop+pBottom); + $('.container .wrapper').css('min-height', c); + + +} + +$(document).ready(function() { + + setContainerMinHeight(); + + $('.show-extra').click(function(e) { + e.preventDefault(); + + $(this).parents('.bg-wrap').find('.extra').toggle('slow'); + $('.hide-extra').toggle(); + }); + $('.hide-extra').click(function(e) { + e.preventDefault(); + $(this).hide(); + $(this).parents('.bg-wrap').find('.extra').hide('slow'); + }); + + $('.box-more p').click(function(e) { + $(this).siblings('.clearfix').toggle('slow'); + $(this).parents('.box-more').toggleClass('border'); + }); + + + $('.top-msg a.close').click(function(e) { + e.preventDefault(); + $(this).parents('.top-msg').slideUp('5000', function() { + $('.top-msg').removeClass('active') + }); + }); + + //$('select').dropkick(); + + + if ( $('#os').length > 0 ) { + var os = BrowserDetect.OS; + if ( os!=="an unknown OS" ) { + $('#os').html('version '+os); + } + } + + $('.top-msg .success').parents('.top-msg').css( + { + backgroundColor: '#f3c', + color: '#fff' + } + ) + + $('.top-msg .error').parents('.top-msg').css( + { + backgroundColor: 'red', + color: '#fff' + } + ) + + + $('.top-msg .warning').parents('.top-msg').css( + { + backgroundColor: '#90f', + color: '#fff' + } + ) + +}); diff --git a/snf-astakos-app/astakos/im/static/im/js/html5shiv-printshiv.js b/snf-astakos-app/astakos/im/static/im/js/html5shiv-printshiv.js new file mode 100644 index 0000000..67db706 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/js/html5shiv-printshiv.js @@ -0,0 +1,267 @@ +/*! HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed */ +(function (win, doc) { + // feature detection: whether the browser supports unknown elements + var supportsUnknownElements = (function (a) { + a.innerHTML = ''; + return a.childNodes.length === 1; + })(doc.createElement('a')); + + // feature detection: whether the browser supports default html5 styles + var supportsHtml5Styles = (function (nav, docEl, compStyle) { + docEl.appendChild(nav); + return (compStyle = (compStyle ? compStyle(nav) : nav.currentStyle).display) && docEl.removeChild(nav) && compStyle === 'block'; + })(doc.createElement('nav'), doc.documentElement, win.getComputedStyle); + + // html5 global so that more elements can be shived and also so that existing shiving can be detected on iframes + // more elements can be added and shived with the following code: html5.elements.push('element-name'); shivDocument(document); + var html5 = { + // a list of html5 elements + elements: 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video'.split(' '), + + // the shiv function + shivDocument: function (scopeDocument) { + scopeDocument = scopeDocument || doc; + + // test if the document has already been shived + if (scopeDocument.documentShived) { + return; + } + scopeDocument.documentShived = true; + + // set local variables + var + documentCreateElement = scopeDocument.createElement, + documentCreateDocumentFragment = scopeDocument.createDocumentFragment, + documentHead = scopeDocument.getElementsByTagName('head')[0], + documentCreateElementReplaceFunction = function (m) { + documentCreateElement(m); + }; + + // shiv for unknown elements + if (!supportsUnknownElements) { + // shiv the document + html5.elements.join(' ').replace(/\w+/g, documentCreateElementReplaceFunction); + + // shiv document create element function + scopeDocument.createElement = function (nodeName) { + var element = documentCreateElement(nodeName); + if (element.canHaveChildren){ + html5.shivDocument(element.document); + } + return element; + }; + + // shiv document create element function + scopeDocument.createDocumentFragment = function () { + return html5.shivDocument(documentCreateDocumentFragment()); + }; + } + + // shiv for default html5 styles + if (!supportsHtml5Styles && documentHead) { + var div = documentCreateElement('div'); + div.innerHTML = ['x'].join(''); + documentHead.insertBefore(div.lastChild, documentHead.firstChild); + } + + // return document (for potential chaining) + return scopeDocument; + } + }; + + // shiv the document + html5.shivDocument(doc); + + win.html5 = html5; + + // ie print shiv + if (supportsUnknownElements || !win.attachEvent){return;} + + // replaces an element with a namespace-shived clone (eg. header element becomes shiv:header element) + function namespaceShivElement(element) { + var elementClone, a, l, i; + if (doc.documentMode > 7) { + elementClone = doc.createElement('font'); + elementClone.setAttribute('data-html5shiv', element.nodeName.toLowerCase()); + } + else { + elementClone = doc.createElement('shiv:' + element.nodeName); + } + while (element.firstChild) { + elementClone.appendChild(element.childNodes[0]); + } + for (a = element.attributes, l = a.length, i = 0; i < l; ++i) { + if (a[i].specified) { + elementClone.setAttribute(a[i].nodeName, a[i].nodeValue); + } + } + elementClone.style.cssText = element.style.cssText; + element.parentNode.replaceChild(elementClone, element); + elementClone.originalElement = element; + } + + // restores an element from a namespace-shived clone (eg. shiv:header element becomes header element) + function unNamespaceShivElement(element) { + var originalElement = element.originalElement; + while (element.childNodes.length) { + originalElement.appendChild(element.childNodes[0]); + } + element.parentNode.replaceChild(originalElement, element); + } + + // get style sheet list css text + function getStyleSheetListCssText(styleSheetList, mediaType) { + // set media type + mediaType = mediaType || 'all'; + + // set local variables + var + i = -1, + cssTextArr = [], + styleSheetListLength = styleSheetList.length, + styleSheet, + styleSheetMediaType; + + // loop through style sheets + while (++i < styleSheetListLength) { + // get style sheet + styleSheet = styleSheetList[i]; + + // get style sheet media type + styleSheetMediaType = styleSheet.media || mediaType; + + // skip a disabled or non-print style sheet + if (styleSheet.disabled || !(/print|all/.test(styleSheetMediaType))) { + continue; + } + + // push style sheet css text + cssTextArr.push(getStyleSheetListCssText(styleSheet.imports, styleSheetMediaType), styleSheet.cssText); + } + + // return css text + return cssTextArr.join(''); + } + + // shiv css text (eg. header {} becomes shiv\:header {}) + function shivCssText (cssText) { + // set local variables + var + elementsRegExp = new RegExp('(^|[\\s,{}])(' + win.html5.elements.join('|') + ')', 'gi'), + cssTextSplit = cssText.split('{'), + cssTextSplitLength = cssTextSplit.length, + i = -1; + + // shiv css text + while (++i < cssTextSplitLength) { + cssTextSplit[i] = cssTextSplit[i].split('}'); + if (doc.documentMode > 7) { + cssTextSplit[i][cssTextSplit[i].length - 1] = cssTextSplit[i][cssTextSplit[i].length - 1].replace(elementsRegExp, '$1font[data-html5shiv="$2"]'); + } + else { + cssTextSplit[i][cssTextSplit[i].length - 1] = cssTextSplit[i][cssTextSplit[i].length - 1].replace(elementsRegExp, '$1shiv\\:$2'); + } + cssTextSplit[i] = cssTextSplit[i].join('}'); + } + + // return shived css text + return cssTextSplit.join('{'); + } + + // the before print function + win.attachEvent( + 'onbeforeprint', + function () { + // test for scenarios where shiving is unnecessary or unavailable + if (win.html5.supportsXElement || !doc.namespaces) { + return; + } + + // add the shiv namespace + if (!doc.namespaces.shiv) { + doc.namespaces.add('shiv'); + } + + // set local variables + var + i = -1, + elementsRegExp = new RegExp('^(' + win.html5.elements.join('|') + ')$', 'i'), + nodeList = doc.getElementsByTagName('*'), + nodeListLength = nodeList.length, + element, + // sorts style and link files and returns their stylesheets + shivedCSS = shivCssText(getStyleSheetListCssText((function (s, l) { + var arr = [], i = s.length; + while (i) { + arr.unshift(s[--i]); + } + i = l.length; + while (i) { + arr.unshift(l[--i]); + } + arr.sort(function (a, b) { + return (a.sourceIndex - b.sourceIndex); + }); + i = arr.length; + while (i) { + arr[--i] = arr[i].styleSheet; + } + return arr; + })(doc.getElementsByTagName('style'), doc.getElementsByTagName('link')))); + + // loop through document elements + while (++i < nodeListLength) { + // get element + element = nodeList[i]; + + // clone matching elements as shiv namespaced + if (elementsRegExp.test(element.nodeName)) { + namespaceShivElement(element); + } + } + + // set new shived css text + doc.appendChild(doc._shivedStyleSheet = doc.createElement('style')).styleSheet.cssText = shivedCSS; + } + ); + + // the after print function + win.attachEvent( + 'onafterprint', + function() { + // test for scenarios where shiving is unnecessary + if (win.html5.supportsXElement || !doc.namespaces) { + return; + } + + // set local variables + var + i = -1, + nodeList = doc.getElementsByTagName('*'), + nodeListLength = nodeList.length, + element; + + // loop through document elements + while (++i < nodeListLength) { + // get element + element = nodeList[i]; + + // restore original elements + if (element.originalElement) { + unNamespaceShivElement(element); + } + } + + // cut new shived css text + if (doc._shivedStyleSheet) { + doc._shivedStyleSheet.parentNode.removeChild(doc._shivedStyleSheet); + } + } + ); +})(this, document); \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/js/jqModal.js b/snf-astakos-app/astakos/im/static/im/js/jqModal.js new file mode 100644 index 0000000..3aac816 --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/js/jqModal.js @@ -0,0 +1,69 @@ +/* + * jqModal - Minimalist Modaling with jQuery + * (http://dev.iceburg.net/jquery/jqModal/) + * + * Copyright (c) 2007,2008 Brice Burgess + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * $Version: 03/01/2009 +r14 + */ +(function($) { +$.fn.jqm=function(o){ +var p={ +overlay: 50, +overlayClass: 'jqmOverlay', +closeClass: 'jqmClose', +trigger: '.jqModal', +ajax: F, +ajaxText: '', +target: F, +modal: F, +toTop: F, +onShow: F, +onHide: F, +onLoad: F +}; +return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s; +H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s}; +if(p.trigger)$(this).jqmAddTrigger(p.trigger); +});}; + +$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');}; +$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');}; +$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});}; +$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});}; + +$.jqm = { +hash:{}, +open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('
    ').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z); + if(c.modal) {if(!A[0])L('bind');A.push(s);} + else if(c.overlay > 0)h.w.jqmAddClose(o); + else o=F; + + h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F; + if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}} + + if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u; + r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});} + else if(cc)h.w.jqmAddClose($(cc,h.w)); + + if(c.toTop&&h.o)h.w.before('').insertAfter(h.o); + (c.onShow)?c.onShow(h):h.w.show();e(h);return F; +}, +close:function(s){var h=H[s];if(!h.a)return F;h.a=F; + if(A[0]){A.pop();if(!A[0])L('unbind');} + if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove(); + if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F; +}, +params:{}}; +var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false, +i=$('').css({opacity:0}), +e=function(h){if(ie6)if(h.o)h.o.html('

    ').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, +f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, +L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, +m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, +hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { + if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; +})(jQuery); \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/js/jquery.colorbox.js b/snf-astakos-app/astakos/im/static/im/js/jquery.colorbox.js new file mode 100644 index 0000000..a82c6af --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/js/jquery.colorbox.js @@ -0,0 +1,888 @@ +// ColorBox v1.3.19 - jQuery lightbox plugin +// (c) 2011 Jack Moore - jacklmoore.com +// License: http://www.opensource.org/licenses/mit-license.php +(function ($, document, window) { + var + // Default settings object. + // See http://jacklmoore.com/colorbox for details. + defaults = { + transition: "elastic", + speed: 300, + width: false, + initialWidth: "600", + innerWidth: false, + maxWidth: false, + height: false, + initialHeight: "450", + innerHeight: false, + maxHeight: false, + scalePhotos: true, + scrolling: true, + inline: false, + html: false, + iframe: false, + fastIframe: true, + photo: false, + href: false, + title: false, + rel: false, + opacity: 0.9, + preloading: true, + current: "image {current} of {total}", + previous: "previous", + next: "next", + close: "close", + open: false, + returnFocus: true, + reposition: true, + loop: true, + slideshow: false, + slideshowAuto: true, + slideshowSpeed: 2500, + slideshowStart: "start slideshow", + slideshowStop: "stop slideshow", + onOpen: false, + onLoad: false, + onComplete: false, + onCleanup: false, + onClosed: false, + overlayClose: true, + escKey: true, + arrowKey: true, + top: false, + bottom: false, + left: false, + right: false, + fixed: false, + data: undefined + }, + + // Abstracting the HTML and event identifiers for easy rebranding + colorbox = 'colorbox', + prefix = 'cbox', + boxElement = prefix + 'Element', + + // Events + event_open = prefix + '_open', + event_load = prefix + '_load', + event_complete = prefix + '_complete', + event_cleanup = prefix + '_cleanup', + event_closed = prefix + '_closed', + event_purge = prefix + '_purge', + + // Special Handling for IE + isIE = !$.support.opacity && !$.support.style, // IE7 & IE8 + isIE6 = isIE && !window.XMLHttpRequest, // IE6 + event_ie6 = prefix + '_IE6', + + // Cached jQuery Object Variables + $overlay, + $box, + $wrap, + $content, + $topBorder, + $leftBorder, + $rightBorder, + $bottomBorder, + $related, + $window, + $loaded, + $loadingBay, + $loadingOverlay, + $title, + $current, + $slideshow, + $next, + $prev, + $close, + $groupControls, + + // Variables for cached values or use across multiple functions + settings, + interfaceHeight, + interfaceWidth, + loadedHeight, + loadedWidth, + element, + index, + photo, + open, + active, + closing, + loadingTimer, + publicMethod, + div = "div", + init; + + // **************** + // HELPER FUNCTIONS + // **************** + + // Convience function for creating new jQuery objects + function $tag(tag, id, css) { + var element = document.createElement(tag); + + if (id) { + element.id = prefix + id; + } + + if (css) { + element.style.cssText = css; + } + + return $(element); + } + + // Determine the next and previous members in a group. + function getIndex(increment) { + var + max = $related.length, + newIndex = (index + increment) % max; + + return (newIndex < 0) ? max + newIndex : newIndex; + } + + // Convert '%' and 'px' values to integers + function setSize(size, dimension) { + return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10)); + } + + // Checks an href to see if it is a photo. + // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex. + function isImage(url) { + return settings.photo || /\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(url); + } + + // Assigns function results to their respective properties + function makeSettings() { + var i; + settings = $.extend({}, $.data(element, colorbox)); + + for (i in settings) { + if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. + settings[i] = settings[i].call(element); + } + } + + settings.rel = settings.rel || element.rel || 'nofollow'; + settings.href = settings.href || $(element).attr('href'); + settings.title = settings.title || element.title; + + if (typeof settings.href === "string") { + settings.href = $.trim(settings.href); + } + } + + function trigger(event, callback) { + $.event.trigger(event); + if (callback) { + callback.call(element); + } + } + + // Slideshow functionality + function slideshow() { + var + timeOut, + className = prefix + "Slideshow_", + click = "click." + prefix, + start, + stop, + clear; + + if (settings.slideshow && $related[1]) { + start = function () { + $slideshow + .text(settings.slideshowStop) + .unbind(click) + .bind(event_complete, function () { + if (settings.loop || $related[index + 1]) { + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + } + }) + .bind(event_load, function () { + clearTimeout(timeOut); + }) + .one(click + ' ' + event_cleanup, stop); + $box.removeClass(className + "off").addClass(className + "on"); + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + }; + + stop = function () { + clearTimeout(timeOut); + $slideshow + .text(settings.slideshowStart) + .unbind([event_complete, event_load, event_cleanup, click].join(' ')) + .one(click, function () { + publicMethod.next(); + start(); + }); + $box.removeClass(className + "on").addClass(className + "off"); + }; + + if (settings.slideshowAuto) { + start(); + } else { + stop(); + } + } else { + $box.removeClass(className + "off " + className + "on"); + } + } + + function launch(target) { + if (!closing) { + + element = target; + + makeSettings(); + + $related = $(element); + + index = 0; + + if (settings.rel !== 'nofollow') { + $related = $('.' + boxElement).filter(function () { + var relRelated = $.data(this, colorbox).rel || this.rel; + return (relRelated === settings.rel); + }); + index = $related.index(element); + + // Check direct calls to ColorBox. + if (index === -1) { + $related = $related.add(element); + index = $related.length - 1; + } + } + + if (!open) { + open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. + + $box.show(); + + if (settings.returnFocus) { + $(element).blur().one(event_closed, function () { + $(this).focus(); + }); + } + + // +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5' + $overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show(); + + // Opens inital empty ColorBox prior to content being loaded. + settings.w = setSize(settings.initialWidth, 'x'); + settings.h = setSize(settings.initialHeight, 'y'); + publicMethod.position(); + + if (isIE6) { + $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () { + $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()}); + }).trigger('resize.' + event_ie6); + } + + trigger(event_open, settings.onOpen); + + $groupControls.add($title).hide(); + + $close.html(settings.close).show(); + } + + publicMethod.load(true); + } + } + + // ColorBox's markup needs to be added to the DOM prior to being called + // so that the browser will go ahead and load the CSS background images. + function appendHTML() { + if (!$box && document.body) { + init = false; + + $window = $(window); + $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide(); + $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide(); + $wrap = $tag(div, "Wrapper"); + $content = $tag(div, "Content").append( + $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'), + $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")), + $title = $tag(div, "Title"), + $current = $tag(div, "Current"), + $next = $tag(div, "Next"), + $prev = $tag(div, "Previous"), + $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow), + $close = $tag(div, "Close") + ); + + $wrap.append( // The 3x3 Grid that makes up ColorBox + $tag(div).append( + $tag(div, "TopLeft"), + $topBorder = $tag(div, "TopCenter"), + $tag(div, "TopRight") + ), + $tag(div, false, 'clear:left').append( + $leftBorder = $tag(div, "MiddleLeft"), + $content, + $rightBorder = $tag(div, "MiddleRight") + ), + $tag(div, false, 'clear:left').append( + $tag(div, "BottomLeft"), + $bottomBorder = $tag(div, "BottomCenter"), + $tag(div, "BottomRight") + ) + ).find('div div').css({'float': 'left'}); + + $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); + + $groupControls = $next.add($prev).add($current).add($slideshow); + + $(document.body).append($overlay, $box.append($wrap, $loadingBay)); + } + } + + // Add ColorBox's event bindings + function addBindings() { + if ($box) { + if (!init) { + init = true; + + // Cache values needed for size calculations + interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6 + interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); + loadedHeight = $loaded.outerHeight(true); + loadedWidth = $loaded.outerWidth(true); + + // Setting padding to remove the need to do size conversions during the animation step. + $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}); + + // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. + $next.click(function () { + publicMethod.next(); + }); + $prev.click(function () { + publicMethod.prev(); + }); + $close.click(function () { + publicMethod.close(); + }); + $overlay.click(function () { + if (settings.overlayClose) { + publicMethod.close(); + } + }); + + // Key Bindings + $(document).bind('keydown.' + prefix, function (e) { + var key = e.keyCode; + if (open && settings.escKey && key === 27) { + e.preventDefault(); + publicMethod.close(); + } + if (open && settings.arrowKey && $related[1]) { + if (key === 37) { + e.preventDefault(); + $prev.click(); + } else if (key === 39) { + e.preventDefault(); + $next.click(); + } + } + }); + + $('.' + boxElement, document).live('click', function (e) { + // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. + // See: http://jacklmoore.com/notes/click-events/ + if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) { + e.preventDefault(); + launch(this); + } + }); + } + return true; + } + return false; + } + + // Don't do anything if ColorBox already exists. + if ($.colorbox) { + return; + } + + // Append the HTML when the DOM loads + $(appendHTML); + + + // **************** + // PUBLIC FUNCTIONS + // Usage format: $.fn.colorbox.close(); + // Usage from within an iframe: parent.$.fn.colorbox.close(); + // **************** + + publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { + var $this = this; + + options = options || {}; + + appendHTML(); + + if (addBindings()) { + if (!$this[0]) { + if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit. + return $this; + } + // if no selector was given (ie. $.colorbox()), create a temporary element to work with + $this = $(''); + options.open = true; // assume an immediate open + } + + if (callback) { + options.onComplete = callback; + } + + $this.each(function () { + $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); + }).addClass(boxElement); + + if (($.isFunction(options.open) && options.open.call($this)) || options.open) { + launch($this[0]); + } + } + + return $this; + }; + + publicMethod.position = function (speed, loadedCallback) { + var + top = 0, + left = 0, + offset = $box.offset(), + scrollTop = $window.scrollTop(), + scrollLeft = $window.scrollLeft(); + + $window.unbind('resize.' + prefix); + + // remove the modal so that it doesn't influence the document width/height + $box.css({top: -9e4, left: -9e4}); + + if (settings.fixed && !isIE6) { + offset.top -= scrollTop; + offset.left -= scrollLeft; + $box.css({position: 'fixed'}); + } else { + top = scrollTop; + left = scrollLeft; + $box.css({position: 'absolute'}); + } + + // keeps the top and left positions within the browser's viewport. + if (settings.right !== false) { + left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); + } else if (settings.left !== false) { + left += setSize(settings.left, 'x'); + } else { + left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); + } + + if (settings.bottom !== false) { + top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); + } else if (settings.top !== false) { + top += setSize(settings.top, 'y'); + } else { + top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2); + } + + $box.css({top: offset.top, left: offset.left}); + + // setting the speed to 0 to reduce the delay between same-sized content. + speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0; + + // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, + // but it has to be shrank down around the size of div#colorbox when it's done. If not, + // it can invoke an obscure IE bug when using iframes. + $wrap[0].style.width = $wrap[0].style.height = "9999px"; + + function modalDimensions(that) { + $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width; + $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height; + } + + $box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}, { + duration: speed, + complete: function () { + modalDimensions(this); + + active = false; + + // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. + $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; + $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; + + if (settings.reposition) { + setTimeout(function () { // small delay before binding onresize due to an IE8 bug. + $window.bind('resize.' + prefix, publicMethod.position); + }, 1); + } + + if (loadedCallback) { + loadedCallback(); + } + }, + step: function () { + modalDimensions(this); + } + }); + }; + + publicMethod.resize = function (options) { + if (open) { + options = options || {}; + + if (options.width) { + settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; + } + if (options.innerWidth) { + settings.w = setSize(options.innerWidth, 'x'); + } + $loaded.css({width: settings.w}); + + if (options.height) { + settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; + } + if (options.innerHeight) { + settings.h = setSize(options.innerHeight, 'y'); + } + if (!options.innerHeight && !options.height) { + $loaded.css({height: "auto"}); + settings.h = $loaded.height(); + } + $loaded.css({height: settings.h}); + + publicMethod.position(settings.transition === "none" ? 0 : settings.speed); + } + }; + + publicMethod.prep = function (object) { + if (!open) { + return; + } + + var callback, speed = settings.transition === "none" ? 0 : settings.speed; + + $loaded.remove(); + $loaded = $tag(div, 'LoadedContent').append(object); + + function getWidth() { + settings.w = settings.w || $loaded.width(); + settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; + return settings.w; + } + function getHeight() { + settings.h = settings.h || $loaded.height(); + settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; + return settings.h; + } + + $loaded.hide() + .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. + .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) + .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. + .prependTo($content); + + $loadingBay.hide(); + + // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. + //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'}); + + $(photo).css({'float': 'none'}); + + // Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay. + if (isIE6) { + $('select').not($box.find('select')).filter(function () { + return this.style.visibility !== 'hidden'; + }).css({'visibility': 'hidden'}).one(event_cleanup, function () { + this.style.visibility = 'inherit'; + }); + } + + callback = function () { + var preload, i, total = $related.length, iframe, frameBorder = 'frameBorder', allowTransparency = 'allowTransparency', complete, src, img; + + if (!open) { + return; + } + + function removeFilter() { + if (isIE) { + $box[0].style.removeAttribute('filter'); + } + } + + complete = function () { + clearTimeout(loadingTimer); + $loadingOverlay.hide(); + trigger(event_complete, settings.onComplete); + }; + + if (isIE) { + //This fadeIn helps the bicubic resampling to kick-in. + if (photo) { + $loaded.fadeIn(100); + } + } + + $title.html(settings.title).add($loaded).show(); + + if (total > 1) { // handle grouping + if (typeof settings.current === "string") { + $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); + } + + $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); + $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); + + if (settings.slideshow) { + $slideshow.show(); + } + + // Preloads images within a rel group + if (settings.preloading) { + preload = [ + getIndex(-1), + getIndex(1) + ]; + while (i = $related[preload.pop()]) { + src = $.data(i, colorbox).href || i.href; + if ($.isFunction(src)) { + src = src.call(i); + } + if (isImage(src)) { + img = new Image(); + img.src = src; + } + } + } + } else { + $groupControls.hide(); + } + + if (settings.iframe) { + iframe = $tag('iframe')[0]; + + if (frameBorder in iframe) { + iframe[frameBorder] = 0; + } + if (allowTransparency in iframe) { + iframe[allowTransparency] = "true"; + } + // give the iframe a unique name to prevent caching + iframe.name = prefix + (+new Date()); + if (settings.fastIframe) { + complete(); + } else { + $(iframe).one('load', complete); + } + iframe.src = settings.href; + if (!settings.scrolling) { + iframe.scrolling = "no"; + } + $(iframe).addClass(prefix + 'Iframe').appendTo($loaded).one(event_purge, function () { + iframe.src = "//about:blank"; + }); + } else { + complete(); + } + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 1, removeFilter); + } else { + removeFilter(); + } + }; + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 0, function () { + publicMethod.position(0, callback); + }); + } else { + publicMethod.position(speed, callback); + } + }; + + publicMethod.load = function (launched) { + var href, setResize, prep = publicMethod.prep; + + active = true; + + photo = false; + + element = $related[index]; + + if (!launched) { + makeSettings(); + } + + trigger(event_purge); + + trigger(event_load, settings.onLoad); + + settings.h = settings.height ? + setSize(settings.height, 'y') - loadedHeight - interfaceHeight : + settings.innerHeight && setSize(settings.innerHeight, 'y'); + + settings.w = settings.width ? + setSize(settings.width, 'x') - loadedWidth - interfaceWidth : + settings.innerWidth && setSize(settings.innerWidth, 'x'); + + // Sets the minimum dimensions for use in image scaling + settings.mw = settings.w; + settings.mh = settings.h; + + // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. + // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. + if (settings.maxWidth) { + settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; + settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; + } + if (settings.maxHeight) { + settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; + settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; + } + + href = settings.href; + + loadingTimer = setTimeout(function () { + $loadingOverlay.show(); + }, 100); + + if (settings.inline) { + // Inserts an empty placeholder where inline content is being pulled from. + // An event is bound to put inline content back when ColorBox closes or loads new content. + $tag(div).hide().insertBefore($(href)[0]).one(event_purge, function () { + $(this).replaceWith($loaded.children()); + }); + prep($(href)); + } else if (settings.iframe) { + // IFrame element won't be added to the DOM until it is ready to be displayed, + // to avoid problems with DOM-ready JS that might be trying to run in that iframe. + prep(" "); + } else if (settings.html) { + prep(settings.html); + } else if (isImage(href)) { + $(photo = new Image()) + .addClass(prefix + 'Photo') + .error(function () { + settings.title = false; + prep($tag(div, 'Error').text('This image could not be loaded')); + }) + .load(function () { + var percent; + photo.onload = null; //stops animated gifs from firing the onload repeatedly. + + if (settings.scalePhotos) { + setResize = function () { + photo.height -= photo.height * percent; + photo.width -= photo.width * percent; + }; + if (settings.mw && photo.width > settings.mw) { + percent = (photo.width - settings.mw) / photo.width; + setResize(); + } + if (settings.mh && photo.height > settings.mh) { + percent = (photo.height - settings.mh) / photo.height; + setResize(); + } + } + + if (settings.h) { + photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px'; + } + + if ($related[1] && (settings.loop || $related[index + 1])) { + photo.style.cursor = 'pointer'; + photo.onclick = function () { + publicMethod.next(); + }; + } + + if (isIE) { + photo.style.msInterpolationMode = 'bicubic'; + } + + setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. + prep(photo); + }, 1); + }); + + setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. + photo.src = href; + }, 1); + } else if (href) { + $loadingBay.load(href, settings.data, function (data, status, xhr) { + prep(status === 'error' ? $tag(div, 'Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents()); + }); + } + }; + + // Navigates to the next page/image in a set. + publicMethod.next = function () { + if (!active && $related[1] && (settings.loop || $related[index + 1])) { + index = getIndex(1); + publicMethod.load(); + } + }; + + publicMethod.prev = function () { + if (!active && $related[1] && (settings.loop || index)) { + index = getIndex(-1); + publicMethod.load(); + } + }; + + // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close(); + publicMethod.close = function () { + if (open && !closing) { + + closing = true; + + open = false; + + trigger(event_cleanup, settings.onCleanup); + + $window.unbind('.' + prefix + ' .' + event_ie6); + + $overlay.fadeTo(200, 0); + + $box.stop().fadeTo(300, 0, function () { + + $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); + + trigger(event_purge); + + $loaded.remove(); + + setTimeout(function () { + closing = false; + trigger(event_closed, settings.onClosed); + }, 1); + }); + } + }; + + // Removes changes ColorBox made to the document, but does not remove the plugin + // from jQuery. + publicMethod.remove = function () { + $([]).add($box).add($overlay).remove(); + $box = null; + $('.' + boxElement) + .removeData(colorbox) + .removeClass(boxElement) + .die(); + }; + + // A method for fetching the current element ColorBox is referencing. + // returns a jQuery object. + publicMethod.element = function () { + return $(element); + }; + + publicMethod.settings = defaults; + +}(jQuery, document, this)); \ No newline at end of file diff --git a/snf-astakos-app/astakos/im/static/im/js/jquery.dropkick-1.0.0.js b/snf-astakos-app/astakos/im/static/im/js/jquery.dropkick-1.0.0.js new file mode 100644 index 0000000..aaffc4b --- /dev/null +++ b/snf-astakos-app/astakos/im/static/im/js/jquery.dropkick-1.0.0.js @@ -0,0 +1,402 @@ +/** + * DropKick + * + * Highly customizable element that gets dropkicked + lists = [], + + // Convenience keys for keyboard navigation + keyMap = { + 'left' : 37, + 'up' : 38, + 'right' : 39, + 'down' : 40, + 'enter' : 13 + }, + + // HTML template for the dropdowns + dropdownTemplate = [ + '

    ', + '', + '{{ label }}', + '', + '
    ', + '
      ', + '
    ', + '
    ', + '
    ' + ].join(''), + + // HTML template for dropdown options + optionTemplate = '
  • {{ text }}
  • ', + + // Some nice default values + defaults = { + startSpeed : 1000, // I recommend a high value here, I feel it makes the changes less noticeable to the user + theme : false, + change : false + }, + + // Make sure we only bind keydown on the document once + keysBound = false + ; + + // Called by using $('foo').dropkick(); + methods.init = function (settings) { + settings = $.extend({}, defaults, settings); + + return this.each(function () { + var + // The current list and place our new one in front of it + $select.before($dk); + + // Update the reference to $dk + $dk = $('#dk_container_' + id).fadeIn(settings.startSpeed); + + // Save the current theme + theme = settings.theme ? settings.theme : 'default'; + $dk.addClass('dk_theme_' + theme); + data.theme = theme; + + // Save the updated $dk reference into our data object + data.$dk = $dk; + + // Save the dropkick data onto the - + diff --git a/snf-astakos-app/astakos/im/templates/im/footer.html b/snf-astakos-app/astakos/im/templates/im/footer.html index c4f148d..81345ff 100644 --- a/snf-astakos-app/astakos/im/templates/im/footer.html +++ b/snf-astakos-app/astakos/im/templates/im/footer.html @@ -1,9 +1,8 @@ - + {% if field.help_text %} + + more info + {{ field.help_text|safe }} + + {% endif %} +

    + {% endfor %} diff --git a/snf-astakos-app/astakos/im/templates/im/invitations.html b/snf-astakos-app/astakos/im/templates/im/invitations.html index 5d75ef3..31ff8d3 100644 --- a/snf-astakos-app/astakos/im/templates/im/invitations.html +++ b/snf-astakos-app/astakos/im/templates/im/invitations.html @@ -1,48 +1,50 @@ {% extends "im/account_base.html" %} {% block page.body %} -
    -
    -

    You have {{ inviter.invitations }} invitation{{ inviter.invitations|pluralize }} left.

    - {% if sent|length %} - - - - - - - - - - {% for inv in sent %} - - - - - - {% endfor %} - -
    EmailReal NameUsed
    {{ inv.email }}{{ inv.realname }}{% if inv.is_consumed %}Yes{% else %}No{% endif %}
    - {% else %} -

    No invitations sent

    - {% endif %} -
    +
    +
    + {% if inviter.invitations %} +
    {% csrf_token %} +

    INVITE SOMEONE ELSE

    + {% with invitation_form as form %} + {% include "im/form_render.html" %} + {% endwith %} + +
    + +
    +
    + {% endif %} +
    +
    + +

    You have {{ inviter.invitations }} invitation{{ inviter.invitations|pluralize }} left.

    + {% if sent|length %} + + + + + + + + + + {% for inv in sent %} + + + + + + {% endfor %} + +
    EmailReal NameUsed
    {{ inv.email }}{{ inv.realname }}{% if inv.is_consumed %}Yes{% else %}No{% endif %}
    + {% else %} +

    No invitations sent

    + {% endif %} +
    -
    - {% if inviter.invitations %} -
    {% csrf_token %} -

    INVITE SOMEONE ELSE

    - {% with invitation_form as form %} - {% include "im/form_render.html" %} - {% endwith %} -
    - -
    -
    - {% endif %} -
    {% endblock %} diff --git a/snf-astakos-app/astakos/im/templates/im/login_base.html b/snf-astakos-app/astakos/im/templates/im/login_base.html index 227fc12..e394309 100644 --- a/snf-astakos-app/astakos/im/templates/im/login_base.html +++ b/snf-astakos-app/astakos/im/templates/im/login_base.html @@ -9,57 +9,50 @@ {% endblock %} {% block signup_class %}hidden{% endblock %} -{% block page.title %} -Login -{% endblock %} +{% block page.title %}{% endblock %} -{% block body %} -
    - -
    -{% comment %}{% include "im/services_description.html" %}{% endcomment %} -{% endblock body %} +{% block body.left %} + + {% comment %}{% include "im/services_description.html" %}{% endcomment %} +{% endblock body.left %} -{% block body.right %} -
    - {% if "local" in im_modules %} - - {% endif %} +{% block body.right %} + {% if "local" in im_modules %} + + {% endif %} -
    - {% for o in im_modules %} -
    - {% if o != 'local' %} - LOGIN using - {{ o }} - {% endif %} -
    - {% endfor %} +
    + {% for o in im_modules %} +
    + {% if o != 'local' %} + LOGIN using + {{ o }} + {% endif %}
    - {% block body.signup %} - {% for o in im_modules %} - {% if o != 'local' %} -
    - {% endif %} {% endfor %} -
    - {% block body.login.signup %} - new to okeanos ? CREATE ACCOUNT - {% endblock %} -
    -
    - {% endblock %}
    -{% endblock %} + {% block body.signup %} + {% for o in im_modules %} + {% if o != 'local' %} +
    + {% endif %} + {% endfor %} +
    + {% block body.login.signup %} + new to okeanos ? CREATE ACCOUNT + {% endblock %} +
    + {% endblock body.signup %} + +{% endblock body.right%} diff --git a/snf-astakos-app/astakos/im/templates/im/profile.html b/snf-astakos-app/astakos/im/templates/im/profile.html index ffc0651..277a7e3 100644 --- a/snf-astakos-app/astakos/im/templates/im/profile.html +++ b/snf-astakos-app/astakos/im/templates/im/profile.html @@ -2,8 +2,7 @@ {% block body %} -
    {% csrf_token %} +{% csrf_token %} {% with profile_form as form %} {% include "im/form_render.html" %} diff --git a/snf-astakos-app/astakos/im/templates/im/signup.html b/snf-astakos-app/astakos/im/templates/im/signup.html index c5e5a0a..a2252dd 100644 --- a/snf-astakos-app/astakos/im/templates/im/signup.html +++ b/snf-astakos-app/astakos/im/templates/im/signup.html @@ -5,12 +5,10 @@ Signup {% endblock %} -{% block body %} -
    +{% block body.left %} -
    {% comment %}{% include "im/services_description.html" %}{% endcomment %} -{% endblock body %} +{% endblock body.left %} {% block body.right %} {% if "local" in im_modules %} diff --git a/snf-astakos-app/astakos/im/views.py b/snf-astakos-app/astakos/im/views.py index 00cf8b5..4b7efff 100644 --- a/snf-astakos-app/astakos/im/views.py +++ b/snf-astakos-app/astakos/im/views.py @@ -262,7 +262,7 @@ def edit_profile(request, template_name='im/profile.html', extra_context={}): next = request.POST.get('next') if next: return redirect(next) - msg = _('Profile has been updated successfully') + msg = _('

    Profile has been updated successfully

    ') messages.add_message(request, messages.SUCCESS, msg) except ValueError, ve: messages.add_message(request, messages.ERROR, ve) @@ -415,7 +415,7 @@ def logout(request, template='registration/logged_out.html', extra_context={}): response['Location'] = LOGOUT_NEXT response.status_code = 301 return response - messages.add_message(request, messages.SUCCESS, _('You have successfully logged out.')) + messages.add_message(request, messages.SUCCESS, _('

    You have successfully logged out.

    ')) context = get_context(request, extra_context) response.write(render_to_string(template, context_instance=context)) return response