Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/home/page/profile_settings/profile_settings.js b/home/page/profile_settings/profile_settings.js
index 96a78e3..478af83 100644
--- a/home/page/profile_settings/profile_settings.js
+++ b/home/page/profile_settings/profile_settings.js
@@ -65,13 +65,15 @@
//
this.make_form = function() {
var div = $a($td(this.tab, 0, 1), 'div');
- this.form = new wn.ui.FieldGroup()
- this.form.make_fields(div, [
- {fieldname:'first_name', fieldtype:'Data',label:'First Name',reqd:1},
- {fieldname:'last_name', fieldtype:'Data',label:'Last Name'},
- {fieldname:'bio', fieldtype:'Text',label:'Bio'},
- {fieldname:'update', fieldtype:'Button',label:'Update'}
- ]);
+ this.form = new wn.ui.FieldGroup({
+ parent: div,
+ fields: [
+ {fieldname:'first_name', fieldtype:'Data',label:'First Name',reqd:1},
+ {fieldname:'last_name', fieldtype:'Data',label:'Last Name'},
+ {fieldname:'bio', fieldtype:'Text',label:'Bio'},
+ {fieldname:'update', fieldtype:'Button',label:'Update'}
+ ]
+ });
this.form.fields_dict.update.input.onclick = function() {
var v = me.form.get_values();
@@ -99,7 +101,6 @@
{fieldname:'change', fieldtype:'Button', label:'Change'}
]
})
- d.make();
d.fields_dict.change.input.onclick = function() {
var v = d.get_values();
if(v) {
diff --git a/public/js/startup.css b/public/js/startup.css
index f61e648..7f5f218 100644
--- a/public/js/startup.css
+++ b/public/js/startup.css
@@ -1,6 +1,5 @@
h1, h2, h3, h4, h5 {
font-family: Arial, Helvetica, sans-serif;
- margin-top: 0.2em;
}
body {
diff --git a/public/js/startup.js b/public/js/startup.js
index fe9507f..1d43f41 100644
--- a/public/js/startup.js
+++ b/public/js/startup.js
@@ -182,6 +182,8 @@
Mousetrap.bind(["command+s", "ctrl+s"], function() {
if(cur_frm)
cur_frm.save();
+ else if(wn.container.page.save_action)
+ wn.container.page.save_action();
return false;
});
}
diff --git a/utilities/page/todo/todo.js b/utilities/page/todo/todo.js
index 607ceb4..2032b31 100644
--- a/utilities/page/todo/todo.js
+++ b/utilities/page/todo/todo.js
@@ -56,7 +56,7 @@
todo.fullname = '';
if(todo.assigned_by) {
var assigned_by = wn.boot.user_info[todo.assigned_by]
- todo.fullname = repl("[By %(fullname)s] ", {
+ todo.fullname = repl("[By %(fullname)s] ".bold(), {
fullname: (assigned_by ? assigned_by.fullname : todo.assigned_by),
});
}
@@ -64,7 +64,7 @@
var parent_list = "#todo-list";
if(todo.owner !== user) {
var owner = wn.boot.user_info[todo.owner];
- todo.fullname = repl("[To %(fullname)s] ", {
+ todo.fullname = repl("[To %(fullname)s] ".bold(), {
fullname: (owner ? owner.fullname : todo.owner),
});
}
@@ -136,7 +136,7 @@
{fieldtype:'Date', fieldname:'date', label:'Event Date', reqd:1},
{fieldtype:'Check', fieldname:'checked', label:'Completed'},
{fieldtype:'Select', fieldname:'priority', label:'Priority', reqd:1, 'options':['Medium','High','Low'].join('\n')},
- {fieldtype:'Button', fieldname:'save', label:'Save'}
+ {fieldtype:'Button', fieldname:'save', label:'Save (Ctrl+S)'}
]
});
@@ -187,7 +187,15 @@
erpnext.todo.make_dialog({
date:get_today(), priority:'Medium', checked:0, description:''});
}, 'icon-plus');
+ wrapper.appframe.add_ripped_paper_effect(wrapper);
// load todos
erpnext.todo.refresh();
+
+ // save on click
+ wrapper.save_action = function() {
+ if(erpnext.todo.dialog && erpnext.todo.dialog.display) {
+ erpnext.todo.dialog.fields_dict.save.input.click();
+ }
+ };
}
\ No newline at end of file