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 errorDisplay : function (error) {
24 return '<div class="error"><dl id="system-message"><dt class="error">Notice</dt><dd class="error message"><ul><li>' + error + '</li></ul></dd></dl></div>';
27 get_value: function (value) {
28 //if(typeof(jQuery(value).attr('value'))!="undefined"){
29 if (/<span value=['"].*['"]>.*<\/span>/i.test(value)) {
30 return jQuery(value).attr('value');
36 escape_id: function(id) {
37 return id.replace( /(:|\.|\[|\])/g, "\\$1" );
42 // xxx tmp - until all plugins are ported
43 errorDisplay = unfold.errorDisplay;
44 get_value = unfold.get_value;