You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/11/30 17:58:34 UTC
[cloudstack] 10/12: fix thead and tbody in separate table,
causes tables to appear weird
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit f5da1d42bd8c4754a56e8aa2e7c91c72eb2e8ab6
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Thu Nov 30 18:12:37 2017 +0530
fix thead and tbody in separate table, causes tables to appear weird
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
ui/css/cloudstack3.css | 3 +--
ui/scripts/ui/widgets/dataTable.js | 13 +++----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 987f35d..519778b 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -96,7 +96,7 @@ a:hover {
/*Table*/
table {
- width: 940px;
+ width: 955px;
max-width: 977px;
margin: 15px 15px 12px 12px;
font-size: 13px;
@@ -1307,7 +1307,6 @@ div.panel div.list-view {
div.panel div.list-view div.data-table table {
width: 955px;
- margin-top: 44px;
}
.detail-view div.list-view div.data-table table {
diff --git a/ui/scripts/ui/widgets/dataTable.js b/ui/scripts/ui/widgets/dataTable.js
index 4574052..216487f 100644
--- a/ui/scripts/ui/widgets/dataTable.js
+++ b/ui/scripts/ui/widgets/dataTable.js
@@ -78,19 +78,12 @@
return true;
};
- var splitTable = function() {
+ var reattachTable = function() {
var $mainContainer = $('<div>')
.addClass('data-table')
.appendTo($table.parent())
- .append(
- $table.detach()
+ .append($table.detach()
);
- $table = $mainContainer;
- var $theadContainer = $('<div>').addClass('fixed-header').prependTo($table);
- var $theadTable = $('<table>').appendTo($theadContainer).attr('nowrap', 'nowrap');
- var $thead = $table.find('thead').detach().appendTo($theadTable);
-
- return $thead;
};
/**
@@ -289,7 +282,7 @@
var init = function() {
var noSelect = options && options.noSelect == true ? true : false;
if (!$table.closest('div.data-table').size() && !$table.hasClass('no-split')) {
- splitTable();
+ reattachTable();
$table.find('tbody').closest('table').addClass('body');
}
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.