diff --git a/public/js/wn/ui/editor.js b/public/js/wn/ui/editor.js index 61a2c59c3f..43ddb91dd3 100644 --- a/public/js/wn/ui/editor.js +++ b/public/js/wn/ui/editor.js @@ -60,8 +60,11 @@ bsEditor = Class.extend({ onhide: function(action) { this.editing = false; if(action==="Cancel") { - this.editor.html(this.original_html); - this.options.oncancel && this.options.oncancel(this); + // restore original html? + if(window.confirm("Do you want to undo all your changes?")) { + this.editor.html(this.original_html); + this.options.oncancel && this.options.oncancel(this); + } } else { this.options.onsave && this.options.onsave(this); this.options.change && this.options.change(this.get_value()); @@ -448,8 +451,10 @@ bsHTMLEditor = Class.extend({ var html = me.modal.find("textarea").val(); $.each(me.editor.dataurls, function(key, val) { html = html.replace(key, val); - }) - me.editor.html(html); + }); + var editor = me.editor.data("object") + editor.set_input(html) + editor.options.change && editor.options.change(editor.clean_html()); me.modal.modal("hide"); }); }, diff --git a/website/css/website.css b/website/css/website.css index f33646ae70..243a3a8469 100644 --- a/website/css/website.css +++ b/website/css/website.css @@ -1,5 +1,5 @@ .container { - max-width: 728px !important; + max-width: 800px; } h1, h2, h3, h4, h5 { diff --git a/website/doctype/web_page/web_page.js b/website/doctype/web_page/web_page.js index 139dc33168..4d4318b30a 100644 --- a/website/doctype/web_page/web_page.js +++ b/website/doctype/web_page/web_page.js @@ -6,8 +6,7 @@ $.extend(cur_frm.cscript, { if(!doc.__islocal) { if(doc.insert_code) { if(!doc.javascript) { - cur_frm.set_value("javascript", - 'wn.pages["'+doc.name+'"].onload = function(wrapper) { }'); + cur_frm.set_value("javascript", '$(function() { });'); } } if(doc.insert_style) { diff --git a/website/js/website.js b/website/js/website.js index a38cbc87ac..148d164195 100644 --- a/website/js/website.js +++ b/website/js/website.js @@ -3,13 +3,6 @@ if(!window.wn) wn = {}; $.extend(wn, { - show_message: function(text, icon) { - if(!icon) icon="icon-refresh icon-spin"; - treemapper.hide_message(); - $('
') - .html('

' - +text+'
').appendTo(document.body); - }, provide: function(namespace) { var nsl = namespace.split('.'); var parent = window; diff --git a/website/templates/base.html b/website/templates/base.html index 0e28af2e2b..3f5bae18f7 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -24,9 +24,9 @@ {% block navbar %}{% include "lib/website/templates/includes/navbar.html" %}{% endblock %} -
+
{% block banner %}{% endblock %} -
+
{% block content %}{% endblock %}
diff --git a/website/templates/includes/footer.html b/website/templates/includes/footer.html index 1cbd279bc4..56653a6bd4 100644 --- a/website/templates/includes/footer.html +++ b/website/templates/includes/footer.html @@ -1,4 +1,5 @@ -
\ No newline at end of file