@@ -60,8 +60,11 @@ bsEditor = Class.extend({ | |||||
onhide: function(action) { | onhide: function(action) { | ||||
this.editing = false; | this.editing = false; | ||||
if(action==="Cancel") { | 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 { | } else { | ||||
this.options.onsave && this.options.onsave(this); | this.options.onsave && this.options.onsave(this); | ||||
this.options.change && this.options.change(this.get_value()); | this.options.change && this.options.change(this.get_value()); | ||||
@@ -448,8 +451,10 @@ bsHTMLEditor = Class.extend({ | |||||
var html = me.modal.find("textarea").val(); | var html = me.modal.find("textarea").val(); | ||||
$.each(me.editor.dataurls, function(key, val) { | $.each(me.editor.dataurls, function(key, val) { | ||||
html = html.replace(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"); | me.modal.modal("hide"); | ||||
}); | }); | ||||
}, | }, | ||||
@@ -1,5 +1,5 @@ | |||||
.container { | .container { | ||||
max-width: 728px !important; | |||||
max-width: 800px; | |||||
} | } | ||||
h1, h2, h3, h4, h5 { | h1, h2, h3, h4, h5 { | ||||
@@ -6,8 +6,7 @@ $.extend(cur_frm.cscript, { | |||||
if(!doc.__islocal) { | if(!doc.__islocal) { | ||||
if(doc.insert_code) { | if(doc.insert_code) { | ||||
if(!doc.javascript) { | 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) { | if(doc.insert_style) { | ||||
@@ -3,13 +3,6 @@ | |||||
if(!window.wn) wn = {}; | if(!window.wn) wn = {}; | ||||
$.extend(wn, { | $.extend(wn, { | ||||
show_message: function(text, icon) { | |||||
if(!icon) icon="icon-refresh icon-spin"; | |||||
treemapper.hide_message(); | |||||
$('<div class="message-overlay"></div>') | |||||
.html('<div class="content"><i class="'+icon+' text-muted"></i><br>' | |||||
+text+'</div>').appendTo(document.body); | |||||
}, | |||||
provide: function(namespace) { | provide: function(namespace) { | ||||
var nsl = namespace.split('.'); | var nsl = namespace.split('.'); | ||||
var parent = window; | var parent = window; | ||||
@@ -24,9 +24,9 @@ | |||||
</head> | </head> | ||||
<body> | <body> | ||||
{% block navbar %}{% include "lib/website/templates/includes/navbar.html" %}{% endblock %} | {% block navbar %}{% include "lib/website/templates/includes/navbar.html" %}{% endblock %} | ||||
<div class="container"> | |||||
<div class="container page-container" id="page-{{ name }}"> | |||||
{% block banner %}{% endblock %} | {% block banner %}{% endblock %} | ||||
<div class="content" id="page-{{ name }}" style="display: block;"> | |||||
<div class="content" style="display: block;"> | |||||
{% block content %}{% endblock %} | {% block content %}{% endblock %} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -1,4 +1,5 @@ | |||||
<footer class="container"> | |||||
<footer> | |||||
<div class="container"> | |||||
<div class="web-footer row"> | <div class="web-footer row"> | ||||
<div class="col-md-12"> | <div class="col-md-12"> | ||||
<p style="float: right; clear: both;" id="website-login"><a href="login">Login</a></p> | <p style="float: right; clear: both;" id="website-login"><a href="login">Login</a></p> | ||||
@@ -43,4 +44,5 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | |||||
</footer> | </footer> |