Upgrade gr-dropdown for download links
Bug: Issue 7867 Change-Id: I80803e388862872cb059c7f7ec0c269ce6a80755
This commit is contained in:
@@ -145,6 +145,7 @@ limitations under the License.
|
|||||||
<a
|
<a
|
||||||
class="itemAction"
|
class="itemAction"
|
||||||
href$="[[_computeLinkURL(link)]]"
|
href$="[[_computeLinkURL(link)]]"
|
||||||
|
download$="[[_computeIsDownload(link)]]"
|
||||||
rel$="[[_computeLinkRel(link)]]"
|
rel$="[[_computeLinkRel(link)]]"
|
||||||
target$="[[link.target]]"
|
target$="[[link.target]]"
|
||||||
hidden$="[[!link.url]]"
|
hidden$="[[!link.url]]"
|
||||||
|
@@ -286,5 +286,9 @@
|
|||||||
_computeHasTooltip(tooltip) {
|
_computeHasTooltip(tooltip) {
|
||||||
return !!tooltip;
|
return !!tooltip;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_computeIsDownload(link) {
|
||||||
|
return !!link.download;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
@@ -49,6 +49,11 @@ limitations under the License.
|
|||||||
sandbox.restore();
|
sandbox.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('_computeIsDownload', () => {
|
||||||
|
assert.isTrue(element._computeIsDownload({download: true}));
|
||||||
|
assert.isFalse(element._computeIsDownload({download: false}));
|
||||||
|
});
|
||||||
|
|
||||||
test('tap on trigger opens menu, then closes', () => {
|
test('tap on trigger opens menu, then closes', () => {
|
||||||
sandbox.stub(element, '_open', () => { element.$.dropdown.open(); });
|
sandbox.stub(element, '_open', () => { element.$.dropdown.open(); });
|
||||||
sandbox.stub(element, '_close', () => { element.$.dropdown.close(); });
|
sandbox.stub(element, '_close', () => { element.$.dropdown.close(); });
|
||||||
|
Reference in New Issue
Block a user