summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-01-20 19:40:33 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-01-20 19:40:33 -0300
commit07ca1d31f4831d06f2271b52bcf7f2f852897606 (patch)
tree49458622d50b1198a80fa215abcef8b974c581c7
parentff04bf78d0474744ebde9abd71b416dc05039538 (diff)
downloadaskbot-07ca1d31f4831d06f2271b52bcf7f2f852897606.tar.gz
askbot-07ca1d31f4831d06f2271b52bcf7f2f852897606.tar.bz2
askbot-07ca1d31f4831d06f2271b52bcf7f2f852897606.zip
fixed some bugs in the UI of tags moderation
-rw-r--r--askbot/conf/forum_data_rules.py14
-rw-r--r--askbot/conf/moderation.py14
-rw-r--r--askbot/media/js/tag_moderation.js14
-rw-r--r--askbot/media/style/style.less6
4 files changed, 28 insertions, 20 deletions
diff --git a/askbot/conf/forum_data_rules.py b/askbot/conf/forum_data_rules.py
index bd974334..e8a2b539 100644
--- a/askbot/conf/forum_data_rules.py
+++ b/askbot/conf/forum_data_rules.py
@@ -154,20 +154,6 @@ settings.register(
)
)
-settings.register(
- livesettings.BooleanValue(
- FORUM_DATA_RULES,
- 'ENABLE_TAG_MODERATION',
- default = False,
- description = _('Enable tag moderation'),
- help_text = _(
- 'If enabled, any new tags will not be applied '
- 'to the questions, but emailed to the moderators. '
- 'To use this feature, tags must be optional.'
- )
- )
-)
-
TAG_SOURCE_CHOICES = (
('category-tree', _('category tree')),
('user-input', _('user input')),
diff --git a/askbot/conf/moderation.py b/askbot/conf/moderation.py
index 70cf9119..b537663f 100644
--- a/askbot/conf/moderation.py
+++ b/askbot/conf/moderation.py
@@ -29,3 +29,17 @@ settings.register(
update_callback = empty_cache_callback
)
)
+
+settings.register(
+ BooleanValue(
+ MODERATION,
+ 'ENABLE_TAG_MODERATION',
+ default = False,
+ description = _('Enable tag moderation'),
+ help_text = _(
+ 'If enabled, any new tags will not be applied '
+ 'to the questions, but emailed to the moderators. '
+ 'To use this feature, tags must be optional.'
+ )
+ )
+)
diff --git a/askbot/media/js/tag_moderation.js b/askbot/media/js/tag_moderation.js
index 31e05e37..009e4e32 100644
--- a/askbot/media/js/tag_moderation.js
+++ b/askbot/media/js/tag_moderation.js
@@ -86,9 +86,14 @@ PerThreadTagModerator.prototype.afterActionHandler = function() {
ancestor.hideButtons();
this.dispose();
} else if (childCount == 0) {
- var table = $('.suggested-tags-table');
- table.before($('<p>' + gettext('No suggested tags left') + '</p>'));
- table.remove();
+ //this does not work with the fade-out of table rows...
+ /* var callback = function() {
+ var table = $('.suggested-tags-table');
+ if (table.find('tr.suggested-tag-row').length == 0) {
+ table.before($('<p>' + gettext('No suggested tags left') + '</p>'));
+ table.remove();
+ }
+ }; */
ancestor.dispose();
} else {
this.dispose();
@@ -164,7 +169,7 @@ AllThreadsTagModerator.prototype.afterActionHandler = function() {
};
AllThreadsTagModerator.prototype.dispose = function() {
- this._tag_entry_element.fadeOut('fast', function() {
+ var eventChain = this._tag_entry_element.fadeOut('fast', function() {
$.each(this._children, function(idx, child) {
child.dispose();
});
@@ -200,6 +205,7 @@ AllThreadsTagModerator.prototype.decorate = function(element) {
var tagEntry = $(element);
var tagId = tagEntry.data('tagId');
+ //handles the case where there are >1 threads per tag
var tagMod = new AllThreadsTagModerator();
tagMod.decorate(tagEntry.next());
tagMod.setTagId(tagId);
diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less
index 86b75968..c2e20577 100644
--- a/askbot/media/style/style.less
+++ b/askbot/media/style/style.less
@@ -1452,17 +1452,19 @@ ul#related-tags li {
padding-right: 20px;
}
td.per-thread-controls {
- width: 120px;/* 20px more to compensate for the padding */
+ width: 160px;/* 20px more to compensate for the padding */
height: 30px;
button {
display: none;
}
}
- th.decision-col,
th.tags-col,
th.users-col {
width: 100px;
}
+ th.decision-col {
+ width: 140px;
+ }
tr.per-tag-controls {
height: 30px;
text-align: center;