Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <head> | 1 <head> |
| 2 <link rel="import" href="observatory_element.html"> | 2 <link rel="import" href="observatory_element.html"> |
| 3 <link rel="import" href="service_ref.html"> | 3 <link rel="import" href="service_ref.html"> |
| 4 </head> | 4 </head> |
| 5 <polymer-element name="instance-ref" extends="service-ref"> | 5 <polymer-element name="instance-ref" extends="service-ref"> |
| 6 <template> | 6 <template> |
| 7 <div> | 7 <style> |
| 8 <template if="{{ (ref['type'] == 'null') }}"> | 8 .memberList { |
| 9 unexpected null | 9 margin-left: 3em; |
| 10 border-spacing: 0; | |
| 11 border-collapse: collapse; | |
| 12 } | |
| 13 .member { | |
| 14 vertical-align: top; | |
| 15 padding: 0 1em; | |
| 16 } | |
| 17 </style> | |
| 18 <div> | |
| 19 <template if="{{ (ref['type'] == 'null') }}"> | |
| 20 unexpected null | |
| 21 </template> | |
| 22 | |
| 23 <template if="{{ (ref['type'] == '@Null') }}"> | |
| 24 {{ name }} | |
| 25 </template> | |
| 26 | |
| 27 <template if="{{ (ref['type'] == '@String' || | |
| 28 ref['type'] == '@Bool' || | |
| 29 ref['type'] == '@Smi' || | |
| 30 ref['type'] == '@Mint') }}"> | |
| 31 <a href="{{ url }}">{{ name }}</a> | |
| 32 </template> | |
| 33 | |
| 34 <template if="{{ (ref['type'] == '@Instance') }}"> | |
| 35 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> { | |
| 36 <a on-click="{{ toggleExpand }}">...</a> | |
| 37 <template if="{{ expanded }}"> | |
| 38 <table class="memberList"> | |
| 39 <tr template repeat="{{ field in ref['fields'] }}"> | |
| 40 | |
| 41 <td class="member">{{ field['decl']['user_name'] }}</td> | |
| 42 <td class="member"> | |
| 43 <instance-ref app="{{ app }}" ref="{{ field['value'] }}"></insta nce-ref> | |
| 44 </td> | |
| 45 </tr> | |
| 46 </table> | |
| 47 </template> | |
| 48 } | |
| 49 </template> | |
| 50 | |
| 51 <template if="{{ (ref['type'] == '@GrowableObjectArray' || | |
| 52 ref['type'] == '@Array') }}"> | |
|
Cutch
2014/02/13 22:31:29
Add a static method somewhere for these type check
turnidge
2014/02/14 17:36:47
Done-ish. Because we dwell in the land of polymer
| |
| 53 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['le ngth']}})</a> { | |
| 54 <a on-click="{{ toggleExpand }}">...</a> | |
| 55 <template if="{{ expanded }}"> | |
| 56 <table class="memberList"> | |
| 57 <tr template repeat="{{ element in ref['elements'] }}"> | |
| 58 <td class="member">[{{ element['index']}}]</td> | |
| 59 <td class="member"> | |
| 60 <instance-ref app="{{ app }}" ref="{{ element['value'] }}"></ins tance-ref> | |
| 61 </td> | |
| 62 </tr> | |
| 63 </table> | |
| 64 </template> | |
| 65 } | |
| 66 </template> | |
| 67 | |
| 68 </div> | |
| 10 </template> | 69 </template> |
| 11 <template if="{{ (ref['type'] == '@Null') }}"> | 70 <script type="application/dart" src="instance_ref.dart"></script> |
| 12 {{ name }} | |
| 13 </template> | |
| 14 <template if="{{ (ref['type'] != 'null') && ref['type'] != '@Null' }}"> | |
| 15 <a href="{{ url }}">{{ name }} </a> | |
| 16 </template> | |
| 17 </div> | |
| 18 </template> | |
| 19 <script type="application/dart" src="instance_ref.dart"></script> | |
| 20 </polymer-element> | 71 </polymer-element> |
| OLD | NEW |