Browse Source

[minor] [website] edit html, page-container, max-width=800px

version-14
Anand Doshi 11 years ago
parent
commit
736b6073d6
6 changed files with 16 additions and 17 deletions
  1. +9
    -4
      public/js/wn/ui/editor.js
  2. +1
    -1
      website/css/website.css
  3. +1
    -2
      website/doctype/web_page/web_page.js
  4. +0
    -7
      website/js/website.js
  5. +2
    -2
      website/templates/base.html
  6. +3
    -1
      website/templates/includes/footer.html

+ 9
- 4
public/js/wn/ui/editor.js View File

@@ -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");
});
},


+ 1
- 1
website/css/website.css View File

@@ -1,5 +1,5 @@
.container {
max-width: 728px !important;
max-width: 800px;
}

h1, h2, h3, h4, h5 {


+ 1
- 2
website/doctype/web_page/web_page.js View File

@@ -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) {


+ 0
- 7
website/js/website.js View File

@@ -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();
$('<div class="message-overlay"></div>')
.html('<div class="content"><i class="'+icon+' text-muted"></i><br>'
+text+'</div>').appendTo(document.body);
},
provide: function(namespace) {
var nsl = namespace.split('.');
var parent = window;


+ 2
- 2
website/templates/base.html View File

@@ -24,9 +24,9 @@
</head>
<body>
{% block navbar %}{% include "lib/website/templates/includes/navbar.html" %}{% endblock %}
<div class="container">
<div class="container page-container" id="page-{{ name }}">
{% block banner %}{% endblock %}
<div class="content" id="page-{{ name }}" style="display: block;">
<div class="content" style="display: block;">
{% block content %}{% endblock %}
</div>
</div>


+ 3
- 1
website/templates/includes/footer.html View File

@@ -1,4 +1,5 @@
<footer class="container">
<footer>
<div class="container">
<div class="web-footer row">
<div class="col-md-12">
<p style="float: right; clear: both;" id="website-login"><a href="login">Login</a></p>
@@ -43,4 +44,5 @@
</div>
</div>
</div>
</div>
</footer>

Loading…
Cancel
Save