| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <link rel="import" href="error_view.html"> | 2 <link rel="import" href="curly_block.html"> |
| 3 <link rel="import" href="eval_box.html"> |
| 3 <link rel="import" href="field_ref.html"> | 4 <link rel="import" href="field_ref.html"> |
| 4 <link rel="import" href="function_ref.html"> | 5 <link rel="import" href="function_ref.html"> |
| 5 <link rel="import" href="instance_ref.html"> | 6 <link rel="import" href="instance_ref.html"> |
| 6 <link rel="import" href="library_ref.html"> | 7 <link rel="import" href="library_ref.html"> |
| 7 <link rel="import" href="nav_bar.html"> | 8 <link rel="import" href="nav_bar.html"> |
| 8 <link rel="import" href="observatory_element.html"> | 9 <link rel="import" href="observatory_element.html"> |
| 10 <link rel="import" href="script_ref.html"> |
| 9 </head> | 11 </head> |
| 10 <polymer-element name="class-view" extends="observatory-element"> | 12 <polymer-element name="class-view" extends="observatory-element"> |
| 11 <template> | 13 <template> |
| 14 <style> |
| 15 .content { |
| 16 padding-left: 10%; |
| 17 font: 400 14px 'Montserrat', sans-serif; |
| 18 } |
| 19 h1 { |
| 20 font: 400 18px 'Montserrat', sans-serif; |
| 21 } |
| 22 .memberList { |
| 23 display: table; |
| 24 } |
| 25 .memberItem { |
| 26 display: table-row; |
| 27 } |
| 28 .memberName, .memberValue { |
| 29 display: table-cell; |
| 30 vertical-align: top; |
| 31 padding: 3px 0 3px 1em; |
| 32 font: 400 14px 'Montserrat', sans-serif; |
| 33 } |
| 34 </style> |
| 35 |
| 12 <nav-bar> | 36 <nav-bar> |
| 13 <top-nav-menu></top-nav-menu> | 37 <top-nav-menu></top-nav-menu> |
| 14 <isolate-nav-menu isolate="{{ cls.isolate }}"></isolate-nav-menu> | 38 <isolate-nav-menu isolate="{{ cls.isolate }}"></isolate-nav-menu> |
| 15 <library-nav-menu library="{{ cls['library'] }}"></library-nav-menu> | 39 <library-nav-menu library="{{ cls['library'] }}"></library-nav-menu> |
| 16 <class-nav-menu cls="{{ cls }}" last="{{ true }}"></class-nav-menu> | 40 <class-nav-menu cls="{{ cls }}" last="{{ true }}"></class-nav-menu> |
| 17 <nav-refresh callback="{{ refresh }}"></nav-refresh> | 41 <nav-refresh callback="{{ refresh }}"></nav-refresh> |
| 18 </nav-bar> | 42 </nav-bar> |
| 19 | 43 |
| 20 <div class="row"> | 44 <div class="content"> |
| 21 <div class="col-md-8 col-md-offset-2"> | 45 <h1> |
| 22 <div class="panel panel-warning"> | 46 <template if="{{ cls['abstract'] }}"> |
| 23 <div class="panel-heading"> | 47 abstract |
| 24 class <strong>{{ cls.name }}</strong> | 48 </template> |
| 25 <template if="{{ cls['super']['type'] != 'Null' }}"> | 49 <template if="{{ cls['patch'] }}"> |
| 26 extends | 50 patch |
| 27 <class-ref ref="{{ cls['super'] }}"></class-ref> | 51 </template> |
| 28 </template> | 52 class {{ cls.name }} |
| 29 <p></p> | 53 </h1> |
| 30 <library-ref ref="{{ cls['library'] }}"></library-ref> | 54 <div class="memberList"> |
| 55 <div class="memberItem"> |
| 56 <div class="memberName">library</div> |
| 57 <div class="memberValue"> |
| 58 <library-ref ref="{{ cls['library'] }}"></library-ref> |
| 59 </div> |
| 31 </div> | 60 </div> |
| 32 <div class="panel-body"> | 61 <div class="memberItem"> |
| 33 <table class="table table-hover"> | 62 <div class="memberName">script</div> |
| 34 <tbody> | 63 <div class="memberValue"> |
| 35 <tr> | 64 <script-ref ref="{{ cls['script'] }}" line="{{ cls['line'] }}"> |
| 36 <td>Abstract</td><td>{{ cls['abstract'] }}</td> | 65 </script-ref> |
| 37 </tr> | 66 </div> |
| 38 <tr> | |
| 39 <td>Const</td><td>{{ cls['const'] }}</td> | |
| 40 </tr> | |
| 41 <tr> | |
| 42 <td>Finalized</td><td>{{ cls['const'] }}</td> | |
| 43 </tr> | |
| 44 <tr> | |
| 45 <td>Implemented</td><td>{{ cls['implemented'] }}</td> | |
| 46 </tr> | |
| 47 <tr> | |
| 48 <td>Patch</td><td>{{ cls['patch'] }}</td> | |
| 49 </tr> | |
| 50 <tr> | |
| 51 <td>VM Name</td><td>{{ cls['name'] }}</td> | |
| 52 </tr> | |
| 53 </tbody> | |
| 54 </table> | |
| 55 <template if="{{ cls['error'] == null }}"> | |
| 56 <blockquote><strong>Fields</strong></blockquote> | |
| 57 <table class="table table-hover"> | |
| 58 <tbody> | |
| 59 <tr template repeat="{{ field in cls['fields'] }}"> | |
| 60 <td><field-ref ref="{{ field }}"></field-ref></td> | |
| 61 <td><instance-ref ref="{{ field['value'] }}"></instance-ref></
td> | |
| 62 </tr> | |
| 63 </tbody> | |
| 64 </table> | |
| 65 <blockquote><strong>Functions</strong></blockquote> | |
| 66 <table class="table table-hover"> | |
| 67 <thead> | |
| 68 <tr> | |
| 69 <th>User Name</th> | |
| 70 <th>VM Name</th> | |
| 71 </tr> | |
| 72 </thead> | |
| 73 <tbody> | |
| 74 <tr template repeat="{{ function in cls['functions'] }}"> | |
| 75 <td><function-ref ref="{{ function }}"></function-ref></td> | |
| 76 <td><function-ref ref="{{ function }}" internal></function-ref
></td> | |
| 77 </tr> | |
| 78 </tbody> | |
| 79 </table> | |
| 80 </template> | |
| 81 <template if="{{ cls['error'] != null }}"> | |
| 82 <error-view error_obj="{{ cls['error'] }}"></error-view> | |
| 83 </template> | |
| 84 </div> | 67 </div> |
| 68 |
| 69 <div class="memberItem"> </div> |
| 70 |
| 71 <template if="{{ cls['super']['type'] != 'Null' }}"> |
| 72 <div class="memberItem"> |
| 73 <div class="memberName">extends</div> |
| 74 <div class="memberValue"> |
| 75 <class-ref ref="{{ cls['super'] }}"></class-ref> |
| 76 </div> |
| 77 </div> |
| 78 </template> |
| 79 <template if="{{ cls['subclasses'].length > 0 }}"> |
| 80 <div class="memberItem"> |
| 81 <div class="memberName">extended by</div> |
| 82 <div class="memberValue"> |
| 83 <template repeat="{{ subclass in cls['subclasses'] }}"> |
| 84 <class-ref ref="{{ subclass }}"></class-ref> |
| 85 </template> |
| 86 </div> |
| 87 </div> |
| 88 </template> |
| 89 |
| 90 <div class="memberItem"> </div> |
| 91 |
| 92 <template if="{{ cls['interfaces'].length > 0 }}"> |
| 93 <div class="memberItem"> |
| 94 <div class="memberName">implements</div> |
| 95 <div class="memberValue"> |
| 96 <template repeat="{{ interface in cls['interfaces'] }}"> |
| 97 <class-ref ref="{{ interface }}"></class-ref> |
| 98 </template> |
| 99 </div> |
| 100 </div> |
| 101 </template> |
| 102 <template if="{{ cls.name != cls.vmName }}"> |
| 103 <div class="memberItem"> |
| 104 <div class="memberName">vm name</div> |
| 105 <div class="memberValue">{{ cls.vmName }}</div> |
| 106 </div> |
| 107 </template> |
| 85 </div> | 108 </div> |
| 86 </div> | 109 </div> |
| 110 |
| 111 <template if="{{ cls['error'] != null }}"> |
| 112 <!-- TODO(turnidge): Don't use instance-ref for error display here --> |
| 113 <instance-ref ref="{{ cls['error'] }}"></instance-ref> |
| 114 </template> |
| 115 |
| 116 <hr> |
| 117 |
| 118 <div class="content"> |
| 119 <template if="{{ cls['fields'].isNotEmpty }}"> |
| 120 fields ({{ cls['fields'].length }}) |
| 121 <curly-block> |
| 122 <div class="memberList"> |
| 123 <template repeat="{{ field in cls['fields'] }}"> |
| 124 <div class="memberItem"> |
| 125 <div class="memberName"> |
| 126 <field-ref ref="{{ field }}"></field-ref> |
| 127 </div> |
| 128 <div class="memberValue"> |
| 129 <template if="{{ field['value'] != null }}"> |
| 130 <instance-ref ref="{{ field['value'] }}"></instance-ref> |
| 131 </template> |
| 132 </div> |
| 133 </div> |
| 134 </template> |
| 135 </div> |
| 136 </curly-block><br> |
| 137 </template> |
| 138 |
| 139 <template if="{{ cls['functions'].isNotEmpty }}"> |
| 140 functions ({{ cls['functions'].length }}) |
| 141 <curly-block> |
| 142 <div class="memberList"> |
| 143 <template repeat="{{ function in cls['functions'] }}"> |
| 144 <div class="memberItem"> |
| 145 <div class="memberValue"> |
| 146 <function-ref ref="{{ function }}" qualified="{{ false }}"> |
| 147 </function-ref> |
| 148 </div> |
| 149 </div> |
| 150 </template> |
| 151 </div> |
| 152 </curly-block><br> |
| 153 </template> |
| 87 </div> | 154 </div> |
| 155 |
| 156 <hr> |
| 157 |
| 158 <div class="content"> |
| 159 <eval-box callback="{{ eval }}"></eval-box> |
| 160 </div> |
| 161 <br><br><br><br> |
| 162 <br><br><br><br> |
| 88 </template> | 163 </template> |
| 89 <script type="application/dart" src="class_view.dart"></script> | 164 <script type="application/dart" src="class_view.dart"></script> |
| 90 </polymer-element> | 165 </polymer-element> |
| OLD | NEW |