| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> |
| 6 <link rel="import" href="chrome://bookmarks/actions.html"> | 6 <link rel="import" href="chrome://bookmarks/actions.html"> |
| 7 <link rel="import" href="chrome://bookmarks/icons.html"> | 7 <link rel="import" href="chrome://bookmarks/icons.html"> |
| 8 <link rel="import" href="chrome://bookmarks/shared_style.html"> | 8 <link rel="import" href="chrome://bookmarks/shared_style.html"> |
| 9 <link rel="import" href="chrome://bookmarks/store_client.html"> | 9 <link rel="import" href="chrome://bookmarks/store_client.html"> |
| 10 | 10 |
| 11 <dom-module id="bookmarks-folder-node"> | 11 <dom-module id="bookmarks-folder-node"> |
| 12 <template> | 12 <template> |
| 13 <style include="shared-style"> | 13 <style include="shared-style"> |
| 14 :host { | 14 :host { |
| 15 --padding-start-per-depth: 36px; | 15 --padding-start-per-depth: 36px; |
| 16 display: block; | 16 display: block; |
| 17 position: relative; |
| 17 } | 18 } |
| 18 | 19 |
| 19 .v-centered { | 20 .v-centered { |
| 20 align-items: center; | 21 align-items: center; |
| 21 display: flex; | 22 display: flex; |
| 22 flex-direction: row; | 23 flex-direction: row; |
| 23 } | 24 } |
| 24 | 25 |
| 25 .menu-label { | 26 .menu-label { |
| 26 -webkit-margin-start: 16px; | 27 -webkit-margin-start: 16px; |
| 27 color: var(--folder-inactive-color); | 28 color: var(--folder-inactive-color); |
| 28 font-weight: 500; | 29 font-weight: 500; |
| 29 overflow: hidden; | 30 overflow: hidden; |
| 30 text-overflow: ellipsis; | 31 text-overflow: ellipsis; |
| 31 white-space: nowrap; | 32 white-space: nowrap; |
| 32 } | 33 } |
| 33 | 34 |
| 34 #container { | 35 #container { |
| 35 -webkit-padding-start: | 36 -webkit-padding-start: |
| 36 calc(var(--node-depth, 0) * var(--padding-start-per-depth)); | 37 calc(var(--node-depth, 0) * var(--padding-start-per-depth)); |
| 37 cursor: pointer; | 38 cursor: pointer; |
| 38 height: 40px; | 39 height: 40px; |
| 39 } | 40 } |
| 40 | 41 |
| 42 :host(.drag-on) #container { |
| 43 background-color: rgba(66, 133, 244, 0.16); |
| 44 } |
| 45 |
| 41 #folder-label { | 46 #folder-label { |
| 42 -webkit-padding-end: 8px; | 47 -webkit-padding-end: 8px; |
| 43 color: var(--secondary-text-color); | 48 color: var(--secondary-text-color); |
| 44 flex-grow: 1; | 49 flex-grow: 1; |
| 45 overflow: hidden; | 50 overflow: hidden; |
| 46 } | 51 } |
| 47 | 52 |
| 48 :host([is-selected-folder_]) .menu-label, | 53 :host([is-selected-folder_]) .menu-label, |
| 49 :host([is-selected-folder_]) #folder-label { | 54 :host([is-selected-folder_]) #folder-label { |
| 50 color: var(--folder-active-color); | 55 color: var(--folder-active-color); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 72 | 77 |
| 73 #arrow[is-open] { | 78 #arrow[is-open] { |
| 74 transform: initial; | 79 transform: initial; |
| 75 } | 80 } |
| 76 | 81 |
| 77 [no-children] { | 82 [no-children] { |
| 78 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ | 83 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ |
| 79 } | 84 } |
| 80 </style> | 85 </style> |
| 81 | 86 |
| 82 <div id="container" class="v-centered" on-tap="selectFolder_"> | 87 <div id="container" class="v-centered" on-tap="selectFolder_" |
| 88 draggable="[[!isRootFolder_(depth)]]"> |
| 83 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> | 89 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> |
| 84 <paper-icon-button id="arrow" icon="cr:arrow-drop-down" | 90 <paper-icon-button id="arrow" icon="cr:arrow-drop-down" |
| 85 is-open$="[[!isClosed_]]" on-tap="toggleFolder_"> | 91 is-open$="[[!isClosed_]]" on-tap="toggleFolder_"> |
| 86 </paper-icon-button> | 92 </paper-icon-button> |
| 87 </template> | 93 </template> |
| 88 <div id="folder-label" class="v-centered"> | 94 <div id="folder-label" class="v-centered"> |
| 89 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" | 95 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" |
| 90 no-children$="[[!hasChildFolder_(item_.children)]]"> | 96 no-children$="[[!hasChildFolder_(item_.children)]]"> |
| 91 </iron-icon> | 97 </iron-icon> |
| 92 <div class="menu-label">[[item_.title]]</div> | 98 <div class="menu-label">[[item_.title]]</div> |
| 93 </div> | 99 </div> |
| 94 </div> | 100 </div> |
| 95 <div id="descendants" hidden$="[[isClosed_]]"> | 101 <div id="descendants" hidden$="[[isClosed_]]"> |
| 96 <template is="dom-repeat" | 102 <template is="dom-repeat" |
| 97 items="[[item_.children]]" | 103 items="[[item_.children]]" |
| 98 as="child" | 104 as="child" |
| 99 filter="isFolder_"> | 105 filter="isFolder_"> |
| 100 <bookmarks-folder-node item-id="[[child]]" | 106 <bookmarks-folder-node item-id="[[child]]" |
| 101 depth="[[getChildDepth_(depth)]]"> | 107 depth="[[getChildDepth_(depth)]]"> |
| 102 </bookmarks-folder-node> | 108 </bookmarks-folder-node> |
| 103 </template> | 109 </template> |
| 104 </div> | 110 </div> |
| 105 </template> | 111 </template> |
| 106 <script src="chrome://bookmarks/folder_node.js"></script> | 112 <script src="chrome://bookmarks/folder_node.js"></script> |
| 107 </dom-module> | 113 </dom-module> |
| OLD | NEW |