From ef6189f9cbe4d94a415dfa06cddb0e7f6f5cc01d Mon Sep 17 00:00:00 2001 From: benweet Date: Sat, 30 Mar 2013 11:56:17 +0000 Subject: [PATCH] Support for offline --- css/jgrowl.css | 131 ++++++++++++++++ css/main.css | 18 ++- index.html | 16 +- js/async-runner.js | 70 +++++++++ js/gdrive.js | 253 +++++++++++++++++++++---------- js/jquery.jgrowl.js | 356 ++++++++++++++++++++++++++++++++++++++++++++ js/main.js | 106 ++++++++++--- 7 files changed, 835 insertions(+), 115 deletions(-) create mode 100644 css/jgrowl.css create mode 100644 js/async-runner.js create mode 100644 js/jquery.jgrowl.js diff --git a/css/jgrowl.css b/css/jgrowl.css new file mode 100644 index 00000000..abbe3253 --- /dev/null +++ b/css/jgrowl.css @@ -0,0 +1,131 @@ + +div.jGrowl { + z-index: 1000; + color: #fff; + font-size: 12px; +} + +/** Special IE6 Style Positioning **/ +div.ie6 { + position: absolute; +} + +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +div.jGrowl { + position: absolute; +} + +body > div.jGrowl { + position: fixed; +} + +div.jGrowl.top-left { + left: 0px; + top: 0px; +} + +div.jGrowl.top-right { + right: 0px; + top: 0px; +} + +div.jGrowl.bottom-left { + left: 0px; + bottom: 0px; +} + +div.jGrowl.bottom-right { + right: 0px; + bottom: 0px; +} + +div.jGrowl.center { + top: 0px; + width: 50%; + left: 25%; +} + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { + margin-left: auto; + margin-right: auto; +} + +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: #777; + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + text-align: left; + display: none; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +div.jGrowl div.jGrowl-notification { + min-height: 40px; +} + +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + margin: 10px; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-header { + font-weight: bold; + font-size: .85em; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-close { + z-index: 99; + float: right; + font-weight: bold; + font-size: 1em; + cursor: pointer; +} + +div.jGrowl div.jGrowl-closer { + padding-top: 4px; + padding-bottom: 4px; + cursor: pointer; + font-size: .9em; + font-weight: bold; + text-align: center; +} + +/** Hide jGrowl when printing **/ +@media print { + div.jGrowl { + display: none; + } +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index 0cc9a00d..1d2dff21 100644 --- a/css/main.css +++ b/css/main.css @@ -19,7 +19,7 @@ div, span, a, ul, li, textarea, input { text-shadow: none !important; } -.btn, .navbar-inner, .well, textarea, input { +.btn, .navbar-inner, .ui-layout-east, .ui-layout-south, textarea, input { border: none !important; } @@ -51,11 +51,11 @@ div, span, a, ul, li, textarea, input { .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { - background-color: #999; + background-color: #888; } .btn-primary { - background-color: #888; + background-color: #777; } .btn-primary:hover, @@ -64,7 +64,7 @@ div, span, a, ul, li, textarea, input { .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { - background-color: #999; + background-color: #888; } .btn-group { @@ -232,4 +232,14 @@ hr { border-top: 5px solid transparent; border-right: 5px solid #525252; border-left: 0; +} + +#message-container { + position: absolute; + right: 20px; + bottom: 20px; + width: 200px; + background-color: #eee; + margin: 0; + font-weight: bold; } \ No newline at end of file diff --git a/index.html b/index.html index 1acea2d4..9bba4e80 100644 --- a/index.html +++ b/index.html @@ -8,23 +8,20 @@ + + - - - + + +