| OLD | NEW |
| (Empty) | |
| 1 <head> |
| 2 <link rel="import" href="instance_ref.html"> |
| 3 <link rel="import" href="observatory_element.html"> |
| 4 </head> |
| 5 <polymer-element name="eval-box" extends="observatory-element"> |
| 6 <template> |
| 7 <style> |
| 8 .textbox { |
| 9 width: 80ex; |
| 10 font: 400 16px 'Montserrat', sans-serif; |
| 11 } |
| 12 .bigtextbox { |
| 13 font: 400 16px 'Montserrat', sans-serif; |
| 14 } |
| 15 .button { |
| 16 font: 400 16px 'Montserrat', sans-serif; |
| 17 } |
| 18 .radios { |
| 19 display: inline; |
| 20 } |
| 21 .radios label{ |
| 22 padding-left: 15px; |
| 23 } |
| 24 .historyExpr, .historyValue { |
| 25 vertical-align: text-top; |
| 26 font: 400 14px 'Montserrat', sans-serif; |
| 27 } |
| 28 .historyExpr a { |
| 29 display: block; |
| 30 color: black; |
| 31 text-decoration: none; |
| 32 padding: 6px 6px; |
| 33 cursor: pointer; |
| 34 white-space: pre-line; |
| 35 } |
| 36 .historyExpr a:hover { |
| 37 background-color: #e1f5fe |
| 38 } |
| 39 .historyValue { |
| 40 display: block; |
| 41 padding: 6px 6px; |
| 42 } |
| 43 </style> |
| 44 <form> |
| 45 <template if="{{ lineMode == '1-line' }}"> |
| 46 <input class="textbox" type="text" value="{{ text }}"> |
| 47 </template> |
| 48 <template if="{{ lineMode == 'N-line' }}"> |
| 49 <textarea class="bigtextbox" rows="5" cols="80" |
| 50 value="{{ text }}"></textarea> |
| 51 </template> |
| 52 |
| 53 <input class="button" type="submit" value="Evaluate" on-click="{{ eval }}"
> |
| 54 <div class="radios" on-change="{{ updateLineMode }}"> |
| 55 <label for="1-line">1-line |
| 56 <input type="radio" name="lineMode" value="1-line" checked> |
| 57 </label> |
| 58 <label for="N-line">N-line |
| 59 <input type="radio" name="lineMode" value="N-line"> |
| 60 </label> |
| 61 </div> |
| 62 </form> |
| 63 |
| 64 <br> |
| 65 <template if="{{ results.isNotEmpty }}"> |
| 66 <table> |
| 67 <tr template repeat="{{ result in results }}"> |
| 68 <td class="historyExpr"> |
| 69 <a class="expr" on-click="{{ selectExpr }}" |
| 70 expr="{{ result['expr'] }}">{{ result['expr'] }}</a> |
| 71 </td> |
| 72 <td class="historyValue"> |
| 73 <template if="{{ result['value'] == null }}"> |
| 74 <div style="color:#aaa;cursor:wait;"><pending></div> |
| 75 </template> |
| 76 <template if="{{ result['value'] != null }}"> |
| 77 <instance-ref isolate="{{ isolate }}" |
| 78 ref="{{ result['value'] }}"> |
| 79 </instance-ref> |
| 80 </template> |
| 81 </td> |
| 82 </tr> |
| 83 </table> |
| 84 </template> |
| 85 </template> |
| 86 </polymer-element> |
| 87 |
| 88 <script type="application/dart" src="eval_box.dart"></script> |
| OLD | NEW |