Browse Source

update

master
guy 8 years ago
parent
commit
7ca0803b60
  1. 26
      bi/widget.js
  2. 26
      docs/widget.js
  3. 26
      src/widget/downlist/item.downlistgroup.js

26
bi/widget.js

@ -5792,7 +5792,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
logic: { logic: {
dynamic: false dynamic: false
}, },
invalid: true, // invalid: true,
iconCls1: "dot-e-font", iconCls1: "dot-e-font",
iconCls2: "pull-right-e-font" iconCls2: "pull-right-e-font"
}) })
@ -5808,26 +5808,26 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
text: o.text, text: o.text,
value: o.value, value: o.value,
height: o.height height: o.height
}) });
this.icon1 = BI.createWidget({ this.icon1 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
this.icon2 = BI.createWidget({ this.icon2 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls2, cls: o.iconCls2,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: 25 width: 25
}) });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
@ -5837,7 +5837,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
bottom: 0, bottom: 0,
right: 0 right: 0
}] }]
}) });
BI.createWidget(BI.extend({ BI.createWidget(BI.extend({
element: this element: this
@ -5845,19 +5845,11 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank) items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank)
})))); }))));
this.element.on("mouseenter." + this.getName(), function (e) { this.element.hover(function () {
if (self.element.__isMouseInBounds__(e) && self.isEnabled()) { if (self.isEnabled()) {
self.hover(); self.hover();
} else {
self.dishover();
} }
}); }, function () {
this.element.on("mousemove." + this.getName(), function (e) {
if (!self.element.__isMouseInBounds__(e) && self.isEnabled()) {
self.dishover()
}
});
this.element.on("mouseleave." + this.getName(), function () {
if (self.isEnabled()) { if (self.isEnabled()) {
self.dishover() self.dishover()
} }

26
docs/widget.js

@ -5792,7 +5792,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
logic: { logic: {
dynamic: false dynamic: false
}, },
invalid: true, // invalid: true,
iconCls1: "dot-e-font", iconCls1: "dot-e-font",
iconCls2: "pull-right-e-font" iconCls2: "pull-right-e-font"
}) })
@ -5808,26 +5808,26 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
text: o.text, text: o.text,
value: o.value, value: o.value,
height: o.height height: o.height
}) });
this.icon1 = BI.createWidget({ this.icon1 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
this.icon2 = BI.createWidget({ this.icon2 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls2, cls: o.iconCls2,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: 25 width: 25
}) });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
@ -5837,7 +5837,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
bottom: 0, bottom: 0,
right: 0 right: 0
}] }]
}) });
BI.createWidget(BI.extend({ BI.createWidget(BI.extend({
element: this element: this
@ -5845,19 +5845,11 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank) items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank)
})))); }))));
this.element.on("mouseenter." + this.getName(), function (e) { this.element.hover(function () {
if (self.element.__isMouseInBounds__(e) && self.isEnabled()) { if (self.isEnabled()) {
self.hover(); self.hover();
} else {
self.dishover();
} }
}); }, function () {
this.element.on("mousemove." + this.getName(), function (e) {
if (!self.element.__isMouseInBounds__(e) && self.isEnabled()) {
self.dishover()
}
});
this.element.on("mouseleave." + this.getName(), function () {
if (self.isEnabled()) { if (self.isEnabled()) {
self.dishover() self.dishover()
} }

26
src/widget/downlist/item.downlistgroup.js

@ -6,7 +6,7 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
invalid: true, // invalid: true,
iconCls1: "dot-e-font", iconCls1: "dot-e-font",
iconCls2: "pull-right-e-font" iconCls2: "pull-right-e-font"
}) })
@ -22,26 +22,26 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
text: o.text, text: o.text,
value: o.value, value: o.value,
height: o.height height: o.height
}) });
this.icon1 = BI.createWidget({ this.icon1 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
this.icon2 = BI.createWidget({ this.icon2 = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls2, cls: o.iconCls2,
width: 25, width: 25,
forceNotSelected: true forceNotSelected: true
}) });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: 25 width: 25
}) });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
@ -51,7 +51,7 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
bottom: 0, bottom: 0,
right: 0 right: 0
}] }]
}) });
BI.createWidget(BI.extend({ BI.createWidget(BI.extend({
element: this element: this
@ -59,19 +59,11 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank) items: BI.LogicFactory.createLogicItemsByDirection("left", this.icon1, this.text, blank)
})))); }))));
this.element.on("mouseenter." + this.getName(), function (e) { this.element.hover(function () {
if (self.element.__isMouseInBounds__(e) && self.isEnabled()) { if (self.isEnabled()) {
self.hover(); self.hover();
} else {
self.dishover();
} }
}); }, function () {
this.element.on("mousemove." + this.getName(), function (e) {
if (!self.element.__isMouseInBounds__(e) && self.isEnabled()) {
self.dishover()
}
});
this.element.on("mouseleave." + this.getName(), function () {
if (self.isEnabled()) { if (self.isEnabled()) {
self.dishover() self.dishover()
} }

Loading…
Cancel
Save