forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.6 KiB
57 lines
1.6 KiB
/** |
|
* 可以理解为MultiPopupView和Panel两个面板的结合体 |
|
* @class BI.PopupPanel |
|
* @extends BI.MultiPopupView |
|
*/ |
|
|
|
BI.PopupPanel = BI.inherit(BI.MultiPopupView, { |
|
|
|
_defaultConfig: function () { |
|
var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments); |
|
return BI.extend(conf, { |
|
baseCls: (conf.baseCls || "") + " bi-popup-panel", |
|
title: "" |
|
}) |
|
}, |
|
|
|
_init: function () { |
|
BI.PopupPanel.superclass._init.apply(this, arguments); |
|
}, |
|
|
|
_createTool: function () { |
|
var self = this, o = this.options; |
|
var close = BI.createWidget({ |
|
type: "bi.icon_button", |
|
cls: "close-h-font", |
|
width: 25, |
|
height: 25 |
|
}); |
|
close.on(BI.IconButton.EVENT_CHANGE, function () { |
|
self.setVisible(false); |
|
self.fireEvent(BI.PopupPanel.EVENT_CLOSE); |
|
}); |
|
return BI.createWidget({ |
|
type: "bi.htape", |
|
cls: "popup-panel-title bi-background bi-border", |
|
height: 25, |
|
items: [{ |
|
el: { |
|
type: "bi.label", |
|
textAlign: "left", |
|
text: o.title, |
|
height: 25, |
|
lgap: 10 |
|
} |
|
}, { |
|
el: close, |
|
width: 25 |
|
}] |
|
}); |
|
} |
|
}); |
|
|
|
BI.PopupPanel.EVENT_CHANGE = "EVENT_CHANGE"; |
|
BI.PopupPanel.EVENT_CLOSE = "EVENT_CLOSE"; |
|
BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON"; |
|
|
|
BI.shortcut("bi.popup_panel", BI.PopupPanel); |