[Kimchi-devel] [PATCH] [Wok 1/3] Initial commit for Datatables.net and Moment.JS

sguimaraes943 at gmail.com sguimaraes943 at gmail.com
Thu Jun 30 20:09:54 UTC 2016


From: Samuel Guimarães <sguimaraes943 at gmail.com>

Signed-off-by: Samuel Guimarães <sguimaraes943 at gmail.com>
---
 configure.ac                              |   3 +
 ui/css/Makefile.am                        |   8 +-
 ui/css/datatables.bootstrap.css           | 243 +++++++++++++++++++++++++
 ui/css/src/datatables.bootstrap.scss      | 289 ++++++++++++++++++++++++++++++
 ui/js/src/wok.datatables.js               |  42 +++++
 ui/libs/Makefile.am                       |   2 +-
 ui/libs/datatables/Makefile.am            |  23 +++
 ui/libs/datatables/css/Makefile.am        |  21 +++
 ui/libs/datatables/css/datatables.min.css |  24 +++
 ui/libs/moment/LICENSE                    |  22 +++
 ui/libs/moment/Makefile.am                |  21 +++
 ui/pages/login.html.tmpl                  |   4 +
 ui/pages/wok-ui.html.tmpl                 |   4 +
 13 files changed, 703 insertions(+), 3 deletions(-)
 create mode 100644 ui/css/datatables.bootstrap.css
 create mode 100644 ui/css/src/datatables.bootstrap.scss
 create mode 100644 ui/js/src/wok.datatables.js
 create mode 100644 ui/libs/datatables/Makefile.am
 create mode 100644 ui/libs/datatables/css/Makefile.am
 create mode 100644 ui/libs/datatables/css/datatables.min.css
 create mode 100644 ui/libs/moment/LICENSE
 create mode 100644 ui/libs/moment/Makefile.am

diff --git a/configure.ac b/configure.ac
index b7ffee4..12f6c67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,9 @@ AC_CONFIG_FILES([
     ui/libs/jquery-ui/themes/base/images/Makefile
     ui/libs/list-js/Makefile
     ui/libs/lodash/Makefile
+    ui/libs/moment/Makefile
+    ui/libs/datatables/Makefile
+    ui/libs/datatables/css/Makefile
     ui/libs/typeahead/Makefile
     ui/pages/Makefile
     ui/pages/help/Makefile
diff --git a/ui/css/Makefile.am b/ui/css/Makefile.am
index aee33d7..a779e61 100644
--- a/ui/css/Makefile.am
+++ b/ui/css/Makefile.am
@@ -22,7 +22,7 @@ SUBDIRS = fontawesome opensans
 EXTRA_DIST = theme-default
 
 cssdir = $(datadir)/wok/ui/css
-dist_css_DATA = theme-default.min.css jquery-ui.custom.css wok.css bootstrap.custom.css bootstrap-select.custom.css settings.css
+dist_css_DATA = theme-default.min.css jquery-ui.custom.css wok.css bootstrap.custom.css bootstrap-select.custom.css settings.css datatables.bootstrap.css
 
 wok: src/wok.scss src/modules/*.scss
 	echo "Compiling .scss file $<"
@@ -40,7 +40,11 @@ bootstrap-select: src/bootstrap-select.custom.scss
 	echo "Compiling .scss file $<"
 	sassc -s expanded $< bootstrap-select.custom.css
 
-css: wok bootstrap bootstrap-select settings
+datatables: src/datatables.bootstrap.scss
+	echo "Compiling .scss file $<"
+	sassc -s expanded $< datatables.bootstrap.css
+
+css: wok bootstrap bootstrap-select settings datatables
 
 theme-default.min.css: theme-default/*.css
 	cat $^ > $@
diff --git a/ui/css/datatables.bootstrap.css b/ui/css/datatables.bootstrap.css
new file mode 100644
index 0000000..2ba5811
--- /dev/null
+++ b/ui/css/datatables.bootstrap.css
@@ -0,0 +1,243 @@
+table.dataTable {
+  clear: both;
+  margin-top: 6px !important;
+  margin-bottom: 6px !important;
+  max-width: none !important;
+  border-collapse: separate !important;
+}
+
+table.dataTable td,
+table.dataTable th {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+}
+
+table.dataTable td.dataTables_empty,
+table.dataTable th.dataTables_empty {
+  text-align: center;
+}
+
+table.dataTable.nowrap th,
+table.dataTable.nowrap td {
+  white-space: nowrap;
+}
+
+div.dataTables_wrapper div.dataTables_length {
+  text-align: right;
+  padding-left: 10px;
+}
+
+div.dataTables_wrapper div.dataTables_length label {
+  font-weight: normal;
+  text-align: left;
+  white-space: nowrap;
+}
+
+div.dataTables_wrapper div.dataTables_length select, div.dataTables_wrapper div.dataTables_length .btn {
+  width: 66px;
+  display: inline-block;
+}
+
+div.dataTables_wrapper div.dataTables_filter {
+  text-align: right;
+}
+
+div.dataTables_wrapper div.dataTables_filter label {
+  font-weight: normal;
+  white-space: nowrap;
+  text-align: left;
+}
+
+div.dataTables_wrapper div.dataTables_filter input {
+  margin-left: 0.5em;
+  display: inline-block;
+  width: auto;
+}
+
+div.dataTables_wrapper div.dataTables_filter .form-control {
+  width: 514px;
+  height: 34px;
+}
+
+div.dataTables_wrapper div.dataTables_info {
+  padding-top: 8px;
+  white-space: nowrap;
+  text-align: right;
+}
+
+div.dataTables_wrapper div.dataTables_paginate {
+  margin: 0;
+  white-space: nowrap;
+  text-align: left;
+}
+
+div.dataTables_wrapper div.dataTables_paginate ul.pagination {
+  margin: 2px 0;
+  white-space: nowrap;
+}
+
+div.dataTables_wrapper div.dataTables_processing {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 200px;
+  margin-left: -100px;
+  margin-top: -26px;
+  text-align: center;
+  padding: 1em 0;
+}
+
+table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
+table.dataTable thead > tr > td.sorting_asc,
+table.dataTable thead > tr > td.sorting_desc,
+table.dataTable thead > tr > td.sorting {
+  padding-right: 30px;
+}
+
+table.dataTable thead > tr > th:active,
+table.dataTable thead > tr > td:active {
+  outline: none;
+}
+
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+  cursor: pointer;
+  position: relative;
+}
+
+table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
+table.dataTable thead .sorting_asc:before,
+table.dataTable thead .sorting_asc:after,
+table.dataTable thead .sorting_desc:before,
+table.dataTable thead .sorting_desc:after,
+table.dataTable thead .sorting_asc_disabled:before,
+table.dataTable thead .sorting_asc_disabled:after,
+table.dataTable thead .sorting_desc_disabled:before,
+table.dataTable thead .sorting_desc_disabled:after {
+  position: absolute;
+  bottom: 8px;
+  right: 8px;
+  display: block;
+  opacity: 0.3;
+  font: normal normal normal 19px/1 FontAwesome;
+  text-rendering: auto;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+table.dataTable thead .sorting:after {
+  top: 13px;
+  content: "\f107";
+  /* sort - arrow down */
+}
+
+table.dataTable thead .sorting:before {
+  top: 3px;
+  content: "\f106";
+  /* sort - arrow up */
+}
+
+table.dataTable thead .sorting_asc:after {
+  opacity: 0.8;
+  content: "\f107";
+  /* sort-by-attributes */
+  top: 13px;
+}
+
+table.dataTable thead .sorting_desc:after {
+  opacity: 0.8;
+  content: "\f107";
+  /* sort-by-attributes-alt */
+  top: 3px;
+}
+
+table.dataTable thead .sorting_asc_disabled:after,
+table.dataTable thead .sorting_desc_disabled:after {
+  color: #eee;
+}
+
+table.dataTable tfoot {
+  display: none;
+}
+
+div.dataTables_scrollHead table.dataTable {
+  margin-bottom: 0 !important;
+}
+
+div.dataTables_scrollBody table {
+  border-top: none;
+  margin-top: 0 !important;
+  margin-bottom: 0 !important;
+}
+
+div.dataTables_scrollBody table thead .sorting:after,
+div.dataTables_scrollBody table thead .sorting_asc:after,
+div.dataTables_scrollBody table thead .sorting_desc:after {
+  display: none;
+}
+
+div.dataTables_scrollBody table tbody tr:first-child th,
+div.dataTables_scrollBody table tbody tr:first-child td {
+  border-top: none;
+}
+
+div.dataTables_scrollFoot table {
+  margin-top: 0 !important;
+  border-top: none;
+}
+
+ at media screen and (max-width: 767px) {
+  div.dataTables_wrapper div.dataTables_length,
+  div.dataTables_wrapper div.dataTables_filter,
+  div.dataTables_wrapper div.dataTables_info,
+  div.dataTables_wrapper div.dataTables_paginate {
+    text-align: center;
+  }
+}
+
+table.dataTable.table-condensed > thead > tr > th {
+  padding-right: 20px;
+}
+
+table.dataTable.table-condensed .sorting:after,
+table.dataTable.table-condensed .sorting_asc:after,
+table.dataTable.table-condensed .sorting_desc:after {
+  top: 6px;
+  right: 6px;
+}
+
+table.table-bordered.dataTable th,
+table.table-bordered.dataTable td {
+  border-left-width: 0;
+}
+
+table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
+table.table-bordered.dataTable td:last-child,
+table.table-bordered.dataTable td:last-child {
+  border-right-width: 0;
+}
+
+table.table-bordered.dataTable tbody th,
+table.table-bordered.dataTable tbody td {
+  border-bottom-width: 0;
+}
+
+div.dataTables_scrollHead table.table-bordered {
+  border-bottom-width: 0;
+}
+
+div.table-responsive > div.dataTables_wrapper > div.row {
+  margin: 0;
+}
+
+div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
+  padding-left: 0;
+}
+
+div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
+  padding-right: 0;
+}
diff --git a/ui/css/src/datatables.bootstrap.scss b/ui/css/src/datatables.bootstrap.scss
new file mode 100644
index 0000000..993162f
--- /dev/null
+++ b/ui/css/src/datatables.bootstrap.scss
@@ -0,0 +1,289 @@
+//
+// Project Wok
+//
+// Copyright IBM Corp, 2016
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+table.dataTable {
+    clear: both;
+    margin-top: 6px !important;
+    margin-bottom: 6px !important;
+    max-width: none !important;
+    border-collapse: separate !important;
+
+    td,
+    th {
+        -webkit-box-sizing: content-box;
+        -moz-box-sizing: content-box;
+        box-sizing: content-box;
+
+        &.dataTables_empty {
+            text-align: center;
+        }
+    }
+
+    // Style options for the table. Foundation provides its own, but it is also
+    // useful to have a few more for DataTables
+    &.nowrap {
+        th,
+        td {
+            white-space: nowrap;
+        }
+    }
+}
+
+
+// DataTables' built in feature elements
+div.dataTables_wrapper {
+    div.dataTables_length {
+        text-align: right;
+        padding-left: 10px;
+
+        label {
+            font-weight: normal;
+            text-align: left;
+            white-space: nowrap;
+        }
+
+        select, .btn {
+            width: 66px;
+            display: inline-block;
+        }
+    }
+
+    div.dataTables_filter {
+        text-align: right;
+
+        label {
+            font-weight: normal;
+            white-space: nowrap;
+            text-align: left;
+        }
+
+        input {
+            margin-left: 0.5em;
+            display: inline-block;
+            width: auto;
+        }
+
+        .form-control {
+            width: 514px; // Adust filter input with Wok filter size
+            height: 34px;
+        }
+    }
+
+    div.dataTables_info {
+        padding-top: 8px;
+        white-space: nowrap;
+        text-align: right;
+    }
+
+    div.dataTables_paginate {
+        margin: 0;
+        white-space: nowrap;
+        text-align: left;
+
+        ul.pagination {
+            margin: 2px 0;
+            white-space: nowrap;
+        }
+    }
+
+    div.dataTables_processing {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        width: 200px;
+        margin-left: -100px;
+        margin-top: -26px;
+        text-align: center;
+        padding: 1em 0;
+    }
+}
+
+
+// Sorting - using Glyphicons
+table.dataTable thead {
+    > tr > th,
+    > tr > td {
+        &.sorting_asc,
+        &.sorting_desc,
+        &.sorting {
+            padding-right: 30px;
+        }
+
+        &:active {
+            outline: none;
+        }
+    }
+
+    .sorting,
+    .sorting_asc,
+    .sorting_desc,
+    .sorting_asc_disabled,
+    .sorting_desc_disabled {
+        cursor: pointer;
+        position: relative;
+
+        &:before,
+        &:after {
+            position: absolute;
+            bottom: 8px;
+            right: 8px;
+            display: block;
+            opacity: 0.3;
+            font: normal normal normal 19px/1 FontAwesome;
+            text-rendering: auto;
+            -webkit-font-smoothing: antialiased;
+            -moz-osx-font-smoothing: grayscale;
+        }
+    }
+
+    .sorting:after {
+        top: 13px;
+        content: "\f107"; /* sort - arrow down */
+    }
+
+    .sorting:before {
+        top: 3px;
+        content: "\f106"; /* sort - arrow up */
+    }
+
+    .sorting_asc:after {
+        opacity: 0.8;
+        content: "\f107"; /* sort-by-attributes */
+        top: 13px;
+    }
+
+    .sorting_desc:after {
+        opacity: 0.8;
+        content: "\f107"; /* sort-by-attributes-alt */
+        top: 3px;
+    }
+
+    .sorting_asc_disabled:after,
+    .sorting_desc_disabled:after {
+        color: #eee;
+    }
+}
+
+table.dataTable tfoot {
+    display: none; // Wok doesn't have tfoot on tables
+}
+
+
+// Scrolling
+div.dataTables_scrollHead table.dataTable {
+    margin-bottom: 0 !important;
+}
+
+div.dataTables_scrollBody {
+    table {
+        border-top: none;
+        margin-top: 0 !important;
+        margin-bottom: 0 !important;
+
+        thead { // Hide sort icons
+            .sorting:after,
+            .sorting_asc:after,
+            .sorting_desc:after {
+                display: none;
+            }
+        }
+
+        tbody tr:first-child th,
+        tbody tr:first-child td {
+            border-top: none;
+        }
+    }
+}
+
+div.dataTables_scrollFoot table {
+    margin-top: 0 !important;
+    border-top: none;
+}
+
+
+// Responsive
+ at media screen and (max-width: 767px) {
+    div.dataTables_wrapper {
+        div.dataTables_length,
+        div.dataTables_filter,
+        div.dataTables_info,
+        div.dataTables_paginate {
+            text-align: center;
+        }
+    }
+}
+
+
+//
+// Bootstrap provides a range of styling options for table's via class name
+// that we want to full support. They sometimes require some customisations
+//
+
+// Condensed
+table.dataTable.table-condensed {
+    > thead > tr > th {
+        padding-right: 20px;
+    }
+
+    .sorting:after,
+    .sorting_asc:after,
+    .sorting_desc:after {
+        top: 6px;
+        right: 6px;
+    }
+}
+
+// Frustratingly the border-collapse:collapse used by Bootstrap makes the column
+// width calculations when using scrolling impossible to align columns. We have
+// to use `border-collapse: separate`
+table.table-bordered.dataTable {
+    th,
+    td {
+        border-left-width: 0;
+
+        &:last-child,
+        &:last-child {
+            border-right-width: 0;
+        }
+    }
+
+    tbody th,
+    tbody td {
+        border-bottom-width: 0;
+    }
+}
+
+// Bordered table
+div.dataTables_scrollHead table.table-bordered {
+    border-bottom-width: 0;
+}
+
+// Responsive tables. We use rows inside the Bootstrap responsive wrapper,
+// so they need to have their margin and padding removed
+div.table-responsive > div.dataTables_wrapper > div.row {
+    margin: 0;
+
+    > div[class^="col-"] {
+        &:first-child {
+            padding-left: 0;
+        }
+        &:last-child {
+            padding-right: 0;
+        }
+    }
+}
diff --git a/ui/js/src/wok.datatables.js b/ui/js/src/wok.datatables.js
new file mode 100644
index 0000000..a454654
--- /dev/null
+++ b/ui/js/src/wok.datatables.js
@@ -0,0 +1,42 @@
+/*
+ * Project Wok
+ *
+ * Copyright IBM Corp, 2015-2016
+ *
+ * Code derived from Project Kimchi
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Sets defalt Datatable options for Wok
+
+wok.initCompleteDataTableCallback = function(e) {
+    var tableId = $('#'+e.sTableId+'_wrapper');
+    $('.dataTables_filter input',tableId).attr("placeholder", "Filter");
+    $(".dataTables_filter label",tableId).contents().filter(function() {
+    return this.nodeType === 3;
+    }).wrap('<div class="sr-only" />');
+    $(".dataTables_length label",tableId).contents().filter(function() {
+    return this.nodeType === 3;
+    }).wrap('<div class="sr-only" />');
+    $(".dataTables_length select",tableId).selectpicker();
+    $(".dataTables tfoot",tableId).remove();
+};
+
+$.extend( true, $.fn.dataTable.defaults, {
+    "sPaginationType": "full_numbers",
+    "dom": '<"row"<"col-sm-12 filter"<"pull-right"l><"pull-right"f>>><"row"<"col-sm-12"t>><"row"<"col-sm-6 pages"p><"col-sm-6 info"i>>', 
+    "initComplete": function(settings, json) {
+        wok.initCompleteDataTableCallback(settings);
+    }
+});
\ No newline at end of file
diff --git a/ui/libs/Makefile.am b/ui/libs/Makefile.am
index 5c1140e..9732499 100644
--- a/ui/libs/Makefile.am
+++ b/ui/libs/Makefile.am
@@ -17,4 +17,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC lodash
+SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC lodash datatables moment
diff --git a/ui/libs/datatables/Makefile.am b/ui/libs/datatables/Makefile.am
new file mode 100644
index 0000000..9c3d2af
--- /dev/null
+++ b/ui/libs/datatables/Makefile.am
@@ -0,0 +1,23 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SUBDIRS = css
+
+datatablesdir = $(datadir)/wok/ui/libs/datatables
+
+dist_datatables_DATA = $(wildcard *.js) $(NULL)
diff --git a/ui/libs/datatables/css/Makefile.am b/ui/libs/datatables/css/Makefile.am
new file mode 100644
index 0000000..bedc920
--- /dev/null
+++ b/ui/libs/datatables/css/Makefile.am
@@ -0,0 +1,21 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+datatablescssdir = $(datadir)/wok/ui/libs/datatables/css
+
+dist_datatablescss_DATA = $(wildcard *.css) $(NULL)
diff --git a/ui/libs/datatables/css/datatables.min.css b/ui/libs/datatables/css/datatables.min.css
new file mode 100644
index 0000000..9a0b859
--- /dev/null
+++ b/ui/libs/datatables/css/datatables.min.css
@@ -0,0 +1,24 @@
+/*
+ * This combined file was created by the DataTables downloader builder:
+ *   https://datatables.net/download
+ *
+ * To rebuild or modify this file with the latest versions of the included
+ * software please visit:
+ *   https://datatables.net/download/#bs/dt-1.10.12/fh-3.1.2/r-2.1.0/se-1.2.0
+ *
+ * Included libraries:
+ *   DataTables 1.10.12, FixedHeader 3.1.2, Responsive 2.1.0, Select 1.2.0
+ */
+
+table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
+
+
+table.dataTable.fixedHeader-floating,table.dataTable.fixedHeader-locked{background-color:white;margin-top:0 !important;margin-bottom:0 !important}table.dataTable.fixedHeader-floating{position:fixed !important}table.dataTable.fixedHeader-locked{position:absolute !important}@media print{table.fixedHeader-floating{display:none}}
+
+
+table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#337ab7}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#337ab7}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none}
+
+
+table.dataTable tbody>tr.selected,table.dataTable tbody>tr>.selected{background-color:#08C}table.dataTable.stripe tbody>tr.odd.selected,table.dataTable.stripe tbody>tr.odd>.selected,table.dataTable.display tbody>tr.odd.selected,table.dataTable.display tbody>tr.odd>.selected{background-color:#0085c7}table.dataTable.hover tbody>tr.selected:hover,table.dataTable.hover tbody>tr>.selected:hover,table.dataTable.display tbody>tr.selected:hover,table.dataTable.display tbody>tr>.selected:hover{background-color:#0083c5}table.dataTable.order-column tbody>tr.selected>.sorting_1,table.dataTable.order-column tbody>tr.selected>.sorting_2,table.dataTable.order-column tbody>tr.selected>.sorting_3,table.dataTable.order-column tbody>tr>.selected,table.dataTable.display tbody>tr.selected>.sorting_1,table.dataTable.display tbody>tr.selected>.sorting_2,table.dataTable.display tbody>tr.selected>.sorting_3,table.dataTable.display tbody>tr>.selected{background-color:#0085c8}table.dataTable.display tbody>tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_1{background-color:#0081c1}table.dataTable.display tbody>tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_2{background-color:#0082c2}table.dataTable.display tbody>tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody>tr.odd.selected>.sorting_3{background-color:#0083c4}table.dataTable.display tbody>tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_1{background-color:#0085c8}table.dataTable.display tbody>tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_2{background-color:#0086ca}table.dataTable.display tbody>tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody>tr.even.selected>.sorting_3{background-color:#0087cb}table.dataTable.display tbody>tr.odd>.selected,table.dataTable.order-column.stripe tbody>tr.odd>.selected{background-color:#0081c1}table.dataTable.display tbody>tr.even>.selected,table.dataTable.order-column.stripe tbody>tr.even>.selected{background-color:#0085c8}table.dataTable.display tbody>tr.selected:hover>.sorting_1,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_1{background-color:#007dbb}table.dataTable.display tbody>tr.selected:hover>.sorting_2,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_2{background-color:#007ebd}table.dataTable.display tbody>tr.selected:hover>.sorting_3,table.dataTable.order-column.hover tbody>tr.selected:hover>.sorting_3{background-color:#007fbf}table.dataTable.display tbody>tr:hover>.selected,table.dataTable.display tbody>tr>.selected:hover,table.dataTable.order-column.hover tbody>tr:hover>.selected,table.dataTable.order-column.hover tbody>tr>.selected:hover{background-color:#007dbb}table.dataTable td.select-checkbox{position:relative}table.dataTable td.select-checkbox:before,table.dataTable td.select-checkbox:after{display:block;position:absolute;top:1.2em;left:50%;width:12px;height:12px;box-sizing:border-box}table.dataTable td.select-checkbox:before{content:' ';margin-top:-6px;margin-left:-6px;border:1px solid black;border-radius:3px}table.dataTable tr.selected td.select-checkbox:after{content:'\2714';margin-top:-11px;margin-left:-4px;text-align:center;text-shadow:1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9}div.dataTables_wrapper span.select-info,div.dataTables_wrapper span.select-item{margin-left:0.5em}@media screen and (max-width: 640px){div.dataTables_wrapper span.select-info,div.dataTables_wrapper span.select-item{margin-left:0;display:block}}table.dataTable tbody tr.selected,table.dataTable tbody th.selected,table.dataTable tbody td.selected{color:white}table.dataTable tbody tr.selected a,table.dataTable tbody th.selected a,table.dataTable tbody td.selected a{color:#a2d4ed}
+
+
diff --git a/ui/libs/moment/LICENSE b/ui/libs/moment/LICENSE
new file mode 100644
index 0000000..9ee5374
--- /dev/null
+++ b/ui/libs/moment/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/ui/libs/moment/Makefile.am b/ui/libs/moment/Makefile.am
new file mode 100644
index 0000000..62f42a5
--- /dev/null
+++ b/ui/libs/moment/Makefile.am
@@ -0,0 +1,21 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+momentjsdir = $(datadir)/wok/ui/libs/moment
+
+dist_momentjs_DATA = $(wildcard *.js) $(NULL)
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index b5137b1..e21117f 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -63,9 +63,11 @@
     <link rel="stylesheet" href="$href('css/jquery-ui.custom.css')">
     <link rel="stylesheet" href="$href('css/bootstrap.custom.css')">
     <link rel="stylesheet" href="$href('libs/bootstrap-select/dist/css/bootstrap-select.min.css')">
+    <link rel="stylesheet" href="$href('libs/datatables/css/datatables.min.css')">
     <link rel="stylesheet" href="$href('css/fontawesome/fontawesome.css')">
     <link rel="stylesheet" href="$href('css/opensans/opensans.css')">
     <link rel="stylesheet" href="$href('css/bootstrap-select.custom.css')">
+    <link rel="stylesheet" href="$href('css/datatables.bootstrap.css')">
     <link rel="stylesheet" href="$href('css/wok.css')">
     <script src="$href('libs/es5-shim/es5-shim.min.js')"></script>
     <script src="$href('libs/jquery/jquery.min.js')"></script>
@@ -75,6 +77,8 @@
     <script src="$href('libs/bootstrap/bootstrap.min.js')"></script>
     <script src="$href('libs/bootstrap-select/dist/js/bootstrap-select.min.js')"></script>
     <script src="$href('libs/lodash/lodash.js')"></script>
+    <script src="$href('libs/moment/moment-with-locales.min.js')"></script>
+    <script src="$href('libs/datatables/datatables.min.js')"></script>
     <script src="$href('js/wok.min.js')"></script>
 </head>
 <body class="login" onload="wok.login_main()">
diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl
index 6ea6e00..c56af3e 100644
--- a/ui/pages/wok-ui.html.tmpl
+++ b/ui/pages/wok-ui.html.tmpl
@@ -65,9 +65,11 @@
     <link rel="stylesheet" href="$href('libs/jquery-bootgrid/dist/css/jquery.bootgrid.min.css')">
     <link rel="stylesheet" href="$href('libs/bootstrap-switch/dist/css/bootstrap-switch.min.css')">
     <link rel="stylesheet" href="$href('libs/bootstrap-editable/dist/css/bootstrap-editable.css')">
+    <link rel="stylesheet" href="$href('libs/datatables/css/datatables.min.css')">
     <link rel="stylesheet" href="$href('css/fontawesome/fontawesome.css')">
     <link rel="stylesheet" href="$href('css/opensans/opensans.css')">
     <link rel="stylesheet" href="$href('css/bootstrap-select.custom.css')">
+    <link rel="stylesheet" href="$href('css/datatables.bootstrap.css')">
     <link rel="stylesheet" href="$href('css/wok.css')">
     <script src="$href('libs/es5-shim/es5-shim.min.js')"></script>
     <script src="$href('libs/jquery/jquery.min.js')"></script>
@@ -83,6 +85,8 @@
     <script src="$href('libs/bootstrap-editable/dist/js/bootstrap-editable.min.js')"></script>
     <script src="$href('libs/typeahead/typeahead.bundle.min.js')"></script>
     <script src="$href('libs/lodash/lodash.js')"></script>
+    <script src="$href('libs/moment/moment-with-locales.min.js')"></script>
+    <script src="$href('libs/datatables/datatables.min.js')"></script>
     <script src="$href('base64/jquery.base64.js')"></script>
     <script src="$href('js/wok.min.js')"></script>
     <!-- This is used for detecting if the UI needs to be built -->
-- 
1.9.3




More information about the Kimchi-devel mailing list