| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <link rel="import" href="curly_block.html"> | 2 <link rel="import" href="curly_block.html"> |
| 3 <link rel="import" href="observatory_element.html"> | 3 <link rel="import" href="observatory_element.html"> |
| 4 <link rel="import" href="service_ref.html"> | 4 <link rel="import" href="service_ref.html"> |
| 5 </head> | 5 </head> |
| 6 <polymer-element name="instance-ref" extends="service-ref"> | 6 <polymer-element name="instance-ref" extends="service-ref"> |
| 7 <template> | 7 <template> |
| 8 <style> | 8 <style> |
| 9 .member { | 9 .memberList { |
| 10 display: table; |
| 11 } |
| 12 .memberItem { |
| 13 display: table-row; |
| 14 } |
| 15 .memberName, .memberValue { |
| 16 display: table-cell; |
| 10 vertical-align: top; | 17 vertical-align: top; |
| 11 padding: 1px 0 1px 1em; | 18 padding: 3px 0 3px 1em; |
| 19 font: 400 14px 'Montserrat', sans-serif; |
| 12 } | 20 } |
| 13 </style> | 21 </style> |
| 14 <div> | 22 <div> |
| 15 <template if="{{ isUnexpected(ref.serviceType) }}"> | 23 <template if="{{ isUnexpected(ref.serviceType) }}"> |
| 16 unexpected reference type <{{ ref.serviceType }}> | 24 unexpected reference type <{{ ref.serviceType }}> |
| 17 </template> | 25 </template> |
| 18 | 26 |
| 19 <template if="{{ isError(ref.serviceType) }}"> | 27 <template if="{{ isError(ref.serviceType) }}"> |
| 20 <pre>{{ ref.message }}</pre> | 28 <pre>{{ ref.message }}</pre> |
| 21 </template> | 29 </template> |
| 22 | 30 |
| 23 <template if="{{ isNull(ref.serviceType) }}"> | 31 <template if="{{ isNull(ref.serviceType) }}"> |
| 24 <div title="{{ hoverText }}">{{ ref['preview'] }}</div> | 32 <div title="{{ hoverText }}">{{ ref['preview'] }}</div> |
| 25 </template> | 33 </template> |
| 26 | 34 |
| 27 <template if="{{ (isString(ref.serviceType) || | 35 <template if="{{ (isString(ref.serviceType) || |
| 28 isBool(ref.serviceType) || | 36 isBool(ref.serviceType) || |
| 29 isInt(ref.serviceType)) }}"> | 37 isInt(ref.serviceType)) }}"> |
| 30 <a href="{{ url }}">{{ ref['preview'] }}</a> | 38 <a href="{{ url }}">{{ ref['preview'] }}</a> |
| 31 </template> | 39 </template> |
| 32 | 40 |
| 33 <template if="{{ isClosure(ref.serviceType) }}"> | 41 <template if="{{ isClosure(ref.serviceType) }}"> |
| 34 <a href="{{ url }}"> | 42 <a href="{{ url }}"> |
| 43 <!-- TODO(turnidge): Switch this to fully-qualified function --> |
| 35 {{ ref['closureFunc']['user_name'] }} | 44 {{ ref['closureFunc']['user_name'] }} |
| 36 </a> | 45 </a> |
| 37 </template> | 46 </template> |
| 38 | 47 |
| 39 <template if="{{ isInstance(ref.serviceType) }}"> | 48 <template if="{{ isInstance(ref.serviceType) }}"> |
| 40 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> | 49 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> |
| 41 <curly-block callback="{{ expander() }}"> | 50 <curly-block callback="{{ expander() }}"> |
| 42 <table> | 51 <div class="memberList"> |
| 43 <tr template repeat="{{ field in ref['fields'] }}"> | 52 <template repeat="{{ field in ref['fields'] }}"> |
| 44 <td class="member">{{ field['decl']['user_name'] }}</td> | 53 <div class="memberItem"> |
| 45 <td class="member"> | 54 <div class="memberName"> |
| 46 <instance-ref ref="{{ field['value'] }}"></instance-ref> | 55 {{ field['decl']['user_name'] }} |
| 47 </td> | 56 </div> |
| 48 </tr> | 57 <div class="memberValue"> |
| 49 </table> | 58 <instance-ref ref="{{ field['value'] }}"></instance-ref> |
| 59 </div> |
| 60 </div> |
| 61 </template> |
| 62 </div> |
| 50 </curly-block> | 63 </curly-block> |
| 51 </template> | 64 </template> |
| 52 | 65 |
| 53 <template if="{{ isList(ref.serviceType) }}"> | 66 <template if="{{ isList(ref.serviceType) }}"> |
| 54 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['le
ngth']}})</a> | 67 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['le
ngth']}})</a> |
| 55 <curly-block callback="{{ expander() }}"> | 68 <curly-block callback="{{ expander() }}"> |
| 56 <table> | 69 <div class="memberList"> |
| 57 <tr template repeat="{{ element in ref['elements'] }}"> | 70 <template repeat="{{ element in ref['elements'] }}"> |
| 58 <td class="member">[{{ element['index']}}]</td> | 71 <div class="memberItem"> |
| 59 <td class="member"> | 72 <div class="memberName">[{{ element['index']}}]</div> |
| 60 <instance-ref ref="{{ element['value'] }}"></instance-ref> | 73 <div class="memberValue"> |
| 61 </td> | 74 <instance-ref ref="{{ element['value'] }}"></instance-ref> |
| 62 </tr> | 75 </div> |
| 63 </table> | 76 </div> |
| 77 </template> |
| 78 </div> |
| 64 </curly-block> | 79 </curly-block> |
| 65 </template> | 80 </template> |
| 66 | 81 |
| 67 </div> | 82 </div> |
| 68 </template> | 83 </template> |
| 69 <script type="application/dart" src="instance_ref.dart"></script> | 84 <script type="application/dart" src="instance_ref.dart"></script> |
| 70 </polymer-element> | 85 </polymer-element> |
| OLD | NEW |