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

Side by Side Diff: components/sync_driver/resources/sync_node_browser.js

Issue 2206453004: [Sync] chrome://sync-internals uses deprecated CSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Sync] chrome://sync-internals uses deprecated CSS Created 4 years, 4 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // require: cr.js 5 // require: cr.js
6 // require: cr/ui.js 6 // require: cr/ui.js
7 // require: cr/ui/tree.js 7 // require: cr/ui/tree.js
8 8
9 (function() { 9 (function() {
10 /** 10 /**
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 cr.ui.decorate(tree, SyncNodeTree); 198 cr.ui.decorate(tree, SyncNodeTree);
199 tree.populate(nodes); 199 tree.populate(nodes);
200 200
201 setLastRefreshTime((new Date()).toLocaleString()); 201 setLastRefreshTime((new Date()).toLocaleString());
202 $('node-browser-refresh-button').disabled = false; 202 $('node-browser-refresh-button').disabled = false;
203 }); 203 });
204 } 204 }
205 205
206 document.addEventListener('DOMContentLoaded', function(e) { 206 document.addEventListener('DOMContentLoaded', function(e) {
207 $('node-browser-refresh-button').addEventListener('click', refresh); 207 $('node-browser-refresh-button').addEventListener('click', refresh);
208 cr.ui.decorate('#sync-node-splitter', cr.ui.Splitter); 208 var Splitter = cr.ui.Splitter;
209 var customSplitter = cr.ui.define('div');
210
211 customSplitter.prototype = {
212 __proto__: Splitter.prototype,
213
214 handleSplitterDragEnd: function(e) {
215 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments);
216 var treeElement = $("sync-node-tree-container");
217 var newWidth = parseFloat(treeElement.style.width);
218 treeElement.style.minWidth = Math.max(newWidth, 50) + "px";
219 }
220 };
221
222 customSplitter.decorate($("sync-node-splitter"));
209 223
210 // Automatically trigger a refresh the first time this tab is selected. 224 // Automatically trigger a refresh the first time this tab is selected.
211 $('sync-browser-tab').addEventListener('selectedChange', function f(e) { 225 $('sync-browser-tab').addEventListener('selectedChange', function f(e) {
212 if (this.selected) { 226 if (this.selected) {
213 $('sync-browser-tab').removeEventListener('selectedChange', f); 227 $('sync-browser-tab').removeEventListener('selectedChange', f);
214 refresh(); 228 refresh();
215 } 229 }
216 }); 230 });
217 }); 231 });
218 232
219 })(); 233 })();
OLDNEW
« no previous file with comments | « components/sync_driver/resources/sync_node_browser.css ('k') | components/sync_driver/resources/sync_search.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698