mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-17 16:34:56 -05:00
webui: do not show empty table footer
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
@@ -472,6 +472,7 @@ IPA.automember.condition_adapter = declare([field_mod.Adapter], {
|
||||
IPA.automember.condition_widget = function(spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.footer = spec.footer === undefined ? false : spec.footer;
|
||||
|
||||
spec.columns = $.merge(spec.columns || [], [
|
||||
{
|
||||
|
||||
@@ -678,12 +678,14 @@ IPA.adder_dialog = function(spec) {
|
||||
var init = function() {
|
||||
that.available_table = IPA.table_widget({
|
||||
entity: that.entity,
|
||||
name: 'available'
|
||||
name: 'available',
|
||||
footer: false
|
||||
});
|
||||
|
||||
that.selected_table = IPA.table_widget({
|
||||
entity: that.entity,
|
||||
name: 'selected'
|
||||
name: 'selected',
|
||||
footer: false
|
||||
});
|
||||
|
||||
if (spec.columns) {
|
||||
|
||||
@@ -1629,6 +1629,7 @@ IPA.dns.record_type_table_widget = function(spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.columns = spec.columns || [];
|
||||
spec.footer = spec.footer === undefined ? false : spec.footer;
|
||||
|
||||
spec.columns.push({
|
||||
name: 'position',
|
||||
|
||||
@@ -107,6 +107,7 @@ IPA.rule_details_widget = function(spec) {
|
||||
IPA.rule_association_table_widget = function(spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.footer = spec.footer === undefined ? false : spec.footer;
|
||||
|
||||
var that = IPA.association_table_widget(spec);
|
||||
|
||||
|
||||
@@ -2393,6 +2393,12 @@ IPA.table_widget = function (spec) {
|
||||
that.save_values = spec.save_values === undefined ? true : spec.save_values;
|
||||
that['class'] = spec['class'];
|
||||
|
||||
/**
|
||||
* Flag to render footer
|
||||
* @property {boolean}
|
||||
*/
|
||||
that.footer = spec.footer === undefined ? true : spec.footer;
|
||||
|
||||
that.pagination = spec.pagination;
|
||||
that.current_page = 1;
|
||||
that.total_pages = 1;
|
||||
@@ -2521,7 +2527,9 @@ IPA.table_widget = function (spec) {
|
||||
that.tbody.css('height', that.height);
|
||||
}
|
||||
|
||||
that.create_footer();
|
||||
if (that.footer) {
|
||||
that.create_footer();
|
||||
}
|
||||
|
||||
that.set_enabled(that.enabled);
|
||||
};
|
||||
@@ -2911,7 +2919,9 @@ IPA.table_widget = function (spec) {
|
||||
|
||||
that.clear = function() {
|
||||
that.empty();
|
||||
that.summary.text('');
|
||||
if (that.footer) {
|
||||
that.summary.text('');
|
||||
}
|
||||
};
|
||||
|
||||
//column initialization
|
||||
|
||||
Reference in New Issue
Block a user