summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/conf/flatpages.py2
-rw-r--r--askbot/media/js/group_messaging.js13
-rw-r--r--askbot/media/js/live_search.js6
-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/search/postgresql/__init__.py6
-rw-r--r--askbot/templates/email/base_mail.html2
-rw-r--r--askbot/templates/widgets/edit_post.html1
-rw-r--r--askbot/templates/widgets/user_long_score_and_badge_summary.html7
-rw-r--r--askbot/urls.py2
11 files changed, 124 insertions, 39 deletions
diff --git a/askbot/conf/flatpages.py b/askbot/conf/flatpages.py
index 7af6ae8a..60106f6f 100644
--- a/askbot/conf/flatpages.py
+++ b/askbot/conf/flatpages.py
@@ -42,7 +42,7 @@ settings.register(
LongStringValue(
FLATPAGES,
'QUESTION_INSTRUCTIONS',
- description=_('Instrutions on how to ask questions'),
+ description=_('Instructions on how to ask questions'),
help_text=\
_(
'HTML is allowed. Save, then <a href="http://validator.w3.org/">'
diff --git a/askbot/media/js/group_messaging.js b/askbot/media/js/group_messaging.js
index c4d5ee74..30519f1f 100644
--- a/askbot/media/js/group_messaging.js
+++ b/askbot/media/js/group_messaging.js
@@ -610,6 +610,7 @@ SendersList.prototype.decorate = function(element) {
*/
var MessageCenter = function() {
Widget.call(this);
+ this._loadingStatus = false;//true when loading in is process
};
inherits(MessageCenter, Widget);
@@ -649,7 +650,14 @@ MessageCenter.prototype.setThreadsList = function(list) {
this._secondCol.prepend(list.getElement());
};
+MessageCenter.prototype.setLoadingStatus = function(loadingStatus) {
+ this._loadingStatus = loadingStatus;
+};
+
MessageCenter.prototype.hitThreadsList = function(url, senderId, requestMethod) {
+ if (this._loadingStatus === true) {
+ return;
+ };
var threadsList = this._threadsList;
var me = this;
$.ajax({
@@ -666,9 +674,14 @@ MessageCenter.prototype.hitThreadsList = function(url, senderId, requestMethod)
threads.decorate($(data['html']));
me.setThreadsList(threads);
me.setState('show-list');
+ me.setLoadingStatus(false);
+ },
+ error: function() {
+ me.setLoadingStatus(false);
}
}
});
+ this.setLoadingStatus(true);
};
MessageCenter.prototype.deleteOrRestoreThread = function(threadId, senderId) {
diff --git a/askbot/media/js/live_search.js b/askbot/media/js/live_search.js
index 9c47ab31..99ffade4 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());
@@ -753,6 +753,7 @@ FullTextSearch.prototype.makeKeyDownHandler = function() {
var toolTip = this._toolTip;
var xButton = this._xButton;
var dropMenu = this._dropMenu;
+ var formSubmitHandler = this.makeFormSubmitHandler();
return function(e) {//don't like the keyup delay to
var keyCode = getKeyCode(e);
@@ -761,6 +762,9 @@ FullTextSearch.prototype.makeKeyDownHandler = function() {
me.reset();
return false;
}
+ } else if (keyCode === 13) {
+ formSubmitHandler(e);
+ return false;
}
var query = me.getSearchQuery();
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 32e30add..c4f4454c 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -113,7 +113,7 @@ def get_users_by_text_query(search_query, users_query_set = None):
users_query_set = User.objects.all()
if 'postgresql_psycopg2' in askbot.get_database_engine_name():
from askbot.search import postgresql
- return postgresql.run_thread_search(users_query_set, search_query)
+ return postgresql.run_user_search(users_query_set, search_query)
else:
return users_query_set.filter(
models.Q(username__icontains=search_query) |
diff --git a/askbot/search/postgresql/__init__.py b/askbot/search/postgresql/__init__.py
index 3edef65d..e42190a8 100644
--- a/askbot/search/postgresql/__init__.py
+++ b/askbot/search/postgresql/__init__.py
@@ -65,7 +65,9 @@ def run_full_text_search(query_set, query_text, text_search_vector_name):
language_code = get_language()
- if getattr(django_settings, 'ASKBOT_MULTILINGUAL', True):
+ #the table name is a hack, because user does not have the language code
+ is_multilingual = getattr(django_settings, 'ASKBOT_MULTILINGUAL', True)
+ if is_multilingual and table_name == 'askbot_thread':
where_clause += " AND " + table_name + \
'.' + "language_code='" + language_code + "'"
@@ -85,6 +87,8 @@ def run_thread_search(query_set, query):
"""runs search for full thread content"""
return run_full_text_search(query_set, query, 'text_search_vector');
+run_user_search = run_thread_search #an alias
+
def run_title_search(query_set, query):
"""runs search for title and tags"""
return run_full_text_search(query_set, query, 'title_search_vector')
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 %}
diff --git a/askbot/templates/widgets/user_long_score_and_badge_summary.html b/askbot/templates/widgets/user_long_score_and_badge_summary.html
index efc59c55..65966376 100644
--- a/askbot/templates/widgets/user_long_score_and_badge_summary.html
+++ b/askbot/templates/widgets/user_long_score_and_badge_summary.html
@@ -1,10 +1,10 @@
+{% set have_badges = user.gold or user.silver or user.bronze %}
{%- if karma_mode != 'hidden' -%}
<a class="user-micro-info"
href="{{user.get_absolute_url()}}?sort=reputation"
->{% trans %}karma:{% endtrans %} {{user.reputation}}</a>
+>{% trans %}karma:{% endtrans %} {{user.reputation}}</a>{% if badges_mode == 'public' and have_badges %},{% endif %}
{%- endif -%}
-{% if badges_mode == 'public' %}
- {%- if user.gold or user.silver or user.bronze %}
+{% if badges_mode == 'public' and have_badges %}
<a class="user-micro-info"
href="{{user.get_absolute_url()}}#badges"
><span title="{{user.get_badge_summary}}">{% trans %}badges:{% endtrans %}
@@ -21,5 +21,4 @@
<span class="badgecount">{{user.bronze}}</span>
{%- endif -%}
</span></a>
- {%- endif -%}
{%- endif -%}
diff --git a/askbot/urls.py b/askbot/urls.py
index 86bb10a0..a82b4694 100644
--- a/askbot/urls.py
+++ b/askbot/urls.py
@@ -38,7 +38,7 @@ urlpatterns = patterns('',
name='sitemap'
),
#no translation for this url!!
- url(r'import-data/$', views.writers.import_data, name='import_data'),
+ url(r'^import-data/$', views.writers.import_data, name='import_data'),
url(r'^%s$' % _('about/'), views.meta.about, name='about'),
url(r'^%s$' % _('faq/'), views.meta.faq, name='faq'),
url(r'^%s$' % _('privacy/'), views.meta.privacy, name='privacy'),