simple fixes in todo

This commit is contained in:
Anand Doshi 2012-03-21 18:02:17 +05:30
parent 653536596d
commit 29ed95ba22

View File

@ -45,10 +45,10 @@ erpnext.todo.ToDoItem = Class.extend({
'Low':'' 'Low':''
} }
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.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_name)s</a>', todo); %(reference_type)s: %(reference_name)s</a>', todo);
} else if(todo.reference_type) { } else if(todo.reference_type) {
todo.link = repl('<a href="#!List/%(reference_type)s">\ todo.link = repl('<a href="#!List/%(reference_type)s">\
%(reference_type)s</a>', todo); %(reference_type)s</a>', todo);
@ -60,7 +60,7 @@ erpnext.todo.ToDoItem = Class.extend({
<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>\ %(description)s</span>\
<span class="ref_link">&rarr;\ <span class="ref_link">&rarr; &nbsp;\
%(link)s</span>\ %(link)s</span>\
<a href="#" class="close">&times;</a>\ <a href="#" class="close">&times;</a>\
</div>', todo)); </div>', todo));