mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-01 08:03:00 +00:00
Change button widget 'title' attribute to 'tooltip'
Fixes remainder of #824
This commit is contained in:
@@ -50,8 +50,8 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(this.style) {
|
||||
domNode.setAttribute("style",this.style);
|
||||
}
|
||||
if(this.title) {
|
||||
domNode.setAttribute("title",this.title);
|
||||
if(this.tooltip) {
|
||||
domNode.setAttribute("title",this.tooltip);
|
||||
}
|
||||
if(this["aria-label"]) {
|
||||
domNode.setAttribute("aria-label",this["aria-label"]);
|
||||
@@ -141,7 +141,14 @@ ButtonWidget.prototype.execute = function() {
|
||||
this.hover = this.getAttribute("hover");
|
||||
this["class"] = this.getAttribute("class","");
|
||||
this["aria-label"] = this.getAttribute("aria-label");
|
||||
this.title = this.getAttribute("title");
|
||||
this.tooltip = this.getAttribute("tooltip");
|
||||
// DEPRECATION WARNING
|
||||
var title = this.getAttribute("title");
|
||||
if(title) {
|
||||
console.log("WARNING: attribute 'title' on button widget should be replaced with 'tooltip'");
|
||||
this.tooltip = title;
|
||||
}
|
||||
|
||||
this.style = this.getAttribute("style");
|
||||
this.selectedClass = this.getAttribute("selectedClass");
|
||||
this.defaultSetValue = this.getAttribute("default");
|
||||
|
||||
Reference in New Issue
Block a user