Changeset - 8de1837484e6
[Not reviewed]
default
0 3 0
domruf - 8 years ago 2017-10-28 20:22:54
dominikruf@gmail.com
less: use upstream's dataTables.bootstrap style instead of jquery.dataTables.css

See https://datatables.net/examples/styling/bootstrap.html .

- use official dataTables.bootstrap.css and dataTables.bootstrap.js
- add datatable less style block to use kallithea font icons
- move dataTables related style to this new block to have them in one place
- remove style that is obsolete, overrides or gets overriden by dataTables.bootstrap.css
3 files changed with 43 insertions and 77 deletions:
0 comments (0 inline, 0 general)
kallithea/public/less/main.less
Show inline comments
 
@@ -10,7 +10,7 @@
 

	
 
/* 3rd party styles */
 
@import "node_modules/bootstrap/less/bootstrap.less";
 
@import (inline) "../css/jquery.dataTables.css";
 
@import (inline) "3rd-party/dataTables.bootstrap.css";
 
@import (less) "../js/select2/select2.css";
 
@import (less) "../js/select2/select2-bootstrap.css";
 

	
kallithea/public/less/style.less
Show inline comments
 
@@ -109,6 +109,44 @@ input.error {
 
  .alert-danger;
 
}
 

	
 
/* datatable */
 
.dataTables_left {
 
  .pull-left;
 
}
 
.dataTables_right {
 
  .pull-right;
 
}
 

	
 
/* make all datatable paginations small */
 
.dataTables_paginate .pagination {
 
  .pagination-sm;
 
}
 

	
 
/* show column sort icons in our font ... and before column header */
 
table.dataTable {
 
  .sorting_asc:before {
 
    font-family: "kallithea";
 
    content: "\23f6";
 
    padding-right: 8px;
 
  }
 
  .sorting_desc:before {
 
    font-family: "kallithea";
 
    content: "\23f7";
 
    padding-right: 8px;
 
  }
 
  .sorting:before {
 
    font-family: "kallithea";
 
    content: "\2195";
 
    padding-right: 8px;
 
    opacity: 0.5;
 
  }
 
  .sorting_asc:after,
 
  .sorting_desc:after,
 
  .sorting:after {
 
    content: "" !important;
 
  }
 
}
 

	
 
/* language bars (summary page) */
 
#lang_stats {
 
  .progress-bar {
 
@@ -171,28 +209,9 @@ div.panel div.panel-heading {
 
  font-weight: 700;
 
}
 

	
 
/* no extra vertical margin */
 
#content div.panel ul.pagination {
 
  margin: 10px 0 0 0;
 
}
 
#content div.panel ul.pagination > li > a,
 
#content div.panel ul.pagination > li > span {
 
  background: #ebebeb url("../images/pager.png") repeat-x;
 
  color: #4A4A4A;
 
  font-weight: 700;
 
  border-top: 1px solid #dedede;
 
  border-left: 1px solid #cfcfcf;
 
  border-bottom: 1px solid #c4c4c4;
 
  border-right: 1px solid #cfcfcf;
 
}
 
#content div.panel ul.pagination > li.active > span,
 
#content div.panel ul.pagination > li:hover > a,
 
#content div.panel ul.pagination > li:active > a {
 
  background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
  border-top: 1px solid #ccc;
 
  border-left: 1px solid #bebebe;
 
  border-bottom: 1px solid #afafaf;
 
  border-right: 1px solid #bebebe;
 
  color: #515151;
 
  margin: 0;
 
}
 

	
 
/* remove margin below footer */
 
@@ -915,56 +934,7 @@ div.comment-prev-next-links div.next-com
 
#comments-general-comments div.comment-prev-next-links div.next-comment {
 
  margin-left: 0;
 
}
 
body table.dataTable thead .sorting {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_desc {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc_disabled {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_desc_disabled {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc::after {
 
  font-family: "kallithea";
 
  content: "\23f6";
 
}
 
body table.dataTable thead .sorting_desc::after {
 
  font-family: "kallithea";
 
  content: "\23f7";
 
}
 
.dataTables_wrapper .dataTables_left {
 
  float: left !important;
 
}
 
.dataTables_wrapper .dataTables_right {
 
  float: right;
 
}
 
.dataTables_wrapper .dataTables_right > div {
 
  padding-left: 30px;
 
}
 
.dataTables_wrapper .dataTables_info {
 
  clear: none;
 
  padding-top: 3px;
 
}
 
.dataTables_wrapper .dataTables_paginate {
 
  padding-top: 0;
 
}
 
.dataTables_wrapper .dataTables_paginate .paginate_button {
 
  padding: 3px 10px;
 
}
 
.dataTables_wrapper .dataTables_paginate > a.paginate_button {
 
  padding-top: 1px;
 
  border: 0 !important;
 
}
 
.dataTables_wrapper label {
 
  margin-bottom: 0;
 
  font-weight: inherit;
 
}
 

	
 
#content div.panel .changelog-panel > .changelog-heading,
 
#content div.panel .changelog-panel > ul.pagination {
 
  margin-left: 100px;
 
@@ -983,11 +953,6 @@ body table.dataTable thead .sorting_desc
 
  }
 
}
 

	
 
/* make all datatable paginations small */
 
.dataTables_paginate .pagination {
 
  .pagination-sm;
 
}
 

	
 
/* pygments style */
 
div.search-code-body pre .match {
 
  background-color: #FAFFA6;
kallithea/templates/base/root.html
Show inline comments
 
@@ -71,6 +71,7 @@
 
        <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/jquery.min.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/jquery.dataTables.min.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/dataTables.bootstrap.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.kallithea_version)}"></script>
0 comments (0 inline, 0 general)