|
49 |
"umc/widgets/ComboBox", |
49 |
"umc/widgets/ComboBox", |
50 |
"umc/widgets/Form", |
50 |
"umc/widgets/Form", |
51 |
"umc/widgets/Page", |
51 |
"umc/widgets/Page", |
|
|
52 |
"umc/widgets/LinkList", |
52 |
"umc/widgets/StandbyMixin", |
53 |
"umc/widgets/StandbyMixin", |
53 |
"umc/widgets/TabController", |
54 |
"umc/widgets/TabController", |
54 |
"dijit/layout/StackContainer", |
55 |
"dijit/layout/StackContainer", |
|
62 |
"umc/i18n!umc/modules/udm", |
63 |
"umc/i18n!umc/modules/udm", |
63 |
"dijit/registry", |
64 |
"dijit/registry", |
64 |
"umc/widgets" |
65 |
"umc/widgets" |
65 |
], function(declare, lang, array, on, Deferred, all, when, construct, domClass, topic, json, TitlePane, render, tools, dialog, ContainerWidget, MultiInput, ComboBox, Form, Page, StandbyMixin, TabController, StackContainer, Text, Button, LabelPane, Template, OverwriteLabel, UMCPBundle, cache, _ ) { |
66 |
], function(declare, lang, array, on, Deferred, all, when, construct, domClass, topic, json, TitlePane, render, tools, dialog, ContainerWidget, MultiInput, ComboBox, Form, Page, LinkList, StandbyMixin, TabController, StackContainer, Text, Button, LabelPane, Template, OverwriteLabel, UMCPBundle, cache, _ ) { |
66 |
|
67 |
|
67 |
var _StandbyPage = declare([Page, StandbyMixin], {}); |
68 |
var _StandbyPage = declare([Page, StandbyMixin], {}); |
68 |
|
69 |
|
|
443 |
})); |
444 |
})); |
444 |
}, |
445 |
}, |
445 |
|
446 |
|
|
|
447 |
_renderReferencingObjectsTab: function(loadedDeferred) { |
448 |
var isPolicyObject = (this.objectType != 'policies/policy' && this.objectType.indexOf('policies/') === 0); |
449 |
when(this.ldapName, lang.hitch(this, function() { |
450 |
var isNewObject = !this.ldapName; |
451 |
if (isPolicyObject && !isNewObject) { |
452 |
this._referencingObjectsTab = new Page({ |
453 |
title: _('Referencing objects'), |
454 |
noFooter: true, |
455 |
headerText: _('Objects referencing this policy object'), |
456 |
}); |
457 |
this._addSubTab(this._referencingObjectsTab, 1); |
458 |
loadedDeferred.then(lang.hitch(this, '_createReferencingObjects')); |
459 |
}; |
460 |
})); |
461 |
}, |
462 |
|
463 |
_createReferencingObjects: function() { |
464 |
var referencingObjects = new LinkList({ |
465 |
staticValues: this._receivedObjOrigData.$references$, |
466 |
}); |
467 |
this._referencingObjectsTab.addChild(referencingObjects); |
468 |
}, |
469 |
|
446 |
_renderPolicyTab: function(policies) { |
470 |
_renderPolicyTab: function(policies) { |
447 |
this._policyWidgets = {}; |
471 |
this._policyWidgets = {}; |
448 |
if (policies && policies.length) { |
472 |
if (policies && policies.length) { |
Lines 1022-1028
|
Link Here
|
---|
|
1022 |
})); |
1046 |
})); |
1023 |
}, |
1047 |
}, |
1024 |
|
1048 |
|
1025 |
_addSubTab: function(page) { |
1049 |
_addSubTab: function(page, index) { |
|
|
1050 |
index = index || this._tabs.getChildren().length; |
1026 |
var tabController = new TabController({ |
1051 |
var tabController = new TabController({ |
1027 |
region: 'nav', |
1052 |
region: 'nav', |
1028 |
containerId: this._tabs.id, |
1053 |
containerId: this._tabs.id, |
Lines 1037-1043
|
Link Here
|
---|
|
1037 |
page.addChild(page.position_text); |
1062 |
page.addChild(page.position_text); |
1038 |
page.own(page.position_text); |
1063 |
page.own(page.position_text); |
1039 |
|
1064 |
|
1040 |
this._tabs.addChild(page); |
1065 |
this._tabs.addChild(page, index); |
1041 |
this.own(page); |
1066 |
this.own(page); |
1042 |
}, |
1067 |
}, |
1043 |
|
1068 |
|
Lines 1118-1123
|
Link Here
|
---|
|
1118 |
this._autoUpdateTabTitle(widgets); |
1143 |
this._autoUpdateTabTitle(widgets); |
1119 |
this._renderSubTabs(widgets, layout, metaInfo).then(lang.hitch(this, function() { |
1144 |
this._renderSubTabs(widgets, layout, metaInfo).then(lang.hitch(this, function() { |
1120 |
this._renderPolicyTab(policies); |
1145 |
this._renderPolicyTab(policies); |
|
|
1146 |
this._renderReferencingObjectsTab(loadedDeferred); |
1121 |
this._renderForm(widgets); |
1147 |
this._renderForm(widgets); |
1122 |
this._renderMultiEditCheckBoxes(widgets); |
1148 |
this._renderMultiEditCheckBoxes(widgets); |
1123 |
this._registerOptionWatchHandler(); |
1149 |
this._registerOptionWatchHandler(); |