jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403412 )
Change subject: Add CategoryCombo
......................................................................
Add CategoryCombo
Generic combo box that gives the list of categories
This was needed for another ticket, i have implemented it in Foundation
because it might be useful elsewhere
Change-Id: I76b7e2f0a51d7048b352f3e5b9958da3a8913993
---
A resources/bluespice.extjs/BS/form/CategoryCombo.js
1 file changed, 25 insertions(+), 0 deletions(-)
Approvals:
Robert Vogel: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/bluespice.extjs/BS/form/CategoryCombo.js
b/resources/bluespice.extjs/BS/form/CategoryCombo.js
new file mode 100644
index 0000000..a64e0f0
--- /dev/null
+++ b/resources/bluespice.extjs/BS/form/CategoryCombo.js
@@ -0,0 +1,25 @@
+Ext.define( 'BS.form.CategoryCombo', {
+ extend: 'Ext.form.field.ComboBox',
+ requires: [ 'BS.model.Category' ],
+ triggerAction: 'all',
+ displayField: 'text',
+ valueField: 'text',
+ allowBlank: false,
+ forceSelection: true,
+
+ initComponent: function() {
+ this.store = this.makeStore();
+ this.callParent(arguments);
+ },
+
+ makeStore: function() {
+ var store = new BS.store.BSApi({
+ apiAction: 'bs-category-store',
+ model: 'BS.model.Category',
+ autoLoad: true
+ });
+
+ return store;
+ },
+});
+
--
To view, visit https://gerrit.wikimedia.org/r/403412
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I76b7e2f0a51d7048b352f3e5b9958da3a8913993
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits