summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2013-02-13 13:59:59 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2013-02-13 13:59:59 -0600
commit829f0b9d5cac51ff1cf769bc8cceb44e0e3049fb (patch)
treea45e91b390313aa533d6b893a84a96207b797e00
parent3110f8b92265f67957030787670c3414c85998c5 (diff)
parent93a3e702249e63dc06088eb2908d7cb4660ba373 (diff)
downloadaskbot-829f0b9d5cac51ff1cf769bc8cceb44e0e3049fb.tar.gz
askbot-829f0b9d5cac51ff1cf769bc8cceb44e0e3049fb.tar.bz2
askbot-829f0b9d5cac51ff1cf769bc8cceb44e0e3049fb.zip
Merge branch 'master' of github.com:ASKBOT/askbot-devel
-rw-r--r--askbot/management/commands/fix_revisionless_posts.py6
-rw-r--r--askbot/media/js/live_search.js2
-rw-r--r--askbot/media/style/style.css111
-rw-r--r--askbot/media/style/style.less11
-rw-r--r--askbot/models/__init__.py2
-rw-r--r--askbot/models/post.py6
-rw-r--r--askbot/models/question.py24
-rw-r--r--askbot/templates/email/base_mail.html2
-rw-r--r--askbot/templates/widgets/edit_post.html1
9 files changed, 115 insertions, 50 deletions
diff --git a/askbot/management/commands/fix_revisionless_posts.py b/askbot/management/commands/fix_revisionless_posts.py
index 9535bef3..69520157 100644
--- a/askbot/management/commands/fix_revisionless_posts.py
+++ b/askbot/management/commands/fix_revisionless_posts.py
@@ -14,9 +14,9 @@ def fix_revisionless_posts(post_class):
print 'have %d corrupted posts' % len(posts)
for post in posts:
post.add_revision(
- author = post.author,
- text = post.text,
- comment = const.POST_STATUS['default_version'],
+ author=post.author,
+ text=post.text,
+ comment=unicode(const.POST_STATUS['default_version']),
revised_at = post.added_at
)
post.last_edited_at = None
diff --git a/askbot/media/js/live_search.js b/askbot/media/js/live_search.js
index 9c47ab31..cb8a8713 100644
--- a/askbot/media/js/live_search.js
+++ b/askbot/media/js/live_search.js
@@ -640,7 +640,7 @@ FullTextSearch.prototype.renderSearchTags = function(tags, query_string){
tag.setDeletable(true);
tag.setDeleteHandler(
function(){
- this.removeSearchTag(tag_name, query_string);
+ me.removeSearchTag(tag_name, query_string);
}
);
search_tags.append(tag.getElement());
diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css
index cbee04f9..f7feb9d5 100644
--- a/askbot/media/style/style.css
+++ b/askbot/media/style/style.css
@@ -198,7 +198,7 @@ body.user-messages {
top: 0px;
left: 0px;
width: 100%;
- z-index: 100;
+ z-index: 100000;
padding: 0;
text-align: center;
background-color: #f5dd69;
@@ -249,15 +249,25 @@ body.user-messages {
width: auto;
float: left;
}
+.lang-nav {
+ position: relative;
+}
.lang-nav ul {
+ display: none;
list-style: none;
+ z-index: 10000;
+ margin: 0;
}
-.lang-nav li {
- display: inline;
- padding-right: 16px;
+.lang-nav:hover ul,
+.lang-nav ul:hover {
+ display: block;
+ position: absolute;
+ width: 100px;
}
-.lang-nav li.current {
- font-weight: bold;
+.lang-nav li {
+ color: #707070;
+ background: white;
+ display: block;
}
#userToolsNav {
/* Navigation bar containing login link or user information, check widgets/user_navigation.html*/
@@ -488,7 +498,7 @@ body.user-messages {
list-style: none;
overflow: auto;
padding: 0 0 10px 0;
- margin: 0 0 20px 0;
+ margin: 0;
position: relative;
}
.search-drop-menu ul li {
@@ -942,13 +952,20 @@ body.anon .search-drop-menu {
line-height: 1.3;
}
/* tips and markdown help are widgets for ask template */
-#tips li {
- color: #707070;
- font-size: 13px;
- list-style-image: url(../images/tips.png);
+.question-instructions {
+ background: #e9e9e1;
+ -moz-border-radius: 5px;
+ -khtml-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -webkit-box-shadow: 1px 1px 3px #999999;
+ -moz-box-shadow: 1px 1px 3px #999999;
+ box-shadow: 1px 1px 3px #999999;
+ padding: 7px 0 1px 2px;
+ margin-bottom: 10px;
+ width: 100%;
}
-#tips a {
- font-size: 16px;
+.question-instructions ul {
+ margin: 0 0 0 27px;
}
#markdownHelp li {
color: #707070;
@@ -1442,7 +1459,7 @@ ul#related-tags li {
padding-right: 20px;
}
.moderate-tags-page td.per-thread-controls {
- width: 120px;
+ width: 160px;
/* 20px more to compensate for the padding */
height: 30px;
@@ -1450,11 +1467,13 @@ ul#related-tags li {
.moderate-tags-page td.per-thread-controls button {
display: none;
}
-.moderate-tags-page th.decision-col,
.moderate-tags-page th.tags-col,
.moderate-tags-page th.users-col {
width: 100px;
}
+.moderate-tags-page th.decision-col {
+ width: 140px;
+}
.moderate-tags-page tr.per-tag-controls {
height: 30px;
text-align: center;
@@ -1600,6 +1619,10 @@ ul#related-tags li {
width: 100%;
max-width: 395px;
}
+.ask-page .lang-selector,
+.edit-question-page .lang-selector {
+ margin: 1px 0 0 5px;
+}
.ask-page #id_post_author_username,
.question-page #id_post_author_username,
.edit-question-page #id_post_author_username,
@@ -1856,7 +1879,6 @@ ul#related-tags li {
}
.wmd-container {
border: #cce6ec 3px solid;
- min-height: 250px;
}
.wmd-container textarea {
border: none;
@@ -1893,7 +1915,7 @@ ul#related-tags li {
display: block;
font-size: 100%;
- min-height: 200px;
+ min-height: 210px;
line-height: 18px;
margin: 0;
border: 0;
@@ -1906,7 +1928,7 @@ ul#related-tags li {
}
.wmd-preview {
color: #525252;
- margin: 0;
+ margin: 0 0 12px 0;
padding: 5px;
background-color: #F5F5F5;
min-height: 20px;
@@ -1960,11 +1982,12 @@ ul#related-tags li {
width: 725px;
}
.preview-toggle {
- width: 100%;
color: #b6a475;
/*letter-spacing:1px;*/
+ line-height: 28px;
text-align: left;
+ width: 100%;
}
.preview-toggle span:hover {
cursor: pointer;
@@ -3090,6 +3113,38 @@ a:hover.medal {
-moz-box-shadow: 1px 1px 2px #636363;
box-shadow: 1px 1px 2px #636363;
}
+.user-profile-page input[type='submit'].select-language {
+ height: 26px;
+ font-size: 15px;
+ text-align: center;
+ text-decoration: none;
+ cursor: pointer;
+ color: #4a757f;
+ font-family: 'Open Sans Condensed', Arial, sans-serif;
+ text-shadow: 0px 1px 0px #c6d9dd;
+ -moz-text-shadow: 0px 1px 0px #c6d9dd;
+ -webkit-text-shadow: 0px 1px 0px #c6d9dd;
+ border-top: #eaf2f3 1px solid;
+ background-color: #d1e2e5;
+ background-repeat: no-repeat;
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#d1e2e5), color-stop(25%, #d1e2e5), to(#a9c2c7));
+ background-image: -webkit-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7);
+ background-image: -moz-linear-gradient(top, #d1e2e5, #d1e2e5 25%, #a9c2c7);
+ background-image: -ms-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7);
+ background-image: -o-linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7);
+ background-image: linear-gradient(#d1e2e5, #d1e2e5 25%, #a9c2c7);
+ border-radius: 4px;
+ -ms-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ -webkit-box-shadow: 1px 1px 2px #636363;
+ -moz-box-shadow: 1px 1px 2px #636363;
+ box-shadow: 1px 1px 2px #636363;
+}
+.user-profile-page select {
+ margin-bottom: 12px;
+}
.user-details {
font-size: 13px;
}
@@ -3919,6 +3974,10 @@ p.signup_p {
line-height: 18px;
margin-bottom: 15px;
}
+#responses h2 {
+ margin: 0;
+ padding: 0;
+}
#responses div.face {
float: left;
text-align: center;
@@ -3927,7 +3986,7 @@ p.signup_p {
overflow: hidden;
}
.response-parent {
- margin-top: 18px;
+ margin-top: 8px;
}
.response-parent strong {
font-size: 20px;
@@ -3940,9 +3999,6 @@ p.signup_p {
#responses input {
float: left;
}
-#re_tools {
- margin-bottom: 10px;
-}
#re_sections {
margin-bottom: 6px;
}
@@ -4226,7 +4282,7 @@ textarea.tipped-input {
}
.editor-status {
float: right;
- margin: 7px 350px 0 0;
+ margin: 8px 350px 0 0;
font-weight: bold;
}
.editor-status span {
@@ -4480,6 +4536,10 @@ textarea.tipped-input {
}
.tag-subscriptions form {
display: inline-block;
+ margin-bottom: 0;
+}
+.tag-subscriptions td {
+ vertical-align: middle;
}
.tag-subscriptions .action {
cursor: pointer;
@@ -4487,3 +4547,6 @@ textarea.tipped-input {
font-family: 'Open Sans Condensed', Arial, sans-serif;
text-decoration: none;
}
+.tag-subscriptions ul.tags li {
+ margin: 2px 5px;
+}
diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less
index ff78a5a4..a55df7fc 100644
--- a/askbot/media/style/style.less
+++ b/askbot/media/style/style.less
@@ -191,7 +191,7 @@ body.user-messages {
top: 0px;
left: 0px;
width: 100%;
- z-index: 100;
+ z-index: 100000;
padding: 0;
text-align: center;
background-color: #f5dd69;
@@ -1793,7 +1793,7 @@ ul#related-tags li {
#editor { /* adjustment for editor preview */
display: block;
font-size: 100%;
- min-height: 200px;
+ min-height: 210px;
line-height: 18px;
margin: 0;
border: 0;
@@ -1809,7 +1809,7 @@ ul#related-tags li {
.wmd-preview {
color: #525252;
- margin: 0;
+ margin: 0 0 12px 0;
padding: 5px;
background-color: #F5F5F5;
min-height: 20px;
@@ -1873,9 +1873,10 @@ ul#related-tags li {
}
.preview-toggle {
- width: 100%;
color: #b6a475; /*letter-spacing:1px;*/
+ line-height: 28px;
text-align: left;
+ width: 100%;
}
.preview-toggle span:hover {
@@ -4089,7 +4090,7 @@ textarea.tipped-input {
.editor-status {
float: right;
- margin: 7px 350px 0 0;
+ margin: 8px 350px 0 0;
font-weight: bold;
span {
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index b784d0c5..32e30add 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -1842,7 +1842,7 @@ def user_create_post_reject_reason(
author = self,
revised_at = timestamp,
text = details,
- comment = const.POST_STATUS['default_version']
+ comment = unicode(const.POST_STATUS['default_version'])
)
reason.details = details
diff --git a/askbot/models/post.py b/askbot/models/post.py
index 2d9e7a88..66004ce4 100644
--- a/askbot/models/post.py
+++ b/askbot/models/post.py
@@ -1809,7 +1809,7 @@ class Post(models.Model):
rev_no = self.revisions.all().count() + 1
if comment in (None, ''):
if rev_no == 1:
- comment = const.POST_STATUS['default_version']
+ comment = unicode(const.POST_STATUS['default_version'])
else:
comment = 'No.%s Revision' % rev_no
return PostRevision.objects.create(
@@ -1837,7 +1837,7 @@ class Post(models.Model):
rev_no = self.revisions.all().count() + 1
if comment in (None, ''):
if rev_no == 1:
- comment = const.POST_STATUS['default_version']
+ comment = unicode(const.POST_STATUS['default_version'])
else:
comment = 'No.%s Revision' % rev_no
@@ -1951,7 +1951,7 @@ class Post(models.Model):
else:
attr = None
if attr is not None:
- return u'%s %s' % (self.thread.title, attr)
+ return u'%s %s' % (self.thread.title, unicode(attr))
else:
return self.thread.title
raise NotImplementedError
diff --git a/askbot/models/question.py b/askbot/models/question.py
index d43ebf4c..2d282fbc 100644
--- a/askbot/models/question.py
+++ b/askbot/models/question.py
@@ -166,7 +166,7 @@ class ThreadManager(BaseQuerySetManager):
author=author,
is_anonymous=is_anonymous,
text=text,
- comment=const.POST_STATUS['default_version'],
+ comment=unicode(const.POST_STATUS['default_version']),
revised_at=added_at,
by_email=by_email,
email_address=email_address
@@ -1275,10 +1275,10 @@ class Thread(models.Model):
tag_names.append(tag_name)
self.retag(
- retagged_by = user,
- retagged_at = timestamp,
- tagnames = ' '.join(tag_names),
- silent = silent
+ retagged_by=user,
+ retagged_at=timestamp,
+ tagnames=' '.join(tag_names),
+ silent=silent
)
def retag(self, retagged_by=None, retagged_at=None, tagnames=None, silent=False):
@@ -1308,13 +1308,13 @@ class Thread(models.Model):
# Create a new revision
latest_revision = thread_question.get_latest_revision()
PostRevision.objects.create(
- post = thread_question,
- title = latest_revision.title,
- author = retagged_by,
- revised_at = retagged_at,
- tagnames = tagnames,
- summary = const.POST_STATUS['retagged'],
- text = latest_revision.text
+ post=thread_question,
+ title=latest_revision.title,
+ author=retagged_by,
+ revised_at=retagged_at,
+ tagnames=tagnames,
+ summary=unicode(const.POST_STATUS['retagged']),
+ text=latest_revision.text
)
def has_favorite_by_user(self, user):
diff --git a/askbot/templates/email/base_mail.html b/askbot/templates/email/base_mail.html
index adf6d268..03e4568e 100644
--- a/askbot/templates/email/base_mail.html
+++ b/askbot/templates/email/base_mail.html
@@ -133,7 +133,7 @@
<![endif]-->
</head>
<body>
-<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable">
+<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="width: 100%">
<tr>
<td>
<table border="0" align="center" cellspacing="0" cellpadding="0" style="background-color:#E7E8E8;">
diff --git a/askbot/templates/widgets/edit_post.html b/askbot/templates/widgets/edit_post.html
index 57770570..9e9a3761 100644
--- a/askbot/templates/widgets/edit_post.html
+++ b/askbot/templates/widgets/edit_post.html
@@ -83,6 +83,7 @@
[{% trans %}hide preview{% endtrans %}]
</span>
</div>
+ <div class="clearfix"></div>
<div id="previewer" class="wmd-preview"></div>
{% endif %}