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

Side by Side Diff: samples/survey/web/elements/question/question_element.dart

Issue 50413005: Reapply "Remove @deprecated features." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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
« no previous file with comments | « samples/build_dart/build.dart ('k') | sdk/lib/io/file.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 survey.web.question; 5 library survey.web.question;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 8
9 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
10 import 'package:survey/models.dart'; 10 import 'package:survey/models.dart';
(...skipping 27 matching lines...) Expand all
38 MANY_FROM_MANY_OPT]; 38 MANY_FROM_MANY_OPT];
39 @observable int widgetSelectedIndex = 0; 39 @observable int widgetSelectedIndex = 0;
40 @observable List<String> optionInputs = toObservable(['']); 40 @observable List<String> optionInputs = toObservable(['']);
41 41
42 @observable String get widgetSelection => widgetOptions[widgetSelectedIndex]; 42 @observable String get widgetSelection => widgetOptions[widgetSelectedIndex];
43 43
44 @observable bool get usingTextWidget => widgetSelectedIndex == 0; 44 @observable bool get usingTextWidget => widgetSelectedIndex == 0;
45 45
46 QuestionElement() { 46 QuestionElement() {
47 new PathObserver(this, 'widgetSelectedIndex').changes.listen((_) { 47 new PathObserver(this, 'widgetSelectedIndex').changes.listen((_) {
48 notifyProperty(this, #widgetSelection); 48 this.notifyPropertyChange(#widgetSelection, null, null);
49 }); 49 });
50 } 50 }
51 51
52 edit() { 52 edit() {
53 editing = true; 53 editing = true;
54 errorMessage = ''; 54 errorMessage = '';
55 optionInputs.add(''); 55 optionInputs.add('');
56 } 56 }
57 57
58 addEmptyInput(Event e, var detail, Element sender) { 58 addEmptyInput(Event e, var detail, Element sender) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 setSelectionAnswers(Event e, var detail, Element sender) { 113 setSelectionAnswers(Event e, var detail, Element sender) {
114 e.preventDefault(); 114 e.preventDefault();
115 question.answers = detail; 115 question.answers = detail;
116 } 116 }
117 117
118 setTextAnswer(Event e, var detail, var sender) { 118 setTextAnswer(Event e, var detail, var sender) {
119 e.preventDefault(); 119 e.preventDefault();
120 question.answers = [sender.value.trim()]; 120 question.answers = [sender.value.trim()];
121 } 121 }
122 } 122 }
OLDNEW
« no previous file with comments | « samples/build_dart/build.dart ('k') | sdk/lib/io/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698