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

Side by Side Diff: samples/tracker/web/elements/task_form_element.html

Issue 66783006: Updated Tracker to deal with Polymer element restrictions Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 for details. All rights reserved. Use of this source code is governed by a 4 for details. All rights reserved. Use of this source code is governed by a
5 BSD-style license that can be found in the LICENSE file. 5 BSD-style license that can be found in the LICENSE file.
6 --> 6 -->
7 <polymer-element name="task-form-element" attributes="task"> 7 <polymer-element name="task-form-element" attributes="task">
8 <template> 8 <template>
9 <style> 9 <style>
10 .field { 10 .field {
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 .delete-task { 25 .delete-task {
26 float:right; 26 float:right;
27 margin-right: 5px; 27 margin-right: 5px;
28 } 28 }
29 </style> 29 </style>
30 30
31 <form on-submit="{{createOrUpdateTask}}"> 31 <form on-submit="{{createOrUpdateTask}}">
32 <!-- Can't delete a form for creating a new task. --> 32 <!-- Can't delete a form for creating a new task. -->
33 <template if="{{task.saved}}"> 33 <template if="{{taskSaved}}">
34 <div on-click="{{deleteTask}}" 34 <div on-click="{{deleteTask}}"
35 class="delete-task glyphicon glyphicon-remove"></div> 35 class="delete-task glyphicon glyphicon-remove"></div>
36 </template> 36 </template>
37 37
38 <div class="field"> 38 <div class="field">
39 <textarea class="form-control" placeholder="Add title here" 39 <textarea class="form-control" placeholder="Add title here"
40 value="{{task.title}}" on-keyup="{{validateTitle}}"></textarea> 40 value="{{task.title}}" on-keyup="{{validateTitle}}"></textarea>
41 <span class="chars-left">{{maxTitleLength - task.title.length}}</span> 41 <span class="chars-left">{{maxTitleLength - taskTitleLength}}</span>
42 42
43 <div class="error" hidden?="{{titleErrorMessage.isEmpty}}"> 43 <div class="error" hidden?="{{titleErrorMessageIsEmpty}}">
44 {{titleErrorMessage}} 44 {{titleErrorMessage}}
45 </div> 45 </div>
46 </div> 46 </div>
47 47
48 <div class="field"> 48 <div class="field">
49 <textarea rows="5" class="form-control" 49 <textarea rows="5" class="form-control"
50 placeholder="Add description here" value="{{task.description}}" 50 placeholder="Add description here" value="{{task.description}}"
51 on-keyup="{{validateDescription}}"></textarea> 51 on-keyup="{{validateDescription}}"></textarea>
52 <span class="chars-left"> 52 <span class="chars-left">
53 {{maxDescriptionLength - task.description.length}} 53 {{maxDescriptionLength - taskDescriptionLength}}
54 </span> 54 </span>
55 55
56 <div class="error" hidden?="{{descriptionErrorMessage.isEmpty}}"> 56 <div class="error" hidden?="{{descriptionErrorMessageIsEmpty}}">
57 {{descriptionErrorMessage}} 57 {{descriptionErrorMessage}}
58 </div> 58 </div>
59 </div> 59 </div>
60 60
61 <div class="field"> 61 <div class="field">
62 <select class="form-control" selectedIndex="{{statusSelectedIndex}}"> 62 <select class="form-control" selectedIndex="{{statusSelectedIndex}}">
63 <option template repeat="{{taskStatusOptions}}">{{}}</option> 63 <option template repeat="{{taskStatusOptions}}">{{}}</option>
64 </select> 64 </select>
65 </div> 65 </div>
66 66
67 <div class="field"> 67 <div class="field">
68 <button type="submit" class="btn btn-default"> 68 <button type="submit" class="btn btn-default">
69 {{submitLabel}} 69 {{submitLabel}}
70 </button>&nbsp; 70 </button>&nbsp;
71 <button type="button" on-click="{{dispatchCancelForm}}" 71 <button type="button" on-click="{{dispatchCancelForm}}"
72 class="btn btn-link">Cancel 72 class="btn btn-link">Cancel
73 </button> 73 </button>
74 </div> 74 </div>
75 </form> 75 </form>
76 </template> 76 </template>
77 <script type="application/dart" src="task_form_element.dart"></script> 77 <script type="application/dart" src="task_form_element.dart"></script>
78 </polymer-element> 78 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698