summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-28 22:51:37 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-28 22:51:37 -0400
commitd9a8432c63add285df9291ca8142687a787f43bd (patch)
tree2050545e0a81dc0c5465587acfbc075308a708d8
parent85db009cc8f28f98c277c3631f169b5d648a1155 (diff)
downloadaskbot-d9a8432c63add285df9291ca8142687a787f43bd.tar.gz
askbot-d9a8432c63add285df9291ca8142687a787f43bd.tar.bz2
askbot-d9a8432c63add285df9291ca8142687a787f43bd.zip
some post-merge fixes
-rw-r--r--askbot/media/js/post.js16
-rw-r--r--askbot/media/js/wmd/wmd.js19
-rw-r--r--askbot/templates/question.html1
3 files changed, 20 insertions, 16 deletions
diff --git a/askbot/media/js/post.js b/askbot/media/js/post.js
index 666fe70b..f377e474 100644
--- a/askbot/media/js/post.js
+++ b/askbot/media/js/post.js
@@ -1447,6 +1447,9 @@ EditCommentForm.prototype.startEditor = function() {
content_css: mediaUrl('media/style/tinymce/comments-content.css'),
elements: editorId,
plugins: 'autoresize',
+ theme: 'advanced',
+ theme_advanced_toolbar_location: 'top',
+ theme_advanced_toolbar_align: 'left',
theme_advanced_buttons1: 'bold, italic, |, link, |, numlist, bullist',
theme_advanced_buttons2: '',
theme_advanced_path: false,
@@ -1495,11 +1498,15 @@ EditCommentForm.prototype.attachTo = function(comment, mode){
//fix up the comment submit button, depending on the mode
if (this._type == 'add'){
this._submit_btn.html(gettext('add comment'));
- this._minorEditBox.hide();
+ if (this._minorEditBox) {
+ this._minorEditBox.hide();
+ }
}
else {
this._submit_btn.html(gettext('save comment'));
- this._minorEditBox.show();
+ if (this._minorEditBox) {
+ this._minorEditBox.show();
+ }
}
//enable the editor
this.getElement().show();
@@ -1576,9 +1583,10 @@ EditCommentForm.prototype.canCancel = function(){
EditCommentForm.prototype.getCancelHandler = function(){
var form = this;
- return function(){
+ return function(evt){
if (form.canCancel()){
form.detach();
+ evt.preventDefault();
}
return false;
};
@@ -2535,7 +2543,7 @@ TinyMCE.prototype.setHighlight = function() {};
TinyMCE.prototype.putCursorAtEnd = function() {};
TinyMCE.prototype.focus = function() {
- tinymce.execCommand('mceFocus', false, this._id);
+ //tinymce.execCommand('mceFocus', false, this._id);
//@todo: make this general to all editors
var winH = $(window).height();
diff --git a/askbot/media/js/wmd/wmd.js b/askbot/media/js/wmd/wmd.js
index 91d98694..ddbc91ed 100644
--- a/askbot/media/js/wmd/wmd.js
+++ b/askbot/media/js/wmd/wmd.js
@@ -2472,21 +2472,16 @@ Attacklab.wmd_env = {};
Attacklab.account_options = {};
Attacklab.wmd_defaults = {version:1, output:"Markdown", lineLength:40, delayLoad:false};
-if(!Attacklab.wmd)
-{
- Attacklab.wmd = function()
- {
- Attacklab.loadEnv = function()
- {
- var mergeEnv = function(env)
- {
- if(!env)
- {
+//@todo: this needs to be moved out of the wmd.js as we have askbot-specific code here
+if(!Attacklab.wmd && askbot['data']['editorType'] === 'markdown') {
+ Attacklab.wmd = function() {
+ Attacklab.loadEnv = function() {
+ var mergeEnv = function(env) {
+ if(!env) {
return;
}
- for(var key in env)
- {
+ for(var key in env) {
Attacklab.wmd_env[key] = env[key];
}
};
diff --git a/askbot/templates/question.html b/askbot/templates/question.html
index 5fa32206..3ddc0114 100644
--- a/askbot/templates/question.html
+++ b/askbot/templates/question.html
@@ -279,6 +279,7 @@
askbot['settings']['saveCommentOnEnter'] = {{ settings.SAVE_COMMENT_ON_ENTER|as_js_bool }};
askbot['settings']['tagSource'] = '{{ settings.TAG_SOURCE }}';
askbot['settings']['enableSharingGoogle'] = {{ settings.ENABLE_SHARING_GOOGLE|as_js_bool }};
+ askbot['settings']['enableEmailAlerts'] = {{ settings.ENABLE_EMAIL_ALERTS|as_js_bool }};
</script>
{% include "meta/editor_data.html" %}
{% compress js %}