diff --git a/install/configure.ac b/install/configure.ac index 3d0c1db02..5cdfb791e 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -73,6 +73,8 @@ AC_CONFIG_FILES([ migration/Makefile share/Makefile static/Makefile + static/layouts/Makefile + static/layouts/default/Makefile tools/Makefile tools/man/Makefile updates/Makefile diff --git a/install/static/Makefile.am b/install/static/Makefile.am index 7097a1f6a..787cc4185 100644 --- a/install/static/Makefile.am +++ b/install/static/Makefile.am @@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = 1.7 NULL = SUBDIRS = \ + layouts \ $(NULL) appdir = $(IPA_DATA_DIR)/static @@ -32,6 +33,7 @@ app_DATA = \ details.js \ entity.js \ webui.js \ + widget.js \ user.js \ ipalogo.png \ gray-fade-line.png \ diff --git a/install/static/add.js b/install/static/add.js index b5f9c16d4..fbf9031b9 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -31,10 +31,19 @@ function ipa_add_field(spec) { var that = {}; that.name = spec.name; that.label = spec.label; + that._entity_name = spec.entity_name; that.init = spec.init; that.setup = spec.setup; + that.__defineGetter__("entity_name", function(){ + return that._entity_name; + }); + + that.__defineSetter__("entity_name", function(entity_name){ + that._entity_name = entity_name; + }); + return that; } @@ -45,7 +54,7 @@ function ipa_add_dialog(spec) { var that = {}; that.name = spec.name; that.title = spec.title; - that.entity_name = spec.entity_name; + that._entity_name = spec.entity_name; that.init = spec.init; @@ -54,6 +63,18 @@ function ipa_add_dialog(spec) { var dialog = $('
'); + that.__defineGetter__("entity_name", function(){ + return that._entity_name; + }); + + that.__defineSetter__("entity_name", function(entity_name){ + that._entity_name = entity_name; + + for (var i=0; iError: '+error_thrown.name+'
'); - search_results.append(''+error_thrown.title+'
'); - search_results.append(''+error_thrown.message+'
'); - } - - ipa_cmd('show', [that.pkey], {}, refresh_on_success, refresh_on_error, that.entity_name); - }; - - that.show_enrollment_dialog = function(container) { - - - - var enrollment_dialog = new AssociationForm( - that.entity_name, - that.pkey, - that.other_entity, - function() { - that.refresh(container); - enrollment_dialog.close(); - }, - that.associator, - that.method - ); - enrollment_dialog.setup(); + table.create(container); + table.setup(container); + table.refresh(container); }; return that; } -function association_form_create(jobj) -{ +function ipa_adder_dialog_setup() { + + var that = this; + var div = $(''); var form = $(''); @@ -561,27 +582,8 @@ function association_form_create(jobj) })); form_div.append(sub_div); form.append(form_div); - form.append($('Error: '+error_thrown.name+'
'); + details.append(''+error_thrown.title+'
'); + details.append(''+error_thrown.message+'
'); + } + + var params = []; + if (facet.pkey) params.push(facet.pkey); + + ipa_cmd( + 'show', params, {all: true}, on_success, on_failure, facet.entity_name + ); +} + +function ipa_details_create(container, result) { + var facet = this; + if (!container) { alert('ERROR: ipa_details_create: Missing container argument!'); return; } - var obj_name = container.attr('id'); - container.attr('title', obj_name); - container.addClass('details-container'); + var entity_name = container.attr('id'); + container.attr('title', entity_name); var details = $('', { 'class': 'details' @@ -272,81 +358,97 @@ function ipa_details_create(container, sections) 'class': 'details-buttons' }).appendTo(details); - buttons.append(ipa_make_button('ui-icon-refresh','Reset','details-reset')); - buttons.append(ipa_make_button('ui-icon-check','Update','details-update')); + buttons.append(ipa_button({ + 'label': 'Reset', + 'icon': 'ui-icon-refresh', + 'class': 'details-reset', + 'click': function() { + ipa_details_reset(container); + return false; + } + })); - details.append('Error: '+error_thrown.name+'
'); - details.append(''+error_thrown.title+'
'); - details.append(''+error_thrown.message+'
'); - } - - var params = [pkey]; - if (!pkey){ - params = []; - } - ipa_cmd( - 'show', params, {all: true}, load_on_win, load_on_fail, obj_name - ); + var dl = $('| + + | ++ Access Time + + + + + | +
|---|---|
| + + | ++ time + | +
| + Name: + | ++ + | ++ Rule type: + Allow + Deny + | +
| + Description: + | ++ + | +|
| + Rule status: + | ++ Active + Inactive + | +|
| + + | ++ Host + + + + + | +
|---|---|
| + + | ++ host + | +
| + + | ++ Host Group + + + + + | +
|---|---|
| + + | ++ hostgroups + | +
| + + | ++ Service + + + + + | +
|---|---|
| + + | ++ service + | +
| + + | ++ Service Group + + + + + | +
|---|---|
| + + | ++ services + | +
| + + | ++ Host + + + + + | +
|---|---|
| + + | ++ host + | +
| + + | ++ Host Group + + + + + | +
|---|---|
| + + | ++ hosts + | +
| + + | ++ User + + + + + | +
|---|---|
| + + | ++ user + | +
| + + | ++ User Group + + + + + | +
|---|---|
| + + | ++ users + | +
'+error_thrown.title+'
'); + div.append(''+error_thrown.message+'
'); + } + + var pkey = $.bbq.getState(that.entity_name + '-pkey', true) || ''; + ipa_cmd('show', [pkey], {}, on_success, on_error, that.entity_name); + }; + + if (spec.columns) { + for (var i=0; i