From d542c7f4476b14d6a0fa2c1089ed6ff1fe8da5dc Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Fri, 15 Jan 2010 13:50:49 -0500 Subject: Commit --- static/about.html | 0 static/bgnav.jpg | Bin static/browser.css | 493 +++++++++++++++ static/browser.html | 255 ++++++++ static/cat.jpeg | Bin static/chatbar.html | 57 ++ static/dumpteam.png | Bin static/favicon.ico | Bin 1406 -> 1406 bytes static/favicon2.ico | Bin 0 -> 1406 bytes static/gritter/css/jquery.gritter.css | 131 ++++ static/gritter/images/gritter-close-ie6.gif | Bin 0 -> 718 bytes static/gritter/images/gritter-long.png | Bin 0 -> 6299 bytes static/gritter/images/gritter.png | Bin 0 -> 4880 bytes static/gritter/images/trees.jpg | Bin 0 -> 274003 bytes static/gritter/js/jquery.gritter.js | 401 +++++++++++++ static/gritter/js/jquery.gritter.min.js | 19 + static/header.css | 121 +++- static/images-global/zoom/closebox.png | Bin 0 -> 1910 bytes static/images-global/zoom/spacer.gif | Bin 0 -> 43 bytes static/images-global/zoom/zoom-caption-fill.png | Bin 0 -> 134 bytes static/images-global/zoom/zoom-caption-l.png | Bin 0 -> 310 bytes static/images-global/zoom/zoom-caption-r.png | Bin 0 -> 290 bytes static/images-global/zoom/zoom-shadow1.png | Bin 0 -> 310 bytes static/images-global/zoom/zoom-shadow2.png | Bin 0 -> 164 bytes static/images-global/zoom/zoom-shadow3.png | Bin 0 -> 368 bytes static/images-global/zoom/zoom-shadow4.png | Bin 0 -> 178 bytes static/images-global/zoom/zoom-shadow5.png | Bin 0 -> 180 bytes static/images-global/zoom/zoom-shadow6.png | Bin 0 -> 428 bytes static/images-global/zoom/zoom-shadow7.png | Bin 0 -> 186 bytes static/images-global/zoom/zoom-shadow8.png | Bin 0 -> 426 bytes static/images-global/zoom/zoom-spin-1.png | Bin 0 -> 1882 bytes static/images-global/zoom/zoom-spin-10.png | Bin 0 -> 1892 bytes static/images-global/zoom/zoom-spin-11.png | Bin 0 -> 1901 bytes static/images-global/zoom/zoom-spin-12.png | Bin 0 -> 1902 bytes static/images-global/zoom/zoom-spin-2.png | Bin 0 -> 1893 bytes static/images-global/zoom/zoom-spin-3.png | Bin 0 -> 1922 bytes static/images-global/zoom/zoom-spin-4.png | Bin 0 -> 1890 bytes static/images-global/zoom/zoom-spin-5.png | Bin 0 -> 1938 bytes static/images-global/zoom/zoom-spin-6.png | Bin 0 -> 1927 bytes static/images-global/zoom/zoom-spin-7.png | Bin 0 -> 1898 bytes static/images-global/zoom/zoom-spin-8.png | Bin 0 -> 1910 bytes static/images-global/zoom/zoom-spin-9.png | Bin 0 -> 1901 bytes static/jquery-1.3.2.min.js | 0 static/jquery.gritter.js | 401 +++++++++++++ static/jquery.gritter.min.js | 19 + static/js-global/FancyZoom.js | 761 ++++++++++++++++++++++++ static/js-global/FancyZoomHTML.js | 318 ++++++++++ static/mouseover.gif | Bin static/moverc.png | Bin static/nav_white.gif | Bin 0 -> 847 bytes static/navdown_white.gif | Bin 0 -> 839 bytes static/pichat.css | 0 static/profile.css | 23 +- static/scroll.js | 0 static/search.html | 301 ++++++++++ static/search/all.js | 1 + static/search/browser.html | 262 ++++++++ static/search/cufon-yui.js | 5 + static/search/dumpsearch.gif | Bin 0 -> 10899 bytes static/search/dumpsearch.js | 39 ++ static/search/futura.js | 1 + static/search/s.html | 258 ++++++++ static/search/search.html | 314 ++++++++++ static/shaqg.gif | Bin static/surf.php | 238 ++++++++ template/banner.st | 2 +- template/browser.st | 73 ++- template/head.st | 0 template/log.st | 45 +- template/profile.st | 9 +- 70 files changed, 4517 insertions(+), 30 deletions(-) mode change 100644 => 100755 static/about.html mode change 100644 => 100755 static/bgnav.jpg create mode 100755 static/browser.css create mode 100755 static/browser.html mode change 100644 => 100755 static/cat.jpeg create mode 100755 static/chatbar.html mode change 100644 => 100755 static/dumpteam.png create mode 100755 static/favicon2.ico create mode 100755 static/gritter/css/jquery.gritter.css create mode 100755 static/gritter/images/gritter-close-ie6.gif create mode 100755 static/gritter/images/gritter-long.png create mode 100755 static/gritter/images/gritter.png create mode 100755 static/gritter/images/trees.jpg create mode 100755 static/gritter/js/jquery.gritter.js create mode 100755 static/gritter/js/jquery.gritter.min.js mode change 100644 => 100755 static/header.css create mode 100755 static/images-global/zoom/closebox.png create mode 100755 static/images-global/zoom/spacer.gif create mode 100755 static/images-global/zoom/zoom-caption-fill.png create mode 100755 static/images-global/zoom/zoom-caption-l.png create mode 100755 static/images-global/zoom/zoom-caption-r.png create mode 100755 static/images-global/zoom/zoom-shadow1.png create mode 100755 static/images-global/zoom/zoom-shadow2.png create mode 100755 static/images-global/zoom/zoom-shadow3.png create mode 100755 static/images-global/zoom/zoom-shadow4.png create mode 100755 static/images-global/zoom/zoom-shadow5.png create mode 100755 static/images-global/zoom/zoom-shadow6.png create mode 100755 static/images-global/zoom/zoom-shadow7.png create mode 100755 static/images-global/zoom/zoom-shadow8.png create mode 100755 static/images-global/zoom/zoom-spin-1.png create mode 100755 static/images-global/zoom/zoom-spin-10.png create mode 100755 static/images-global/zoom/zoom-spin-11.png create mode 100755 static/images-global/zoom/zoom-spin-12.png create mode 100755 static/images-global/zoom/zoom-spin-2.png create mode 100755 static/images-global/zoom/zoom-spin-3.png create mode 100755 static/images-global/zoom/zoom-spin-4.png create mode 100755 static/images-global/zoom/zoom-spin-5.png create mode 100755 static/images-global/zoom/zoom-spin-6.png create mode 100755 static/images-global/zoom/zoom-spin-7.png create mode 100755 static/images-global/zoom/zoom-spin-8.png create mode 100755 static/images-global/zoom/zoom-spin-9.png mode change 100644 => 100755 static/jquery-1.3.2.min.js create mode 100755 static/jquery.gritter.js create mode 100755 static/jquery.gritter.min.js create mode 100755 static/js-global/FancyZoom.js create mode 100755 static/js-global/FancyZoomHTML.js mode change 100644 => 100755 static/mouseover.gif mode change 100644 => 100755 static/moverc.png create mode 100755 static/nav_white.gif create mode 100755 static/navdown_white.gif mode change 100644 => 100755 static/pichat.css mode change 100644 => 100755 static/profile.css mode change 100644 => 100755 static/scroll.js create mode 100755 static/search.html create mode 100755 static/search/all.js create mode 100755 static/search/browser.html create mode 100755 static/search/cufon-yui.js create mode 100755 static/search/dumpsearch.gif create mode 100755 static/search/dumpsearch.js create mode 100755 static/search/futura.js create mode 100755 static/search/s.html create mode 100755 static/search/search.html mode change 100644 => 100755 static/shaqg.gif create mode 100755 static/surf.php mode change 100644 => 100755 template/head.st mode change 100644 => 100755 template/log.st diff --git a/static/about.html b/static/about.html old mode 100644 new mode 100755 diff --git a/static/bgnav.jpg b/static/bgnav.jpg old mode 100644 new mode 100755 diff --git a/static/browser.css b/static/browser.css new file mode 100755 index 0000000..30ea714 --- /dev/null +++ b/static/browser.css @@ -0,0 +1,493 @@ +/* pichat.css */ + +body { + + background-color:#e3e3e3; + margin:0; + +} + + +#content{ + z-index: 3; + overflow: auto; + min-width:600px; +} + +#chatboxx { + position: fixed; + top:80px; +} + +#rapper { + top: 0px; +} + +#footerc +{ + text-align:center; + position:fixed; + width:100%; + bottom:0px; +line-height:3.1; + font-size:11px; +word-spacing:8px; +height:28px; + color: #000; + +} +#footerc a { + font-size: 11px; + color: #000; +} +#footerc a:link { + text-decoration: none; + font-size: 11px; +color:000; +} + +#footerc a:hover { + text-decoration:none; + font-size: 11px; + color: #f0e; +} + + +#messagePane { + border: 2px solid #c8cbce; + + +top:56px; +bottom:65px; + position:fixed; + width: 99%; + background-color:#FFF; +left:0.3%; + + z-index:5; +} + +#messageList { + height: 100%; + width: 100%; + overflow-y: auto; + overflow-x: hidden; +} +#messagetabs { + height: 40px; + padding: 5px; + position: fixed; + width: 80%; + max-width:1500px; + overflow-y: hidden; + overflow-x: hidden; + top:48px; + left:0px; + z-index:1; +} + +#msgInputDiv { + position:relative; + min-width:500px; + z-index:100; +left:1px; +bottom:10px; + width: 100%; +} + +#msgInput { + width: 100%; + z-index:100; + background-color:#FFF; + margin-top: 15px; + left:-3px; + position:relative; + border:2px solid #c8cbce; +height:36px; +font-size:20px; + min-width:500px; + + box-shadow: 2px 3px 4px #eee; +-webkit-box-shadow: 2px 3px 4px #eee; +-moz-box-shadow: 2px 3px 4px #eee; +filter: progid:DXImageTransform.Microsoft.dropShadow(color=#eee, offX=3, offY=4, positive=true); +} +.msgInput { + min-width:500px; + z-index:100; +} + +#msgSubmit { + + position:absolute; + display:inline-block; + width:120px; +height:35px; +right:0px; +font-size:20px; +background-image:url(/static/bg-btn-blue.png); +top:15px; + text-align:center; + z-index:100; + cursor:pointer; + background-color:#087cff; + border-top-right-radius:10px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topright:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomright:5px; + border-radius:2px; + font-size:12px; + color:#fff; + text-shadow:1px 1px 3px rgba(0,0,0,0.5); +} +.msgDiv img{ + max-width:650px; + width: expression(this.width > 650 ? 650: true); + max-height:400px; + height: expression(this.width > 400 ? 400: true); + max-width:400px; + z-index: 1; +} +.msgDiv {padding:2px; +} +.oldmsg { + color: #666; +} + +#userList { + overflow-x: hidden; + overflow-y:auto; + height: auto; + margin: 0px; + position: absolute; + padding: 5px; + top:85px; + min-width: 150px; + width:11%; + float:right; + right: 6%; + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; + font-weight:420; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + background-color:#FFF; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; + max-height:450px; + box-shadow: 3px 4px 4px #c8cbce; +-webkit-box-shadow: 3px 4px 4px #c8cbce; +-moz-box-shadow: 3px 3px 4px #c8cbce; +filter: progid:DXImageTransform.Microsoft.dropShadow(color=#c8cbce, offX=3, offY=4, positive=true); + text-overflow:ellipsis; + z-index:18; + text-align: left; +} +.username{height:30px; +margin-top:6px; +line-height:20px; +text-indent:6px; +z-index:18; +min-width:90px; +overflow:hidden; + +} +.username a { +display:block; +width:100%; +height:100%; +text-decoration:none; +} +.username a:hover { +display:block; +width:100%; +height:100%; +background-image:url(/static/moverc.png); +background-repeat:repeat-x; +color:#fff; +text-decoration:none; +background-color:#f3f3f3; + border-top-right-radius:5px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topright:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomright:5px; +} +#userList img{ + max-width:30px; + width: expression(this.width > 30 ? 30: true); + max-height:30px; + height: expression(this.width > 30 ? 30: true); + max-width:30px; + + float:right; + right:1px; + z-index:77; + height:30px; + border-top-left-radius:3px; + border-top-right-radius:3px; + -webkit-border-top-left-radius:3px; + -webkit-border-top-right-radius:3px; + -moz-border-radius-topleft:3px; + -moz-border-radius-topright:3px; + border-bottom-left-radius:3px; + border-bottom-right-radius:3px; + -webkit-border-bottom-left-radius:3px; + -webkit-border-bottom-right-radius:3px; + -moz-border-radius-bottomleft:3px; + -moz-border-radius-bottomright:3px; +} + +#userListicon { + overflow: auto; + height: 70%; + margin: 0px; + position: fixed; + padding: 5px; + top:48px; + width: 7%; + float:right; + right: 35px; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + text-transform: uppercase; + min-width:72px; + line-height:13px; + z-index:1; + font-weight: bold; + font-family: Arial, Helvetica, sans-serif; + color: #666; + text-transform:none; + +} +#avatar +{ + right:1px; + float:right; + text-align:left; + width:auto; + +} + +#binfo { + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; + bottom + #chatrap{ + top: 105px; + left:0px; + position:absolute; + width: 100%; + padding-bottom:20px; +} +#chatrap{ + top: 105px; + left:0px; + position:absolute; + width: 100%; + padding-bottom:20px; +} + +#input { + padding-right:15px; + line-height:22px; + font-size: 12px; +} + #loghead { + border-bottom:0px; + padding-left: -50px; + margin-right:60%; + width:70%; + letter-spacing:-3px; + color:#504F61; + height:28px; + font-size:33px; + font-family:Arial, Helvetica, sans-serif; + font-weight:bold; + text-transform:capitalize; + text-shadow: -6px 4px 4px #ccc; + padding-bottom:12px; + left: -40px; + background-color: #FFF; + top: 80px; + position: fixed; + } + +#logc +{ + margin-right:10%; + margin-left:10%; + background-color:#FFF; + padding-left: 40px; + padding-bottom: 30px; + padding-top: 15px; +} + + + #profile { + float: right; + border:1px solid #000; + padding: 20px; + width: 180px; + margin-right:15%; + background-color:#FFF; + background-image:url(/static/cloudbg2.png); + background-position:center; + z-index:10; + border-top-right-radius:5px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topright:5px; + min-height:600px; + } +#chatrap{ + top: 105px; + left:0px; + position:absolute; + width: 100%; + margin: 0; + padding-bottom:105px; +} + +#log +{ + border: 2px #F1F1F1; + margin-right:15%; + margin-left:15%; + background-color:#FFF; + padding-left: 40px; + padding-bottom: 80px; + padding-top: 15px; + min-height: 800px; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; +} +#posts { + + + +} +.logged-dump img{ + max-width:650px; + width: expression(this.width > 500 ? 500: true); + max-height:400px; + height: expression(this.width > 500 ? 500: true); + border:0px; + z-index:4; + + + +} +.logged-dump{ + + + + + padding: 15px; + font-family: Arial, Helvetica, sans-serif; + margin-left:15%; + width:60%; + + font-size: 12px; + text-transform: uppercase; + border-top-left-radius:5px;border-top-right-radius:5px;-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-topright:5px; + border-bottom-left-radius:5px;border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px; + min-width:72px; + line-height:15px; + background-color:#F2F2F2; + background-image:/static/footer.png; + background-position:bottom; + border:solid 1px #0f1e31; + z-index:4; + text-align: left; + margin:15px; + line-height:5px; + + +} + .editable { + color: #0AA; + } + .editing { + color: #F0F; + } + div#avatar { + overflow: hidden; + text-overflow: ellipsis; + } + + img#avatarPic { + max-height:250px; + } + + #logged-dump { + border: 1px solid dotted; + padding: 5px; + } + #loghead { + border-bottom:0px; + padding-left: -50px; + margin-right:60%; + width:auto; + letter-spacing:-3px; + color:#087cff; + height:28px; + font-size:33px; + font-family:Arial, Helvetica, sans-serif; + font-weight:bold; + text-transform:capitalize; + text-shadow: -6px 4px 4px #ccc; + padding-bottom:12px; + left: -40px; + } + +p { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 7px; +} +a { + font-size: 12px; + color: #000; +} +a:link { + text-decoration: none; +} +a:visited { + text-decoration: none; + color: #000; +} +a:hover { + text-decoration: none; + color: #00F; +} +a:active { + text-decoration: none; + color: #000; +} +td { + font-family: Arial, Helvetica, sans-serif; + letter-spacing:-1px; + font-size: 12px; + color: #000000; +} +.btnav { border: 0px #000000 solid;} diff --git a/static/browser.html b/static/browser.html new file mode 100755 index 0000000..5306a5d --- /dev/null +++ b/static/browser.html @@ -0,0 +1,255 @@ + + + +dump.fm - Browser/Search Tool + + + + + + + + +

+ + +

  +

+

+ + + + + +

+

+ + + ★★ + + Always ON + + + + JPG + + PNG + + BMP + + GIF + + Any +
+ + + Small + + Medium + + Large + + Extra Large + + All Sizes + + + + + Black & White + + Gray + + Color + +Whateva

+ + + +
Loading...
+ + + + + + + + \ No newline at end of file diff --git a/static/cat.jpeg b/static/cat.jpeg old mode 100644 new mode 100755 diff --git a/static/chatbar.html b/static/chatbar.html new file mode 100755 index 0000000..69d0727 --- /dev/null +++ b/static/chatbar.html @@ -0,0 +1,57 @@ + + + dump.fm + + + + + + + + + + + +
+ $if(user_nick)$ +
+ + +
+ $endif$ +
+ + + + + diff --git a/static/dumpteam.png b/static/dumpteam.png old mode 100644 new mode 100755 diff --git a/static/favicon.ico b/static/favicon.ico index c64876f..6dd74d1 100755 Binary files a/static/favicon.ico and b/static/favicon.ico differ diff --git a/static/favicon2.ico b/static/favicon2.ico new file mode 100755 index 0000000..c64876f Binary files /dev/null and b/static/favicon2.ico differ diff --git a/static/gritter/css/jquery.gritter.css b/static/gritter/css/jquery.gritter.css new file mode 100755 index 0000000..0d23e04 --- /dev/null +++ b/static/gritter/css/jquery.gritter.css @@ -0,0 +1,131 @@ +/* ie6 trash */ +* html #gritter-notice-wrapper { + position:absolute; +} +* html .gritter-top { + margin-bottom:-10px; +} +* html .gritter-item { + padding-bottom:0; +} +* html .gritter-bottom { + margin-bottom:0; +} +* html .gritter-close { + background:url(../images/gritter-close-ie6.gif); + width:22px; + height:22px; + top:7px; + + right:7px; +} + +/* the norm */ +#gritter-notice-wrapper { + position:fixed; + top:70px; + right:20px; + width:301px; + + + z-index:9999; +} +#gritter-notice-wrapper img{ + max-width:250px; + width: expression(this.width > 250 ? 250: true); + max-height:240px; + height: expression(this.width > 240 ? 240: true) + right:5px; + + +float:right; + +} +.gritter-item-wrapper { + position:relative; + margin:0 0 5px 0; + + background:url('.'); /* ie7/8 fix */ +} +.gritter-top { + background:url(../images/gritter.png0) no-repeat left -30px; + height:10px; +} +.hover .gritter-top { + background-position:right -30px; +} +.gritter-bottom { + background:url(../images/gritter.png0) no-repeat left bottom; + height:0px; + margin:0; +} +.hover .gritter-bottom { + background-position: bottom right; +} +.gritter-item { + display:block; + background:url(../images/gritter.png0) no-repeat left -40px; +background-color:#eee; + color:#ccc; + height:auto; + padding:7px 15px 11px 11px; + font-size: 11px; +height:auto; + font-family:verdana; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; + box-shadow: 5px 7px 10px #c8cbce; +-webkit-box-shadow: 5px 7px 10px #c8cbce; +-moz-box-shadow: 5px 7px 10px #c8cbce; +border:0px solid #999; +} +.hover .gritter-item { + background-position:right -40px; +} +.gritter-item p { + + margin:0; +right:0; + +} +.gritter-close { + position:absolute; + top:5px; + right:3px; + background:url(../images/gritter.png) no-repeat left top; + cursor:pointer; + width:30px; + height:30px; +} +.gritter-title { + font-size:14px; + font-weight:bold; + + + display:block; + text-shadow:-1px -1px #eee; /* Not supported by IE :( */ +} +.gritter-image { + width:48px; + height:48px; + float:right; +right:0px; +} +.gritter-with-image, +.gritter-without-image { + padding:0 0 5px 0; +} +.gritter-with-image { + width:250px; + float:right; +} diff --git a/static/gritter/images/gritter-close-ie6.gif b/static/gritter/images/gritter-close-ie6.gif new file mode 100755 index 0000000..aea6e42 Binary files /dev/null and b/static/gritter/images/gritter-close-ie6.gif differ diff --git a/static/gritter/images/gritter-long.png b/static/gritter/images/gritter-long.png new file mode 100755 index 0000000..578b891 Binary files /dev/null and b/static/gritter/images/gritter-long.png differ diff --git a/static/gritter/images/gritter.png b/static/gritter/images/gritter.png new file mode 100755 index 0000000..0ca3bc0 Binary files /dev/null and b/static/gritter/images/gritter.png differ diff --git a/static/gritter/images/trees.jpg b/static/gritter/images/trees.jpg new file mode 100755 index 0000000..00b2d5d Binary files /dev/null and b/static/gritter/images/trees.jpg differ diff --git a/static/gritter/js/jquery.gritter.js b/static/gritter/js/jquery.gritter.js new file mode 100755 index 0000000..60305ba --- /dev/null +++ b/static/gritter/js/jquery.gritter.js @@ -0,0 +1,401 @@ +/* + * Gritter for jQuery + * http://www.boedesign.com/ + * + * Copyright (c) 2009 Jordan Boesch + * Dual licensed under the MIT and GPL licenses. + * + * Date: December 1, 2009 + * Version: 1.6 + */ + +(function($){ + + /** + * Set it up as an object under the jQuery namespace + */ + $.gritter = {}; + + /** + * Set up global options that the user can over-ride + */ + $.gritter.options = { + fade_in_speed: 'medium', // how fast notifications fade in + fade_out_speed: 1000, // how fast the notices fade out + time: 2500 // hang on the screen for... + } + + /** + * Add a gritter notification to the screen + * @see Gritter#add(); + */ + $.gritter.add = function(params){ + + try { + return Gritter.add(params || {}); + } catch(e) { + + var err = 'Gritter Error: ' + e; + (typeof(console) != 'undefined' && console.error) ? + console.error(err, params) : + alert(err); + + } + + } + + /** + * Remove a gritter notification from the screen + * @see Gritter#removeSpecific(); + */ + $.gritter.remove = function(id, params){ + Gritter.removeSpecific(id, params || {}); + } + + /** + * Remove all notifications + * @see Gritter#stop(); + */ + $.gritter.removeAll = function(params){ + Gritter.stop(params || {}); + } + + /** + * Big fat Gritter object + * @constructor (not really since it's object literal) + */ + var Gritter = { + + // Public - options to over-ride with $.gritter.options in "add" + fade_in_speed: '', + fade_out_speed: '', + time: '', + + // Private - no touchy the private parts + _custom_timer: 0, + _item_count: 0, + _is_setup: 0, + _tpl_close: '
', + _tpl_item: '', + _tpl_wrap: '
', + + /** + * Add a gritter notification to the screen + * @param {Object} params The object that contains all the options for drawing the notification + * @return {Integer} The specific numeric id to that gritter notification + */ + add: function(params){ + + // We might have some issues if we don't have a title or text! + if(!params.title || !params.text){ + throw 'You need to fill out the first 2 params: "title" and "text"'; + } + + // Check the options and set them once + if(!this._is_setup){ + this._runSetup(); + } + + // Basics + var user = params.title, + text = params.text, + image = params.image || '', + sticky = params.sticky || false, + item_class = params.class_name || '', + time_alive = params.time || ''; + + this._verifyWrapper(); + + this._item_count++; + var number = this._item_count, + tmp = this._tpl_item; + + // Assign callbacks + $(['before_open', 'after_open', 'before_close', 'after_close']).each(function(i, val){ + Gritter['_' + val + '_' + number] = ($.isFunction(params[val])) ? params[val] : function(){} + }); + + // Reset + this._custom_timer = 0; + + // A custom fade time set + if(time_alive){ + this._custom_timer = time_alive; + } + + var image_str = (image != '') ? '' : '', + class_name = (image != '') ? 'gritter-with-image' : 'gritter-without-image'; + + // String replacements on the template + tmp = this._str_replace( + ['[[username]]', '[[text]]', '[[image]]', '[[number]]', '[[class_name]]', '[[item_class]]'], + [user, text, image_str, this._item_count, class_name, item_class], tmp + ); + + this['_before_open_' + number](); + $('#gritter-notice-wrapper').append(tmp); + + var item = $('#gritter-item-' + this._item_count); + + item.fadeIn(this.fade_in_speed, function(){ + Gritter['_after_open_' + number]($(this)); + }); + + if(!sticky){ + this._setFadeTimer(item, number); + } + + // Bind the hover/unhover states + $(item).bind('mouseenter mouseleave', function(event){ + if(event.type == 'mouseenter'){ + if(!sticky){ + Gritter._restoreItemIfFading($(this), number); + } + } + else { + if(!sticky){ + Gritter._setFadeTimer($(this), number); + } + } + Gritter._hoverState($(this), event.type); + }); + + return number; + + }, + + /** + * If we don't have any more gritter notifications, get rid of the wrapper using this check + * @private + * @param {Integer} unique_id The ID of the element that was just deleted, use it for a callback + * @param {Object} e The jQuery element that we're going to perform the remove() action on + */ + _countRemoveWrapper: function(unique_id, e){ + + // Remove it then run the callback function + e.remove(); + this['_after_close_' + unique_id](e); + + // Check if the wrapper is empty, if it is.. remove the wrapper + if($('.gritter-item-wrapper').length == 0){ + $('#gritter-notice-wrapper').remove(); + } + + }, + + /** + * Fade out an element after it's been on the screen for x amount of time + * @private + * @param {Object} e The jQuery element to get rid of + * @param {Integer} unique_id The id of the element to remove + * @param {Object} params An optional list of params to set fade speeds etc. + * @param {Boolean} unbind_events Unbind the mouseenter/mouseleave events if they click (X) + */ + _fade: function(e, unique_id, params, unbind_events){ + + var params = params || {}, + fade = (typeof(params.fade) != 'undefined') ? params.fade : true; + fade_out_speed = params.speed || this.fade_out_speed; + + this['_before_close_' + unique_id](e); + + // If this is true, then we are coming from clicking the (X) + if(unbind_events){ + e.unbind('mouseenter mouseleave'); + } + + // Fade it out or remove it + if(fade){ + + e.animate({ + opacity: 0 + }, fade_out_speed, function(){ + e.animate({ height: 0 }, 300, function(){ + Gritter._countRemoveWrapper(unique_id, e); + }) + }) + + } + else { + + this._countRemoveWrapper(unique_id, e); + + } + + }, + + /** + * Perform actions based on the type of bind (mouseenter, mouseleave) + * @private + * @param {Object} e The jQuery element + * @param {String} type The type of action we're performing: mouseenter or mouseleave + */ + _hoverState: function(e, type){ + + // Change the border styles and add the (X) close button when you hover + if(type == 'mouseenter'){ + + e.addClass('hover'); + var find_img = e.find('img'); + + // Insert the close button before what element + (find_img.length) ? + find_img.before(this._tpl_close) : + e.find('span').before(this._tpl_close); + + // Clicking (X) makes the perdy thing close + e.find('.gritter-close').click(function(){ + + var unique_id = e.attr('id').split('-')[2]; + Gritter.removeSpecific(unique_id, {}, e, true); + + }); + + } + // Remove the border styles and (X) close button when you mouse out + else { + + e.removeClass('hover'); + e.find('.gritter-close').remove(); + + } + + }, + + /** + * Remove a specific notification based on an ID + * @param {Integer} unique_id The ID used to delete a specific notification + * @param {Object} params A set of options passed in to determine how to get rid of it + * @param {Object} e The jQuery element that we're "fading" then removing + * @param {Boolean} unbind_events If we clicked on the (X) we set this to true to unbind mouseenter/mouseleave + */ + removeSpecific: function(unique_id, params, e, unbind_events){ + + if(!e){ + var e = $('#gritter-item-' + unique_id); + } + + // We set the fourth param to let the _fade function know to + // unbind the "mouseleave" event. Once you click (X) there's no going back! + this._fade(e, unique_id, params || {}, unbind_events); + + }, + + /** + * If the item is fading out and we hover over it, restore it! + * @private + * @param {Object} e The HTML element to remove + * @param {Integer} unique_id The ID of the element + */ + _restoreItemIfFading: function(e, unique_id){ + + clearTimeout(this['_int_id_' + unique_id]); + e.stop().css({ opacity: '' }); + + }, + + /** + * Setup the global options - only once + * @private + */ + _runSetup: function(){ + + for(opt in $.gritter.options){ + this[opt] = $.gritter.options[opt]; + } + this._is_setup = 1; + + }, + + /** + * Set the notification to fade out after a certain amount of time + * @private + * @param {Object} item The HTML element we're dealing with + * @param {Integer} unique_id The ID of the element + */ + _setFadeTimer: function(e, unique_id){ + + var timer_str = (this._custom_timer) ? this._custom_timer : this.time; + this['_int_id_' + unique_id] = setTimeout(function(){ + Gritter._fade(e, unique_id); + }, timer_str); + + }, + + /** + * Bring everything to a halt + * @param {Object} params A list of callback functions to pass when all notifications are removed + */ + stop: function(params){ + + // callbacks (if passed) + var before_close = ($.isFunction(params.before_close)) ? params.before_close : function(){}; + var after_close = ($.isFunction(params.after_close)) ? params.after_close : function(){}; + + var wrap = $('#gritter-notice-wrapper'); + before_close(wrap); + wrap.fadeOut(function(){ + $(this).remove(); + after_close(); + }); + + }, + + /** + * An extremely handy PHP function ported to JS, works well for templating + * @private + * @param {String/Array} search A list of things to search for + * @param {String/Array} replace A list of things to replace the searches with + * @return {String} sa The output + */ + _str_replace: function(search, replace, subject, count){ + + var i = 0, j = 0, temp = '', repl = '', sl = 0, fl = 0, + f = [].concat(search), + r = [].concat(replace), + s = subject, + ra = r instanceof Array, sa = s instanceof Array; + s = [].concat(s); + + if(count){ + this.window[count] = 0; + } + + for(i = 0, sl = s.length; i < sl; i++){ + + if(s[i] === ''){ + continue; + } + + for (j = 0, fl = f.length; j < fl; j++){ + + temp = s[i] + ''; + repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]; + s[i] = (temp).split(f[j]).join(repl); + + if(count && s[i] !== temp){ + this.window[count] += (temp.length-s[i].length) / f[j].length; + } + + } + } + + return sa ? s : s[0]; + + }, + + /** + * A check to make sure we have something to wrap our notices with + * @private + */ + _verifyWrapper: function(){ + + if($('#gritter-notice-wrapper').length == 0){ + $('body').append(this._tpl_wrap); + } + + } + + } + +})(jQuery); diff --git a/static/gritter/js/jquery.gritter.min.js b/static/gritter/js/jquery.gritter.min.js new file mode 100755 index 0000000..76a307a --- /dev/null +++ b/static/gritter/js/jquery.gritter.min.js @@ -0,0 +1,19 @@ +(function($){$.gritter={};$.gritter.options={fade_in_speed:'medium',fade_out_speed:1000,time:6000} +$.gritter.add=function(params){try{return Gritter.add(params||{});}catch(e){var err='Gritter Error: '+e;(typeof(console)!='undefined'&&console.error)?console.error(err,params):alert(err);}} +$.gritter.remove=function(id,params){Gritter.removeSpecific(id,params||{});} +$.gritter.removeAll=function(params){Gritter.stop(params||{});} +var Gritter={fade_in_speed:'',fade_out_speed:'',time:'',_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'
',_tpl_item:'',_tpl_wrap:'
',add:function(params){if(!params.title||!params.text){throw'You need to fill out the first 2 params: "title" and "text"';} +if(!this._is_setup){this._runSetup();} +var user=params.title,text=params.text,image=params.image||'',sticky=params.sticky||false,item_class=params.class_name||'',time_alive=params.time||'';this._verifyWrapper();this._item_count++;var number=this._item_count,tmp=this._tpl_item;$(['before_open','after_open','before_close','after_close']).each(function(i,val){Gritter['_'+val+'_'+number]=($.isFunction(params[val]))?params[val]:function(){}});this._custom_timer=0;if(time_alive){this._custom_timer=time_alive;} +var image_str=(image!='')?'':'',class_name=(image!='')?'gritter-with-image':'gritter-without-image';tmp=this._str_replace(['[[username]]','[[text]]','[[image]]','[[number]]','[[class_name]]','[[item_class]]'],[user,text,image_str,this._item_count,class_name,item_class],tmp);this['_before_open_'+number]();$('#gritter-notice-wrapper').append(tmp);var item=$('#gritter-item-'+this._item_count);item.fadeIn(this.fade_in_speed,function(){Gritter['_after_open_'+number]($(this));});if(!sticky){this._setFadeTimer(item,number);} +$(item).bind('mouseenter mouseleave',function(event){if(event.type=='mouseenter'){if(!sticky){Gritter._restoreItemIfFading($(this),number);}} +else{if(!sticky){Gritter._setFadeTimer($(this),number);}} +Gritter._hoverState($(this),event.type);});return number;},_countRemoveWrapper:function(unique_id,e){e.remove();this['_after_close_'+unique_id](e);if($('.gritter-item-wrapper').length==0){$('#gritter-notice-wrapper').remove();}},_fade:function(e,unique_id,params,unbind_events){var params=params||{},fade=(typeof(params.fade)!='undefined')?params.fade:true;fade_out_speed=params.speed||this.fade_out_speed;this['_before_close_'+unique_id](e);if(unbind_events){e.unbind('mouseenter mouseleave');} +if(fade){e.animate({opacity:0},fade_out_speed,function(){e.animate({height:0},300,function(){Gritter._countRemoveWrapper(unique_id,e);})})} +else{this._countRemoveWrapper(unique_id,e);}},_hoverState:function(e,type){if(type=='mouseenter'){e.addClass('hover');var find_img=e.find('img');(find_img.length)?find_img.before(this._tpl_close):e.find('span').before(this._tpl_close);e.find('.gritter-close').click(function(){var unique_id=e.attr('id').split('-')[2];Gritter.removeSpecific(unique_id,{},e,true);});} +else{e.removeClass('hover');e.find('.gritter-close').remove();}},removeSpecific:function(unique_id,params,e,unbind_events){if(!e){var e=$('#gritter-item-'+unique_id);} +this._fade(e,unique_id,params||{},unbind_events);},_restoreItemIfFading:function(e,unique_id){clearTimeout(this['_int_id_'+unique_id]);e.stop().css({opacity:''});},_runSetup:function(){for(opt in $.gritter.options){this[opt]=$.gritter.options[opt];} +this._is_setup=1;},_setFadeTimer:function(e,unique_id){var timer_str=(this._custom_timer)?this._custom_timer:this.time;this['_int_id_'+unique_id]=setTimeout(function(){Gritter._fade(e,unique_id);},timer_str);},stop:function(params){var before_close=($.isFunction(params.before_close))?params.before_close:function(){};var after_close=($.isFunction(params.after_close))?params.after_close:function(){};var wrap=$('#gritter-notice-wrapper');before_close(wrap);wrap.fadeOut(function(){$(this).remove();after_close();});},_str_replace:function(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;} +for(i=0,sl=s.length;i', + _tpl_item: '', + _tpl_wrap: '
', + + /** + * Add a gritter notification to the screen + * @param {Object} params The object that contains all the options for drawing the notification + * @return {Integer} The specific numeric id to that gritter notification + */ + add: function(params){ + + // We might have some issues if we don't have a title or text! + if(!params.title || !params.text){ + throw 'You need to fill out the first 2 params: "title" and "text"'; + } + + // Check the options and set them once + if(!this._is_setup){ + this._runSetup(); + } + + // Basics + var user = params.title, + text = params.text, + image = params.image || '', + sticky = params.sticky || false, + item_class = params.class_name || '', + time_alive = params.time || ''; + + this._verifyWrapper(); + + this._item_count++; + var number = this._item_count, + tmp = this._tpl_item; + + // Assign callbacks + $(['before_open', 'after_open', 'before_close', 'after_close']).each(function(i, val){ + Gritter['_' + val + '_' + number] = ($.isFunction(params[val])) ? params[val] : function(){} + }); + + // Reset + this._custom_timer = 0; + + // A custom fade time set + if(time_alive){ + this._custom_timer = time_alive; + } + + var image_str = (image != '') ? '' : '', + class_name = (image != '') ? 'gritter-with-image' : 'gritter-without-image'; + + // String replacements on the template + tmp = this._str_replace( + ['[[username]]', '[[text]]', '[[image]]', '[[number]]', '[[class_name]]', '[[item_class]]'], + [user, text, image_str, this._item_count, class_name, item_class], tmp + ); + + this['_before_open_' + number](); + $('#gritter-notice-wrapper').append(tmp); + + var item = $('#gritter-item-' + this._item_count); + + item.fadeIn(this.fade_in_speed, function(){ + Gritter['_after_open_' + number]($(this)); + }); + + if(!sticky){ + this._setFadeTimer(item, number); + } + + // Bind the hover/unhover states + $(item).bind('mouseenter mouseleave', function(event){ + if(event.type == 'mouseenter'){ + if(!sticky){ + Gritter._restoreItemIfFading($(this), number); + } + } + else { + if(!sticky){ + Gritter._setFadeTimer($(this), number); + } + } + Gritter._hoverState($(this), event.type); + }); + + return number; + + }, + + /** + * If we don't have any more gritter notifications, get rid of the wrapper using this check + * @private + * @param {Integer} unique_id The ID of the element that was just deleted, use it for a callback + * @param {Object} e The jQuery element that we're going to perform the remove() action on + */ + _countRemoveWrapper: function(unique_id, e){ + + // Remove it then run the callback function + e.remove(); + this['_after_close_' + unique_id](e); + + // Check if the wrapper is empty, if it is.. remove the wrapper + if($('.gritter-item-wrapper').length == 0){ + $('#gritter-notice-wrapper').remove(); + } + + }, + + /** + * Fade out an element after it's been on the screen for x amount of time + * @private + * @param {Object} e The jQuery element to get rid of + * @param {Integer} unique_id The id of the element to remove + * @param {Object} params An optional list of params to set fade speeds etc. + * @param {Boolean} unbind_events Unbind the mouseenter/mouseleave events if they click (X) + */ + _fade: function(e, unique_id, params, unbind_events){ + + var params = params || {}, + fade = (typeof(params.fade) != 'undefined') ? params.fade : true; + fade_out_speed = params.speed || this.fade_out_speed; + + this['_before_close_' + unique_id](e); + + // If this is true, then we are coming from clicking the (X) + if(unbind_events){ + e.unbind('mouseenter mouseleave'); + } + + // Fade it out or remove it + if(fade){ + + e.animate({ + opacity: 0 + }, fade_out_speed, function(){ + e.animate({ height: 0 }, 300, function(){ + Gritter._countRemoveWrapper(unique_id, e); + }) + }) + + } + else { + + this._countRemoveWrapper(unique_id, e); + + } + + }, + + /** + * Perform actions based on the type of bind (mouseenter, mouseleave) + * @private + * @param {Object} e The jQuery element + * @param {String} type The type of action we're performing: mouseenter or mouseleave + */ + _hoverState: function(e, type){ + + // Change the border styles and add the (X) close button when you hover + if(type == 'mouseenter'){ + + e.addClass('hover'); + var find_img = e.find('img'); + + // Insert the close button before what element + (find_img.length) ? + find_img.before(this._tpl_close) : + e.find('span').before(this._tpl_close); + + // Clicking (X) makes the perdy thing close + e.find('.gritter-close').click(function(){ + + var unique_id = e.attr('id').split('-')[2]; + Gritter.removeSpecific(unique_id, {}, e, true); + + }); + + } + // Remove the border styles and (X) close button when you mouse out + else { + + e.removeClass('hover'); + e.find('.gritter-close').remove(); + + } + + }, + + /** + * Remove a specific notification based on an ID + * @param {Integer} unique_id The ID used to delete a specific notification + * @param {Object} params A set of options passed in to determine how to get rid of it + * @param {Object} e The jQuery element that we're "fading" then removing + * @param {Boolean} unbind_events If we clicked on the (X) we set this to true to unbind mouseenter/mouseleave + */ + removeSpecific: function(unique_id, params, e, unbind_events){ + + if(!e){ + var e = $('#gritter-item-' + unique_id); + } + + // We set the fourth param to let the _fade function know to + // unbind the "mouseleave" event. Once you click (X) there's no going back! + this._fade(e, unique_id, params || {}, unbind_events); + + }, + + /** + * If the item is fading out and we hover over it, restore it! + * @private + * @param {Object} e The HTML element to remove + * @param {Integer} unique_id The ID of the element + */ + _restoreItemIfFading: function(e, unique_id){ + + clearTimeout(this['_int_id_' + unique_id]); + e.stop().css({ opacity: '' }); + + }, + + /** + * Setup the global options - only once + * @private + */ + _runSetup: function(){ + + for(opt in $.gritter.options){ + this[opt] = $.gritter.options[opt]; + } + this._is_setup = 1; + + }, + + /** + * Set the notification to fade out after a certain amount of time + * @private + * @param {Object} item The HTML element we're dealing with + * @param {Integer} unique_id The ID of the element + */ + _setFadeTimer: function(e, unique_id){ + + var timer_str = (this._custom_timer) ? this._custom_timer : this.time; + this['_int_id_' + unique_id] = setTimeout(function(){ + Gritter._fade(e, unique_id); + }, timer_str); + + }, + + /** + * Bring everything to a halt + * @param {Object} params A list of callback functions to pass when all notifications are removed + */ + stop: function(params){ + + // callbacks (if passed) + var before_close = ($.isFunction(params.before_close)) ? params.before_close : function(){}; + var after_close = ($.isFunction(params.after_close)) ? params.after_close : function(){}; + + var wrap = $('#gritter-notice-wrapper'); + before_close(wrap); + wrap.fadeOut(function(){ + $(this).remove(); + after_close(); + }); + + }, + + /** + * An extremely handy PHP function ported to JS, works well for templating + * @private + * @param {String/Array} search A list of things to search for + * @param {String/Array} replace A list of things to replace the searches with + * @return {String} sa The output + */ + _str_replace: function(search, replace, subject, count){ + + var i = 0, j = 0, temp = '', repl = '', sl = 0, fl = 0, + f = [].concat(search), + r = [].concat(replace), + s = subject, + ra = r instanceof Array, sa = s instanceof Array; + s = [].concat(s); + + if(count){ + this.window[count] = 0; + } + + for(i = 0, sl = s.length; i < sl; i++){ + + if(s[i] === ''){ + continue; + } + + for (j = 0, fl = f.length; j < fl; j++){ + + temp = s[i] + ''; + repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]; + s[i] = (temp).split(f[j]).join(repl); + + if(count && s[i] !== temp){ + this.window[count] += (temp.length-s[i].length) / f[j].length; + } + + } + } + + return sa ? s : s[0]; + + }, + + /** + * A check to make sure we have something to wrap our notices with + * @private + */ + _verifyWrapper: function(){ + + if($('#gritter-notice-wrapper').length == 0){ + $('body').append(this._tpl_wrap); + } + + } + + } + +})(jQuery); diff --git a/static/jquery.gritter.min.js b/static/jquery.gritter.min.js new file mode 100755 index 0000000..76a307a --- /dev/null +++ b/static/jquery.gritter.min.js @@ -0,0 +1,19 @@ +(function($){$.gritter={};$.gritter.options={fade_in_speed:'medium',fade_out_speed:1000,time:6000} +$.gritter.add=function(params){try{return Gritter.add(params||{});}catch(e){var err='Gritter Error: '+e;(typeof(console)!='undefined'&&console.error)?console.error(err,params):alert(err);}} +$.gritter.remove=function(id,params){Gritter.removeSpecific(id,params||{});} +$.gritter.removeAll=function(params){Gritter.stop(params||{});} +var Gritter={fade_in_speed:'',fade_out_speed:'',time:'',_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'
',_tpl_item:'',_tpl_wrap:'
',add:function(params){if(!params.title||!params.text){throw'You need to fill out the first 2 params: "title" and "text"';} +if(!this._is_setup){this._runSetup();} +var user=params.title,text=params.text,image=params.image||'',sticky=params.sticky||false,item_class=params.class_name||'',time_alive=params.time||'';this._verifyWrapper();this._item_count++;var number=this._item_count,tmp=this._tpl_item;$(['before_open','after_open','before_close','after_close']).each(function(i,val){Gritter['_'+val+'_'+number]=($.isFunction(params[val]))?params[val]:function(){}});this._custom_timer=0;if(time_alive){this._custom_timer=time_alive;} +var image_str=(image!='')?'':'',class_name=(image!='')?'gritter-with-image':'gritter-without-image';tmp=this._str_replace(['[[username]]','[[text]]','[[image]]','[[number]]','[[class_name]]','[[item_class]]'],[user,text,image_str,this._item_count,class_name,item_class],tmp);this['_before_open_'+number]();$('#gritter-notice-wrapper').append(tmp);var item=$('#gritter-item-'+this._item_count);item.fadeIn(this.fade_in_speed,function(){Gritter['_after_open_'+number]($(this));});if(!sticky){this._setFadeTimer(item,number);} +$(item).bind('mouseenter mouseleave',function(event){if(event.type=='mouseenter'){if(!sticky){Gritter._restoreItemIfFading($(this),number);}} +else{if(!sticky){Gritter._setFadeTimer($(this),number);}} +Gritter._hoverState($(this),event.type);});return number;},_countRemoveWrapper:function(unique_id,e){e.remove();this['_after_close_'+unique_id](e);if($('.gritter-item-wrapper').length==0){$('#gritter-notice-wrapper').remove();}},_fade:function(e,unique_id,params,unbind_events){var params=params||{},fade=(typeof(params.fade)!='undefined')?params.fade:true;fade_out_speed=params.speed||this.fade_out_speed;this['_before_close_'+unique_id](e);if(unbind_events){e.unbind('mouseenter mouseleave');} +if(fade){e.animate({opacity:0},fade_out_speed,function(){e.animate({height:0},300,function(){Gritter._countRemoveWrapper(unique_id,e);})})} +else{this._countRemoveWrapper(unique_id,e);}},_hoverState:function(e,type){if(type=='mouseenter'){e.addClass('hover');var find_img=e.find('img');(find_img.length)?find_img.before(this._tpl_close):e.find('span').before(this._tpl_close);e.find('.gritter-close').click(function(){var unique_id=e.attr('id').split('-')[2];Gritter.removeSpecific(unique_id,{},e,true);});} +else{e.removeClass('hover');e.find('.gritter-close').remove();}},removeSpecific:function(unique_id,params,e,unbind_events){if(!e){var e=$('#gritter-item-'+unique_id);} +this._fade(e,unique_id,params||{},unbind_events);},_restoreItemIfFading:function(e,unique_id){clearTimeout(this['_int_id_'+unique_id]);e.stop().css({opacity:''});},_runSetup:function(){for(opt in $.gritter.options){this[opt]=$.gritter.options[opt];} +this._is_setup=1;},_setFadeTimer:function(e,unique_id){var timer_str=(this._custom_timer)?this._custom_timer:this.time;this['_int_id_'+unique_id]=setTimeout(function(){Gritter._fade(e,unique_id);},timer_str);},stop:function(params){var before_close=($.isFunction(params.before_close))?params.before_close:function(){};var after_close=($.isFunction(params.after_close))?params.after_close:function(){};var wrap=$('#gritter-notice-wrapper');before_close(wrap);wrap.fadeOut(function(){$(this).remove();after_close();});},_str_replace:function(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;} +for(i=0,sl=s.length;i links to images will be updated to zoom inline. +// Add rel="nozoom" to your to disable zooming for an image. +// +// Redistribution and use of this effect in source form, with or without modification, +// are permitted provided that the following conditions are met: +// +// * USE OF SOURCE ON COMMERCIAL (FOR-PROFIT) WEBSITE REQUIRES ONE-TIME LICENSE FEE PER DOMAIN. +// Reasonably priced! Visit www.fancyzoom.com for licensing instructions. Thanks! +// +// * Non-commercial (personal) website use is permitted without license/payment! +// +// * Redistribution of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistribution of source code and derived works cannot be sold without specific +// written prior permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +var includeCaption = true; // Turn on the "caption" feature, and write out the caption HTML +var zoomTime = 5; // Milliseconds between frames of zoom animation +var zoomSteps = 15; // Number of zoom animation frames +var includeFade = 1; // Set to 1 to fade the image in / out as it zooms +var minBorder = 90; // Amount of padding between large, scaled down images, and the window edges +var shadowSettings = '0px 5px 25px rgba(0, 0, 0, '; // Blur, radius, color of shadow for compatible browsers + +var zoomImagesURI = '/images-global/zoom/'; // Location of the zoom and shadow images + +// Init. Do not add anything below this line, unless it's something awesome. + +var myWidth = 0, myHeight = 0, myScroll = 0; myScrollWidth = 0; myScrollHeight = 0; +var zoomOpen = false, preloadFrame = 1, preloadActive = false, preloadTime = 0, imgPreload = new Image(); +var preloadAnimTimer = 0; + +var zoomActive = new Array(); var zoomTimer = new Array(); +var zoomOrigW = new Array(); var zoomOrigH = new Array(); +var zoomOrigX = new Array(); var zoomOrigY = new Array(); + +var zoomID = "ZoomBox"; +var theID = "ZoomImage"; +var zoomCaption = "ZoomCaption"; +var zoomCaptionDiv = "ZoomCapDiv"; + +if (navigator.userAgent.indexOf("MSIE") != -1) { + var browserIsIE = true; +} + +// Zoom: Setup The Page! Called in your 's onLoad handler. + +function setupZoom() { + prepZooms(); + insertZoomHTML(); + zoomdiv = document.getElementById(zoomID); + zoomimg = document.getElementById(theID); +} + +// Zoom: Inject Javascript functions into hrefs pointing to images, one by one! +// Skip any href that contains a rel="nozoom" tag. +// This is done at page load time via an onLoad() handler. + +function prepZooms() { + if (! document.getElementsByTagName) { + return; + } + var links = document.getElementsByTagName("a"); + for (i = 0; i < links.length; i++) { + if (links[i].getAttribute("href")) { + if (links[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi) != -1) { + if (links[i].getAttribute("rel") != "nozoom") { + links[i].onclick = function (event) { return zoomClick(this, event); }; + links[i].onmouseover = function () { zoomPreload(this); }; + } + } + } + } +} + +// Zoom: Load an image into an image object. When done loading, function sets preloadActive to false, +// so other bits know that they can proceed with the zoom. +// Preloaded image is stored in imgPreload and swapped out in the zoom function. + +function zoomPreload(from) { + + var theimage = from.getAttribute("href"); + + // Only preload if we have to, i.e. the image isn't this image already + + if (imgPreload.src.indexOf(from.getAttribute("href").substr(from.getAttribute("href").lastIndexOf("/"))) == -1) { + preloadActive = true; + imgPreload = new Image(); + + // Set a function to fire when the preload is complete, setting flags along the way. + + imgPreload.onload = function() { + preloadActive = false; + } + + // Load it! + imgPreload.src = theimage; + } +} + +// Zoom: Start the preloading animation cycle. + +function preloadAnimStart() { + preloadTime = new Date(); + document.getElementById("ZoomSpin").style.left = (myWidth / 2) + 'px'; + document.getElementById("ZoomSpin").style.top = ((myHeight / 2) + myScroll) + 'px'; + document.getElementById("ZoomSpin").style.visibility = "visible"; + preloadFrame = 1; + document.getElementById("SpinImage").src = zoomImagesURI+'zoom-spin-'+preloadFrame+'.png'; + preloadAnimTimer = setInterval("preloadAnim()", 100); +} + +// Zoom: Display and ANIMATE the jibber-jabber widget. Once preloadActive is false, bail and zoom it up! + +function preloadAnim(from) { + if (preloadActive != false) { + document.getElementById("SpinImage").src = zoomImagesURI+'zoom-spin-'+preloadFrame+'.png'; + preloadFrame++; + if (preloadFrame > 12) preloadFrame = 1; + } else { + document.getElementById("ZoomSpin").style.visibility = "hidden"; + clearInterval(preloadAnimTimer); + preloadAnimTimer = 0; + zoomIn(preloadFrom); + } +} + +// ZOOM CLICK: We got a click! Should we do the zoom? Or wait for the preload to complete? +// todo?: Double check that imgPreload src = clicked src + +function zoomClick(from, evt) { + + var shift = getShift(evt); + + // Check for Command / Alt key. If pressed, pass them through -- don't zoom! + if (! evt && window.event && (window.event.metaKey || window.event.altKey)) { + return true; + } else if (evt && (evt.metaKey|| evt.altKey)) { + return true; + } + + // Get browser dimensions + getSize(); + + // If preloading still, wait, and display the spinner. + if (preloadActive == true) { + // But only display the spinner if it's not already being displayed! + if (preloadAnimTimer == 0) { + preloadFrom = from; + preloadAnimStart(); + } + } else { + // Otherwise, we're loaded: do the zoom! + zoomIn(from, shift); + } + + return false; + +} + +// Zoom: Move an element in to endH endW, using zoomHost as a starting point. +// "from" is an object reference to the href that spawned the zoom. + +function zoomIn(from, shift) { + + zoomimg.src = from.getAttribute("href"); + + // Determine the zoom settings from where we came from, the element in the . + // If there's no element in the , or we can't get the width, make stuff up + + if (from.childNodes[0].width) { + startW = from.childNodes[0].width; + startH = from.childNodes[0].height; + startPos = findElementPos(from.childNodes[0]); + } else { + startW = 50; + startH = 12; + startPos = findElementPos(from); + } + + hostX = startPos[0]; + hostY = startPos[1]; + + // Make up for a scrolled containing div. + // TODO: This HAS to move into findElementPos. + + if (document.getElementById('scroller')) { + hostX = hostX - document.getElementById('scroller').scrollLeft; + } + + // Determine the target zoom settings from the preloaded image object + + endW = imgPreload.width; + endH = imgPreload.height; + + // Start! But only if we're not zooming already! + + if (zoomActive[theID] != true) { + + // Clear everything out just in case something is already open + + if (document.getElementById("ShadowBox")) { + document.getElementById("ShadowBox").style.visibility = "hidden"; + } else if (! browserIsIE) { + + // Wipe timer if shadow is fading in still + if (fadeActive["ZoomImage"]) { + clearInterval(fadeTimer["ZoomImage"]); + fadeActive["ZoomImage"] = false; + fadeTimer["ZoomImage"] = false; + } + + document.getElementById("ZoomImage").style.webkitBoxShadow = shadowSettings + '0.0)'; + } + + document.getElementById("ZoomClose").style.visibility = "hidden"; + + // Setup the CAPTION, if existing. Hide it first, set the text. + + if (includeCaption) { + document.getElementById(zoomCaptionDiv).style.visibility = "hidden"; + if (from.getAttribute('title') && includeCaption) { + // Yes, there's a caption, set it up + document.getElementById(zoomCaption).innerHTML = from.getAttribute('title'); + } else { + document.getElementById(zoomCaption).innerHTML = ""; + } + } + + // Store original position in an array for future zoomOut. + + zoomOrigW[theID] = startW; + zoomOrigH[theID] = startH; + zoomOrigX[theID] = hostX; + zoomOrigY[theID] = hostY; + + // Now set the starting dimensions + + zoomimg.style.width = startW + 'px'; + zoomimg.style.height = startH + 'px'; + zoomdiv.style.left = hostX + 'px'; + zoomdiv.style.top = hostY + 'px'; + + // Show the zooming image container, make it invisible + + if (includeFade == 1) { + setOpacity(0, zoomID); + } + zoomdiv.style.visibility = "visible"; + + // If it's too big to fit in the window, shrink the width and height to fit (with ratio). + + sizeRatio = endW / endH; + if (endW > myWidth - minBorder) { + endW = myWidth - minBorder; + endH = endW / sizeRatio; + } + if (endH > myHeight - minBorder) { + endH = myHeight - minBorder; + endW = endH * sizeRatio; + } + + zoomChangeX = ((myWidth / 2) - (endW / 2) - hostX); + zoomChangeY = (((myHeight / 2) - (endH / 2) - hostY) + myScroll); + zoomChangeW = (endW - startW); + zoomChangeH = (endH - startH); + + // Shift key? + + if (shift) { + tempSteps = zoomSteps * 7; + } else { + tempSteps = zoomSteps; + } + + // Setup Zoom + + zoomCurrent = 0; + + // Setup Fade with Zoom, If Requested + + if (includeFade == 1) { + fadeCurrent = 0; + fadeAmount = (0 - 100) / tempSteps; + } else { + fadeAmount = 0; + } + + // Do It! + + zoomTimer[theID] = setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+hostX+", "+zoomChangeX+", "+hostY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDoneIn(zoomID)')", zoomTime); + zoomActive[theID] = true; + } +} + +// Zoom it back out. + +function zoomOut(from, evt) { + + // Get shift key status. + // IE events don't seem to get passed through the function, so grab it from the window. + + if (getShift(evt)) { + tempSteps = zoomSteps * 7; + } else { + tempSteps = zoomSteps; + } + + // Check to see if something is happening/open + + if (zoomActive[theID] != true) { + + // First, get rid of the shadow if necessary. + + if (document.getElementById("ShadowBox")) { + document.getElementById("ShadowBox").style.visibility = "hidden"; + } else if (! browserIsIE) { + + // Wipe timer if shadow is fading in still + if (fadeActive["ZoomImage"]) { + clearInterval(fadeTimer["ZoomImage"]); + fadeActive["ZoomImage"] = false; + fadeTimer["ZoomImage"] = false; + } + + document.getElementById("ZoomImage").style.webkitBoxShadow = shadowSettings + '0.0)'; + } + + // ..and the close box... + + document.getElementById("ZoomClose").style.visibility = "hidden"; + + // ...and the caption if necessary! + + if (includeCaption && document.getElementById(zoomCaption).innerHTML != "") { + // fadeElementSetup(zoomCaptionDiv, 100, 0, 5, 1); + document.getElementById(zoomCaptionDiv).style.visibility = "hidden"; + } + + // Now, figure out where we came from, to get back there + + startX = parseInt(zoomdiv.style.left); + startY = parseInt(zoomdiv.style.top); + startW = zoomimg.width; + startH = zoomimg.height; + zoomChangeX = zoomOrigX[theID] - startX; + zoomChangeY = zoomOrigY[theID] - startY; + zoomChangeW = zoomOrigW[theID] - startW; + zoomChangeH = zoomOrigH[theID] - startH; + + // Setup Zoom + + zoomCurrent = 0; + + // Setup Fade with Zoom, If Requested + + if (includeFade == 1) { + fadeCurrent = 0; + fadeAmount = (100 - 0) / tempSteps; + } else { + fadeAmount = 0; + } + + // Do It! + + zoomTimer[theID] = setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+startX+", "+zoomChangeX+", "+startY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDone(zoomID, theID)')", zoomTime); + zoomActive[theID] = true; + } +} + +// Finished Zooming In + +function zoomDoneIn(zoomdiv, theID) { + + // Note that it's open + + zoomOpen = true; + zoomdiv = document.getElementById(zoomdiv); + + // Position the table shadow behind the zoomed in image, and display it + + if (document.getElementById("ShadowBox")) { + + setOpacity(0, "ShadowBox"); + shadowdiv = document.getElementById("ShadowBox"); + + shadowLeft = parseInt(zoomdiv.style.left) - 13; + shadowTop = parseInt(zoomdiv.style.top) - 8; + shadowWidth = zoomdiv.offsetWidth + 26; + shadowHeight = zoomdiv.offsetHeight + 26; + + shadowdiv.style.width = shadowWidth + 'px'; + shadowdiv.style.height = shadowHeight + 'px'; + shadowdiv.style.left = shadowLeft + 'px'; + shadowdiv.style.top = shadowTop + 'px'; + + document.getElementById("ShadowBox").style.visibility = "visible"; + fadeElementSetup("ShadowBox", 0, 100, 5); + + } else if (! browserIsIE) { + // Or, do a fade of the modern shadow + fadeElementSetup("ZoomImage", 0, .8, 5, 0, "shadow"); + } + + // Position and display the CAPTION, if existing + + if (includeCaption && document.getElementById(zoomCaption).innerHTML != "") { + // setOpacity(0, zoomCaptionDiv); + zoomcapd = document.getElementById(zoomCaptionDiv); + zoomcapd.style.top = parseInt(zoomdiv.style.top) + (zoomdiv.offsetHeight + 15) + 'px'; + zoomcapd.style.left = (myWidth / 2) - (zoomcapd.offsetWidth / 2) + 'px'; + zoomcapd.style.visibility = "visible"; + // fadeElementSetup(zoomCaptionDiv, 0, 100, 5); + } + + // Display Close Box (fade it if it's not IE) + + if (!browserIsIE) setOpacity(0, "ZoomClose"); + document.getElementById("ZoomClose").style.visibility = "visible"; + if (!browserIsIE) fadeElementSetup("ZoomClose", 0, 100, 5); + + // Get keypresses + document.onkeypress = getKey; + +} + +// Finished Zooming Out + +function zoomDone(zoomdiv, theID) { + + // No longer open + + zoomOpen = false; + + // Clear stuff out, clean up + + zoomOrigH[theID] = ""; + zoomOrigW[theID] = ""; + document.getElementById(zoomdiv).style.visibility = "hidden"; + zoomActive[theID] == false; + + // Stop getting keypresses + + document.onkeypress = null; + +} + +// Actually zoom the element + +function zoomElement(zoomdiv, theID, zoomCurrent, zoomStartW, zoomChangeW, zoomStartH, zoomChangeH, zoomStartX, zoomChangeX, zoomStartY, zoomChangeY, zoomSteps, includeFade, fadeAmount, execWhenDone) { + + // console.log("Zooming Step #"+zoomCurrent+ " of "+zoomSteps+" (zoom " + zoomStartW + "/" + zoomChangeW + ") (zoom " + zoomStartH + "/" + zoomChangeH + ") (zoom " + zoomStartX + "/" + zoomChangeX + ") (zoom " + zoomStartY + "/" + zoomChangeY + ") Fade: "+fadeAmount); + + // Test if we're done, or if we continue + + if (zoomCurrent == (zoomSteps + 1)) { + zoomActive[theID] = false; + clearInterval(zoomTimer[theID]); + + if (execWhenDone != "") { + eval(execWhenDone); + } + } else { + + // Do the Fade! + + if (includeFade == 1) { + if (fadeAmount < 0) { + setOpacity(Math.abs(zoomCurrent * fadeAmount), zoomdiv); + } else { + setOpacity(100 - (zoomCurrent * fadeAmount), zoomdiv); + } + } + + // Calculate this step's difference, and move it! + + moveW = cubicInOut(zoomCurrent, zoomStartW, zoomChangeW, zoomSteps); + moveH = cubicInOut(zoomCurrent, zoomStartH, zoomChangeH, zoomSteps); + moveX = cubicInOut(zoomCurrent, zoomStartX, zoomChangeX, zoomSteps); + moveY = cubicInOut(zoomCurrent, zoomStartY, zoomChangeY, zoomSteps); + + document.getElementById(zoomdiv).style.left = moveX + 'px'; + document.getElementById(zoomdiv).style.top = moveY + 'px'; + zoomimg.style.width = moveW + 'px'; + zoomimg.style.height = moveH + 'px'; + + zoomCurrent++; + + clearInterval(zoomTimer[theID]); + zoomTimer[theID] = setInterval("zoomElement('"+zoomdiv+"', '"+theID+"', "+zoomCurrent+", "+zoomStartW+", "+zoomChangeW+", "+zoomStartH+", "+zoomChangeH+", "+zoomStartX+", "+zoomChangeX+", "+zoomStartY+", "+zoomChangeY+", "+zoomSteps+", "+includeFade+", "+fadeAmount+", '"+execWhenDone+"')", zoomTime); + } +} + +// Zoom Utility: Get Key Press when image is open, and act accordingly + +function getKey(evt) { + if (! evt) { + theKey = event.keyCode; + } else { + theKey = evt.keyCode; + } + + if (theKey == 27) { // ESC + zoomOut(this, evt); + } +} + +//////////////////////////// +// +// FADE Functions +// + +function fadeOut(elem) { + if (elem.id) { + fadeElementSetup(elem.id, 100, 0, 10); + } +} + +function fadeIn(elem) { + if (elem.id) { + fadeElementSetup(elem.id, 0, 100, 10); + } +} + +// Fade: Initialize the fade function + +var fadeActive = new Array(); +var fadeQueue = new Array(); +var fadeTimer = new Array(); +var fadeClose = new Array(); +var fadeMode = new Array(); + +function fadeElementSetup(theID, fdStart, fdEnd, fdSteps, fdClose, fdMode) { + + // alert("Fading: "+theID+" Steps: "+fdSteps+" Mode: "+fdMode); + + if (fadeActive[theID] == true) { + // Already animating, queue up this command + fadeQueue[theID] = new Array(theID, fdStart, fdEnd, fdSteps); + } else { + fadeSteps = fdSteps; + fadeCurrent = 0; + fadeAmount = (fdStart - fdEnd) / fadeSteps; + fadeTimer[theID] = setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')", 15); + fadeActive[theID] = true; + fadeMode[theID] = fdMode; + + if (fdClose == 1) { + fadeClose[theID] = true; + } else { + fadeClose[theID] = false; + } + } +} + +// Fade: Do the fade. This function will call itself, modifying the parameters, so +// many instances can run concurrently. Can fade using opacity, or fade using a box-shadow. + +function fadeElement(theID, fadeCurrent, fadeAmount, fadeSteps) { + + if (fadeCurrent == fadeSteps) { + + // We're done, so clear. + + clearInterval(fadeTimer[theID]); + fadeActive[theID] = false; + fadeTimer[theID] = false; + + // Should we close it once the fade is complete? + + if (fadeClose[theID] == true) { + document.getElementById(theID).style.visibility = "hidden"; + } + + // Hang on.. did a command queue while we were working? If so, make it happen now + + if (fadeQueue[theID] && fadeQueue[theID] != false) { + fadeElementSetup(fadeQueue[theID][0], fadeQueue[theID][1], fadeQueue[theID][2], fadeQueue[theID][3]); + fadeQueue[theID] = false; + } + } else { + + fadeCurrent++; + + // Now actually do the fade adjustment. + + if (fadeMode[theID] == "shadow") { + + // Do a special fade on the webkit-box-shadow of the object + + if (fadeAmount < 0) { + document.getElementById(theID).style.webkitBoxShadow = shadowSettings + (Math.abs(fadeCurrent * fadeAmount)) + ')'; + } else { + document.getElementById(theID).style.webkitBoxShadow = shadowSettings + (100 - (fadeCurrent * fadeAmount)) + ')'; + } + + } else { + + // Set the opacity depending on if we're adding or subtracting (pos or neg) + + if (fadeAmount < 0) { + setOpacity(Math.abs(fadeCurrent * fadeAmount), theID); + } else { + setOpacity(100 - (fadeCurrent * fadeAmount), theID); + } + } + + // Keep going, and send myself the updated variables + clearInterval(fadeTimer[theID]); + fadeTimer[theID] = setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')", 15); + } +} + +//////////////////////////// +// +// UTILITY functions +// + +// Utility: Set the opacity, compatible with a number of browsers. Value from 0 to 100. + +function setOpacity(opacity, theID) { + + var object = document.getElementById(theID).style; + + // If it's 100, set it to 99 for Firefox. + + if (navigator.userAgent.indexOf("Firefox") != -1) { + if (opacity == 100) { opacity = 99.9999; } // This is majorly awkward + } + + // Multi-browser opacity setting + + object.filter = "alpha(opacity=" + opacity + ")"; // IE/Win + object.opacity = (opacity / 100); // Safari 1.2, Firefox+Mozilla + +} + +// Utility: Math functions for animation calucations - From http://www.robertpenner.com/easing/ +// +// t = time, b = begin, c = change, d = duration +// time = current frame, begin is fixed, change is basically finish - begin, duration is fixed (frames), + +function linear(t, b, c, d) +{ + return c*t/d + b; +} + +function sineInOut(t, b, c, d) +{ + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; +} + +function cubicIn(t, b, c, d) { + return c*(t/=d)*t*t + b; +} + +function cubicOut(t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; +} + +function cubicInOut(t, b, c, d) +{ + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; +} + +function bounceOut(t, b, c, d) +{ + if ((t/=d) < (1/2.75)){ + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)){ + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)){ + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } +} + + +// Utility: Get the size of the window, and set myWidth and myHeight +// Credit to quirksmode.org + +function getSize() { + + // Window Size + + if (self.innerHeight) { // Everyone but IE + myWidth = window.innerWidth; + myHeight = window.innerHeight; + myScroll = window.pageYOffset; + } else if (document.documentElement && document.documentElement.clientHeight) { // IE6 Strict + myWidth = document.documentElement.clientWidth; + myHeight = document.documentElement.clientHeight; + myScroll = document.documentElement.scrollTop; + } else if (document.body) { // Other IE, such as IE7 + myWidth = document.body.clientWidth; + myHeight = document.body.clientHeight; + myScroll = document.body.scrollTop; + } + + // Page size w/offscreen areas + + if (window.innerHeight && window.scrollMaxY) { + myScrollWidth = document.body.scrollWidth; + myScrollHeight = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac + myScrollWidth = document.body.scrollWidth; + myScrollHeight = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + myScrollWidth = document.body.offsetWidth; + myScrollHeight = document.body.offsetHeight; + } +} + +// Utility: Get Shift Key Status +// IE events don't seem to get passed through the function, so grab it from the window. + +function getShift(evt) { + var shift = false; + if (! evt && window.event) { + shift = window.event.shiftKey; + } else if (evt) { + shift = evt.shiftKey; + if (shift) evt.stopPropagation(); // Prevents Firefox from doing shifty things + } + return shift; +} + +// Utility: Find the Y position of an element on a page. Return Y and X as an array + +function findElementPos(elemFind) +{ + var elemX = 0; + var elemY = 0; + do { + elemX += elemFind.offsetLeft; + elemY += elemFind.offsetTop; + } while ( elemFind = elemFind.offsetParent ) + + return Array(elemX, elemY); +} \ No newline at end of file diff --git a/static/js-global/FancyZoomHTML.js b/static/js-global/FancyZoomHTML.js new file mode 100755 index 0000000..7644a9a --- /dev/null +++ b/static/js-global/FancyZoomHTML.js @@ -0,0 +1,318 @@ +// FancyZoomHTML.js - v1.0 +// Used to draw necessary HTML elements for FancyZoom +// +// Copyright (c) 2008 Cabel Sasser / Panic Inc +// All rights reserved. + +function insertZoomHTML() { + + // All of this junk creates the three
's used to hold the closebox, image, and zoom shadow. + + var inBody = document.getElementsByTagName("body").item(0); + + // WAIT SPINNER + + var inSpinbox = document.createElement("div"); + inSpinbox.setAttribute('id', 'ZoomSpin'); + inSpinbox.style.position = 'absolute'; + inSpinbox.style.left = '10px'; + inSpinbox.style.top = '10px'; + inSpinbox.style.visibility = 'hidden'; + inSpinbox.style.zIndex = '525'; + inBody.insertBefore(inSpinbox, inBody.firstChild); + + var inSpinImage = document.createElement("img"); + inSpinImage.setAttribute('id', 'SpinImage'); + inSpinImage.setAttribute('src', zoomImagesURI+'zoom-spin-1.png'); + inSpinbox.appendChild(inSpinImage); + + // ZOOM IMAGE + // + //
+ // + //
+ // + //
+ //
+ + var inZoombox = document.createElement("div"); + inZoombox.setAttribute('id', 'ZoomBox'); + + inZoombox.style.position = 'absolute'; + inZoombox.style.left = '10px'; + inZoombox.style.top = '10px'; + inZoombox.style.visibility = 'hidden'; + inZoombox.style.zIndex = '499'; + + inBody.insertBefore(inZoombox, inSpinbox.nextSibling); + + var inImage1 = document.createElement("img"); + inImage1.onclick = function (event) { zoomOut(this, event); return false; }; + inImage1.setAttribute('src',zoomImagesURI+'spacer.gif'); + inImage1.setAttribute('id','ZoomImage'); + inImage1.setAttribute('border', '0'); + // inImage1.setAttribute('onMouseOver', 'zoomMouseOver();') + // inImage1.setAttribute('onMouseOut', 'zoomMouseOut();') + + // This must be set first, so we can later test it using webkitBoxShadow. + inImage1.setAttribute('style', '-webkit-box-shadow: '+shadowSettings+'0.0)'); + inImage1.style.display = 'block'; + inImage1.style.width = '10px'; + inImage1.style.height = '10px'; + inImage1.style.cursor = 'pointer'; // -webkit-zoom-out? + inZoombox.appendChild(inImage1); + + var inClosebox = document.createElement("div"); + inClosebox.setAttribute('id', 'ZoomClose'); + inClosebox.style.position = 'absolute'; + + // In MSIE, we need to put the close box inside the image. + // It's 2008 and I'm having to do a browser detect? Sigh. + if (browserIsIE) { + inClosebox.style.left = '-1px'; + inClosebox.style.top = '0px'; + } else { + inClosebox.style.left = '-15px'; + inClosebox.style.top = '-15px'; + } + + inClosebox.style.visibility = 'hidden'; + inZoombox.appendChild(inClosebox); + + var inImage2 = document.createElement("img"); + inImage2.onclick = function (event) { zoomOut(this, event); return false; }; + inImage2.setAttribute('src',zoomImagesURI+'closebox.png'); + inImage2.setAttribute('width','30'); + inImage2.setAttribute('height','30'); + inImage2.setAttribute('border','0'); + inImage2.style.cursor = 'pointer'; + inClosebox.appendChild(inImage2); + + // SHADOW + // Only draw the table-based shadow if the programatic webkitBoxShadow fails! + // Also, don't draw it if we're IE -- it wouldn't look quite right anyway. + + if (! document.getElementById('ZoomImage').style.webkitBoxShadow && ! browserIsIE) { + + // SHADOW BASE + + var inFixedBox = document.createElement("div"); + inFixedBox.setAttribute('id', 'ShadowBox'); + inFixedBox.style.position = 'absolute'; + inFixedBox.style.left = '50px'; + inFixedBox.style.top = '50px'; + inFixedBox.style.width = '100px'; + inFixedBox.style.height = '100px'; + inFixedBox.style.visibility = 'hidden'; + inFixedBox.style.zIndex = '498'; + inBody.insertBefore(inFixedBox, inZoombox.nextSibling); + + // SHADOW + // Now, the shadow table. Skip if not compatible, or irrevelant with -box-shadow. + + //
X + // + // + // + // + // + + var inShadowTable = document.createElement("table"); + inShadowTable.setAttribute('border', '0'); + inShadowTable.setAttribute('width', '100%'); + inShadowTable.setAttribute('height', '100%'); + inShadowTable.setAttribute('cellpadding', '0'); + inShadowTable.setAttribute('cellspacing', '0'); + inFixedBox.appendChild(inShadowTable); + + var inShadowTbody = document.createElement("tbody"); // Needed for IE (for HTML4). + inShadowTable.appendChild(inShadowTbody); + + var inRow1 = document.createElement("tr"); + inRow1.style.height = '25px'; + inShadowTbody.appendChild(inRow1); + + var inCol1 = document.createElement("td"); + inCol1.style.width = '27px'; + inRow1.appendChild(inCol1); + var inShadowImg1 = document.createElement("img"); + inShadowImg1.setAttribute('src', zoomImagesURI+'zoom-shadow1.png'); + inShadowImg1.setAttribute('width', '27'); + inShadowImg1.setAttribute('height', '25'); + inShadowImg1.style.display = 'block'; + inCol1.appendChild(inShadowImg1); + + var inCol2 = document.createElement("td"); + inCol2.setAttribute('background', zoomImagesURI+'zoom-shadow2.png'); + inRow1.appendChild(inCol2); + // inCol2.innerHTML = ' + // + // + // + // + + inRow2 = document.createElement("tr"); + inShadowTbody.appendChild(inRow2); + + var inCol4 = document.createElement("td"); + inCol4.setAttribute('background', zoomImagesURI+'zoom-shadow4.png'); + inRow2.appendChild(inCol4); + // inCol4.innerHTML = ' '; + var inSpacer2 = document.createElement("img"); + inSpacer2.setAttribute('src',zoomImagesURI+'spacer.gif'); + inSpacer2.setAttribute('height', '1'); + inSpacer2.setAttribute('width', '1'); + inSpacer2.style.display = 'block'; + inCol4.appendChild(inSpacer2); + + var inCol5 = document.createElement("td"); + inCol5.setAttribute('bgcolor', '#ffffff'); + inRow2.appendChild(inCol5); + // inCol5.innerHTML = ' '; + var inSpacer3 = document.createElement("img"); + inSpacer3.setAttribute('src',zoomImagesURI+'spacer.gif'); + inSpacer3.setAttribute('height', '1'); + inSpacer3.setAttribute('width', '1'); + inSpacer3.style.display = 'block'; + inCol5.appendChild(inSpacer3); + + var inCol6 = document.createElement("td"); + inCol6.setAttribute('background', zoomImagesURI+'zoom-shadow5.png'); + inRow2.appendChild(inCol6); + // inCol6.innerHTML = ' '; + var inSpacer4 = document.createElement("img"); + inSpacer4.setAttribute('src',zoomImagesURI+'spacer.gif'); + inSpacer4.setAttribute('height', '1'); + inSpacer4.setAttribute('width', '1'); + inSpacer4.style.display = 'block'; + inCol6.appendChild(inSpacer4); + + // + // + // + // + //
 
   
+ //  
+ + var inRow3 = document.createElement("tr"); + inRow3.style.height = '26px'; + inShadowTbody.appendChild(inRow3); + + var inCol7 = document.createElement("td"); + inCol7.style.width = '27px'; + inRow3.appendChild(inCol7); + var inShadowImg7 = document.createElement("img"); + inShadowImg7.setAttribute('src', zoomImagesURI+'zoom-shadow6.png'); + inShadowImg7.setAttribute('width', '27'); + inShadowImg7.setAttribute('height', '26'); + inShadowImg7.style.display = 'block'; + inCol7.appendChild(inShadowImg7); + + var inCol8 = document.createElement("td"); + inCol8.setAttribute('background', zoomImagesURI+'zoom-shadow7.png'); + inRow3.appendChild(inCol8); + // inCol8.innerHTML = ' '; + var inSpacer5 = document.createElement("img"); + inSpacer5.setAttribute('src',zoomImagesURI+'spacer.gif'); + inSpacer5.setAttribute('height', '1'); + inSpacer5.setAttribute('width', '1'); + inSpacer5.style.display = 'block'; + inCol8.appendChild(inSpacer5); + + var inCol9 = document.createElement("td"); + inCol9.style.width = '27px'; + inRow3.appendChild(inCol9); + var inShadowImg9 = document.createElement("img"); + inShadowImg9.setAttribute('src', zoomImagesURI+'zoom-shadow8.png'); + inShadowImg9.setAttribute('width', '27'); + inShadowImg9.setAttribute('height', '26'); + inShadowImg9.style.display = 'block'; + inCol9.appendChild(inShadowImg9); + } + + if (includeCaption) { + + // CAPTION + // + //
+ // + // + // + // + // + // + //
+ //
+ + var inCapDiv = document.createElement("div"); + inCapDiv.setAttribute('id', 'ZoomCapDiv'); + inCapDiv.style.position = 'absolute'; + inCapDiv.style.visibility = 'hidden'; + inCapDiv.style.marginLeft = 'auto'; + inCapDiv.style.marginRight = 'auto'; + inCapDiv.style.zIndex = '501'; + + inBody.insertBefore(inCapDiv, inZoombox.nextSibling); + + var inCapTable = document.createElement("table"); + inCapTable.setAttribute('border', '0'); + inCapTable.setAttribute('cellPadding', '0'); // Wow. These honestly need to + inCapTable.setAttribute('cellSpacing', '0'); // be intercapped to work in IE. WTF? + inCapDiv.appendChild(inCapTable); + + var inTbody = document.createElement("tbody"); // Needed for IE (for HTML4). + inCapTable.appendChild(inTbody); + + var inCapRow1 = document.createElement("tr"); + inTbody.appendChild(inCapRow1); + + var inCapCol1 = document.createElement("td"); + inCapCol1.setAttribute('align', 'right'); + inCapRow1.appendChild(inCapCol1); + var inCapImg1 = document.createElement("img"); + inCapImg1.setAttribute('src', zoomImagesURI+'zoom-caption-l.png'); + inCapImg1.setAttribute('width', '13'); + inCapImg1.setAttribute('height', '26'); + inCapImg1.style.display = 'block'; + inCapCol1.appendChild(inCapImg1); + + var inCapCol2 = document.createElement("td"); + inCapCol2.setAttribute('background', zoomImagesURI+'zoom-caption-fill.png'); + inCapCol2.setAttribute('id', 'ZoomCaption'); + inCapCol2.setAttribute('valign', 'middle'); + inCapCol2.style.fontSize = '14px'; + inCapCol2.style.fontFamily = 'Helvetica'; + inCapCol2.style.fontWeight = 'bold'; + inCapCol2.style.color = '#ffffff'; + inCapCol2.style.textShadow = '0px 2px 4px #000000'; + inCapCol2.style.whiteSpace = 'nowrap'; + inCapRow1.appendChild(inCapCol2); + + var inCapCol3 = document.createElement("td"); + inCapRow1.appendChild(inCapCol3); + var inCapImg2 = document.createElement("img"); + inCapImg2.setAttribute('src', zoomImagesURI+'zoom-caption-r.png'); + inCapImg2.setAttribute('width', '13'); + inCapImg2.setAttribute('height', '26'); + inCapImg2.style.display = 'block'; + inCapCol3.appendChild(inCapImg2); + } +} \ No newline at end of file diff --git a/static/mouseover.gif b/static/mouseover.gif old mode 100644 new mode 100755 diff --git a/static/moverc.png b/static/moverc.png old mode 100644 new mode 100755 diff --git a/static/nav_white.gif b/static/nav_white.gif new file mode 100755 index 0000000..611d97a Binary files /dev/null and b/static/nav_white.gif differ diff --git a/static/navdown_white.gif b/static/navdown_white.gif new file mode 100755 index 0000000..d3c0865 Binary files /dev/null and b/static/navdown_white.gif differ diff --git a/static/pichat.css b/static/pichat.css old mode 100644 new mode 100755 diff --git a/static/profile.css b/static/profile.css old mode 100644 new mode 100755 index a8989db..7605fc7 --- a/static/profile.css +++ b/static/profile.css @@ -211,7 +211,29 @@ color:#087cff; font-size:1px; } + #newuser + {height:120px; + border-top-left-radius:5px; + border-top-right-radius:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; + box-shadow: 15px 15px 10px #c8cbce; +-webkit-box-shadow: 15px 15px 10px #c8cbce; +-moz-box-shadow: 15px 15px 10px #c8cbce; +border:3px solid #999; +padding:20; + width:auto} + #newuser a:link{text-size:30px;} + body { margin: 0; @@ -221,4 +243,3 @@ body,td,th { }@charset "UTF-8"; -/* CSS Document */ diff --git a/static/scroll.js b/static/scroll.js old mode 100644 new mode 100755 diff --git a/static/search.html b/static/search.html new file mode 100755 index 0000000..f4f210d --- /dev/null +++ b/static/search.html @@ -0,0 +1,301 @@ + + + +dump.fm - image search + + + +
+ + + + + + + + + + +
+
+
+
+ + + + + + + +options + + + +
+
+

+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + +
Loading...
+ + +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/static/search/all.js b/static/search/all.js new file mode 100755 index 0000000..233a5a9 --- /dev/null +++ b/static/search/all.js @@ -0,0 +1 @@ +$(document).ready(function(){var $desc=$('#description');var dheight=$desc.height();$desc.css('height','0').hide();var about=$('a#about').text();$('a#about').bind('click',function(){if($desc.is(':visible')){closeDesc()}else{$desc.show().animate({height:dheight},{duration:500});$('a#about').text("close")};return false});function closeDesc(){$desc.animate({height:0},{duration:500,complete:function(){$desc.fadeOut(function(){$(this).css('display','none');$('a#about').text(about)})}})};$('a.closeinfo').bind('click',function(){closeDesc()});$('a#notecount').bind('click',function(){$('.notes').toggle()});var $searchBox=$('#search input[type="text"]');var searchDefault='Search';$searchBox.val(searchDefault);$searchBox.focus(function(){if($(this).attr("value")==searchDefault)$(this).attr("value","");$(this).addClass("focus")});$searchBox.blur(function(){if($(this).attr("value")=="")$(this).attr("value",searchDefault);$(this).removeClass("focus")});$('#wrapper a:not(.popupwindow)').filter(function(){var theHref=this;if(theHref.hostname&&theHref.hostname!==location.hostname){$(theHref).not(".noAutoIcon").addClass("offSite");$(theHref).not(".noAutoLink").attr('target','_blank').bind('click keypress',function(event){var code=event.charCode||event.keyCode;if(!code||(code&&code==13)){if(pageTracker){var fixedLink=this.href;fixedLink=fixedLink.replace(/https?:\/\/(.*)/,"$1");fixedLink='/outgoing/'+fixedLink;pageTracker._trackPageview(fixedLink)}}})}})}); diff --git a/static/search/browser.html b/static/search/browser.html new file mode 100755 index 0000000..a75e402 --- /dev/null +++ b/static/search/browser.html @@ -0,0 +1,262 @@ + + + +dump.fm - Browser/Search Tool + + + + + + + + + + +
+ +

+ + + + + + + +

+ + + ★★ + + Always ON +

+ + + + + + +

+ + + JPG + + PNG + + BMP + + GIF + + Any

+ + +

+ + + Small + + Medium + + Large + + Extra Large + + All Sizes

+ + +

+ + + Black & White + + Gray + + Color + + Whateva

+ + + +
Loading...
+ + + + + +
+ + \ No newline at end of file diff --git a/static/search/cufon-yui.js b/static/search/cufon-yui.js new file mode 100755 index 0000000..cecc239 --- /dev/null +++ b/static/search/cufon-yui.js @@ -0,0 +1,5 @@ +/* + * Copyright (c) 2009 Simo Kinnunen. + * Licensed under the MIT license. + */ +var Cufon=(function(){var K=function(){return K.replace.apply(null,arguments)};var U=K.DOM={ready:(function(){var Z=false,b={loaded:1,complete:1};var Y=[],a=function(){if(Z){return}Z=true;for(var c;c=Y.shift();c()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false);window.addEventListener("pageshow",a,false)}if(!window.opera&&document.readyState){(function(){b[document.readyState]?a():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");a()}catch(c){setTimeout(arguments.callee,1)}})()}O(window,"load",a);return function(c){if(!arguments.length){a()}else{Z?c():Y.push(c)}}})()};var L=K.CSS={Size:function(Z,Y){this.value=parseFloat(Z);this.unit=String(Z).match(/[a-z%]*$/)[0]||"px";this.convert=function(a){return a/Y*this.value};this.convertFrom=function(a){return a/this.value*Y};this.toString=function(){return this.value+this.unit}},getStyle:function(Z){var Y=document.defaultView;if(Y&&Y.getComputedStyle){return new A(Y.getComputedStyle(Z,null))}if(Z.currentStyle){return new A(Z.currentStyle)}return new A(Z.style)},ready:(function(){var a=false;var Z=[],b=function(){a=true;for(var d;d=Z.shift();d()){}};var Y=Object.prototype.propertyIsEnumerable?F("style"):{length:0};var c=F("link");U.ready(function(){var g=0,f;for(var e=0,d=c.length;f=c[e],e=Y.length+g){b()}else{setTimeout(arguments.callee,10)}});return function(d){if(a){d()}else{Z.push(d)}}})(),supports:function(a,Z){var Y=document.createElement("span").style;if(Y[a]===undefined){return false}Y[a]=Z;return Y[a]===Z},textAlign:function(b,a,Y,Z){if(a.get("textAlign")=="right"){if(Y>0){b=" "+b}}else{if(Y400}if(f==500){f=400}for(var g in d){g=parseInt(g,10);if(!c||ga){a=g}h.push(g)}if(fa){f=a}h.sort(function(j,i){return(b?(j>f&&i>f)?ji:(ji:jj){j=c}if(b>f){f=b}if(c + + + + + + + +
+
+
+ + + + + + + + +

options

+
+
+
+
+

+
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/static/search/search.html b/static/search/search.html new file mode 100755 index 0000000..5c5b96b --- /dev/null +++ b/static/search/search.html @@ -0,0 +1,314 @@ + + + +dump.fm - image search + + + +
+ + + + + + + + + + +
+
+
+
+ + + + + + + +options + + + +
+
+

+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + +
Loading...
+ + +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/static/shaqg.gif b/static/shaqg.gif old mode 100644 new mode 100755 diff --git a/static/surf.php b/static/surf.php new file mode 100755 index 0000000..d5ad9ce --- /dev/null +++ b/static/surf.php @@ -0,0 +1,238 @@ + + + +dump.fm + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/template/banner.st b/template/banner.st index 19b90dc..3998ff0 100755 --- a/template/banner.st +++ b/template/banner.st @@ -8,7 +8,7 @@
$if(user_nick)$  - Profile | + ★ Profile ★ | $else$ Register | $endif$ Room A | diff --git a/template/browser.st b/template/browser.st index 1531ff5..a92eef3 100755 --- a/template/browser.st +++ b/template/browser.st @@ -1,9 +1,72 @@ - - $if(user_nick)$ - Hello, $user_nick$ - $else$ - Hello, unnamed + + dump.fm | Browser Tool Beta + $head()$ + + + + + + + + + $if(isadminroom)$ + + $endif$ + + + $banner()$ +
+
+
+ +
+
+
+ +
+
+
+ + + +
+ $if(user_nick)$ +
+ + +
+ $endif$ +
+
+
+
+
+
+ + +
+

+ $footer()$

+

+

+
+ diff --git a/template/head.st b/template/head.st old mode 100644 new mode 100755 diff --git a/template/log.st b/template/log.st old mode 100644 new mode 100755 index 976d0e6..60eb3d5 --- a/template/log.st +++ b/template/log.st @@ -2,10 +2,9 @@ $roomname$ Log $head()$ +