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

Side by Side Diff: dart/site/try/src/ui.dart

Issue 224373003: Detect concurrent edits. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « dart/site/try/src/interaction_manager.dart ('k') | no next file » | 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 trydart.ui; 5 library trydart.ui;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 8
9 import 'dart:async' show 9 import 'dart:async' show
10 Future, 10 Future,
(...skipping 30 matching lines...) Expand all
41 CompilationUnit; 41 CompilationUnit;
42 42
43 import 'compilation.dart' show 43 import 'compilation.dart' show
44 currentSource; 44 currentSource;
45 45
46 // TODO(ahe): Make internal to buildUI once all interactions have been moved to 46 // TODO(ahe): Make internal to buildUI once all interactions have been moved to
47 // the manager. 47 // the manager.
48 InteractionManager interaction; 48 InteractionManager interaction;
49 49
50 DivElement mainEditorPane; 50 DivElement mainEditorPane;
51 DivElement statusDiv;
51 PreElement outputDiv; 52 PreElement outputDiv;
52 DivElement hackDiv; 53 DivElement hackDiv;
53 IFrameElement outputFrame; 54 IFrameElement outputFrame;
54 MutationObserver observer; 55 MutationObserver observer;
55 SpanElement cacheStatusElement; 56 SpanElement cacheStatusElement;
56 Theme currentTheme = Theme.named(theme); 57 Theme currentTheme = Theme.named(theme);
57 58
58 buildButton(message, action) { 59 buildButton(message, action) {
59 if (message is String) { 60 if (message is String) {
60 message = new Text(message); 61 message = new Text(message);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ..style.position = 'relative'; 124 ..style.position = 'relative';
124 125
125 var inputHeader = new DivElement()..appendText('Code'); 126 var inputHeader = new DivElement()..appendText('Code');
126 127
127 inputHeader.style 128 inputHeader.style
128 ..right = '3px' 129 ..right = '3px'
129 ..top = '0px' 130 ..top = '0px'
130 ..position = 'absolute'; 131 ..position = 'absolute';
131 inputWrapper.append(inputHeader); 132 inputWrapper.append(inputHeader);
132 133
134 statusDiv = new DivElement();
135 statusDiv.style
136 ..left = '0px'
137 ..top = '0px'
138 ..position = 'absolute';
139 inputWrapper.append(statusDiv);
140
133 outputFrame = 141 outputFrame =
134 makeOutputFrame( 142 makeOutputFrame(
135 Url.createObjectUrl(new Blob([''], 'application/javascript'))); 143 Url.createObjectUrl(new Blob([''], 'application/javascript')));
136 144
137 outputDiv = new PreElement(); 145 outputDiv = new PreElement();
138 outputDiv.style 146 outputDiv.style
139 ..backgroundColor = currentTheme.background.color 147 ..backgroundColor = currentTheme.background.color
140 ..color = currentTheme.foreground.color 148 ..color = currentTheme.foreground.color
141 ..overflow = 'auto' 149 ..overflow = 'auto'
142 ..padding = '1em' 150 ..padding = '1em'
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 window.localStorage['compilationPaused'] = '$compilationPaused'; 484 window.localStorage['compilationPaused'] = '$compilationPaused';
477 window.localStorage['codeFont'] = '$codeFont'; 485 window.localStorage['codeFont'] = '$codeFont';
478 486
479 dialog.style.height = '0px'; 487 dialog.style.height = '0px';
480 } 488 }
481 form.onSubmit.listen(onSubmit); 489 form.onSubmit.listen(onSubmit);
482 490
483 var doneButton = document.getElementById('settings-done'); 491 var doneButton = document.getElementById('settings-done');
484 doneButton.onClick.listen(onSubmit); 492 doneButton.onClick.listen(onSubmit);
485 } 493 }
OLDNEW
« no previous file with comments | « dart/site/try/src/interaction_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698