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-light.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> |
5 <link rel="import" href="chrome://bookmarks/actions.html"> | 5 <link rel="import" href="chrome://bookmarks/actions.html"> |
6 <link rel="import" href="chrome://bookmarks/icons.html"> | 6 <link rel="import" href="chrome://bookmarks/icons.html"> |
7 <link rel="import" href="chrome://bookmarks/shared_style.html"> | 7 <link rel="import" href="chrome://bookmarks/shared_style.html"> |
8 <link rel="import" href="chrome://bookmarks/store_client.html"> | 8 <link rel="import" href="chrome://bookmarks/store_client.html"> |
9 | 9 |
10 <dom-module id="bookmarks-folder-node"> | 10 <dom-module id="bookmarks-folder-node"> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 color: var(--interactive-color); | 50 color: var(--interactive-color); |
51 } | 51 } |
52 | 52 |
53 iron-icon { | 53 iron-icon { |
54 flex-shrink: 0; | 54 flex-shrink: 0; |
55 } | 55 } |
56 | 56 |
57 #arrow { | 57 #arrow { |
58 color: var(--secondary-text-color); | 58 color: var(--secondary-text-color); |
59 margin: 0 8px; | 59 margin: 0 8px; |
| 60 } |
| 61 |
| 62 #arrow iron-icon { |
60 transform: rotate(-90deg); | 63 transform: rotate(-90deg); |
61 transition: transform 150ms; | 64 transition: transform 150ms; |
62 } | 65 } |
63 | 66 |
64 :host-context([dir='rtl']) #arrow { | 67 :host-context([dir='rtl']) #arrow iron-icon { |
65 transform: rotate(90deg); | 68 transform: rotate(90deg); |
66 } | 69 } |
67 | 70 |
68 #arrow[is-open] { | 71 #arrow iron-icon[is-open] { |
69 transform: initial; | 72 transform: initial; |
70 } | 73 } |
71 | 74 |
72 [no-children] { | 75 [no-children] { |
73 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ | 76 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ |
74 } | 77 } |
75 </style> | 78 </style> |
76 | 79 |
77 <div id="container" class="v-centered" on-tap="selectFolder_" | 80 <div id="container" class="v-centered" on-tap="selectFolder_" |
78 draggable="[[!isTopLevelFolder_(depth)]]" | 81 draggable="[[!isTopLevelFolder_(depth)]]" |
79 tabindex$="[[getTabIndex_(isSelectedFolder_)]]" | 82 tabindex$="[[getTabIndex_(isSelectedFolder_)]]" |
80 hidden="[[isRootFolder_(depth)]]"> | 83 hidden="[[isRootFolder_(depth)]]"> |
81 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> | 84 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> |
82 <button is="paper-icon-button-light" id="arrow" | 85 <button is="paper-icon-button-light" id="arrow" |
83 is-open$="[[!isClosed_]]" on-tap="toggleFolder_" | 86 on-tap="toggleFolder_" on-mousedown="preventDefault_" tabindex="-1"> |
84 on-mousedown="preventDefault_" tabindex="-1"> | 87 <iron-icon icon="cr:arrow-drop-down" is-open$="[[!isClosed_]]"> |
85 <iron-icon icon="cr:arrow-drop-down"></iron-icon> | 88 </iron-icon> |
86 </button> | 89 </button> |
87 </template> | 90 </template> |
88 <div id="folder-label" class="v-centered"> | 91 <div id="folder-label" class="v-centered"> |
89 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" | 92 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" |
90 no-children$="[[!hasChildFolder_(item_.children)]]"> | 93 no-children$="[[!hasChildFolder_(item_.children)]]"> |
91 </iron-icon> | 94 </iron-icon> |
92 <div class="menu-label">[[item_.title]]</div> | 95 <div class="menu-label">[[item_.title]]</div> |
93 </div> | 96 </div> |
94 </div> | 97 </div> |
95 <div id="descendants" hidden$="[[isClosed_]]"> | 98 <div id="descendants" hidden$="[[isClosed_]]"> |
96 <template is="dom-repeat" | 99 <template is="dom-repeat" |
97 items="[[item_.children]]" | 100 items="[[item_.children]]" |
98 as="child" | 101 as="child" |
99 filter="isFolder_"> | 102 filter="isFolder_"> |
100 <bookmarks-folder-node item-id="[[child]]" | 103 <bookmarks-folder-node item-id="[[child]]" |
101 depth="[[getChildDepth_(depth)]]"> | 104 depth="[[getChildDepth_(depth)]]"> |
102 </bookmarks-folder-node> | 105 </bookmarks-folder-node> |
103 </template> | 106 </template> |
104 </div> | 107 </div> |
105 </template> | 108 </template> |
106 <script src="chrome://bookmarks/folder_node.js"></script> | 109 <script src="chrome://bookmarks/folder_node.js"></script> |
107 </dom-module> | 110 </dom-module> |
OLD | NEW |