| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripp
le.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripp
le.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> |
| 5 | 5 |
| 6 <dom-module id="viewer-bookmark" attributes="bookmark"> | 6 <dom-module id="viewer-bookmark" attributes="bookmark"> |
| 7 <template> | 7 <template> |
| 8 <style> | 8 <style> |
| 9 #item { | 9 #item { |
| 10 @apply(--layout-center); | 10 @apply(--layout-center); |
| 11 @apply(--layout-horizontal); | 11 @apply(--layout-horizontal); |
| 12 cursor: pointer; | 12 cursor: pointer; |
| 13 height: 30px; | 13 height: 30px; |
| 14 position: relative; | 14 position: relative; |
| 15 } | 15 } |
| 16 | 16 |
| 17 #item:hover { | 17 #item:hover { |
| 18 background-color: rgb(237, 237, 237); | 18 background-color: rgb(237, 237, 237); |
| 19 } | 19 } |
| 20 | 20 |
| 21 paper-ripple { | 21 paper-ripple { |
| 22 /* Allowing the ripple to capture pointer events prevents a focus | 22 /* Allowing the ripple to capture pointer events prevents a focus |
| 23 * rectangle for showing up for clicks, while still allowing it with | 23 * rectangle for showing up for clicks, while still allowing it with |
| 24 * tab-navigation. This undoes a paper-ripple bugfix aimed at | 24 * tab-navigation. This undoes a paper-ripple bug fix aimed at |
| 25 * non-Chrome browsers. TODO(tsergeant): Improve focus in | 25 * non-Chrome browsers. TODO(tsergeant): Improve focus in |
| 26 * viewer-bookmark so this can be removed (https://crbug.com/5448190). | 26 * viewer-bookmark so this can be removed (https://crbug.com/5448190). |
| 27 */ | 27 */ |
| 28 pointer-events: auto; | 28 pointer-events: auto; |
| 29 } | 29 } |
| 30 | 30 |
| 31 #title { | 31 #title { |
| 32 overflow: hidden; | 32 overflow: hidden; |
| 33 text-overflow: ellipsis; | 33 text-overflow: ellipsis; |
| 34 white-space: nowrap; | 34 white-space: nowrap; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 55 </style> | 55 </style> |
| 56 <div id="item" on-click="onClick"> | 56 <div id="item" on-click="onClick"> |
| 57 <paper-ripple></paper-ripple> | 57 <paper-ripple></paper-ripple> |
| 58 <paper-icon-button id="expand" icon="cr:chevron-right" | 58 <paper-icon-button id="expand" icon="cr:chevron-right" |
| 59 on-click="toggleChildren"> | 59 on-click="toggleChildren"> |
| 60 </paper-icon-button> | 60 </paper-icon-button> |
| 61 <span id="title" tabindex="0">{{bookmark.title}}</span> | 61 <span id="title" tabindex="0">{{bookmark.title}}</span> |
| 62 </div> | 62 </div> |
| 63 <!-- dom-if will stamp the complex bookmark tree lazily as individual nodes | 63 <!-- dom-if will stamp the complex bookmark tree lazily as individual nodes |
| 64 are opened. --> | 64 are opened. --> |
| 65 <template is="dom-if" if="{{childrenShown}}" id="sub-bookmarks"> | 65 <template is="dom-if" if="[[childrenShown]]" id="sub-bookmarks"> |
| 66 <template is="dom-repeat" items="{{bookmark.children}}"> | 66 <template is="dom-repeat" items="[[bookmark.children]]"> |
| 67 <viewer-bookmark bookmark="{{item}}" depth="{{childDepth}}"> | 67 <viewer-bookmark bookmark="{{item}}" depth="{{childDepth}}"> |
| 68 </viewer-bookmark> | 68 </viewer-bookmark> |
| 69 </template> | 69 </template> |
| 70 </template> | 70 </template> |
| 71 </template> | 71 </template> |
| 72 <script src="viewer-bookmark.js"></script> | 72 <script src="viewer-bookmark.js"></script> |
| 73 </dom-module> | 73 </dom-module> |
| OLD | NEW |