|
|
@@ -114,25 +114,15 @@ wn.widgets.Dialog = function(opts) { |
|
|
|
|
|
|
|
this.make_head = function() { |
|
|
|
var me = this; |
|
|
|
this.head = $a(this.wrapper, 'div', 'dialog_head'); |
|
|
|
|
|
|
|
var t = make_table(this.head,1,2,'100%',['100%','16px'],{padding:'2px'}); |
|
|
|
|
|
|
|
$y($td(t,0,0),{paddingLeft:'16px',fontWeight:'bold',fontSize:'14px',textAlign:'center'}); |
|
|
|
$y($td(t,0,1),{textAlign:'right'}); |
|
|
|
|
|
|
|
var img = $a($td(t,0,01),'img','',{cursor:'pointer'}); |
|
|
|
img.src='lib/images/icons/close.gif'; |
|
|
|
|
|
|
|
this.title_text = $td(t,0,0); |
|
|
|
this.appframe = new wn.views.AppFrame(this.wrapper); |
|
|
|
this.appframe.$titlebar.find('.close').unbind('click').click(function() { |
|
|
|
if(me.oncancel)me.oncancel(); me.hide(); |
|
|
|
}); |
|
|
|
this.set_title(this.opts.title); |
|
|
|
|
|
|
|
img.onclick = function() { if(me.oncancel)me.oncancel(); me.hide(); } |
|
|
|
this.cancel_img = img; |
|
|
|
} |
|
|
|
|
|
|
|
this.set_title = function(t) { |
|
|
|
this.title_text.innerHTML = t ? t : ''; |
|
|
|
this.appframe.$titlebar.find('.appframe-title').html(t || ''); |
|
|
|
} |
|
|
|
|
|
|
|
this.set_postion = function() { |
|
|
@@ -182,7 +172,7 @@ wn.widgets.Dialog = function(opts) { |
|
|
|
} |
|
|
|
|
|
|
|
this.no_cancel = function() { |
|
|
|
$dh(this.cancel_img); |
|
|
|
this.appframe.$titlebar.find('.close').toggle(false); |
|
|
|
} |
|
|
|
|
|
|
|
if(opts) this.make(); |
|
|
|