From bed8d70d0f1321d0a4463b768b7b2d12a18eb3da Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sun, 20 Jun 2010 22:48:50 -0400 Subject: sostler prod commit --- static/js/pichat.js | 28 +++++++++++++++++----------- template/profile.st | 7 ++----- template/userlog.st | 34 ++++++++-------------------------- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/static/js/pichat.js b/static/js/pichat.js index 2ea4b3b..a169090 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -95,12 +95,14 @@ function linkReplace(url) { linkUrl = url; else linkUrl = 'http://' + url; - + + // Ugly hack. Don't open new links in chat, only in logs. + var shouldOpen = $('#chatrap').length == 0; var uri = parseUri(url) switch(getUriType(uri)) { case 'image': LastMsgContainsImage = true; - return ""; break; + return ""; break; case 'youtube': Youtube.startAnimation(); return "" + @@ -662,7 +664,6 @@ function setupUpload(elementId, roomKey) { }; var onComplete = function(file, response) { var r = $.trim(response); - g = r; if (r.match(/FILE_TOO_BIG/)) { var maxSize = r.split(" ")[1] / 1024; alert("Sorry. Your file is just too fucking big. " @@ -692,7 +693,7 @@ function setupUpload(elementId, roomKey) { autoSubmit: true, name: 'image', data: { room: roomKey }, - onSubmit: onSubmit, + onSubmit: onSubmit, onComplete: onComplete }); } @@ -704,17 +705,22 @@ function setupUploadAvatar(elementId) { }; var onComplete = function(file, resp) { $('#spinner').hide(); - if (resp == 'INVALID_REQUEST') { + var r = $.trim(resp); + if (r == 'INVALID_REQUEST') { location.reload(); - } else if (resp == 'NOT_LOGGED_IN') { + } else if (r == 'NOT_LOGGED_IN') { location.reload(); - } else if (resp == 'INVALID_IMAGE') { + } else if (r == 'INVALID_IMAGE') { alert("Sorry, dump.fm can't deal with your image. Pick another :("); return; - } - var s = ''; - $('#avatarPic').replaceWith(s).show(); - $('#avatar').text(resp); + } else if (r.match(/FILE_TOO_BIG/)) { + var maxSize = r.split(" ")[1] / 1024; + alert("Sorry. Your file is just too fucking big. " + + maxSize + "KB or less please."); + return; + } + var s = ''; + $('#dashavatarPic').replaceWith(s).show(); }; new AjaxUpload(elementId, { action: '/upload/avatar', diff --git a/template/profile.st b/template/profile.st index 7bad5cd..5278e77 100644 --- a/template/profile.st +++ b/template/profile.st @@ -51,18 +51,15 @@

contact info

$if(contact)$
$contact$
- $else$ - - + $endif$

bio

$if(bio)$
$bio$
$else$ - - + $endif$ diff --git a/template/userlog.st b/template/userlog.st index 547772e..850e55b 100644 --- a/template/userlog.st +++ b/template/userlog.st @@ -18,15 +18,15 @@
- $endif$ -
dumps posted: $dump_cnt$
-
dumps $nick$ faved: $dumps_user_faved_cnt$
- - $if(is_home)$ - - $endif$ +
dumps posted: $dump_cnt$
+
dumps $nick$ faved: $dumps_user_faved_cnt$
+

contact info

$if(contact)$ @@ -62,23 +56,11 @@


$endif$ - - - - $if(is_home)$ -
-

- $endif$ + -
- - $nick$'s
Favorite Pix
- -
-
-
+
$if(dumps)$ -- cgit v1.2.3-70-g09d2