From 17652dd1f7936c4bc440855c6ec69d4766a2cd12 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 13 Feb 2014 15:42:59 +0530 Subject: [PATCH] title, header, sidebar and breadcrumbs are default blocks, show nprogress bar when loading via pushstate and ajax --- webnotes/public/js/wn/website/editable.js | 9 +++++++-- webnotes/templates/base.html | 2 +- webnotes/templates/generators/blog_post.html | 4 ---- webnotes/templates/generators/web_page.html | 12 ++---------- .../templates/generators/website_group.html | 11 ++--------- webnotes/templates/includes/breadcrumbs.html | 4 ++-- webnotes/templates/pages/blog.html | 4 ---- webnotes/templates/pages/login.html | 6 +++--- webnotes/templates/pages/login.py | 2 +- webnotes/templates/pages/website_script.js | 17 ++++++++--------- webnotes/templates/pages/website_script.py | 11 +++++++---- webnotes/templates/pages/writers.html | 4 ---- webnotes/templates/website_group/forum.html | 2 +- webnotes/website/css/website.css | 2 +- webnotes/website/js/website.js | 6 +++++- webnotes/website/js/website_group.js | 13 +++++++++++-- webnotes/webutils.py | 15 +++++++++++++++ 17 files changed, 66 insertions(+), 58 deletions(-) diff --git a/webnotes/public/js/wn/website/editable.js b/webnotes/public/js/wn/website/editable.js index 93c37cd6cb..d3d8ab1e56 100644 --- a/webnotes/public/js/wn/website/editable.js +++ b/webnotes/public/js/wn/website/editable.js @@ -1,5 +1,5 @@ wn.make_editable = function(editor, doctype, name, fieldname) { - wn.require("assets/js/editor.min.js"); + wn.require("/assets/js/editor.min.js"); WebPageEditor = bsEditor.extend({ onhide: function(action) { @@ -15,7 +15,12 @@ wn.make_editable = function(editor, doctype, name, fieldname) { this._super(bool); if(!bool) { - var $edit_btn = $(repl('
  • Edit %(doctype)s
  • \ + // remove existing web page editor toggles + $('li.editable-toggle + li').remove(); + $('li.editable-toggle').remove(); + + var $edit_btn = $(repl('
  • \ + Edit %(doctype)s
  • \
  • ', {doctype: doctype})) .prependTo($("#website-post-login ul.dropdown-menu")); diff --git a/webnotes/templates/base.html b/webnotes/templates/base.html index 16d79ce870..6f616d2cf5 100644 --- a/webnotes/templates/base.html +++ b/webnotes/templates/base.html @@ -49,7 +49,7 @@