EditPolicySetView.js revision c0e6013f511c7d30472563730aa5e910454b36eb
/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Portions copyright 2014-2016 ForgeRock AS.
*/
"jquery",
"lodash",
"bootstrap-tabdrop",
"selectize"
], function ($, _, PolicySetModel, StripedListView, PoliciesView, PoliciesService, FormHelper, Messages, AbstractView,
return AbstractView.extend({
partials: [
],
APPLICATION_TYPE: "iPlanetAMWebAgentService",
events: {
"click #saveChanges": "submitForm",
"click #delete": "onDeleteClick"
},
initialize: function () {
this.model = null;
},
onModelSync: function () {
this.renderAfterSyncModel();
},
if (callback) {
this.renderCallback = callback;
}
if (policySetName) {
} else {
this.newEntity = true;
this.model = new PolicySetModel();
this.renderAfterSyncModel();
}
},
renderAfterSyncModel: function () {
}
this.renderApplication();
},
renderApplication: function () {
var self = this,
parentRenderCallback = function () {
self.parentRender(function () {
}, function (policiesNumber) {
if (policiesNumber > 0) {
}
function (tpl) {
if (self.renderCallback) {
}
});
});
});
},
populateAvailableResourceTypes = function (resourceTypes) {
var options = {};
});
return options;
};
// Fill in the necessary information about application
this.decisionCombinersPromise, this.resourceTypesPromise)
});
} else {
});
}
},
populateResourceTypes: function () {
var self = this;
sortField: "name",
valueField: "uuid",
labelField: "name",
searchField: "name",
}
});
if (this.data.disableSettingsEdit) {
}
},
if (!data.entityName) {
}
},
var result = [];
});
return result;
},
submitForm: function (e) {
e.preventDefault();
var self = this,
this.updateFields();
if (savePromise) {
.done(function () {
trigger: true
});
}
});
} else {
}
},
onDeleteClick: function (e) {
e.preventDefault();
_.bind(this.deletePolicySet, this));
},
deletePolicySet: function () {
var self = this,
onSuccess = function () {
trigger: true
});
},
});
};
wait: true
});
},
updateFields: function () {
}
} else {
}
});
}
});
});