Permalink
Browse files

Added url shareing

  • Loading branch information...
1 parent aef07a6 commit 83a65f40eb186d1b14bf26c9741db7b9538fd3b1 George Eracleous committed Apr 4, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −0 app/handlers/home.py
  2. +2 −1 app/model/user.py
  3. +1 −2 static/js/submit.js
  4. +3 −3 static/js/submit.js~
View
@@ -1,5 +1,6 @@
from app.handlers import base
from app.model.video import *
+from app.model.user import *
from random import shuffle
import tornado.web
import gdata.youtube#@UnresolvedImport
View
@@ -5,7 +5,7 @@
@author: George Eracleous
'''
import string, hashlib, random
-from mongoengine import Document,StringField, EmbeddedDocument, ObjectIdField#@UnresolvedImports
+from mongoengine import Document,StringField, EmbeddedDocument, ObjectIdField, ListField#@UnresolvedImports
class User(Document):
meta = {"collection": "Users"}
@@ -16,6 +16,7 @@ class User(Document):
email = StringField(required=True)
password = StringField(required=True, default="")
salt = StringField(required=True, default="")
+ covers = ListField(StringField(), default=list)
def create_password(self, password):
char_set = string.ascii_uppercase + string.digits
View
@@ -20,15 +20,14 @@
},
true,
function(response) {
- $("#share-url-box").attr("style", "position:relative; width:500px; top:100px; float:right; display:block;")
+ $("#share-url-box").attr("style", "position:relative; width:500px; top:40px; float:right; display:block;")
$("#share-url-box").html("<h2>Success! Share this link with your friends and fans and let them vote on your cover!</h2></br><p style='border-style:solid; padding:2px;'>"+response.share_url +"</p></br><p><b>Note</b>: The covers in the homepage appear in random order. However, this link will redirect your fans directly to your cover, which will appear on the left hand frame!</p>");
//CYP.popup.show("Share this url with your friends: " + response.share_url)
$("#url").val("");
$("#title").val("");
$("#artist").val("");
- //CYP.successNotifier.show(response.msg)
});
}
else{
View
@@ -20,15 +20,15 @@
},
true,
function(response) {
- $("#share-url-box").attr("style", "position:relative; width:500px; top:100px; float:right; display:block;")
- $("#share-url-box").html("<h2>Success! Share this link with your friends and fans and let them vote on your cover!</h2></br><p style='border-style:solid; padding:2px;'>"+response.share_url +"</p></br><p><b>Note</: The covers in the homepage appear in random order. However, this link will redirect your fans directly to your cover, which will appear on the left hand frame!</p>");
+ $("#share-url-box").attr("style", "position:relative; width:500px; top:40px; float:right; display:block;")
+ $("#share-url-box").html("<h2>Success! Share this link with your friends and fans and let them vote on your cover!</h2></br><p style='border-style:solid; padding:2px;'>"+response.share_url +"</p></br><p><b>Note</b>: The covers in the homepage appear in random order. However, this link will redirect your fans directly to your cover, which will appear on the left hand frame!</p>");
//CYP.popup.show("Share this url with your friends: " + response.share_url)
$("#url").val("");
$("#title").val("");
$("#artist").val("");
- //CYP.successNotifier.show(response.msg)
+
});
}
else{

0 comments on commit 83a65f4

Please sign in to comment.