Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
fix(ui): add tooltip for text and icon objects
Browse files Browse the repository at this point in the history
  • Loading branch information
JoschaMetze committed Oct 10, 2017
1 parent faa4bfe commit ee002a5
Show file tree
Hide file tree
Showing 22 changed files with 10,873 additions and 10,670 deletions.
966 changes: 485 additions & 481 deletions dist/amd/aurelia-openui5-bridge.d.ts

Large diffs are not rendered by default.

22 changes: 18 additions & 4 deletions dist/amd/icon/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;

var Ui5Icon = exports.Ui5Icon = (_dec = (0, _aureliaTemplating.customElement)('ui5-icon'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec3 = (0, _aureliaTemplating.bindable)(), _dec4 = (0, _aureliaTemplating.bindable)(), _dec5 = (0, _aureliaTemplating.bindable)(), _dec6 = (0, _aureliaTemplating.bindable)(), _dec7 = (0, _aureliaTemplating.bindable)(), _dec8 = (0, _aureliaTemplating.bindable)(), _dec9 = (0, _aureliaTemplating.bindable)(), _dec10 = (0, _aureliaTemplating.bindable)(), _dec11 = (0, _aureliaTemplating.bindable)(), _dec12 = (0, _aureliaTemplating.bindable)(), _dec13 = (0, _aureliaTemplating.bindable)(), _dec14 = (0, _aureliaTemplating.bindable)(), _dec15 = (0, _aureliaTemplating.bindable)(), _dec16 = (0, _aureliaTemplating.bindable)(), _dec17 = (0, _aureliaTemplating.bindable)(), _dec18 = (0, _aureliaTemplating.bindable)(), _dec19 = (0, _aureliaFramework.computedFrom)('_icon'), _dec(_class = _dec2(_class = (_class2 = function () {
var Ui5Icon = exports.Ui5Icon = (_dec = (0, _aureliaTemplating.customElement)('ui5-icon'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec3 = (0, _aureliaTemplating.bindable)(), _dec4 = (0, _aureliaTemplating.bindable)(), _dec5 = (0, _aureliaTemplating.bindable)(), _dec6 = (0, _aureliaTemplating.bindable)(), _dec7 = (0, _aureliaTemplating.bindable)(), _dec8 = (0, _aureliaTemplating.bindable)(), _dec9 = (0, _aureliaTemplating.bindable)(), _dec10 = (0, _aureliaTemplating.bindable)(), _dec11 = (0, _aureliaTemplating.bindable)(), _dec12 = (0, _aureliaTemplating.bindable)(), _dec13 = (0, _aureliaTemplating.bindable)(), _dec14 = (0, _aureliaTemplating.bindable)(), _dec15 = (0, _aureliaTemplating.bindable)(), _dec16 = (0, _aureliaTemplating.bindable)(), _dec17 = (0, _aureliaTemplating.bindable)(), _dec18 = (0, _aureliaTemplating.bindable)(), _dec19 = (0, _aureliaTemplating.bindable)(), _dec20 = (0, _aureliaFramework.computedFrom)('_icon'), _dec(_class = _dec2(_class = (_class2 = function () {
Ui5Icon.prototype.defaultFunc = function defaultFunc() {};

function Ui5Icon(element) {
Expand Down Expand Up @@ -115,6 +115,8 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com

_initDefineProp(this, 'press', _descriptor16, this);

_initDefineProp(this, 'tooltip', _descriptor17, this);

this.element = element;
}

Expand All @@ -133,7 +135,8 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
useIconTooltip: (0, _attributes.getBooleanFromAttributeValue)(this.useIconTooltip),
alt: this.alt,
noTabStop: (0, _attributes.getBooleanFromAttributeValue)(this.noTabStop),
press: this.press
press: this.press,
tooltip: this.tooltip
};
if (this.ui5Id) this._icon = new sap.ui.core.Icon(this.ui5Id, props);else this._icon = new sap.ui.core.Icon(props);
$(this.element).closest("[ui5-container]")[0].au.controller.viewModel.addChild(this._icon, this.element);
Expand Down Expand Up @@ -223,6 +226,12 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
}
};

Ui5Icon.prototype.tooltipChanged = function tooltipChanged(newValue) {
if (this._icon !== null) {
this._icon.setTooltip(newValue);
}
};

_createClass(Ui5Icon, [{
key: 'UIElement',
get: function get() {
Expand Down Expand Up @@ -311,5 +320,10 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
initializer: function initializer() {
return this.defaultFunc;
}
}), _applyDecoratedDescriptor(_class2.prototype, 'UIElement', [_dec19], Object.getOwnPropertyDescriptor(_class2.prototype, 'UIElement'), _class2.prototype)), _class2)) || _class) || _class);
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, 'tooltip', [_dec19], {
enumerable: true,
initializer: function initializer() {
return null;
}
}), _applyDecoratedDescriptor(_class2.prototype, 'UIElement', [_dec20], Object.getOwnPropertyDescriptor(_class2.prototype, 'UIElement'), _class2.prototype)), _class2)) || _class) || _class);
});
22 changes: 18 additions & 4 deletions dist/amd/text/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;

var Ui5Text = exports.Ui5Text = (_dec = (0, _aureliaTemplating.customElement)('ui5-text'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec3 = (0, _aureliaFramework.computedFrom)('_text'), _dec(_class = _dec2(_class = (_class2 = function () {
var Ui5Text = exports.Ui5Text = (_dec = (0, _aureliaTemplating.customElement)('ui5-text'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec3 = (0, _aureliaTemplating.bindable)(), _dec4 = (0, _aureliaFramework.computedFrom)('_text'), _dec(_class = _dec2(_class = (_class2 = function () {
function Ui5Text(element) {
_classCallCheck(this, Ui5Text);

Expand All @@ -93,6 +93,8 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com

_initDefineProp(this, 'maxLines', _descriptor5, this);

_initDefineProp(this, 'tooltip', _descriptor6, this);

this.element = element;
}

Expand All @@ -101,7 +103,8 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
text: this.text != null ? this.text : this.element.innerText.trim(),
wrapping: (0, _attributes.getBooleanFromAttributeValue)(this.wrapping),
textAlign: this.textAlign,
maxLines: this.maxLines
maxLines: this.maxLines,
tooltip: this.tooltip
};
if (this.ui5Id) this._text = new sap.m.Text(this.ui5Id, props);else this._text = new sap.m.Text(props);
this._parent = $(this.element).closest("[ui5-container]")[0].au.controller.viewModel;
Expand All @@ -120,6 +123,12 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
}
};

Ui5Text.prototype.tooltipChanged = function tooltipChanged(newValue) {
if (this._text !== null) {
this._text.setTooltip(newValue);
}
};

_createClass(Ui5Text, [{
key: 'UIElement',
get: function get() {
Expand Down Expand Up @@ -153,5 +162,10 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', '../com
initializer: function initializer() {
return null;
}
}), _applyDecoratedDescriptor(_class2.prototype, 'UIElement', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'UIElement'), _class2.prototype)), _class2)) || _class) || _class);
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'tooltip', [_dec3], {
enumerable: true,
initializer: function initializer() {
return null;
}
}), _applyDecoratedDescriptor(_class2.prototype, 'UIElement', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'UIElement'), _class2.prototype)), _class2)) || _class) || _class);
});
Loading

0 comments on commit ee002a5

Please sign in to comment.