Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: chrome/browser/resources/md_bookmarks/folder_node.html

Issue 2857893002: [MD Bookmarks] Allow left/right keys to close/open folders in sidebar. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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-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 {
tsergeant 2017/05/05 01:31:07 This appears to work, but it should probably apply
calamity 2017/05/09 03:45:35 Done.
65 transform: rotate(90deg); 68 transform: rotate(90deg);
66 } 69 }
67 70
68 #arrow[is-open] { 71 #arrow-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 is-open$="[[!isClosed_]]" on-tap="toggleFolder_"
84 on-mousedown="preventDefault_" tabindex="-1"> 87 on-mousedown="preventDefault_" tabindex="-1">
85 <iron-icon icon="cr:arrow-drop-down"></iron-icon> 88 <iron-icon id="arrow-icon" icon="cr:arrow-drop-down"
89 is-open$="[[!isClosed_]]">
90 </iron-icon>
86 </button> 91 </button>
87 </template> 92 </template>
88 <div id="folder-label" class="v-centered"> 93 <div id="folder-label" class="v-centered">
89 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" 94 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]"
90 no-children$="[[!hasChildFolder_(item_.children)]]"> 95 no-children$="[[!hasChildFolder_(item_.children)]]">
91 </iron-icon> 96 </iron-icon>
92 <div class="menu-label">[[item_.title]]</div> 97 <div class="menu-label">[[item_.title]]</div>
93 </div> 98 </div>
94 </div> 99 </div>
95 <div id="descendants" hidden$="[[isClosed_]]"> 100 <div id="descendants" hidden$="[[isClosed_]]">
96 <template is="dom-repeat" 101 <template is="dom-repeat"
97 items="[[item_.children]]" 102 items="[[item_.children]]"
98 as="child" 103 as="child"
99 filter="isFolder_"> 104 filter="isFolder_">
100 <bookmarks-folder-node item-id="[[child]]" 105 <bookmarks-folder-node item-id="[[child]]"
101 depth="[[getChildDepth_(depth)]]"> 106 depth="[[getChildDepth_(depth)]]">
102 </bookmarks-folder-node> 107 </bookmarks-folder-node>
103 </template> 108 </template>
104 </div> 109 </div>
105 </template> 110 </template>
106 <script src="chrome://bookmarks/folder_node.js"></script> 111 <script src="chrome://bookmarks/folder_node.js"></script>
107 </dom-module> 112 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698