summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-24 12:08:28 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-24 12:08:28 +0300
commit9587506124f2a36f9b844da2c9fe17a26fe1daa9 (patch)
tree89abd47adb5f17c9910cdb0cf020fdd1d24f045f
parent550c1828a3c4bc61ae95c9fe123450ab0897e219 (diff)
downloadgitlab-ce-9587506124f2a36f9b844da2c9fe17a26fe1daa9.tar.gz
Dont override default table with bootstrap class. Refactor table css
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap.scss1
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap/files.scss4
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap/mixins.scss8
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap/tables.scss68
-rw-r--r--app/assets/stylesheets/sections/tree.scss42
-rw-r--r--app/views/projects/tree/_tree.html.haml2
-rw-r--r--app/views/projects/tree/_tree_item.html.haml2
7 files changed, 31 insertions, 96 deletions
diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss
index 1b24683fd97..faf36b702c0 100644
--- a/app/assets/stylesheets/gitlab_bootstrap.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap.scss
@@ -62,6 +62,5 @@ $baseLineHeight: 18px !default;
@import "gitlab_bootstrap/buttons.scss";
@import "gitlab_bootstrap/blocks.scss";
@import "gitlab_bootstrap/files.scss";
-@import "gitlab_bootstrap/tables.scss";
@import "gitlab_bootstrap/lists.scss";
@import "gitlab_bootstrap/forms.scss";
diff --git a/app/assets/stylesheets/gitlab_bootstrap/files.scss b/app/assets/stylesheets/gitlab_bootstrap/files.scss
index a0d6682eb8f..8ba8c93e3d6 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/files.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/files.scss
@@ -6,6 +6,10 @@
border: 1px solid #CCC;
margin-bottom: 1em;
+ table {
+ @extend .table;
+ }
+
.file-title {
border-bottom: 1px solid #bbb;
@include bg-dark-gray-gradient;
diff --git a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
index e7daf8f43b4..8b975a12cf7 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
@@ -95,6 +95,14 @@
font-size: 14px;
line-height: 1.5;
}
+
+ table {
+ @extend .table;
+ @extend .table-bordered;
+ th {
+ background: #EEE;
+ }
+ }
}
@mixin page-title {
diff --git a/app/assets/stylesheets/gitlab_bootstrap/tables.scss b/app/assets/stylesheets/gitlab_bootstrap/tables.scss
deleted file mode 100644
index 29ec1b584bd..00000000000
--- a/app/assets/stylesheets/gitlab_bootstrap/tables.scss
+++ /dev/null
@@ -1,68 +0,0 @@
-table {
- @extend .table;
- @extend .table-striped;
- border: 1px solid #CCC;
- width: 100%;
-
- &.low {
- td {
- line-height: 18px;
- }
- }
-
- &.headless {
- tr:first-child td{
- border-top: 1px solid #CCC;
- }
- }
-
- th {
- font-weight: normal;
- font-size: 15px;
- vertical-align: middle;
- border-bottom: 1px solid #CCC;
- text-shadow: 0 1px 1px #fff;
-
- ul.nav {
- text-shadow: none;
- margin: 0;
- }
- }
-
- th, td {
- padding: 10px;
- line-height: 18px;
- text-align: left;
- }
-
- td {
- border-color: #f1f1f1;
- line-height: 28px;
-
- .s16 {
- margin-top: 5px;
- margin-right: 5px;
- }
-
- &:first-child {
- border-left: 1px solid #CCC;
- }
-
- &:last-child {
- border-right: 1px solid #CCC;
- }
- }
-
- &.bordered {
- @extend .table-bordered;
- }
-
- &.lite {
- border: none;
- box-shadow: none;
- tr, td {
- border: none;
- background:none !important;
- }
- }
-}
diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss
index 3f163bc163c..2a84741f0d6 100644
--- a/app/assets/stylesheets/sections/tree.scss
+++ b/app/assets/stylesheets/sections/tree.scss
@@ -13,13 +13,21 @@
}
.tree-table {
+ @extend .table;
@include border-radius(0);
- .tree-item {
- td {
+
+ tr {
+ td, th {
padding: 8px 10px;
- strong {
- font-weight: normal;
- }
+ line-height: 20px;
+ }
+ th {
+ font-weight: normal;
+ font-size: 15px;
+ border-bottom: 1px solid #CCC;
+ }
+ td {
+ border-color: #F1F1F1;
}
&:hover {
td {
@@ -29,12 +37,11 @@
}
cursor: pointer;
}
-
&.selected {
td {
- background: $hover;
- border-top: 1px solid #ADF;
- border-bottom: 1px solid #ADF;
+ background: #f5f5f5;
+ border-top: 1px solid #EEE;
+ border-bottom: 1px solid #EEE;
}
}
}
@@ -56,21 +63,6 @@
}
}
- .tree-table {
- border: none;
-
- th .btn {
- margin: -2px -1px;
- padding: 2px 10px;
- }
- td {
- line-height: 20px;
- background: #fff;
- border-left: none;
- border-right: none;
- }
- }
-
.tree_author {
padding-right: 8px;
@@ -125,4 +117,4 @@
.tree-ref-holder {
float: left;
margin-top: 5px;
-} \ No newline at end of file
+}
diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml
index 0b1148b3e74..ae5f30c0004 100644
--- a/app/views/projects/tree/_tree.html.haml
+++ b/app/views/projects/tree/_tree.html.haml
@@ -26,7 +26,7 @@
= link_to @commit.short_id, project_commit_path(@project, @commit)
&ndash;
= truncate(@commit.title, length: 50)
- %th= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny pull-right"
+ %th= link_to "history", project_commits_path(@project, @id), class: "pull-right"
- if tree.up_dir?
%tr.tree-item
diff --git a/app/views/projects/tree/_tree_item.html.haml b/app/views/projects/tree/_tree_item.html.haml
index 0a76d5c21b6..f8856afc866 100644
--- a/app/views/projects/tree/_tree_item.html.haml
+++ b/app/views/projects/tree/_tree_item.html.haml
@@ -1,7 +1,7 @@
%tr{ class: "tree-item #{tree_hex_class(tree_item)}" }
%td.tree-item-file-name
= tree_icon(type)
- %strong= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
+ %span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
%td.tree_time_ago.cgray
%span.log_loading.hide
Loading commit data...