Files
luos/workflow/engine/templates/authSources/authSourcesListSyn.js

46 lines
1.5 KiB
JavaScript
Raw Normal View History

2015-06-11 11:08:56 -04:00
var synchronizeDepartmentsLDAPADV = function() {
iGrid = Ext.getCmp('infoGrid');
rowSelected = iGrid.getSelectionModel().getSelected();
if (rowSelected) {
2015-06-11 15:48:58 -04:00
location.href = 'authSourcesSynchronize?authUid=' + rowSelected.data.AUTH_SOURCE_UID + '&tab=synchronizeDepartments';
2015-06-11 11:08:56 -04:00
}
};
var synchronizeGroupsLDAPADV = function() {
iGrid = Ext.getCmp('infoGrid');
rowSelected = iGrid.getSelectionModel().getSelected();
if (rowSelected) {
2015-06-11 15:48:58 -04:00
location.href = 'authSourcesSynchronize?authUid=' + rowSelected.data.AUTH_SOURCE_UID + '&tab=synchronizeGroups';
2015-06-11 11:08:56 -04:00
}
};
var synchronizeDepartmentsButtonLDAPADV = new Ext.Action({
text: _('ID_DEPARTMENTS_SYNCHRONIZE'),
2015-06-11 11:08:56 -04:00
iconCls: 'ICON_DEPARTAMENTS',
disabled: true,
handler: synchronizeDepartmentsLDAPADV
});
var synchronizeGroupsButtonLDAPADV = new Ext.Action({
text: _('ID_GROUPS_SYNCHRONIZE'),
2015-06-11 11:08:56 -04:00
iconCls: 'ICON_GROUPS',
disabled: true,
handler: synchronizeGroupsLDAPADV
});
var _rowselectLDAPADV = function(sm, index, record) {
if (record.get('AUTH_SOURCE_PROVIDER') == 'ldapAdvanced') {
synchronizeDepartmentsButtonLDAPADV.enable();
synchronizeGroupsButtonLDAPADV.enable();
}
};
var _rowdeselectLDAPADV = function(sm, index, record) {
synchronizeDepartmentsButtonLDAPADV.disable();
synchronizeGroupsButtonLDAPADV.disable();
};
_rowselect.push(_rowselectLDAPADV);
_rowdeselect.push(_rowdeselectLDAPADV);
_pluginActionButtons.push(synchronizeDepartmentsButtonLDAPADV);
_pluginActionButtons.push(synchronizeGroupsButtonLDAPADV);