diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-02-26 00:11:24 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-02-26 00:11:24 +0100 |
commit | 98d2d8c1cc1e0d7842210b3b7f98bd73aaa46be2 (patch) | |
tree | 670e87bf99c530a6da97378ca1624fe7823e65ae /static | |
parent | 49ea14b5623bfd5a2fce1465df0be524ec47efc1 (diff) |
Simplify Aloha Editor handling.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/wiki.js | 27 |
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(); }); }); }); - |