Commit c1898dcb authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Remove DOM attr/class when FilesNg is disabled

Bug: 1035691,992819,992821,992818
Change-Id: Ie560caf9f760e0baae734f7d9bcccdb9b73382df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087244
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747123}
parent 0e16a89b
...@@ -765,6 +765,8 @@ class FileManager extends cr.EventTarget { ...@@ -765,6 +765,8 @@ class FileManager extends cr.EventTarget {
metrics.startInterval('Load.InitUI'); metrics.startInterval('Load.InitUI');
if (util.isFilesNg()) { if (util.isFilesNg()) {
this.dialogDom_.classList.add('files-ng'); this.dialogDom_.classList.add('files-ng');
} else {
this.dialogDom_.classList.remove('files-ng');
} }
this.initEssentialUI_(); this.initEssentialUI_();
this.initAdditionalUI_(); this.initAdditionalUI_();
...@@ -895,6 +897,8 @@ class FileManager extends cr.EventTarget { ...@@ -895,6 +897,8 @@ class FileManager extends cr.EventTarget {
// Move the dialog header to the side of the splitter above the list view. // Move the dialog header to the side of the splitter above the list view.
const dialogMain = queryRequiredElement('.dialog-main'); const dialogMain = queryRequiredElement('.dialog-main');
dialogMain.insertBefore(dialogHeader, dialogMain.firstChild); dialogMain.insertBefore(dialogHeader, dialogMain.firstChild);
} else {
dialogHeader.classList.remove('files-ng');
} }
// Create the root view of FileManager. // Create the root view of FileManager.
......
...@@ -2459,6 +2459,8 @@ DirectoryTree.decorate = ...@@ -2459,6 +2459,8 @@ DirectoryTree.decorate =
directorytree.styleRowElementDepth = directorytree.styleRowElementDepth =
directorytree.styleRowElementDepthFilesNG; directorytree.styleRowElementDepthFilesNG;
el.setAttribute('files-ng', ''); el.setAttribute('files-ng', '');
} else {
el.removeAttribute('files-ng');
} }
Object.freeze(directorytree); Object.freeze(directorytree);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment