diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-07-10 12:32:13 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-07-10 12:32:13 -0400 |
commit | 91e111f41d33f065f6e37e78ed6a1e1b3da4190e (patch) | |
tree | fd0348e4541e492c55fc862cf988ca5c0e2f6458 | |
parent | 3fb3a1595418e677f60d5bc0275f9fd097e11788 (diff) | |
download | askbot-91e111f41d33f065f6e37e78ed6a1e1b3da4190e.tar.gz askbot-91e111f41d33f065f6e37e78ed6a1e1b3da4190e.tar.bz2 askbot-91e111f41d33f065f6e37e78ed6a1e1b3da4190e.zip |
fixed tag validation on the "ask" page
-rw-r--r-- | askbot/skins/common/media/js/post.js | 7 | ||||
-rw-r--r-- | askbot/skins/default/media/style/style.less | 8 | ||||
-rw-r--r-- | askbot/skins/default/templates/widgets/tag_editor.html | 6 |
3 files changed, 15 insertions, 6 deletions
diff --git a/askbot/skins/common/media/js/post.js b/askbot/skins/common/media/js/post.js index 5b30b2bc..4639e974 100644 --- a/askbot/skins/common/media/js/post.js +++ b/askbot/skins/common/media/js/post.js @@ -2505,7 +2505,7 @@ TagEditor.prototype.addTag = function(tag_name) { TagEditor.prototype.immediateClearErrorMessage = function() { this._error_alert.html(''); this._error_alert.show(); - this._element.css('margin-top', '18px');//todo: the margin thing is a hack + //this._element.css('margin-top', '18px');//todo: the margin thing is a hack } TagEditor.prototype.clearErrorMessage = function(fade) { @@ -2526,7 +2526,7 @@ TagEditor.prototype.setErrorMessage = function(text) { this._error_alert.hide(); this._error_alert.fadeIn(100); } - this._element.css('margin-top', '0');//todo: remove this hack + //this._element.css('margin-top', '0');//todo: remove this hack }; TagEditor.prototype.getAddTagHandler = function() { @@ -2678,7 +2678,7 @@ TagEditor.prototype.decorate = function(element) { this._element = element; this._hidden_tags_input = element.find('input[name="tags"]');//this one is hidden this._tags_container = element.find('ul.tags'); - this._error_alert = $('.tag-editor-error-alert'); + this._error_alert = $('.tag-editor-error-alert > span'); var me = this; this._tags_container.children().each(function(idx, elem){ @@ -3081,6 +3081,7 @@ CategoryAdder.prototype.createDom = function() { var input = this.makeElement('input'); this._input = input; input.addClass('add-category'); + input.attr('name', 'add_category'); this._element.append(input); //add save category button var save_button = this.makeElement('button'); diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less index 00bb4be5..f6c976fc 100644 --- a/askbot/skins/default/media/style/style.less +++ b/askbot/skins/default/media/style/style.less @@ -3637,11 +3637,15 @@ textarea.tipped-input { height: 13px; } } - input.new-tags-input { - border-style: none; + input.new-tags-input, + input.new-tags-input:focus { + border: none; font-size: 15px; font-color: @info-text; line-height: 16px; margin-top: 9px; + -webkit-box-shadow: none;/* undo bootstrap glow */ + -moz-box-shadow: none; + box-shadow: none; } } diff --git a/askbot/skins/default/templates/widgets/tag_editor.html b/askbot/skins/default/templates/widgets/tag_editor.html index 53a73130..8f3fa8cd 100644 --- a/askbot/skins/default/templates/widgets/tag_editor.html +++ b/askbot/skins/default/templates/widgets/tag_editor.html @@ -1,6 +1,9 @@ {% import "macros.html" as macros %} <p style="margin:-18px 0 0 42px; color: brown; font-size: 13px; font-style: italic" - class="tag-editor-error-alert"></p> + class="tag-editor-error-alert" +> + <span for="id_tags" generated="true" class="form-error" style="float: left;"></span> +</p> <div class="tag-editor" style="margin-top: 18px">{# there's a hack with the margin in js as well #} {{ macros.tag_list_widget( tag_names, @@ -11,6 +14,7 @@ <input class="new-tags-input" type="text" + name="new_tags_input" /> <div class="clearfix"></div> <input |