Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/winjs/winjs
Browse files Browse the repository at this point in the history
  • Loading branch information
llongley committed Jul 9, 2016
2 parents d8cbea8 + b80887d commit b4ba343
Show file tree
Hide file tree
Showing 120 changed files with 283 additions and 39 deletions.
17 changes: 0 additions & 17 deletions src/js/WinJS/Controls/AppBar/_Command.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ define([

// Update aria-label
this._element.setAttribute("aria-label", this.label);

// Check if we need to suppress the tooltip
this._testIdenticalTooltip();
}
},

Expand Down Expand Up @@ -387,9 +384,6 @@ define([
if (this._tooltipControl) {
this._tooltipControl.innerHTML = this._tooltip;
}

// Check if we need to suppress the tooltip
this._testIdenticalTooltip();
}
},

Expand Down Expand Up @@ -552,11 +546,6 @@ define([
}
},

// Private
_testIdenticalTooltip: function AppBarCommand_testIdenticalToolTip() {
this._hideIfFullSize = (this._label === this._tooltip);
},

_createContent: function AppBarCommand_createContent() {
// Make sure there's an element
if (!this._element) {
Expand Down Expand Up @@ -631,12 +620,6 @@ define([
// Attach a tooltip - Note: we're going to stomp on it's setControl so we don't have to make another DOM element to hang it off of.
// This private _tooltipControl attribute is used by other pieces, changing the name could break them.
this._tooltipControl = new Tooltip.Tooltip(this._element);
var that = this;
this._tooltipControl.addEventListener("beforeopen", function () {
if (that._hideIfFullSize && !_Overlay._Overlay._getParentControlUsingClassName(that._element.parentElement, _Constants.reducedClass)) {
that._tooltipControl.close();
}
}, false);
},

_setSection: function AppBarCommand_setSection(section) {
Expand Down
2 changes: 2 additions & 0 deletions src/js/WinJS/Controls/AppBar/_Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ define([
"fontincrease",
"fontsize",
"cellphone",
"print",
"share",
"reshare",
"tag",
"repeatone",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,7 @@ export class _CommandingSurface {
type: (originalCommand.type === _Constants.typeContent ? _Constants.typeFlyout : originalCommand.type) || _Constants.typeButton,
disabled: originalCommand.disabled,
flyout: originalCommand.flyout,
tooltip: originalCommand.tooltip,
beforeInvoke: () => {
// Save the command that was selected
this._chosenCommand = <_Command.ICommand>(menuCommand["_originalICommand"]);
Expand Down
3 changes: 3 additions & 0 deletions src/js/WinJS/Controls/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,9 @@ define([

_forceLayoutImpl: function ListView_forceLayoutImpl(viewChange) {
var that = this;
if (!this._versionManager) {
return;
}
this._versionManager.unlocked.then(function () {
that._writeProfilerMark("_forceLayoutImpl viewChange(" + viewChange + "),info");

Expand Down
5 changes: 5 additions & 0 deletions src/js/WinJS/Controls/Menu/_Command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ export declare class MenuCommand {
**/
selected: boolean;

/**
* Gets or sets the tooltip of the command.
**/
tooltip: string;

/**
* Gets the type of the command.
**/
Expand Down
27 changes: 25 additions & 2 deletions src/js/WinJS/Controls/Menu/_Command.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ define([
'../../Utilities/_Control',
'../../Utilities/_ElementUtilities',
'../_LegacyAppBar/_Constants',
'../Flyout/_Overlay'
], function menuCommandInit(exports, _Global, _Base, _ErrorFromName, _Resources, Promise, _Control, _ElementUtilities, _Constants, _Overlay) {
'../Flyout/_Overlay',
'../Tooltip'
], function menuCommandInit(exports, _Global, _Base, _ErrorFromName, _Resources, Promise, _Control, _ElementUtilities, _Constants, _Overlay, Tooltip) {
"use strict";

_Base.Namespace._moduleDefine(exports, "WinJS.UI", {
Expand Down Expand Up @@ -257,6 +258,21 @@ define([
}
},

/// <field type="String" locid="WinJS.UI.AppBarCommand.tooltip" helpKeyword="WinJS.UI.AppBarCommand.tooltip">Gets or sets the tooltip text of the AppBarCommand.</field>
tooltip: {
get: function () {
return this._tooltip;
},
set: function (value) {
this._tooltip = value;

// Update already-constructed tooltips. Separators and content commands won't have these:
if (this._tooltipControl) {
this._tooltipControl.innerHTML = this._tooltip;
}
}
},

/// <field type="Boolean" locid="WinJS.UI.MenuCommand.selected" helpKeyword="WinJS.UI.MenuCommand.selected">
/// Gets or sets the selected state of a toggle button. This property is true if the toggle button is selected; otherwise, it's false.
/// <compatibleWith platform="Windows" minVersion="8.0"/>
Expand Down Expand Up @@ -357,6 +373,10 @@ define([
return;
}
this._disposed = true;

if (this._tooltipControl) {
this._tooltipControl.dispose();
}
},

addEventListener: function (type, listener, useCapture) {
Expand Down Expand Up @@ -431,6 +451,9 @@ define([
this._labelSpan = this._toggleSpan.nextElementSibling;
this._flyoutSpan = this._labelSpan.nextElementSibling;

// Attach a tooltip - Note: we're going to stomp on it's setControl so we don't have to make another DOM element to hang it off of.
// This private _tooltipControl attribute is used by other pieces, changing the name could break them.
this._tooltipControl = new Tooltip.Tooltip(this._element);
},
_sendEvent: function MenuCommand_sendEvent(eventName, detail) {
if (!this._disposed) {
Expand Down
2 changes: 1 addition & 1 deletion src/less/colors-semanticzoom.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
color: ButtonFace;
}

html.win-hoverable win-semanticzoom-button:hover {
html.win-hoverable .win-semanticzoom-button:hover {
background-color: Highlight;
border-color: ButtonText;
color: HighlightText;
Expand Down
1 change: 1 addition & 0 deletions src/less/styles-splitview.less
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
&.win-splitview-placementleft {
@pane-left();
.RTL(@pane-right);
position: static;
}

&.win-splitview-placementright {
Expand Down
2 changes: 2 additions & 0 deletions src/strings/af-za/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/am-et/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/ar-sa/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/as-in/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/az-latn-az/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/be-by/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/bg-bg/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/bn-bd/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/bn-in/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/bs-latn-ba/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/ca-es-valencia/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/ca-es/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/chr-cher-us/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/cs-cz/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/cy-gb/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/da-dk/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/de-de/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/el-gr/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/en-gb/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
4 changes: 4 additions & 0 deletions src/strings/en-us/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@
"_ui/appBarIcons/fontsize.comment": "{Locked=qps-ploc,qps-plocm}",
"ui/appBarIcons/cellphone": "\uE1C9", // group:Communications
"_ui/appBarIcons/cellphone.comment": "{Locked=qps-ploc,qps-plocm}",
"ui/appBarIcons/print": "\uE749", // group:Communications
"_ui/appBarIcons/print.comment": "{Locked=qps-ploc,qps-plocm}",
"ui/appBarIcons/share": "\uE72D", // group:Communications
"_ui/appBarIcons/share.comment": "{Locked=qps-ploc,qps-plocm}",
"ui/appBarIcons/reshare": "\uE1CA", // group:Communications
"_ui/appBarIcons/reshare.comment": "{Locked=qps-ploc,qps-plocm}",
"ui/appBarIcons/tag": "\uE1CB", // group:Data
Expand Down
2 changes: 2 additions & 0 deletions src/strings/es-es/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/es-mx/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/et-ee/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/eu-es/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/fa-ir/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
2 changes: 2 additions & 0 deletions src/strings/fi-fi/Microsoft.WinJS.resjson
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"ui/appBarIcons/fontincrease": "",
"ui/appBarIcons/fontsize": "",
"ui/appBarIcons/cellphone": "",
"ui/appBarIcons/print": "",
"ui/appBarIcons/share": "",
"ui/appBarIcons/reshare": "",
"ui/appBarIcons/tag": "",
"ui/appBarIcons/repeatone": "",
Expand Down
Loading

0 comments on commit b4ba343

Please sign in to comment.