1 // various UI oriented utilities
3 debug_dom: function (msg,dom,maxdepth) {
4 if (maxdepth===undefined) maxdepth=5;
5 var up=null, counter=0;
7 messages.debug(counter+" "+msg+" id='"+dom.id+"' ["+dom.classList+"]");
10 if ( (up == null) || (up === dom)) break;
11 if (counter >= maxdepth) { messages.debug(counter+" "+msg+" -> ..."); break; }
16 warning:function(text){
17 return "<button class='unfold-warning btn btn-warning'>"+text+"</button>";
19 error : function(text){
20 return "<button class='unfold-error btn btn-danger'>"+text+"</button>";
23 get_value: function (value) {
24 //if(typeof(jQuery(value).attr('value'))!="undefined"){
25 if (/<span value=['"].*['"]>.*<\/span>/i.test(value)) {
26 return jQuery(value).attr('value');