Browse Source

无JIRA任务 自定义item高度

es6
fay 4 years ago
parent
commit
1e0a99cc8c
  1. 3
      src/widget/multiselect/multiselect.combo.js
  2. 3
      src/widget/multiselect/multiselect.combo.nobar.js
  3. 3
      src/widget/multiselect/multiselect.insert.combo.js
  4. 3
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  5. 2
      src/widget/multiselect/multiselect.insert.trigger.js
  6. 5
      src/widget/multiselect/multiselect.loader.js
  7. 3
      src/widget/multiselect/multiselect.loader.nobar.js
  8. 4
      src/widget/multiselect/multiselect.popup.view.js
  9. 2
      src/widget/multiselect/multiselect.popup.view.nobar.js
  10. 4
      src/widget/multiselect/multiselect.trigger.js
  11. 4
      src/widget/multiselect/search/multiselect.search.insert.pane.js
  12. 5
      src/widget/multiselect/search/multiselect.search.loader.js
  13. 4
      src/widget/multiselect/search/multiselect.search.pane.js
  14. 2
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  15. 4
      src/widget/multiselect/trigger/searcher.multiselect.js
  16. 3
      src/widget/multiselectlist/multiselectlist.insert.js
  17. 1
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  18. 7
      src/widget/multiselectlist/multiselectlist.js

3
src/widget/multiselect/multiselect.combo.js

@ -10,6 +10,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-combo", baseCls: "bi-multi-select-combo",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemHeight: 24,
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
@ -60,6 +61,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: this.storeValue value: this.storeValue
}); });
@ -170,6 +172,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
} }
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemsHeight: o.itemsHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {

3
src/widget/multiselect/multiselect.combo.nobar.js

@ -10,6 +10,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-combo-no-bar", baseCls: "bi-multi-select-combo-no-bar",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemHeight: 24,
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
@ -57,6 +58,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: { value: {
type: BI.Selection.Multi, type: BI.Selection.Multi,
value: o.value value: o.value
@ -160,6 +162,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
} }
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {

3
src/widget/multiselect/multiselect.insert.combo.js

@ -11,6 +11,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
itemHeight: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
}, },
@ -57,6 +58,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: o.value value: o.value
}); });
@ -166,6 +168,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {
self.combo.adjustWidth(); self.combo.adjustWidth();

3
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -10,6 +10,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-insert-combo-no-bar", baseCls: "bi-multi-select-insert-combo-no-bar",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsHeight: 24,
height: 24, height: 24,
attributes: { attributes: {
tabIndex: 0 tabIndex: 0
@ -57,6 +58,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: { value: {
type: BI.Selection.Multi, type: BI.Selection.Multi,
value: o.value value: o.value
@ -157,6 +159,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {

2
src/widget/multiselect/multiselect.insert.trigger.js

@ -18,6 +18,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
baseCls: "bi-multi-select-trigger bi-border bi-border-radius", baseCls: "bi-multi-select-trigger bi-border bi-border-radius",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemHeight: 24,
searcher: {}, searcher: {},
switcher: {}, switcher: {},
@ -41,6 +42,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
text: o.text, text: o.text,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
watermark: o.watermark, watermark: o.watermark,
popup: {}, popup: {},
adapter: o.adapter, adapter: o.adapter,

5
src/widget/multiselect/multiselect.loader.js

@ -17,7 +17,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
}, },
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn,
itemHeight: 24
}); });
}, },
@ -125,7 +126,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: this.options.itemHeight,
selected: this.isAllSelected(), selected: this.isAllSelected(),
iconWrapperWidth: 36 iconWrapperWidth: 36
}); });

3
src/widget/multiselect/multiselect.loader.nobar.js

@ -17,6 +17,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
}, },
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemHeight: 24,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },
@ -116,7 +117,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: 24, height: this.options.itemHeight,
iconWrapperWidth: 36 iconWrapperWidth: 36
}); });
}, },

4
src/widget/multiselect/multiselect.popup.view.js

@ -13,7 +13,8 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, {
maxHeight: 400, maxHeight: 400,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn,
itemHeight: 24,
}); });
}, },
@ -24,6 +25,7 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.multi_select_loader", type: "bi.multi_select_loader",
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
itemHeight: opts.itemHeight,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
value: opts.value value: opts.value

2
src/widget/multiselect/multiselect.popup.view.nobar.js

@ -13,6 +13,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {
maxHeight: 400, maxHeight: 400,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemHeight: 24,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },
@ -24,6 +25,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.multi_select_no_bar_loader", type: "bi.multi_select_no_bar_loader",
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
itemHeight: opts.itemHeight,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
value: opts.value value: opts.value

4
src/widget/multiselect/multiselect.trigger.js

@ -23,7 +23,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: null, adapter: null,
masker: {}, masker: {},
allowEdit: true allowEdit: true,
itemHeight: 24
}); });
}, },
@ -40,6 +41,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
height: o.height, height: o.height,
text: o.text, text: o.text,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
watermark: o.watermark, watermark: o.watermark,
popup: {}, popup: {},

4
src/widget/multiselect/search/multiselect.search.insert.pane.js

@ -18,7 +18,8 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
baseCls: "bi-multi-select-search-pane bi-card", baseCls: "bi-multi-select-search-pane bi-card",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn,
itemHeight: 24
}); });
}, },
@ -56,6 +57,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
self.setKeyword(o.keywordGetter()); self.setKeyword(o.keywordGetter());
}]); }]);
}, },
itemHeight: o.itemHeight,
value: o.value value: o.value
}); });
this.loader.on(BI.Controller.EVENT_CHANGE, function () { this.loader.on(BI.Controller.EVENT_CHANGE, function () {

5
src/widget/multiselect/search/multiselect.search.loader.js

@ -11,7 +11,8 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
baseCls: "bi-multi-select-search-loader", baseCls: "bi-multi-select-search-loader",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn,
itemHeight: 24
}); });
}, },
@ -91,7 +92,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: false dynamic: false
}, },
height: 24, height: this.options.itemHeight,
selected: this.isAllSelected(), selected: this.isAllSelected(),
cls: "bi-list-item-active", cls: "bi-list-item-active",
iconWrapperWidth: 36 iconWrapperWidth: 36

4
src/widget/multiselect/search/multiselect.search.pane.js

@ -18,7 +18,8 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, {
baseCls: "bi-multi-select-search-pane bi-card", baseCls: "bi-multi-select-search-pane bi-card",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn,
itemHeight: 24,
}); });
}, },
@ -44,6 +45,7 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, {
self.setKeyword(o.keywordGetter()); self.setKeyword(o.keywordGetter());
}]); }]);
}, },
itemHeight: o.itemHeight,
value: o.value value: o.value
}); });
this.loader.on(BI.Controller.EVENT_CHANGE, function () { this.loader.on(BI.Controller.EVENT_CHANGE, function () {

2
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -10,6 +10,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-searcher", baseCls: "bi-multi-select-searcher",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemHeight: 24,
el: {}, el: {},
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
@ -64,6 +65,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
this.setKeyword(keyword); this.setKeyword(keyword);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
}, },
itemHeight: o.itemHeight,
value: o.value, value: o.value,
listeners: [{ listeners: [{
eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,

4
src/widget/multiselect/trigger/searcher.multiselect.js

@ -15,7 +15,8 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {}, masker: {},
text: BI.i18nText("BI-Basic_Please_Select") text: BI.i18nText("BI-Basic_Please_Select"),
itemHeight: 24
}); });
}, },
@ -64,6 +65,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
this.setKeyword(keyword); this.setKeyword(keyword);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
}, },
itemHeight: o.itemHeight,
value: o.value value: o.value
}, o.popup), }, o.popup),

3
src/widget/multiselectlist/multiselectlist.insert.js

@ -8,6 +8,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24, searcherHeight: 24,
itemHeight: 24
}); });
}, },
_init: function () { _init: function () {
@ -25,6 +26,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
type: "bi.multi_select_loader", type: "bi.multi_select_loader",
cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
logic: { logic: {
dynamic: false dynamic: false
@ -54,6 +56,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
} }
}, },
itemHeight: o.itemHeight,
listeners: [{ listeners: [{
eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () { action: function () {

1
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -28,6 +28,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
type: "bi.multi_select_no_bar_loader", type: "bi.multi_select_no_bar_loader",
cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
logic: { logic: {
dynamic: false dynamic: false

7
src/widget/multiselectlist/multiselectlist.js

@ -7,7 +7,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
baseCls: "bi-multi-select-list", baseCls: "bi-multi-select-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24 searcherHeight: 24,
itemHeight: 24
}); });
}, },
_init: function () { _init: function () {
@ -26,6 +27,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
logic: { logic: {
dynamic: false dynamic: false
}, },
@ -54,7 +56,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this.setKeyword(op.keywords[0]); this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
} }
} },
itemHeight: o.itemHeight
}); });
this.searcherPane.setVisible(false); this.searcherPane.setVisible(false);

Loading…
Cancel
Save