summaryrefslogtreecommitdiffstats
path: root/install/ui
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-04-17 14:38:43 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-10 10:23:27 +0200
commit9c1da611ea94046090dd88d320253d2cded5c76e (patch)
tree3a81a94686da6b021c194b46723b7cf88d57a49a /install/ui
parent21651d9d3f463f5c07355d0f4e52a8d3867d88cc (diff)
downloadfreeipa-9c1da611ea94046090dd88d320253d2cded5c76e.tar.gz
freeipa-9c1da611ea94046090dd88d320253d2cded5c76e.tar.xz
freeipa-9c1da611ea94046090dd88d320253d2cded5c76e.zip
webui: do not show empty table footer
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r--install/ui/src/freeipa/automember.js1
-rw-r--r--install/ui/src/freeipa/dialog.js6
-rw-r--r--install/ui/src/freeipa/dns.js1
-rw-r--r--install/ui/src/freeipa/rule.js1
-rw-r--r--install/ui/src/freeipa/widget.js14
5 files changed, 19 insertions, 4 deletions
diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js
index a16b3e1a1..a03971b35 100644
--- a/install/ui/src/freeipa/automember.js
+++ b/install/ui/src/freeipa/automember.js
@@ -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 || [], [
{
diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js
index 578acb55d..7b156cfdf 100644
--- a/install/ui/src/freeipa/dialog.js
+++ b/install/ui/src/freeipa/dialog.js
@@ -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) {
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index a3685b14e..522b68908 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -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',
diff --git a/install/ui/src/freeipa/rule.js b/install/ui/src/freeipa/rule.js
index 9109e06e0..f8d182b38 100644
--- a/install/ui/src/freeipa/rule.js
+++ b/install/ui/src/freeipa/rule.js
@@ -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);
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index da82dafea..863399f61 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -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