Browse Source

Pull request #1506: 无JIRA任务 自定义item高度

Merge in VISUAL/fineui from ~FAY/fineui:master to master

* commit '1e0a99cc8c0a0f70e0e9e4b77e18ac848be1c3d8':
  无JIRA任务 自定义item高度
es6
fay 4 years ago
parent
commit
31def1e997
  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",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
itemHeight: 24,
height: 24,
attributes: {
tabIndex: 0
@ -60,6 +61,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: this.storeValue
});
@ -170,6 +172,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}
}],
itemsCreator: o.itemsCreator,
itemsHeight: o.itemsHeight,
valueFormatter: o.valueFormatter,
onLoaded: 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",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
itemHeight: 24,
height: 24,
attributes: {
tabIndex: 0
@ -57,6 +58,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
},
valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: {
type: BI.Selection.Multi,
value: o.value
@ -160,6 +162,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
}
}],
itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter,
onLoaded: 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,
valueFormatter: BI.emptyFn,
height: 24,
itemHeight: 24,
attributes: {
tabIndex: 0
},
@ -57,6 +58,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
},
valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: o.value
});
@ -166,6 +168,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
onLoaded: function () {
BI.nextTick(function () {
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",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
itemsHeight: 24,
height: 24,
attributes: {
tabIndex: 0
@ -57,6 +58,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
},
valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemHeight: o.itemHeight,
value: {
type: BI.Selection.Multi,
value: o.value
@ -157,6 +159,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
}
}],
itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter,
onLoaded: 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",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
itemHeight: 24,
searcher: {},
switcher: {},
@ -41,6 +42,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
text: o.text,
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
watermark: o.watermark,
popup: {},
adapter: o.adapter,

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

@ -17,7 +17,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
},
valueFormatter: 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",
logic: this.options.logic,
cls: "bi-list-item-active",
height: 24,
height: this.options.itemHeight,
selected: this.isAllSelected(),
iconWrapperWidth: 36
});

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

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

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

@ -13,7 +13,8 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, {
maxHeight: 400,
valueFormatter: 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({
type: "bi.multi_select_loader",
itemsCreator: opts.itemsCreator,
itemHeight: opts.itemHeight,
valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded,
value: opts.value

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

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

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

@ -23,7 +23,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: null,
masker: {},
allowEdit: true
allowEdit: true,
itemHeight: 24
});
},
@ -40,6 +41,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
height: o.height,
text: o.text,
itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter,
watermark: o.watermark,
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",
itemsCreator: 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());
}]);
},
itemHeight: o.itemHeight,
value: o.value
});
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",
itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn
valueFormatter: BI.emptyFn,
itemHeight: 24
});
},
@ -91,7 +92,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
logic: {
dynamic: false
},
height: 24,
height: this.options.itemHeight,
selected: this.isAllSelected(),
cls: "bi-list-item-active",
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",
itemsCreator: 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());
}]);
},
itemHeight: o.itemHeight,
value: o.value
});
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), {
baseCls: "bi-multi-select-searcher",
itemsCreator: BI.emptyFn,
itemHeight: 24,
el: {},
popup: {},
valueFormatter: BI.emptyFn,
@ -64,6 +65,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
this.setKeyword(keyword);
o.itemsCreator(op, callback);
},
itemHeight: o.itemHeight,
value: o.value,
listeners: [{
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,
adapter: null,
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);
o.itemsCreator(op, callback);
},
itemHeight: o.itemHeight,
value: o.value
}, o.popup),

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

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

7
src/widget/multiselectlist/multiselectlist.js

@ -7,7 +7,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
baseCls: "bi-multi-select-list",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
searcherHeight: 24
searcherHeight: 24,
itemHeight: 24
});
},
_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",
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
itemHeight: o.itemHeight,
logic: {
dynamic: false
},
@ -54,7 +56,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
}
},
itemHeight: o.itemHeight
});
this.searcherPane.setVisible(false);

Loading…
Cancel
Save