1
0
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:
Jermolene
2014-09-10 10:25:50 +01:00
parent 7ed1a2ebc7
commit b7f638aef3
29 changed files with 41 additions and 34 deletions

View File

@@ -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");