You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wizardTabGroupFilter.js 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /**
  2. * Copyright (c) 2015, Arthur Schiwon <blizzz@owncloud.com>
  3. * This file is licensed under the Affero General Public License version 3 or later.
  4. * See the COPYING-README file.
  5. */
  6. OCA = OCA || {};
  7. (function() {
  8. /**
  9. * @classdesc This class represents the view belonging to the server tab
  10. * in the LDAP wizard.
  11. */
  12. var WizardTabGroupFilter = OCA.LDAP.Wizard.WizardTabAbstractFilter.subClass({
  13. /**
  14. * @inheritdoc
  15. */
  16. init: function (fotf, tabIndex, tabID) {
  17. tabID = '#ldapWizard4';
  18. var items = {
  19. ldap_groupfilter_objectclass: {
  20. $element: $('#ldap_groupfilter_objectclass'),
  21. setMethod: 'setObjectClass',
  22. keyName: 'ldap_groupfilter_objectclass',
  23. featureName: 'GroupObjectClasses'
  24. },
  25. ldap_group_filter_mode: {
  26. setMethod: 'setFilterMode'
  27. },
  28. ldap_groupfilter_groups: {
  29. $element: $('#ldap_groupfilter_groups'),
  30. setMethod: 'setGroups',
  31. keyName: 'ldap_groupfilter_groups',
  32. featureName: 'GroupsForGroups',
  33. $relatedElements: $(
  34. tabID + ' .ldapGroupListAvailable,' +
  35. tabID + ' .ldapGroupListSelected,' +
  36. tabID + ' .ldapManyGroupsSearch'
  37. )
  38. },
  39. ldap_group_filter: {
  40. $element: $('#ldap_group_filter'),
  41. setMethod: 'setFilter',
  42. keyName: 'ldap_group_filter'
  43. },
  44. groupFilterRawToggle: {
  45. $element: $('#toggleRawGroupFilter')
  46. },
  47. groupFilterRawContainer: {
  48. $element: $('#rawGroupFilterContainer')
  49. },
  50. ldap_group_count: {
  51. $element: $('#ldap_group_count'),
  52. $relatedElements: $('.ldapGetGroupCount'),
  53. setMethod: 'setCount',
  54. keyName: 'ldap_group_count'
  55. }
  56. };
  57. this.setManagedItems(items);
  58. this.manyGroupsSupport = true;
  59. this._super(fotf, tabIndex, tabID);
  60. },
  61. /**
  62. * @inheritdoc
  63. * @returns {Object}
  64. */
  65. getObjectClassItem: function () {
  66. return this.managedItems.ldap_groupfilter_objectclass;
  67. },
  68. /**
  69. * @inheritdoc
  70. * @returns {Object}
  71. */
  72. getGroupsItem: function () {
  73. return this.managedItems.ldap_groupfilter_groups;
  74. },
  75. /**
  76. * @inheritdoc
  77. * @returns {Object}
  78. */
  79. getFilterItem: function () {
  80. return this.managedItems.ldap_group_filter;
  81. },
  82. /**
  83. * @inheritdoc
  84. * @returns {Object}
  85. */
  86. getToggleItem: function () {
  87. return this.managedItems.groupFilterRawToggle;
  88. },
  89. /**
  90. * @inheritdoc
  91. * @returns {Object}
  92. */
  93. getRawFilterContainerItem: function () {
  94. return this.managedItems.groupFilterRawContainer;
  95. },
  96. /**
  97. * @inheritdoc
  98. * @returns {Object}
  99. */
  100. getCountItem: function () {
  101. return this.managedItems.ldap_group_count;
  102. },
  103. /**
  104. * @inheritdoc
  105. * @returns {string}
  106. */
  107. getFilterModeKey: function () {
  108. return 'ldap_group_filter_mode';
  109. }
  110. });
  111. OCA.LDAP.Wizard.WizardTabGroupFilter = WizardTabGroupFilter;
  112. })();