forked from GitHub/gf-core
minibar: add tool tips to some of the buttons
Also move the functions title and attr from editor/editor.js to js/support.js. Also mention recent changes in minibar/about.html.
This commit is contained in:
@@ -160,12 +160,16 @@ function encodeArgs(args) {
|
||||
function text(s) { return document.createTextNode(s); }
|
||||
|
||||
function node(tag,as,ds) {
|
||||
var n=document.createElement(tag);
|
||||
for(var a in as) n.setAttribute(a,as[a]);
|
||||
var n=attr(as,document.createElement(tag));
|
||||
if(ds) for(var i in ds) n.appendChild(ds[i]);
|
||||
return n;
|
||||
}
|
||||
|
||||
function attr(as,n) {
|
||||
for(var a in as) n.setAttribute(a,as[a]);
|
||||
return n
|
||||
}
|
||||
|
||||
function empty(tag,name,value) {
|
||||
var el=node(tag,{},[])
|
||||
if(name && value) el.setAttribute(name,value);
|
||||
@@ -221,6 +225,8 @@ function tda(cs) { return node("td",{},cs); }
|
||||
|
||||
function img(src) { return empty("img","src",src); }
|
||||
|
||||
function title(t,n) { return attr({title:t},n) }
|
||||
|
||||
/* --- Document modification ------------------------------------------------ */
|
||||
|
||||
function clear(el) { replaceInnerHTML(el,""); }
|
||||
|
||||
Reference in New Issue
Block a user