| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <link rel="import" href="class_ref.html"> | 2 <link rel="import" href="class_ref.html"> |
| 3 <link rel="import" href="curly_block.html"> |
| 4 <link rel="import" href="eval_box.html"> |
| 3 <link rel="import" href="field_ref.html"> | 5 <link rel="import" href="field_ref.html"> |
| 4 <link rel="import" href="function_ref.html"> | 6 <link rel="import" href="function_ref.html"> |
| 5 <link rel="import" href="instance_ref.html"> | 7 <link rel="import" href="instance_ref.html"> |
| 6 <link rel="import" href="observatory_element.html"> | 8 <link rel="import" href="observatory_element.html"> |
| 7 <link rel="import" href="library_ref.html"> | 9 <link rel="import" href="library_ref.html"> |
| 8 <link rel="import" href="nav_bar.html"> | 10 <link rel="import" href="nav_bar.html"> |
| 9 <link rel="import" href="script_ref.html"> | 11 <link rel="import" href="script_ref.html"> |
| 10 </head> | 12 </head> |
| 11 <polymer-element name="library-view" extends="observatory-element"> | 13 <polymer-element name="library-view" extends="observatory-element"> |
| 12 <template> | 14 <template> |
| 15 <style> |
| 16 .content { |
| 17 padding-left: 10%; |
| 18 font: 400 14px 'Montserrat', sans-serif; |
| 19 } |
| 20 h1 { |
| 21 font: 400 18px 'Montserrat', sans-serif; |
| 22 } |
| 23 .memberHeader, .member { |
| 24 vertical-align: top; |
| 25 padding: 3px 0 3px 1em; |
| 26 font: 400 14px 'Montserrat', sans-serif; |
| 27 } |
| 28 </style> |
| 29 |
| 13 <nav-bar> | 30 <nav-bar> |
| 14 <top-nav-menu></top-nav-menu> | 31 <top-nav-menu></top-nav-menu> |
| 15 <isolate-nav-menu isolate="{{ library.isolate }}"></isolate-nav-menu> | 32 <isolate-nav-menu isolate="{{ library.isolate }}"></isolate-nav-menu> |
| 16 <library-nav-menu library="{{ library }}" last="{{ true }}"></library-nav-
menu> | 33 <library-nav-menu library="{{ library }}" last="{{ true }}"></library-nav-
menu> |
| 17 <nav-refresh callback="{{ refresh }}"></nav-refresh> | 34 <nav-refresh callback="{{ refresh }}"></nav-refresh> |
| 18 </nav-bar> | 35 </nav-bar> |
| 19 | 36 |
| 20 <div class="alert alert-info">Scripts</div> | 37 <div class="content"> |
| 21 <table class="table table-hover"> | 38 <h1> |
| 22 <tbody> | 39 <template if="{{ library.name.isEmpty }}"> |
| 23 <tr template repeat="{{ script in library['scripts']}}"> | 40 unnamed library |
| 24 <td> | 41 </template> |
| 25 {{ script.kind }} | 42 <template if="{{ library.name.isNotEmpty }}"> |
| 26 </td> | 43 library {{ library.name }} |
| 27 <td> | 44 </template> |
| 28 <script-ref ref="{{ script }}"></script-ref> | 45 </h1> |
| 29 </td> | 46 <table> |
| 30 </tr> | 47 <tr> |
| 31 </tbody> | 48 <td class="memberHeader">url</td> |
| 32 </table> | 49 <td class="member">{{ library['url'] }}</td> |
| 33 <div class="alert alert-info">Imported Libraries</div> | 50 </tr> |
| 34 <table class="table table-hover"> | 51 <template if="{{ library['imports'].length > 0 }}"> |
| 35 <tbody> | 52 <tr> |
| 36 <tr template repeat="{{ lib in library['libraries'] }}"> | 53 <td class="memberHeader">imports</td> |
| 37 <td> | 54 <td class="member"> |
| 38 <library-ref ref="{{ lib }}"></library-ref> | 55 <template repeat="{{ import in library['imports'] }}"> |
| 39 </td> | 56 <library-ref ref="{{ import }}"></library-ref> |
| 40 </tr> | 57 </template> |
| 41 </tbody> | 58 </td> |
| 42 </table> | 59 </tr> |
| 43 <div class="alert alert-info">Variables</div> | 60 </template> |
| 44 <table class="table table-hover"> | 61 <template if="{{ library.name != library.vmName }}"> |
| 45 <tbody> | 62 <tr> |
| 46 <tr template repeat="{{ variable in library['variables'] }}"> | 63 <td class="memberHeader">vm name</td> |
| 47 <td><field-ref ref="{{ variable }}"></field-ref></td> | 64 <td class="member">{{ library.vmName }}></td> |
| 48 <td><instance-ref ref="{{ variable['value'] }}"></instance-ref></td> | 65 </tr> |
| 49 </tr> | 66 </template> |
| 50 </tbody> | 67 </table> |
| 51 </table> | 68 </div> |
| 52 <div class="alert alert-info">Functions</div> | |
| 53 <table class="table table-hover"> | |
| 54 <tbody> | |
| 55 <tr template repeat="{{ func in library['functions'] }}"> | |
| 56 <td> | |
| 57 <function-ref ref="{{ func }}"></function-ref> | |
| 58 </td> | |
| 59 </tr> | |
| 60 </tbody> | |
| 61 </table> | |
| 62 <div class="alert alert-info">Classes</div> | |
| 63 <table class="table table-hover"> | |
| 64 <thead> | |
| 65 <tr> | |
| 66 <th>Name</th> | |
| 67 <th>Internal Name</th> | |
| 68 </tr> | |
| 69 </thead> | |
| 70 <tbody> | |
| 71 <tr template repeat="{{ cls in library['classes'] }}"> | |
| 72 <td> | |
| 73 <class-ref ref="{{ cls }}"></class-ref> | |
| 74 </td> | |
| 75 <td> | |
| 76 <class-ref ref="{{ cls }}" internal></class-ref> | |
| 77 </td> | |
| 78 </tr> | |
| 79 </tbody> | |
| 80 </table> | |
| 81 | 69 |
| 70 <hr> |
| 71 |
| 72 <div class="content"> |
| 73 <template if="{{ library['scripts'].isNotEmpty }}"> |
| 74 scripts ({{ library['scripts'].length }}) |
| 75 <curly-block> |
| 76 <table> |
| 77 <tr template repeat="{{ script in library['scripts'] }}"> |
| 78 <td class="member"> |
| 79 <script-ref ref="{{ script }}"></script-ref> |
| 80 </td> |
| 81 </tr> |
| 82 </table> |
| 83 </curly-block><br> |
| 84 </template> |
| 85 |
| 86 <template if="{{ library['classes'].isNotEmpty }}"> |
| 87 classes ({{ library['classes'].length }}) |
| 88 <curly-block> |
| 89 <table> |
| 90 <tr template repeat="{{ cls in library['classes'] }}"> |
| 91 <td class="member"> |
| 92 <class-ref ref="{{ cls }}"></class-ref> |
| 93 </td> |
| 94 </tr> |
| 95 </table> |
| 96 </curly-block><br> |
| 97 </template> |
| 98 |
| 99 <template if="{{ library['variables'].isNotEmpty }}"> |
| 100 variables ({{ library['variables'].length }}) |
| 101 <curly-block> |
| 102 <table> |
| 103 <tr template repeat="{{ field in library['variables'] }}"> |
| 104 <td class="member"> |
| 105 <field-ref ref="{{ field }}"></field-ref> |
| 106 </td> |
| 107 <td class="member"> |
| 108 <template if="{{ field['value'] != null }}"> |
| 109 <instance-ref ref="{{ field['value'] }}"></instance-ref> |
| 110 </template> |
| 111 </td> |
| 112 </tr> |
| 113 </table> |
| 114 </curly-block><br> |
| 115 </template> |
| 116 |
| 117 <template if="{{ library['functions'].isNotEmpty }}"> |
| 118 functions ({{ library['functions'].length }}) |
| 119 <curly-block> |
| 120 <table> |
| 121 <tr template repeat="{{ function in library['functions'] }}"> |
| 122 <td class="member"> |
| 123 <function-ref ref="{{ function }}"> |
| 124 </function-ref> |
| 125 </td> |
| 126 </tr> |
| 127 </table> |
| 128 </curly-block><br> |
| 129 </template> |
| 130 </div> |
| 131 |
| 132 <hr> |
| 133 |
| 134 <div class="content"> |
| 135 <eval-box callback="{{ eval }}"></eval-box> |
| 136 </div> |
| 137 <br><br><br><br> |
| 138 <br><br><br><br> |
| 82 </template> | 139 </template> |
| 83 <script type="application/dart" src="library_view.dart"></script> | 140 <script type="application/dart" src="library_view.dart"></script> |
| 84 </polymer-element> | 141 </polymer-element> |
| OLD | NEW |