moved to bootstrap 2.1 and some ui fixes in todo and messages
diff --git a/utilities/page/messages/messages.js b/utilities/page/messages/messages.js
index 5ad540f..11559da 100644
--- a/utilities/page/messages/messages.js
+++ b/utilities/page/messages/messages.js
@@ -24,7 +24,7 @@
$('<h3 id="message-title">Everyone</h3>\
<div id="show-everyone" style="display: none;">\
- <a href="#messages" style="font-size: 80%;">\
+ <a href="#messages/'+user+'" style="font-size: 80%;">\
Show messages from everyone</a></div><hr>\
<div id="post-message" style="display: none">\
<textarea style="width: 100%; height: 24px;"></textarea>\
@@ -36,6 +36,9 @@
}
$(wn.pages.messages).bind('show', function() {
+ // remove alerts
+ $('#alert-container .alert').remove();
+
erpnext.messages.show();
setTimeout("erpnext.messages.refresh()", 7000);
})
@@ -78,7 +81,7 @@
});
},
show: function() {
- var contact = this.get_contact();
+ var contact = this.get_contact() || this.contact || user;
$('#message-title').text(contact==user ? "Everyone" :
wn.boot.user_info[contact].fullname)
@@ -108,7 +111,6 @@
}
return name;
}
- return user;
},
make_list: function() {
this.list = new wn.ui.Listing({
diff --git a/utilities/page/todo/todo.css b/utilities/page/todo/todo.css
index 6c1ec36..088f60e 100644
--- a/utilities/page/todo/todo.css
+++ b/utilities/page/todo/todo.css
@@ -1,6 +1,5 @@
.todoitem {
padding-bottom: 3px;
- min-height: 45px;
clear: both;
}
@@ -25,13 +24,10 @@
.todoitem .description {
padding: 3px 0px;
- display: inline-block;
- width: 80%;
}
-#todo-list, #assigned-todo-list {
- float: left;
- width: 50%;
+#todo-list {
+
}
.todo-separator {
@@ -47,4 +43,8 @@
.todo-layout {
background-color: #FFFDC9;
min-height: 300px;
+}
+
+.popup-on-click {
+ margin: 0px 6px;
}
\ No newline at end of file
diff --git a/utilities/page/todo/todo.html b/utilities/page/todo/todo.html
index 37b07a8..e00f8ef 100644
--- a/utilities/page/todo/todo.html
+++ b/utilities/page/todo/todo.html
@@ -3,11 +3,6 @@
<div class="layout-main todo-layout">
<div>
<div id="todo-list">
- <h4>My List</h4><br>
- <div class="todo-content"></div>
- </div>
- <div id="assigned-todo-list">
- <h4>Assigned to others</h4><br>
<div class="todo-content"></div>
</div>
</div>
diff --git a/utilities/page/todo/todo.js b/utilities/page/todo/todo.js
index 0a725a7..607ceb4 100644
--- a/utilities/page/todo/todo.js
+++ b/utilities/page/todo/todo.js
@@ -27,24 +27,17 @@
var nothing_to_do = function() {
$('#todo-list div.todo-content')
- .html('<div class="help-box">Nothing to do :)</div>');
+ .html('<div class="alert">Nothing to do :)</div>');
}
- var nothing_delegated = function() {
- $('#assigned-todo-list div.todo-content')
- .html('<div class="help-box">Nothing assigned to other users. \
- Use "Assign To" in a form to delegate work.</div>');
- }
if(r.message) {
for(var i in r.message) {
new erpnext.todo.ToDoItem(r.message[i]);
}
if (!todo_list.html()) { nothing_to_do(); }
- if (!assigned_todo_list.html()) { nothing_delegated(); }
} else {
nothing_to_do();
- nothing_delegated();
}
}
});
@@ -70,7 +63,6 @@
var parent_list = "#todo-list";
if(todo.owner !== user) {
- parent_list = "#assigned-todo-list";
var owner = wn.boot.user_info[todo.owner];
todo.fullname = repl("[To %(fullname)s] ", {
fullname: (owner ? owner.fullname : todo.owner),
@@ -79,7 +71,7 @@
parent_list += " div.todo-content";
if(todo.reference_name && todo.reference_type) {
- todo.link = repl('<br><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);
} else if(todo.reference_type) {
todo.link = repl('<br><a href="#!List/%(reference_type)s">\
@@ -88,16 +80,14 @@
todo.link = '';
}
if(!todo.description) todo.description = '';
-
- todo.desc = wn.markdown(todo.description);
-
+
$(parent_list).append(repl('\
<div class="todoitem">\
<span class="label %(labelclass)s">%(priority)s</span>\
+ <span class="popup-on-click"><a href="#">[edit]</a></span>\
<span class="description">\
<span class="help" style="margin-right: 7px">%(userdate)s</span>\
- %(fullname)s%(desc)s\
- <span class="popup-on-click"><a href="#"> [edit]</a></span>\
+ %(fullname)s: %(description)s\
<span class="ref_link">%(link)s</span>\
</span>\
<span class="close-span"><a href="#" class="close">×</a></span>\
@@ -142,8 +132,7 @@
title: 'To Do',
fields: [
{fieldtype:'Text', fieldname:'description', label:'Description',
- reqd:1, description:'Use <a href="#markdown-reference">markdown</a> to \
- format content'},
+ reqd:1},
{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')},