added app frame to todo list
diff --git a/erpnext/utilities/page/todo/todo.css b/erpnext/utilities/page/todo/todo.css
index ee9b4f1..7c7dcaf 100644
--- a/erpnext/utilities/page/todo/todo.css
+++ b/erpnext/utilities/page/todo/todo.css
@@ -47,4 +47,9 @@
.todo-content {
padding-right: 15px;
+}
+
+.layout-main {
+ background-color: #FFFDC9;
+ min-height: 300px;
}
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.html b/erpnext/utilities/page/todo/todo.html
index d49fc23..88dcbf3 100644
--- a/erpnext/utilities/page/todo/todo.html
+++ b/erpnext/utilities/page/todo/todo.html
@@ -1,9 +1,6 @@
-<div class="layout-wrapper" style="min-height: 300px; background-color: #FFFDC9">
+<div class="layout-wrapper layout-wrapper-background">
<div class="appframe-area"></div>
- <div>
- <a class="close" onclick="window.history.back();">×</a>
- <h1>To Do</h1>
- <br>
+ <div class="layout-main">
<div>
<div id="todo-list">
<h4>My List</h4><br>
@@ -14,8 +11,6 @@
<div class="todo-content"></div>
</div>
</div>
- <div style="margin-top: 21px; clear: both">
- <button id="add-todo" class="btn btn-small"><i class="icon-plus"></i> Add</button>
- </div>
+ <div style="clear: both"></div>
</div>
</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
index 206becf..786e757 100644
--- a/erpnext/utilities/page/todo/todo.js
+++ b/erpnext/utilities/page/todo/todo.js
@@ -48,11 +48,6 @@
}
}
});
-
- $('#add-todo').click(function() {
- erpnext.todo.make_dialog({
- date:get_today(), priority:'Medium', checked:0, description:''});
- })
}
erpnext.todo.ToDoItem = Class.extend({
@@ -196,7 +191,15 @@
});
}
-wn.pages.todo.onload = function() {
+wn.pages.todo.onload = function(wrapper) {
+ // create app frame
+ wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'To Do');
+ wrapper.appframe.add_button('Refresh', erpnext.todo.refresh, 'icon-refresh');
+ wrapper.appframe.add_button('Add', function() {
+ erpnext.todo.make_dialog({
+ date:get_today(), priority:'Medium', checked:0, description:''});
+ }, 'icon-plus');
+
// load todos
erpnext.todo.refresh();
}
\ No newline at end of file