From 4fe8b0a68b9fde633db475a2e12463ce928e59f2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 14 Feb 2013 20:42:32 +0530 Subject: [PATCH] added leave applications and block lists to calendar --- core/doctype/event/event.txt | 12 +++++++++--- public/js/legacy/widgets/form/form.js | 2 +- public/js/wn/request.js | 2 +- public/js/wn/views/formview.js | 2 +- public/js/wn/views/pageview.js | 2 +- webnotes/db.py | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/core/doctype/event/event.txt b/core/doctype/event/event.txt index 6e48390273..f46513337c 100644 --- a/core/doctype/event/event.txt +++ b/core/doctype/event/event.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-02-14 14:53:12", + "creation": "2013-02-14 18:10:53", "docstatus": 0, - "modified": "2013-02-14 15:21:26", + "modified": "2013-02-14 19:20:21", "modified_by": "Administrator", "owner": "Administrator" }, @@ -83,7 +83,13 @@ "fieldname": "ends_on", "fieldtype": "Datetime", "label": "Ends on", - "reqd": 1 + "reqd": 0 + }, + { + "doctype": "DocField", + "fieldname": "all_day", + "fieldtype": "Check", + "label": "All Day" }, { "doctype": "DocField", diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js index e47d06044a..661f0fdf19 100644 --- a/public/js/legacy/widgets/form/form.js +++ b/public/js/legacy/widgets/form/form.js @@ -462,7 +462,7 @@ _f.Frm.prototype.check_doc_perm = function() { this.perm = wn.perm.get_perm(dt, dn); if(!this.perm[0][READ]) { - wn.container.change_to('403'); + wn.set_route("403"); return 0; } return 1 diff --git a/public/js/wn/request.js b/public/js/wn/request.js index 2907ab3d90..e59305396f 100644 --- a/public/js/wn/request.js +++ b/public/js/wn/request.js @@ -169,7 +169,7 @@ wn.request.cleanup = function(opts, r) { }; if(r['403']) { - wn.container.change_to('403'); + wn.set_route('403'); } if(r.docs) { diff --git a/public/js/wn/views/formview.js b/public/js/wn/views/formview.js index 079b7d27c3..5e2f297917 100644 --- a/public/js/wn/views/formview.js +++ b/public/js/wn/views/formview.js @@ -24,7 +24,7 @@ wn.views.formview = { wn.views.formview.show(dt, new_name); return; } else { - wn.container.change_to('404'); + wn.set_route('404'); } return; } diff --git a/public/js/wn/views/pageview.js b/public/js/wn/views/pageview.js index ccf5afe881..3e2fb3bc4f 100644 --- a/public/js/wn/views/pageview.js +++ b/public/js/wn/views/pageview.js @@ -29,7 +29,7 @@ wn.views.pageview = { wn.views.pageview.with_page(name, function(r) { if(r && r.exc) { if(!r['403']) - wn.container.change_to('404'); + wn.set_route('404'); } else if(!wn.pages[name]) { new wn.views.Page(name); } diff --git a/webnotes/db.py b/webnotes/db.py index 5bfc9f0f1b..e17a544570 100644 --- a/webnotes/db.py +++ b/webnotes/db.py @@ -137,7 +137,7 @@ class Database: self.sql(query) def check_transaction_status(self, query): - if query and query.strip().split()[0].lower() in ['start', 'alter', 'drop', 'create', "begin"]: + if self.transaction_writes and query and query.strip().split()[0].lower() in ['start', 'alter', 'drop', 'create', "begin"]: raise Exception, 'This statement can cause implicit commit' if query and query.strip().lower()=='commit':