1
0
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:
hallgren
2012-11-29 16:05:42 +00:00
parent d9b0895e57
commit c9522c0a37
6 changed files with 18 additions and 13 deletions

View File

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