added app frame to todo list
This commit is contained in:
		
							parent
							
								
									95a822c701
								
							
						
					
					
						commit
						c6fce634cf
					
				| @ -59,8 +59,7 @@ class DocType: | ||||
| 			if cstr(d.uom) in check_list: | ||||
| 				msgprint("UOM %s has been entered more than once in Conversion Factor Details." % cstr(d.uom)) | ||||
| 				raise Exception | ||||
| 
 | ||||
| 			if not cstr(d.uom) in check_list: | ||||
| 			else: | ||||
| 				check_list.append(cstr(d.uom)) | ||||
| 
 | ||||
| 			if cstr(d.uom) == cstr(self.doc.stock_uom): | ||||
|  | ||||
| @ -15,7 +15,6 @@ | ||||
| // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| 
 | ||||
| pscript.onload_questions = function(wrapper) { | ||||
| 	console.log(1); | ||||
| 	body = $(wrapper).find('.layout-main-section').get(0); | ||||
| 	 | ||||
| 	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe')); | ||||
|  | ||||
| @ -48,3 +48,8 @@ | ||||
| .todo-content { | ||||
| 	padding-right: 15px; | ||||
| } | ||||
| 
 | ||||
| .layout-main { | ||||
| 	background-color: #FFFDC9; | ||||
| 	min-height: 300px; | ||||
| } | ||||
| @ -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> | ||||
| @ -48,11 +48,6 @@ erpnext.todo.refresh = function() { | ||||
| 			} | ||||
| 		} | ||||
| 	}); | ||||
| 	 | ||||
| 	$('#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 @@ erpnext.todo.save = function(btn) { | ||||
| 	}); | ||||
| } | ||||
| 
 | ||||
| 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(); | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user