diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js
index dfba099619..041a97578f 100644
--- a/public/js/legacy/widgets/form/form.js
+++ b/public/js/legacy/widgets/form/form.js
@@ -459,15 +459,8 @@ _f.Frm.prototype.refresh_header = function() {
set_title(this.meta.issingle ? this.doctype : this.docname);
}
- // form title
- //this.page_layout.main_head.innerHTML = '
'+this.docname+'
';
-
// show / hide buttons
- if(this.frm_head)this.frm_head.refresh();
-
- // add to recent
- if(wn.ui.toolbar.recent)
- wn.ui.toolbar.recent.add(this.doctype, this.docname, 1);
+ if(this.frm_head)this.frm_head.refresh();
}
_f.Frm.prototype.check_doc_perm = function() {
diff --git a/public/js/legacy/widgets/form/form_header.js b/public/js/legacy/widgets/form/form_header.js
index f56006c214..28179850fa 100644
--- a/public/js/legacy/widgets/form/form_header.js
+++ b/public/js/legacy/widgets/form/form_header.js
@@ -42,7 +42,11 @@ _f.FrmHeader = Class.extend({
this.appframe.add_breadcrumb("icon-file");
},
refresh: function() {
- this.appframe.set_title(this.frm.docname);
+ var title = this.frm.docname;
+ if(title.length > 30) {
+ title = title.substr(0,30) + "...";
+ }
+ this.appframe.set_title(title, this.frm.docname);
this.refresh_labels();
this.refresh_toolbar();
this.refresh_timestamps();
diff --git a/public/js/wn/misc/user.js b/public/js/wn/misc/user.js
index e10380ba65..b68adcf9f6 100644
--- a/public/js/wn/misc/user.js
+++ b/public/js/wn/misc/user.js
@@ -65,16 +65,11 @@ $.extend(wn.user, {
}
},
get_desktop_items: function() {
+ // get user sequence preference
var user_list = wn.user.get_default("_desktop_items");
if(user_list && user_list.length)
var modules_list = user_list;
- else
- try {
- var modules_list = JSON.parse(wn.boot.modules_list);
- } catch(e) {
- // ?
- }
-
+
if(modules_list) {
// add missing modules - they will be hidden anyways by the view
$.each(wn.modules, function(m, data) {
@@ -83,7 +78,20 @@ $.extend(wn.user, {
}
});
} else
+ // all modules
modules_list = keys(wn.modules);
+
+ // filter hidden modules
+ if(wn.boot.modules_list) {
+ var allowed_list = JSON.parse(wn.boot.modules_list);
+ if(modules_list) {
+ var modules_list = $.map(modules_list, function(m) {
+ if(allowed_list.indexOf(m)!=-1) return m; else return null;
+ });
+ } else {
+ var modules_list = allowed_list;
+ }
+ }
return modules_list;
},
is_report_manager: function() {
diff --git a/public/js/wn/ui/appframe.js b/public/js/wn/ui/appframe.js
index ab0dea1133..f2c6ced3ea 100644
--- a/public/js/wn/ui/appframe.js
+++ b/public/js/wn/ui/appframe.js
@@ -25,10 +25,11 @@ wn.ui.AppFrame = Class.extend({
title: function(txt) {
this.set_title(txt);
},
- set_title: function(txt) {
+ set_title: function(txt, full_text) {
if(this.set_document_title)
document.title = txt;
- this.$titlebar.find(".appframe-title").html(txt);
+ this.$titlebar.find(".appframe-title").html(txt)
+ .attr("title", full_text || txt);
},
clear_breadcrumbs: function() {
this.$w.find(".appframe-breadcrumb").empty();
diff --git a/public/js/wn/views/container.js b/public/js/wn/views/container.js
index 5cf8e3765d..fee47a126e 100644
--- a/public/js/wn/views/container.js
+++ b/public/js/wn/views/container.js
@@ -58,20 +58,4 @@ wn.views.Container = Class.extend({
scroll(0,0);
return this.page;
}
-});
-
-wn.views.add_module_btn = function(parent, module) {
- $(parent).append(
- repl('\
- %(module)s Home\
- ', {module: module, module_small: module.toLowerCase()}));
-}
-
-wn.views.add_list_btn = function(parent, doctype) {
- $(parent).append(
- repl('\
- %(doctype)s List\
- ', {doctype: doctype}));
-}
+});
\ No newline at end of file
diff --git a/webnotes/model/utils.py b/webnotes/model/utils.py
index 12c704c7ef..5fe76f19e6 100644
--- a/webnotes/model/utils.py
+++ b/webnotes/model/utils.py
@@ -239,7 +239,7 @@ def check_if_doc_is_linked(dt, dn):
# this condition ensures that it allows deletion when child table field references parent
item = sql("select name, parent, parenttype from `tab%s` where `%s`='%s' and docstatus!=2 and (ifnull(parent, '')='' or `%s`!=`parent`) \
- limit 1" % (link_dt, link_field, dn, link_field), debug=1)
+ limit 1" % (link_dt, link_field, dn, link_field))
except Exception, e:
if e.args[0]==1146: pass