summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/wiki.js27
1 files changed, 2 insertions, 25 deletions
diff --git a/static/js/wiki.js b/static/js/wiki.js
index 5deab10..6baf629 100644
--- a/static/js/wiki.js
+++ b/static/js/wiki.js
@@ -18,26 +18,8 @@ mulk.savePage = function() {
console.log('Error saving content.');
}
});
- $('#wiki-page-content').removeAttr('contenteditable');
};
-/*
-jQuery(function ($) {
- $('#wiki-page-content').on('blur', function() {
- mulk.savePage();
- document.designMode = 'off';
- });
- $('body').on('click', function() {
- mulk.savePage();
- document.designMode = 'off';
- });
- $('#wiki-page-content').on('dblclick', function() {
- document.designMode = 'on';
- });
-});
-*/
-
-
jQuery(function ($) {
if (!window.Aloha) {
window.Aloha = {};
@@ -76,17 +58,12 @@ jQuery(function ($) {
Aloha.ready(function() {
var $$ = Aloha.jQuery;
- var editable;
- $$('#wiki-page-content').aloha();
- editable = Aloha.editables[0];
- editable.disable();
$('#wiki-page-content').on('blur', function() {
mulk.savePage();
- editable.disable();
+ $$('#wiki-page-content').mahalo();
});
$('#wiki-page-content').dblclick(function() {
- editable.enable();
+ $$('#wiki-page-content').aloha();
});
});
});
-