assign to - allow comments

This commit is contained in:
Anand Doshi
2012-03-22 11:01:38 +05:30
parent 29ed95ba22
commit 06fcfdfcde
4 changed files with 10 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
.todoitem .ref_link { .todoitem .ref_link {
float: left; float: left;
margin-left: 14px; margin-left: 10px;
display: inline-block; display: inline-block;
line-height: 18px; line-height: 18px;
} }

View File

@@ -46,6 +46,11 @@ erpnext.todo.ToDoItem = Class.extend({
} }
todo.labelclass = label_map[todo.priority]; todo.labelclass = label_map[todo.priority];
todo.userdate = dateutil.str_to_user(todo.date) || ''; todo.userdate = dateutil.str_to_user(todo.date) || '';
if(todo.assigned_by) {
todo.fullname = repl("[By %(fullname)s] ", {
fullname: wn.boot.user_info[todo.assigned_by].fullname
})
}
if(todo.reference_name && todo.reference_type) { if(todo.reference_name && todo.reference_type) {
todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\ todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
%(reference_type)s: %(reference_name)s</a>', todo); %(reference_type)s: %(reference_name)s</a>', todo);
@@ -59,7 +64,7 @@ erpnext.todo.ToDoItem = Class.extend({
<span class="description">\ <span class="description">\
<span class="label %(labelclass)s">%(priority)s</span>\ <span class="label %(labelclass)s">%(priority)s</span>\
<span class="help" style="margin-right: 7px">%(userdate)s</span>\ <span class="help" style="margin-right: 7px">%(userdate)s</span>\
%(description)s</span>\ %(fullname)s%(description)s</span>\
<span class="ref_link">&rarr; &nbsp;\ <span class="ref_link">&rarr; &nbsp;\
%(link)s</span>\ %(link)s</span>\
<a href="#" class="close">&times;</a>\ <a href="#" class="close">&times;</a>\

View File

@@ -2170,7 +2170,7 @@ wn.widgets.form.sidebar.AssignTo=Class.extend({init:function(parent,sidebar,doct
doc.file_list=filename+','+fileid;doc.modified=new_timestamp;var frm=frms[doctype];frm.attachments.dialog.hide();msgprint('File Uploaded Sucessfully.');frm.refresh();} doc.file_list=filename+','+fileid;doc.modified=new_timestamp;var frm=frms[doctype];frm.attachments.dialog.hide();msgprint('File Uploaded Sucessfully.');frm.refresh();}
/* /*
* lib/js/legacy/wn/widgets/form/assign_to.js * lib/js/legacy/wn/widgets/form/assign_to.js
*/ */
wn.widgets.form.sidebar.AssignTo=Class.extend({init:function(parent,sidebar,doctype,docname){var me=this;this.doctype=doctype;this.name=docname;this.wrapper=$a(parent,'div','sidebar-comment-wrapper');this.body=$a(this.wrapper,'div');this.add_btn=$btn($a(this.wrapper,'div','sidebar-comment-message'),'Assign',function(){me.add();}) wn.widgets.form.sidebar.AssignTo=Class.extend({init:function(parent,sidebar,doctype,docname){var me=this;this.doctype=doctype;this.name=docname;this.wrapper=$a(parent,'div','sidebar-comment-wrapper');this.body=$a(this.wrapper,'div');this.add_btn=$btn($a(this.wrapper,'div','sidebar-comment-message'),'Assign',function(){me.add();})
this.refresh();},refresh:function(){var me=this;$c('webnotes.widgets.form.assign_to.get',{doctype:me.doctype,name:me.name},function(r,rt){me.render(r.message)})},render:function(d){var me=this;$(this.body).empty();if(this.dialog){this.dialog.hide();} this.refresh();},refresh:function(){var me=this;$c('webnotes.widgets.form.assign_to.get',{doctype:me.doctype,name:me.name},function(r,rt){me.render(r.message)})},render:function(d){var me=this;$(this.body).empty();if(this.dialog){this.dialog.hide();}
for(var i=0;i<d.length;i++){$(this.body).append(repl('<div>%(owner)s \ for(var i=0;i<d.length;i++){$(this.body).append(repl('<div>%(owner)s \

View File

@@ -1 +1 @@
841 842