zcf 8 years ago
parent
commit
d1004e3862
  1. 124
      bi/case.js
  2. 25
      bi/core.js
  3. 2
      bi/widget.js
  4. 124
      dist/case.js
  5. 5309
      dist/core.js
  6. 2
      dist/widget.js
  7. 122
      src/case/colorchooser/colorpicker/colorpicker.js
  8. 2
      src/case/pager/pager.all.count.js
  9. 5299
      src/core/jquery.js
  10. 15
      src/core/model.js
  11. 10
      src/core/view.js

124
bi/case.js

@ -2710,29 +2710,29 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
_items: [ _items: [
[{ [{
value: "#ff0000" value: "#ffffff"
}, {
value: "#ffff02"
}, {
value: "#00ff00"
}, { }, {
value: "#00ffff" value: "#f2f2f2"
}, { }, {
value: "#0000ff" value: "#e5e5e5"
}, { }, {
value: "#ff02ff" value: "#d9d9d9"
}, { }, {
value: "#ffffff" value: "#cccccc"
}, { }, {
value: "#e6e6e6" value: "#bfbfbf"
}, { }, {
value: "#cccccc" value: "#b2b2b2"
}, { }, {
value: "#b3b3b3" value: "#a6a6a6"
}, { }, {
value: "#999999" value: "#999999"
}, {
value: "#8c8c8c"
}, { }, {
value: "#808080" value: "#808080"
}, {
value: "#737373"
}, { }, {
value: "#666666" value: "#666666"
}, { }, {
@ -2740,106 +2740,106 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
}, { }, {
value: "#333333" value: "#333333"
}, { }, {
value: "#1a1a1a" value: "#000000"
}], }],
[{ [{
value: "#ea9b5e" value: "#d8b5a6"
}, { }, {
value: "#ebb668" value: "#ff9e9a"
}, { }, {
value: "#efca69" value: "#ffc17d"
}, { }, {
value: "#faf4a2" value: "#f5e56b"
}, { }, {
value: "#c9da73" value: "#d8e698"
}, { }, {
value: "#b6d19c" value: "#e0ebaf"
}, { }, {
value: "#86be85" value: "#c3d825"
}, { }, {
value: "#87c5c3" value: "#bce2e8"
}, { }, {
value: "#75bfec" value: "#85d3cd"
}, { }, {
value: "#85a9e0" value: "#bce2e8"
}, { }, {
value: "#8890d3" value: "#a0d8ef"
}, { }, {
value: "#a484b9" value: "#89c3eb"
}, { }, {
value: "#b48bbf" value: "#bbc8e6"
}, { }, {
value: "#ba8dc6" value: "#bbbcde"
}, { }, {
value: "#e697c8" value: "#d6b4cc"
}, { }, {
value: "#e49da0" value: "#fbc0d3"
}], }],
[{ [{
value: "#df6a18" value: "#bb9581"
}, { }, {
value: "#df8d04" value: "#f37d79"
}, { }, {
value: "#efb500" value: "#fba74f"
}, { }, {
value: "#faf201" value: "#ffdb4f"
}, { }, {
value: "#b2cc23" value: "#c7dc68"
}, { }, {
value: "#7dbd2f" value: "#b0ca71"
}, { }, {
value: "#48a754" value: "#99ab4e"
}, { }, {
value: "#27acaa" value: "#84b9cb"
}, { }, {
value: "#09abe9" value: "#00a3af"
}, { }, {
value: "#357bcc" value: "#2ca9e1"
}, { }, {
value: "#4d67c1" value: "#0095d9"
}, { }, {
value: "#5b4aa5" value: "#4c6cb3"
}, { }, {
value: "#7e52a5" value: "#8491c3"
}, { }, {
value: "#a057a4" value: "#a59aca"
}, { }, {
value: "#d1689c" value: "#cc7eb1"
}, { }, {
value: "#d66871" value: "#e89bb4"
}], }],
[{ [{
value: "#d12d02" value: "#9d775f"
}, { }, {
value: "#db6700" value: "#dd4b4b"
}, { }, {
value: "#ee9106" value: "#ef8b07"
}, { }, {
value: "#f7ed02" value: "#fcc800"
}, { }, {
value: "#92b801" value: "#aacf53"
}, { }, {
value: "#37a600" value: "#82ae46"
}, { }, {
value: "#289100" value: "#69821b"
}, { }, {
value: "#1a9589" value: "#59b9c6"
}, { }, {
value: "#0292e0" value: "#2a83a2"
}, { }, {
value: "#005dbb" value: "#007bbb"
}, { }, {
value: "#005eb4" value: "#19448e"
}, { }, {
value: "#0041a3" value: "#274a78"
}, { }, {
value: "#00217f" value: "#4a488e"
}, { }, {
value: "#811e89" value: "#7058a3"
}, { }, {
value: "#cd2a7c" value: "#884898"
}, { }, {
value: "#cd324a" value: "#d47596"
}] }]
], ],
@ -8591,6 +8591,8 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
var count = BI.createWidget({ var count = BI.createWidget({
type: "bi.left", type: "bi.left",
height: o.height,
scrollable: false,
items: [{ items: [{
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,

25
bi/core.js

@ -4872,6 +4872,7 @@ BI.Widget = BI.inherit(BI.OB, {
!BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self); !BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self);
self.splice.apply(self, newKeys); self.splice.apply(self, newKeys);
self.trigger("splice", newKeys); self.trigger("splice", newKeys);
BI.remove(self._childs, child);
}).on("copy", function () { }).on("copy", function () {
var keys = name.split('.'); var keys = name.split('.');
var g = self.get(keys[0]), p, c; var g = self.get(keys[0]), p, c;
@ -5146,6 +5147,20 @@ BI.Widget = BI.inherit(BI.OB, {
this._save(null, BI.extend({}, options, { this._save(null, BI.extend({}, options, {
patch: true patch: true
})); }));
},
_destroy: function () {
var children = BI.extend({}, this._childs);
this._childs = {};
BI.each(children, function (i, child) {
child._destroy();
});
this.destroyed && this.destroyed();
},
destroy: function () {
this._destroy();
BI.Model.superclass.destroy.apply(this, arguments);
} }
});/** });/**
* @class BI.View * @class BI.View
@ -5174,9 +5189,9 @@ BI.View = BI.inherit(BI.V, {
this.model._changing_ = false; this.model._changing_ = false;
this.model.actionEnd() && this.actionEnd(); this.model.actionEnd() && this.actionEnd();
}).listenTo(this.model, "destroy", function () { }).listenTo(this.model, "destroy", function () {
this.destroy(); this._destroy();
}).listenTo(this.model, "unset", function () { }).listenTo(this.model, "unset", function () {
this.destroy(); this._destroy();
}).listenTo(this.model, "splice", function (arg) { }).listenTo(this.model, "splice", function (arg) {
this.splice.apply(this, arg); this.splice.apply(this, arg);
}).listenTo(this.model, "duplicate", function (arg) { }).listenTo(this.model, "duplicate", function (arg) {
@ -5393,7 +5408,7 @@ BI.View = BI.inherit(BI.V, {
delete self._cards[cardName]; delete self._cards[cardName];
self.model.removeChild(modelData, view.model); self.model.removeChild(modelData, view.model);
cardLayout.deleteCardByName(cardName); cardLayout.deleteCardByName(cardName);
view.destroy(); view._destroy();
cardLayout.setVisible(false); cardLayout.setVisible(false);
} }
action.actionBack(view, null, function () { action.actionBack(view, null, function () {
@ -5644,11 +5659,11 @@ BI.View = BI.inherit(BI.V, {
}); });
delete this._cardLayouts; delete this._cardLayouts;
delete this._cards; delete this._cards;
this.off();
this.destroyed(); this.destroyed();
this.off();
}, },
destroy: function () { _destroy: function () {
BI.each(this._cardLayouts, function (name, card) { BI.each(this._cardLayouts, function (name, card) {
card && card._unMount(); card && card._unMount();
}); });

2
bi/widget.js

@ -12355,7 +12355,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Value"), text: BI.i18nText("BI-Basic_Value"),
textHeight: o.height - c.border * 2, textHeight: o.height - c.border * 2,
width: c.width - c.border * 2, width: c.width - c.border * 2,
height: o.height - c.border * 2, height: o.height - c.border * 2,

124
dist/case.js vendored

@ -2710,29 +2710,29 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
_items: [ _items: [
[{ [{
value: "#ff0000" value: "#ffffff"
}, {
value: "#ffff02"
}, {
value: "#00ff00"
}, { }, {
value: "#00ffff" value: "#f2f2f2"
}, { }, {
value: "#0000ff" value: "#e5e5e5"
}, { }, {
value: "#ff02ff" value: "#d9d9d9"
}, { }, {
value: "#ffffff" value: "#cccccc"
}, { }, {
value: "#e6e6e6" value: "#bfbfbf"
}, { }, {
value: "#cccccc" value: "#b2b2b2"
}, { }, {
value: "#b3b3b3" value: "#a6a6a6"
}, { }, {
value: "#999999" value: "#999999"
}, {
value: "#8c8c8c"
}, { }, {
value: "#808080" value: "#808080"
}, {
value: "#737373"
}, { }, {
value: "#666666" value: "#666666"
}, { }, {
@ -2740,106 +2740,106 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
}, { }, {
value: "#333333" value: "#333333"
}, { }, {
value: "#1a1a1a" value: "#000000"
}], }],
[{ [{
value: "#ea9b5e" value: "#d8b5a6"
}, { }, {
value: "#ebb668" value: "#ff9e9a"
}, { }, {
value: "#efca69" value: "#ffc17d"
}, { }, {
value: "#faf4a2" value: "#f5e56b"
}, { }, {
value: "#c9da73" value: "#d8e698"
}, { }, {
value: "#b6d19c" value: "#e0ebaf"
}, { }, {
value: "#86be85" value: "#c3d825"
}, { }, {
value: "#87c5c3" value: "#bce2e8"
}, { }, {
value: "#75bfec" value: "#85d3cd"
}, { }, {
value: "#85a9e0" value: "#bce2e8"
}, { }, {
value: "#8890d3" value: "#a0d8ef"
}, { }, {
value: "#a484b9" value: "#89c3eb"
}, { }, {
value: "#b48bbf" value: "#bbc8e6"
}, { }, {
value: "#ba8dc6" value: "#bbbcde"
}, { }, {
value: "#e697c8" value: "#d6b4cc"
}, { }, {
value: "#e49da0" value: "#fbc0d3"
}], }],
[{ [{
value: "#df6a18" value: "#bb9581"
}, { }, {
value: "#df8d04" value: "#f37d79"
}, { }, {
value: "#efb500" value: "#fba74f"
}, { }, {
value: "#faf201" value: "#ffdb4f"
}, { }, {
value: "#b2cc23" value: "#c7dc68"
}, { }, {
value: "#7dbd2f" value: "#b0ca71"
}, { }, {
value: "#48a754" value: "#99ab4e"
}, { }, {
value: "#27acaa" value: "#84b9cb"
}, { }, {
value: "#09abe9" value: "#00a3af"
}, { }, {
value: "#357bcc" value: "#2ca9e1"
}, { }, {
value: "#4d67c1" value: "#0095d9"
}, { }, {
value: "#5b4aa5" value: "#4c6cb3"
}, { }, {
value: "#7e52a5" value: "#8491c3"
}, { }, {
value: "#a057a4" value: "#a59aca"
}, { }, {
value: "#d1689c" value: "#cc7eb1"
}, { }, {
value: "#d66871" value: "#e89bb4"
}], }],
[{ [{
value: "#d12d02" value: "#9d775f"
}, { }, {
value: "#db6700" value: "#dd4b4b"
}, { }, {
value: "#ee9106" value: "#ef8b07"
}, { }, {
value: "#f7ed02" value: "#fcc800"
}, { }, {
value: "#92b801" value: "#aacf53"
}, { }, {
value: "#37a600" value: "#82ae46"
}, { }, {
value: "#289100" value: "#69821b"
}, { }, {
value: "#1a9589" value: "#59b9c6"
}, { }, {
value: "#0292e0" value: "#2a83a2"
}, { }, {
value: "#005dbb" value: "#007bbb"
}, { }, {
value: "#005eb4" value: "#19448e"
}, { }, {
value: "#0041a3" value: "#274a78"
}, { }, {
value: "#00217f" value: "#4a488e"
}, { }, {
value: "#811e89" value: "#7058a3"
}, { }, {
value: "#cd2a7c" value: "#884898"
}, { }, {
value: "#cd324a" value: "#d47596"
}] }]
], ],
@ -8591,6 +8591,8 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
var count = BI.createWidget({ var count = BI.createWidget({
type: "bi.left", type: "bi.left",
height: o.height,
scrollable: false,
items: [{ items: [{
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,

5309
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/widget.js vendored

@ -12355,7 +12355,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Value"), text: BI.i18nText("BI-Basic_Value"),
textHeight: o.height - c.border * 2, textHeight: o.height - c.border * 2,
width: c.width - c.border * 2, width: c.width - c.border * 2,
height: o.height - c.border * 2, height: o.height - c.border * 2,

122
src/case/colorchooser/colorpicker/colorpicker.js

@ -16,29 +16,29 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
_items: [ _items: [
[{ [{
value: "#ff0000" value: "#ffffff"
}, {
value: "#ffff02"
}, {
value: "#00ff00"
}, { }, {
value: "#00ffff" value: "#f2f2f2"
}, { }, {
value: "#0000ff" value: "#e5e5e5"
}, { }, {
value: "#ff02ff" value: "#d9d9d9"
}, { }, {
value: "#ffffff" value: "#cccccc"
}, { }, {
value: "#e6e6e6" value: "#bfbfbf"
}, { }, {
value: "#cccccc" value: "#b2b2b2"
}, { }, {
value: "#b3b3b3" value: "#a6a6a6"
}, { }, {
value: "#999999" value: "#999999"
}, {
value: "#8c8c8c"
}, { }, {
value: "#808080" value: "#808080"
}, {
value: "#737373"
}, { }, {
value: "#666666" value: "#666666"
}, { }, {
@ -46,106 +46,106 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
}, { }, {
value: "#333333" value: "#333333"
}, { }, {
value: "#1a1a1a" value: "#000000"
}], }],
[{ [{
value: "#ea9b5e" value: "#d8b5a6"
}, { }, {
value: "#ebb668" value: "#ff9e9a"
}, { }, {
value: "#efca69" value: "#ffc17d"
}, { }, {
value: "#faf4a2" value: "#f5e56b"
}, { }, {
value: "#c9da73" value: "#d8e698"
}, { }, {
value: "#b6d19c" value: "#e0ebaf"
}, { }, {
value: "#86be85" value: "#c3d825"
}, { }, {
value: "#87c5c3" value: "#bce2e8"
}, { }, {
value: "#75bfec" value: "#85d3cd"
}, { }, {
value: "#85a9e0" value: "#bce2e8"
}, { }, {
value: "#8890d3" value: "#a0d8ef"
}, { }, {
value: "#a484b9" value: "#89c3eb"
}, { }, {
value: "#b48bbf" value: "#bbc8e6"
}, { }, {
value: "#ba8dc6" value: "#bbbcde"
}, { }, {
value: "#e697c8" value: "#d6b4cc"
}, { }, {
value: "#e49da0" value: "#fbc0d3"
}], }],
[{ [{
value: "#df6a18" value: "#bb9581"
}, { }, {
value: "#df8d04" value: "#f37d79"
}, { }, {
value: "#efb500" value: "#fba74f"
}, { }, {
value: "#faf201" value: "#ffdb4f"
}, { }, {
value: "#b2cc23" value: "#c7dc68"
}, { }, {
value: "#7dbd2f" value: "#b0ca71"
}, { }, {
value: "#48a754" value: "#99ab4e"
}, { }, {
value: "#27acaa" value: "#84b9cb"
}, { }, {
value: "#09abe9" value: "#00a3af"
}, { }, {
value: "#357bcc" value: "#2ca9e1"
}, { }, {
value: "#4d67c1" value: "#0095d9"
}, { }, {
value: "#5b4aa5" value: "#4c6cb3"
}, { }, {
value: "#7e52a5" value: "#8491c3"
}, { }, {
value: "#a057a4" value: "#a59aca"
}, { }, {
value: "#d1689c" value: "#cc7eb1"
}, { }, {
value: "#d66871" value: "#e89bb4"
}], }],
[{ [{
value: "#d12d02" value: "#9d775f"
}, { }, {
value: "#db6700" value: "#dd4b4b"
}, { }, {
value: "#ee9106" value: "#ef8b07"
}, { }, {
value: "#f7ed02" value: "#fcc800"
}, { }, {
value: "#92b801" value: "#aacf53"
}, { }, {
value: "#37a600" value: "#82ae46"
}, { }, {
value: "#289100" value: "#69821b"
}, { }, {
value: "#1a9589" value: "#59b9c6"
}, { }, {
value: "#0292e0" value: "#2a83a2"
}, { }, {
value: "#005dbb" value: "#007bbb"
}, { }, {
value: "#005eb4" value: "#19448e"
}, { }, {
value: "#0041a3" value: "#274a78"
}, { }, {
value: "#00217f" value: "#4a488e"
}, { }, {
value: "#811e89" value: "#7058a3"
}, { }, {
value: "#cd2a7c" value: "#884898"
}, { }, {
value: "#cd324a" value: "#d47596"
}] }]
], ],

2
src/case/pager/pager.all.count.js

@ -96,6 +96,8 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
var count = BI.createWidget({ var count = BI.createWidget({
type: "bi.left", type: "bi.left",
height: o.height,
scrollable: false,
items: [{ items: [{
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,

5299
src/core/jquery.js vendored

File diff suppressed because it is too large Load Diff

15
src/core/model.js

@ -182,6 +182,7 @@ BI.Model = BI.inherit(BI.M, {
!BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self); !BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self);
self.splice.apply(self, newKeys); self.splice.apply(self, newKeys);
self.trigger("splice", newKeys); self.trigger("splice", newKeys);
BI.remove(self._childs, child);
}).on("copy", function () { }).on("copy", function () {
var keys = name.split('.'); var keys = name.split('.');
var g = self.get(keys[0]), p, c; var g = self.get(keys[0]), p, c;
@ -456,5 +457,19 @@ BI.Model = BI.inherit(BI.M, {
this._save(null, BI.extend({}, options, { this._save(null, BI.extend({}, options, {
patch: true patch: true
})); }));
},
_destroy: function () {
var children = BI.extend({}, this._childs);
this._childs = {};
BI.each(children, function (i, child) {
child._destroy();
});
this.destroyed && this.destroyed();
},
destroy: function () {
this._destroy();
BI.Model.superclass.destroy.apply(this, arguments);
} }
}); });

10
src/core/view.js

@ -25,9 +25,9 @@ BI.View = BI.inherit(BI.V, {
this.model._changing_ = false; this.model._changing_ = false;
this.model.actionEnd() && this.actionEnd(); this.model.actionEnd() && this.actionEnd();
}).listenTo(this.model, "destroy", function () { }).listenTo(this.model, "destroy", function () {
this.destroy(); this._destroy();
}).listenTo(this.model, "unset", function () { }).listenTo(this.model, "unset", function () {
this.destroy(); this._destroy();
}).listenTo(this.model, "splice", function (arg) { }).listenTo(this.model, "splice", function (arg) {
this.splice.apply(this, arg); this.splice.apply(this, arg);
}).listenTo(this.model, "duplicate", function (arg) { }).listenTo(this.model, "duplicate", function (arg) {
@ -244,7 +244,7 @@ BI.View = BI.inherit(BI.V, {
delete self._cards[cardName]; delete self._cards[cardName];
self.model.removeChild(modelData, view.model); self.model.removeChild(modelData, view.model);
cardLayout.deleteCardByName(cardName); cardLayout.deleteCardByName(cardName);
view.destroy(); view._destroy();
cardLayout.setVisible(false); cardLayout.setVisible(false);
} }
action.actionBack(view, null, function () { action.actionBack(view, null, function () {
@ -495,11 +495,11 @@ BI.View = BI.inherit(BI.V, {
}); });
delete this._cardLayouts; delete this._cardLayouts;
delete this._cards; delete this._cards;
this.off();
this.destroyed(); this.destroyed();
this.off();
}, },
destroy: function () { _destroy: function () {
BI.each(this._cardLayouts, function (name, card) { BI.each(this._cardLayouts, function (name, card) {
card && card._unMount(); card && card._unMount();
}); });

Loading…
Cancel
Save