Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: samples/tracker/web/task_form_element.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/tracker/web/task_element.dart ('k') | samples/tracker/web/tracker_app.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library tracker.web.task_form_element; 5 library tracker.web.task_form_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'package:tracker/models.dart'; 8 import 'package:tracker/models.dart';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:math'; 10 import 'dart:math';
11 11
12 @CustomTag('task-form-element') 12 @CustomTag('task-form-element')
13 class TaskFormElement extends PolymerElement with ObservableMixin { 13 class TaskFormElement extends PolymerElement with Observable {
14 bool get applyAuthorStyles => true; 14 bool get applyAuthorStyles => true;
15 @observable Task task; 15 @observable Task task;
16 @observable String titleErrorMessage = ''; 16 @observable String titleErrorMessage = '';
17 @observable int maxTitleLength = Task.MAX_TITLE_LENGTH; 17 @observable int maxTitleLength = Task.MAX_TITLE_LENGTH;
18 @observable String descriptionErrorMessage = ''; 18 @observable String descriptionErrorMessage = '';
19 @observable int maxDescriptionLength = Task.MAX_DESCRIPTION_LENGTH; 19 @observable int maxDescriptionLength = Task.MAX_DESCRIPTION_LENGTH;
20 @observable final List<String> taskStatusOptions = toObservable([ 20 @observable final List<String> taskStatusOptions = toObservable([
21 Task.CURRENT, Task.PENDING, Task.COMPLETED]); 21 Task.CURRENT, Task.PENDING, Task.COMPLETED]);
22 @observable int statusSelectedIndex = 1; 22 @observable int statusSelectedIndex = 1;
23 @observable String previousStatus = ''; 23 @observable String previousStatus = '';
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 appModel.tasks.add(task); 104 appModel.tasks.add(task);
105 } 105 }
106 } 106 }
107 107
108 deleteTask() { 108 deleteTask() {
109 if (window.confirm('Are you sure you want to delete this?')) { 109 if (window.confirm('Are you sure you want to delete this?')) {
110 appModel.tasks.remove(task); 110 appModel.tasks.remove(task);
111 } 111 }
112 } 112 }
113 } 113 }
OLDNEW
« no previous file with comments | « samples/tracker/web/task_element.dart ('k') | samples/tracker/web/tracker_app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698