Browse Source

Merge remote-tracking branch 'origin/master'

master
guy 7 years ago
parent
commit
0bda0f93a5
  1. 8
      demo/js/widget/relationview/demo.relationview.js
  2. 15
      dist/bundle.js
  3. 4
      dist/bundle.min.js
  4. 8
      dist/demo.js
  5. 15
      dist/widget.js
  6. 2
      src/widget/downlist/combo.downlist.js
  7. 5
      src/widget/relationview/relationview.item.js
  8. 7
      src/widget/relationview/relationview.js
  9. 1
      src/widget/relationview/relationview.region.container.js

8
demo/js/widget/relationview/demo.relationview.js

@ -6,7 +6,7 @@ Demo.RelationView = BI.inherit(BI.Widget, {
baseCls: "demo-relation-view" baseCls: "demo-relation-view"
}, },
render: function () { render: function () {
var relationview = BI.createWidget({ this.relationview = BI.createWidget({
type: "bi.relation_view", type: "bi.relation_view",
items: [ items: [
{ {
@ -18,6 +18,7 @@ Demo.RelationView = BI.inherit(BI.Widget, {
isPrimary: true, isPrimary: true,
title: "b2...", title: "b2...",
value: "b2", value: "b2",
//disabled: true,
handler: function () { handler: function () {
alert("d"); alert("d");
} }
@ -57,9 +58,12 @@ Demo.RelationView = BI.inherit(BI.Widget, {
return { return {
type: "bi.float_center_adapt", type: "bi.float_center_adapt",
items: [{ items: [{
el: relationview el: this.relationview
}] }]
}; };
},
mounted: function () {
this.relationview.doRedMark("A")
} }
}); });
BI.shortcut("demo.relation_view", Demo.RelationView); BI.shortcut("demo.relation_view", Demo.RelationView);

15
dist/bundle.js vendored

@ -79518,6 +79518,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null, container: null,
stopPropagation: false,
el: {} el: {}
}); });
}, },
@ -79550,6 +79551,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
container: o.container, container: o.container,
adjustLength: o.adjustLength, adjustLength: o.adjustLength,
direction: o.direction, direction: o.direction,
stopPropagation: o.stopPropagation,
el: BI.createWidget(o.el, { el: BI.createWidget(o.el, {
type: "bi.icon_trigger", type: "bi.icon_trigger",
extraCls: o.iconCls ? o.iconCls : "pull-down-font", extraCls: o.iconCls ? o.iconCls : "pull-down-font",
@ -90921,15 +90923,14 @@ BI.RelationViewItem = BI.inherit(BI.BasicButton, {
height: 25, height: 25,
textAlign: "left", textAlign: "left",
width: 70, width: 70,
lgap: 20 lgap: 15
} }
}) })
} }
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: BI.concat([header], body), items: BI.concat([header], body)
lgap: 5
}); });
}, },
@ -91047,6 +91048,12 @@ BI.RelationView = BI.inherit(BI.Widget, {
}); });
}, },
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
o.items = items || []; o.items = items || [];
@ -91112,6 +91119,7 @@ BI.RelationView = BI.inherit(BI.Widget, {
text: items.length > 0 ? items[0].regionText : "", text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn, handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
items: items, items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true belongPackage: items.length > 0 ? items[0].belongPackage : true
}); });
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) { if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
@ -91281,6 +91289,7 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
header: o.header, header: o.header,
text: o.text, text: o.text,
handler: o.handler, handler: o.handler,
disabled: o.disabled,
items: o.items, items: o.items,
belongPackage: o.belongPackage belongPackage: o.belongPackage
}); });

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/demo.js vendored

@ -13067,7 +13067,7 @@ Demo.RelationView = BI.inherit(BI.Widget, {
baseCls: "demo-relation-view" baseCls: "demo-relation-view"
}, },
render: function () { render: function () {
var relationview = BI.createWidget({ this.relationview = BI.createWidget({
type: "bi.relation_view", type: "bi.relation_view",
items: [ items: [
{ {
@ -13079,6 +13079,7 @@ Demo.RelationView = BI.inherit(BI.Widget, {
isPrimary: true, isPrimary: true,
title: "b2...", title: "b2...",
value: "b2", value: "b2",
//disabled: true,
handler: function () { handler: function () {
alert("d"); alert("d");
} }
@ -13118,9 +13119,12 @@ Demo.RelationView = BI.inherit(BI.Widget, {
return { return {
type: "bi.float_center_adapt", type: "bi.float_center_adapt",
items: [{ items: [{
el: relationview el: this.relationview
}] }]
}; };
},
mounted: function () {
this.relationview.doRedMark("A")
} }
}); });
BI.shortcut("demo.relation_view", Demo.RelationView);/** BI.shortcut("demo.relation_view", Demo.RelationView);/**

15
dist/widget.js vendored

@ -3464,6 +3464,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null, container: null,
stopPropagation: false,
el: {} el: {}
}); });
}, },
@ -3496,6 +3497,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
container: o.container, container: o.container,
adjustLength: o.adjustLength, adjustLength: o.adjustLength,
direction: o.direction, direction: o.direction,
stopPropagation: o.stopPropagation,
el: BI.createWidget(o.el, { el: BI.createWidget(o.el, {
type: "bi.icon_trigger", type: "bi.icon_trigger",
extraCls: o.iconCls ? o.iconCls : "pull-down-font", extraCls: o.iconCls ? o.iconCls : "pull-down-font",
@ -14867,15 +14869,14 @@ BI.RelationViewItem = BI.inherit(BI.BasicButton, {
height: 25, height: 25,
textAlign: "left", textAlign: "left",
width: 70, width: 70,
lgap: 20 lgap: 15
} }
}) })
} }
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: BI.concat([header], body), items: BI.concat([header], body)
lgap: 5
}); });
}, },
@ -14993,6 +14994,12 @@ BI.RelationView = BI.inherit(BI.Widget, {
}); });
}, },
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
o.items = items || []; o.items = items || [];
@ -15058,6 +15065,7 @@ BI.RelationView = BI.inherit(BI.Widget, {
text: items.length > 0 ? items[0].regionText : "", text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn, handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
items: items, items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true belongPackage: items.length > 0 ? items[0].belongPackage : true
}); });
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) { if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
@ -15227,6 +15235,7 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
header: o.header, header: o.header,
text: o.text, text: o.text,
handler: o.handler, handler: o.handler,
disabled: o.disabled,
items: o.items, items: o.items,
belongPackage: o.belongPackage belongPackage: o.belongPackage
}); });

2
src/widget/downlist/combo.downlist.js

@ -12,6 +12,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null, container: null,
stopPropagation: false,
el: {} el: {}
}); });
}, },
@ -44,6 +45,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
container: o.container, container: o.container,
adjustLength: o.adjustLength, adjustLength: o.adjustLength,
direction: o.direction, direction: o.direction,
stopPropagation: o.stopPropagation,
el: BI.createWidget(o.el, { el: BI.createWidget(o.el, {
type: "bi.icon_trigger", type: "bi.icon_trigger",
extraCls: o.iconCls ? o.iconCls : "pull-down-font", extraCls: o.iconCls ? o.iconCls : "pull-down-font",

5
src/widget/relationview/relationview.item.js

@ -52,15 +52,14 @@ BI.RelationViewItem = BI.inherit(BI.BasicButton, {
height: 25, height: 25,
textAlign: "left", textAlign: "left",
width: 70, width: 70,
lgap: 20 lgap: 15
} }
}) })
} }
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: BI.concat([header], body), items: BI.concat([header], body)
lgap: 5
}); });
}, },

7
src/widget/relationview/relationview.js

@ -102,6 +102,12 @@ BI.RelationView = BI.inherit(BI.Widget, {
}); });
}, },
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) { populate: function (items) {
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
o.items = items || []; o.items = items || [];
@ -167,6 +173,7 @@ BI.RelationView = BI.inherit(BI.Widget, {
text: items.length > 0 ? items[0].regionText : "", text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn, handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
items: items, items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true belongPackage: items.length > 0 ? items[0].belongPackage : true
}); });
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) { if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {

1
src/widget/relationview/relationview.region.container.js

@ -18,6 +18,7 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
header: o.header, header: o.header,
text: o.text, text: o.text,
handler: o.handler, handler: o.handler,
disabled: o.disabled,
items: o.items, items: o.items,
belongPackage: o.belongPackage belongPackage: o.belongPackage
}); });

Loading…
Cancel
Save