diff --git a/install/ui/aci.js b/install/ui/aci.js index 8e9e5433b..30f5de792 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -716,7 +716,7 @@ IPA.permission_target_policy = function (widget_name) { for (var i=0; i that.table.total_pages) { + state[that.entity_name+'-page'] = that.table.total_pages; + IPA.nav.push_state(state); + return; + } + that.table.current_page = page; + + if (!that.pkeys || !that.pkeys.length) { + that.table.empty(); + that.table.summary.text(IPA.messages.association.no_entries); + that.table.unselect_all(); + return; + } + + that.pkeys.sort(); + var total = that.pkeys.length; + + var start = (that.table.current_page - 1) * that.table.page_length + 1; + var end = that.table.current_page * that.table.page_length; + end = end > total ? total : end; + + var summary = IPA.messages.association.paging; + summary = summary.replace('${start}', start); + summary = summary.replace('${end}', end); + summary = summary.replace('${total}', total); + that.table.summary.text(summary); + + that.values = that.pkeys.slice(start-1, end); + + var columns = that.table.columns.values; + if (columns.length == 1) { // show pkey only + var name = columns[0].name; + that.table.empty(); + for (var i=0; i that.table.total_pages) { - state[that.entity_name+'-page'] = that.table.total_pages; - IPA.nav.push_state(state); - return; - } - that.table.current_page = page; - - if (!that.pkeys || !that.pkeys.length) { - that.table.empty(); - that.table.summary.text(IPA.messages.association.no_entries); - return; - } - - that.pkeys.sort(); - var total = that.pkeys.length; - - var start = (that.table.current_page - 1) * that.table.page_length + 1; - var end = that.table.current_page * that.table.page_length; - end = end > total ? total : end; - - var summary = IPA.messages.association.paging; - summary = summary.replace('${start}', start); - summary = summary.replace('${end}', end); - summary = summary.replace('${total}', total); - that.table.summary.text(summary); - - that.values = that.pkeys.slice(start-1, end); - - var columns = that.table.columns.values; - if (columns.length == 1) { // show pkey only - var name = columns[0].name; - that.table.empty(); - for (var i=0; i"); container.append(details); - var result = {}; + var data = {}; + data.result = {}; + data.result.result = {}; section.create(container); - facet.load(result); + facet.load(data); var table = $('table', container); diff --git a/install/ui/user.js b/install/ui/user.js index 09b4b2a3c..77fbae5bb 100644 --- a/install/ui/user.js +++ b/install/ui/user.js @@ -32,10 +32,7 @@ IPA.user.entity = function(spec) { that.init = function() { that.entity_init(); - var link = true; - if (IPA.nav && IPA.nav.name == 'self-service') { - link = false; - } + var link = IPA.nav.name == 'self-service' ? false : undefined; that.builder.search_facet({ columns: [