diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-09-26 18:08:29 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-09-26 18:08:29 -0400 |
| commit | 9d7138359236450fe3ca48253cede0dac6c3af18 (patch) | |
| tree | fe33ba12b891aa8db446585f63e8fa345ec62573 | |
| parent | 461c3a9f062459d75cf63687eae11a4e271285d7 (diff) | |
timb commiting prod changes...
| -rw-r--r-- | scripts/s3upload.py | 90 | ||||
| -rwxr-xr-x | static/css/dump.css | 23 | ||||
| -rw-r--r-- | static/form_login/front.css | 3 | ||||
| -rw-r--r-- | static/js/fullscreen.js | 2 | ||||
| -rw-r--r-- | template/banner.st | 6 | ||||
| -rw-r--r-- | template/footer.st | 4 | ||||
| -rw-r--r-- | template/messagepane.st | 41 | ||||
| -rw-r--r-- | template/mini_profile.st | 8 | ||||
| -rw-r--r-- | template/rooms/VIP.st | 2 | ||||
| -rw-r--r-- | template/share_buttons.st | 4 |
10 files changed, 101 insertions, 82 deletions
diff --git a/scripts/s3upload.py b/scripts/s3upload.py index f4a5a77..a31874b 100644 --- a/scripts/s3upload.py +++ b/scripts/s3upload.py @@ -9,9 +9,7 @@ CONN = None AWS_ACCESS_KEY_ID = 'AKIAJAQK4CDDP6I6SNVA' AWS_SECRET_ACCESS_KEY = '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' BUCKET_NAME = 'dumpfm' - -def parse_date(date_string, fmt='%Y%m%d'): - return datetime.datetime.strptime(date_string, fmt) +COUNTER = 0 def retry_func(f, count): try: @@ -22,75 +20,57 @@ def retry_func(f, count): print 'Error! retrying %s more time(s)' % (count - 1) retry_func(f, count - 1) -def upload_file(path, dry_run=True): +def upload_file(path): + global COUNTER path = os.path.normpath(path) if path == '.' or not os.path.isfile(path): return filedata = open(path, 'rb').read() + size = os.path.getsize(path) content_type = mimetypes.guess_type(path)[0] if not content_type: content_type = 'text/plain' path = path.replace('\\', '/') # Windows hack - if not dry_run: - start = time.time() - def do_upload(): - CONN.put(BUCKET_NAME, path, S3.S3Object(filedata), - {'x-amz-acl': 'public-read', 'Content-Type': content_type}) - retry_func(do_upload, 3) - ms_took = (time.time() - start) * 1000 - print "uploaded %s (%0.0fms)" % (path, ms_took) + start = time.time() + def do_upload(): + CONN.put(BUCKET_NAME, path, S3.S3Object(filedata), + {'x-amz-acl': 'public-read', 'Content-Type': content_type}) + retry_func(do_upload, 3) + + ms_took = (time.time() - start) * 1000 + print "uploaded %s (%0.0fms) (%sKB)" % (path, ms_took, size / 1024) + COUNTER += 1 +def upload_directory(path): + for f in sorted(os.listdir(path)): + subpath = os.path.join(path, f) + if os.path.isdir(subpath): + upload_directory(subpath) + else: + upload_file(subpath) -def do_upload(directory, start_date, end_date, dry_run=True): +def do_upload(path): global CONN CONN = S3.AWSAuthConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) - for subdir in sorted(os.listdir(directory)): - subdir_date = None - try: - subdir_date = parse_date(subdir) - except: - continue + start = time.time() + + if os.path.isdir(path): + upload_directory(path) + else: + upload_file(path) - - if start_date <= subdir_date <= end_date: - counter = 0 - print "uploading contents of %s" % subdir, - for filename in os.listdir(os.path.join(directory, subdir)): - path = os.path.join(directory, subdir, filename) - upload_file(path, dry_run=dry_run) - counter += 1 + s_took = (time.time() - start) + print "uploaded %s files in %0.0fs" % (COUNTER, s_took) - print 'handled %s files' % counter if __name__ == "__main__": - if not 4 <= len(sys.argv) <= 5: - print 'usage: s3upload.py directory startdate enddate [dryrun=true]' + if len(sys.argv) == 1: + print 'usage: s3upload.py path' sys.exit(1) - - directory = sys.argv[1] - start_date = sys.argv[2] - end_date = sys.argv[3] - dry_run = sys.argv[4] if len(sys.argv) == 5 else 'true' - - if dry_run.lower() == 'true': - print 'doing dry run' - dry_run = True - else: - dry_run = False - - try: - start_date = parse_date(start_date) - except: - print "invalid start date: %s" % start_date - sys.exit(1) - - try: - end_date = parse_date(end_date) - except: - print "invalid end date: %s" % end_date - sys.exit(1) - - do_upload(directory, start_date, end_date, dry_run) + args = sys.argv[1:] + for path in args: + do_upload(path) + print diff --git a/static/css/dump.css b/static/css/dump.css index 1449167..a68bd0c 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -281,7 +281,6 @@ border-left:1px solid #999;*/ position:absolute; width: 100%; height: 62px; - z-index: 1000; } #logoicons{ width:auto; @@ -336,6 +335,7 @@ img.chat-thumb { /* sharing */ .buttons{ cursor:pointer; + position: relative; display:inline-block; } @@ -349,14 +349,11 @@ display:inline-block; /*padding-left: 20px;*/ } img.thumb { -bottom:10px; +bottom:3px; image-rendering: -moz-crisp-edges; position:absolute; - - - - left:110px; + left:94px; display: inline-block; } @@ -511,6 +508,7 @@ a.msg-image-zoom img.zoom-icon:hover { width:100%; text-align: center; left: 0; + z-index: 1000; } #search-results-images{ @@ -650,6 +648,7 @@ color:#000; line-height:1.6; font-size:11px; word-spacing:15px; +z-index:6; height:28px; color: #000; @@ -1513,7 +1512,7 @@ color:000; { position:absolute; top:18px; - padding-top: 25px; + margin-top: 25px; } .logged-dump img{ @@ -1531,13 +1530,12 @@ color:000; .logged-dump { background-color:#fff; text-overflow: ellipsis-word; - padding: 18px 18px 6px 18px; + padding: 0px 18px 6px 18px; + margin-top: 18px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-transform: uppercase; margin-left:3px; - line-height:15px; - z-index:4; line-height:20px; text-align: left; } @@ -1932,7 +1930,6 @@ border:8px inset yellow; bottom:25px; top:50px; background-color:#fff; - z-index:5; } #login-container a:link{color:#000;} @@ -2032,14 +2029,16 @@ font-size:20px;font-weight:bold;word-spacing:-3px; font-size: 20px;left:-40px; font-weight: bold; line-height: 1em; - opacity: 1.0; + opacity: 1.0;z-index:3; padding: 25px 10px 40px; top: 8px; width: auto; -webkit-transform: rotate(-9deg); -moz-transform: rotate(-9deg); transform: rotate(-9deg); + } + login-container{z-index:777;} #bar7dis a#disregister:hover { background: #E9E74A; border-top: 10px solid #e1df47; diff --git a/static/form_login/front.css b/static/form_login/front.css index fee7e27..1bd0fae 100644 --- a/static/form_login/front.css +++ b/static/form_login/front.css @@ -9,7 +9,7 @@ top:-2; filter:alpha(opacity=90); -moz-opacity:0.9; -khtml-opacity: 0.9; - opacity: 0.9; + opacity: 0.9z-index:2; } @@ -95,6 +95,7 @@ a.signin.menu-open span {cursor:pointer; color:#789; font-size:11px; box-shadow: 3px 2px 2px #ccc; -webkit-box-shadow: 3px 2px 2px #ccc; +z-index:5000; -moz-box-shadow: 3px 2px 2px #ccc; filter: progid:DXImageTransform.Microsoft.dropShadow(color=#ccc, offX=3, offY=4, positive=true); } diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js index 0f54102..808c138 100644 --- a/static/js/fullscreen.js +++ b/static/js/fullscreen.js @@ -40,11 +40,13 @@ function clickImage(img) { $('#fav-indicator').show(); Tag.add(msg_id, "favorite"); $(img).addClass("fullscreen-favorite"); + track('UI', 'FullscreenFav'); } else { delete FavedMap[msg_id]; $('#fav-indicator').hide(); Tag.rm(msg_id, "favorite"); $(img).removeClass("fullscreen-favorite"); + track('UI', 'FullscreenDeFav'); } } diff --git a/template/banner.st b/template/banner.st index 6083678..a4229f5 100644 --- a/template/banner.st +++ b/template/banner.st @@ -35,7 +35,7 @@ <div id="toptools"> <form name="Tools" > - <select class="toolsmenu" name="menu" onChange="location=document.Tools.menu.options[document.Tools.menu.selectedIndex].value;"> + <select class="toolsmenu" name="menu" onChange="if (document.Tools.menu.selectedIndex != 0) { location=document.Tools.menu.options[document.Tools.menu.selectedIndex].value; } "> <option>Tools</option> <option value="http://bon.gs/tile/" target="_blank">Tile Tool</option> <option value="http://dump.fm/m/oie">Online Image Editor</option> @@ -86,7 +86,7 @@ <div id="dumplist"> $if(user_nick)$ - <a href="http://dump.fm/fullscreen">checkout dump.fm in full-screen - </a><a href="http://dump.fm/stickers">SUPPORT DUMP.FM! BUY SOME STICKERS!!</a><a href="http://dis.dump.fm">- dis magazine new style options</a> $else$ <style>#dumplist{z-index:-1!important;}</style> $endif$ + <a href="http://dump.fm/fullscreen">checkout dump.fm in full-screen - </a><a href="http://dump.fm/stickers">SUPPORT DUMP.FM! BUY SOME STICKERS!!</a>$else$ <style>#dumplist{z-index:-1!important;}</style> $endif$ $if(isadmin)$ -<a href="http://vip.dump.fm/">NAUGHTY BOYS DELIGHT </a> $endif$ </div> @@ -109,7 +109,7 @@ - <div id="search-results"> + <div id="search-results" style="background-color: white;"> <div id="search-controls"> <a id="search-control-previous">previous</a> <span id="search-control-text"></span> diff --git a/template/footer.st b/template/footer.st index 6df573b..5987bd1 100644 --- a/template/footer.st +++ b/template/footer.st @@ -1,7 +1,7 @@ @2010 <a href="/">dump.fm</a> -<a href="http://dump.fm/about_us"><span style="word-spacing:normal;">About Us</span></a> -<a href="http://dump.fm/help"><span style="word-spacing:normal;">Help FAQ</span></a> +<a href="http://dump.fm/about_us" style="word-spacing: normal">About Us</a> +<a href="http://dump.fm/help" style="word-spacing: normal">Help FAQ</a> <a href="http://dump.fm/terms">Terms</a> <a href="http://dump.fm/privacy">Privacy</a> $google_analytics()$ diff --git a/template/messagepane.st b/template/messagepane.st index f925629..673c2ec 100644 --- a/template/messagepane.st +++ b/template/messagepane.st @@ -1,19 +1,46 @@ <div id="messagePane"> <style> - #textbutton { + #chatbuttons { position: absolute; - left: 10px; + right: 25px; top: 0px; - background: lightblue; - z-index: 100000; + } + #textbutton, #imgbutton, #clearbutton { + float: right; + background: #CDF8FF; + color: #666; + z-index: 0; + margin-left: 15px; + height: 20px; + } + #clearbutton { + text-decoration: underline + cursor: pointer; } </style> - <div id="textbutton"> - <span>show text?</span> - <input type="checkbox"> + <div id="chatbuttons"> + <div id="textbutton"> + <span>show text?</span> + <input type="checkbox"> + </div> + <div id="imgbutton"> + <span>show imgs?</span> + <input type="checkbox"> + </div> + <div id="clearbutton"> + <span>clear screen</span> + <input type="checkbox"> + </div> </div> <script> jQuery('#textbutton input').attr('checked', TextEnabled).change(setTextEnable); + jQuery('#imgbutton input').attr('checked', ImgsEnabled).change(setImgsEnable); + jQuery('#clearbutton input').click(function() { + track('UI', 'ClearScreen'); + jQuery('.dump').remove(); + jQuery(this).removeAttr('checked'); + return false; + }); </script> $if(user_nick)$ diff --git a/template/mini_profile.st b/template/mini_profile.st index b7c82cc..a991f6b 100644 --- a/template/mini_profile.st +++ b/template/mini_profile.st @@ -35,3 +35,11 @@ <div><img id="bio" src="/static/img/noinfo.png"><br><br></div> $endif$ </div> +<script> +jQuery(function() { + jQuery(".linkify").each(function() { + var text = jQuery(this).text(); + jQuery(this).html(linkifyWithoutImage(text)); + }); +}); +</script>
\ No newline at end of file diff --git a/template/rooms/VIP.st b/template/rooms/VIP.st index 54bf72a..9281203 100644 --- a/template/rooms/VIP.st +++ b/template/rooms/VIP.st @@ -119,7 +119,7 @@ $footer()$ </div> $preload()$ - <div id="vipinfo" style="position: absolute; z-index: 100000; right: 50; bottom: 75;"> + <div id="vipinfo" style="position: absolute; z-index: 100000; right: 50; bottom: 125; background: white; padding: 10px; opacity: .75;"> <h1>Welcome to the cool club</h1> <ul> <li><a href="/roomlist">Rooms</a></li> diff --git a/template/share_buttons.st b/template/share_buttons.st index 83c387f..882ec07 100644 --- a/template/share_buttons.st +++ b/template/share_buttons.st @@ -7,6 +7,8 @@ $if(dump.favorited)$ <img src="/static/img/thumbs/heartfaved.gif" class="thumb favorite" onclick="Tag.favorite(this)"> $else$ - <img src="/static/img/thumbs/heart.gif" class="thumb" onclick="Tag.favorite(this)"> + <div style="position: relative"> + <img src="/static/img/thumbs/heart.gif" class="thumb" onclick="Tag.favorite(this)"> + </div> $endif$ </span>
\ No newline at end of file |
