Skip to content

Commit

Permalink
Bug 536373 - breadcrumb dirty indicator id is not unique
Browse files Browse the repository at this point in the history
  • Loading branch information
carmacleod committed Jun 27, 2018
1 parent bd83d90 commit 9329328
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
9 changes: 8 additions & 1 deletion bundles/org.eclipse.orion.client.ui/web/edit/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,13 @@ objects.mixin(TabWidget.prototype, {
if (dirtyIndicator) {
dirtyIndicator.style.display = isDirty ? "block" : "none";
}
var breadcrumb = this.editorTabs[location].breadcrumb;
if (breadcrumb) {
dirtyIndicator = breadcrumb.dirty;
if (dirtyIndicator) {
dirtyIndicator.textContent = isDirty ? "*" : "";
}
}
}
}
});
Expand Down Expand Up @@ -1609,7 +1616,7 @@ objects.mixin(EditorViewer.prototype, {
var loc = this.inputManager.getFileMetadata().Location;
var dirty = this.editor.isDirty();
mGlobalCommands.setDirtyIndicator(dirty);
// Update all dirty indicator for each tab associated with this file.
// Update all dirty indicators for each tab associated with this file.
this.activateContext.editorViewers.forEach(function(editorViewer) {
editorViewer.tabWidget.updateDirtyIndicator(loc, dirty);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ define(['require', 'orion/webui/littlelib'], function (require, lib) {
this._container.appendChild(this.crumbs);

this.dirty = document.createElement("span"); //$NON-NLS-0$
this.dirty.id = "dirty"; //$NON-NLS-0$
this.dirty.className = "modifiedFileMarker"; //$NON-NLS-0$
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,6 @@ define([
}
window.document.title = title;
}

var dirty = lib.node("dirty"); //$NON-NLS-0$f
if (dirty) {
if (isDirty) {
dirty.textContent = "*";
} else {
dirty.textContent = "";
}
}
}

/**
Expand Down

0 comments on commit 9329328

Please sign in to comment.