Refactored IPA.current_facet().

The IPA.current_facet() has been merged into IPA.entity.setup()
and replaced by IPA.entity.get_facet(). The setup() will read the
current facet's name from the <entity>-facet URL parameter and store
the facet object in the entity object. The get_facet() without any
parameter will return the current facet object.
This commit is contained in:
Endi S. Dewata
2011-07-21 21:29:55 -05:00
committed by Adam Young
parent df7ee2ccf5
commit ca7395c353
7 changed files with 32 additions and 48 deletions

View File

@@ -173,8 +173,7 @@ IPA.user_status_widget = function(spec) {
click: function() {
var entity = IPA.get_entity(that.entity_name);
var facet_name = IPA.current_facet(entity);
var facet = entity.get_facet(facet_name);
var facet = entity.get_facet();
if (facet.is_dirty()) {
var dialog = IPA.dirty_dialog({
@@ -257,8 +256,7 @@ IPA.user_status_widget = function(spec) {
action == 'activate',
function(data, textStatus, xhr) {
var entity = IPA.get_entity(that.entity_name);
var facet_name = IPA.current_facet(entity);
var facet = entity.get_facet(facet_name);
var facet = entity.get_facet();
facet.refresh();
dialog.close();
}