From 0bc00ebee88e33665b94379090f9bcd3c15df327 Mon Sep 17 00:00:00 2001 From: Stricted Date: Sun, 15 Feb 2015 05:46:28 +0100 Subject: [PATCH] remove datatables completely --- css/default/dataTables.bootstrap.css | 314 - css/default/dataTables.bootstrap.min.css | 1 - css/default/dataTables.responsive.css | 94 - css/default/dataTables.responsive.min.css | 1 - css/default/sb-admin-2.css | 26 +- css/default/sb-admin-2.min.css | 2 +- js/default/dataTables.bootstrap.js | 186 - js/default/dataTables.bootstrap.min.js | 5 - js/default/functions.js | 90 - js/default/functions.min.js | 2 +- js/default/jquery.dataTables.js | 14840 -------------------- js/default/jquery.dataTables.min.js | 157 - lib/api/smarty/plugins/function.pages.php | 2 +- templates/default/footer.tpl | 2 - templates/default/header.tpl | 2 - templates/default/index.tpl | 4 +- templates/default/recordList.tpl | 4 +- 17 files changed, 20 insertions(+), 15712 deletions(-) delete mode 100644 css/default/dataTables.bootstrap.css delete mode 100644 css/default/dataTables.bootstrap.min.css delete mode 100644 css/default/dataTables.responsive.css delete mode 100644 css/default/dataTables.responsive.min.css delete mode 100644 js/default/dataTables.bootstrap.js delete mode 100644 js/default/dataTables.bootstrap.min.js delete mode 100644 js/default/jquery.dataTables.js delete mode 100644 js/default/jquery.dataTables.min.js diff --git a/css/default/dataTables.bootstrap.css b/css/default/dataTables.bootstrap.css deleted file mode 100644 index f65e264..0000000 --- a/css/default/dataTables.bootstrap.css +++ /dev/null @@ -1,314 +0,0 @@ -div.dataTables_length label { - font-weight: normal; - text-align: left; - white-space: nowrap; -} - -div.dataTables_length select { - width: 75px; - display: inline-block; -} - -div.dataTables_filter { - text-align: right; -} - -div.dataTables_filter label { - font-weight: normal; - white-space: nowrap; - text-align: left; -} - -div.dataTables_filter input { - margin-left: 0.5em; - display: inline-block; -} - -div.dataTables_info { - padding-top: 8px; - white-space: nowrap; -} - -div.dataTables_paginate { - margin: 0; - white-space: nowrap; - text-align: right; -} - -div.dataTables_paginate ul.pagination { - margin: 2px 0; - white-space: nowrap; -} - -@media screen and (max-width: 767px) { - div.dataTables_length, - div.dataTables_filter, - div.dataTables_info, - div.dataTables_paginate { - text-align: center; - } -} - - -table.dataTable td, -table.dataTable th { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - - -table.dataTable { - clear: both; - margin-top: 6px !important; - margin-bottom: 6px !important; - max-width: none !important; -} - -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; -} - -table.dataTable thead .sorting { background: url('../images/sort_both.png') no-repeat center right; } -table.dataTable thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } -table.dataTable thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } - -table.dataTable thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } -table.dataTable thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } - -table.dataTable thead > tr > th { - padding-left: 18px; - padding-right: 18px; -} - -table.dataTable th:active { - outline: none; -} - -/* Scrolling */ -div.dataTables_scrollHead table { - margin-bottom: 0 !important; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} - -div.dataTables_scrollHead table thead tr:last-child th:first-child, -div.dataTables_scrollHead table thead tr:last-child td:first-child { - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} - -div.dataTables_scrollBody table { - border-top: none; - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -div.dataTables_scrollBody tbody tr:first-child th, -div.dataTables_scrollBody tbody tr:first-child td { - border-top: none; -} - -div.dataTables_scrollFoot table { - margin-top: 0 !important; - border-top: none; -} - -/* Frustratingly the border-collapse:collapse used by Bootstrap makes the column - width calculations when using scrolling impossible to align columns. We have - to use separate - */ -table.table-bordered.dataTable { - border-collapse: separate !important; -} -table.table-bordered thead th, -table.table-bordered thead td { - border-left-width: 0; - border-top-width: 0; -} -table.table-bordered tbody th, -table.table-bordered tbody td { - border-left-width: 0; - border-bottom-width: 0; -} -table.table-bordered th:last-child, -table.table-bordered td:last-child { - border-right-width: 0; -} -div.dataTables_scrollHead table.table-bordered { - border-bottom-width: 0; -} - - - - -/* - * TableTools styles - */ -.table.dataTable tbody tr.active td, -.table.dataTable tbody tr.active th { - background-color: #08C; - color: white; -} - -.table.dataTable tbody tr.active:hover td, -.table.dataTable tbody tr.active:hover th { - background-color: #0075b0 !important; -} - -.table.dataTable tbody tr.active th > a, -.table.dataTable tbody tr.active td > a { - color: white; -} - -.table-striped.dataTable tbody tr.active:nth-child(odd) td, -.table-striped.dataTable tbody tr.active:nth-child(odd) th { - background-color: #017ebc; -} - -table.DTTT_selectable tbody tr { - cursor: pointer; -} - -div.DTTT .btn:hover { - text-decoration: none !important; -} - -ul.DTTT_dropdown.dropdown-menu { - z-index: 2003; -} - -ul.DTTT_dropdown.dropdown-menu a { - color: #333 !important; /* needed only when demo_page.css is included */ -} - -ul.DTTT_dropdown.dropdown-menu li { - position: relative; -} - -ul.DTTT_dropdown.dropdown-menu li:hover a { - background-color: #0088cc; - color: white !important; -} - -div.DTTT_collection_background { - z-index: 2002; -} - -/* TableTools information display */ -div.DTTT_print_info { - position: fixed; - top: 50%; - left: 50%; - width: 400px; - height: 150px; - margin-left: -200px; - margin-top: -75px; - text-align: center; - color: #333; - padding: 10px 30px; - opacity: 0.95; - - background-color: white; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); -} - -div.DTTT_print_info h6 { - font-weight: normal; - font-size: 28px; - line-height: 28px; - margin: 1em; -} - -div.DTTT_print_info p { - font-size: 14px; - line-height: 20px; -} - -div.dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 60px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - padding-bottom: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0))); - background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%); - background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%); - background: -ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%); - background: -o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%); - background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%); -} - - - -/* - * FixedColumns styles - */ -div.DTFC_LeftHeadWrapper table, -div.DTFC_LeftFootWrapper table, -div.DTFC_RightHeadWrapper table, -div.DTFC_RightFootWrapper table, -table.DTFC_Cloned tr.even { - background-color: white; - margin-bottom: 0; -} - -div.DTFC_RightHeadWrapper table , -div.DTFC_LeftHeadWrapper table { - border-bottom: none !important; - margin-bottom: 0 !important; - border-top-right-radius: 0 !important; - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} - -div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child, -div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child, -div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child, -div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child { - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} - -div.DTFC_RightBodyWrapper table, -div.DTFC_LeftBodyWrapper table { - border-top: none; - margin: 0 !important; -} - -div.DTFC_RightBodyWrapper tbody tr:first-child th, -div.DTFC_RightBodyWrapper tbody tr:first-child td, -div.DTFC_LeftBodyWrapper tbody tr:first-child th, -div.DTFC_LeftBodyWrapper tbody tr:first-child td { - border-top: none; -} - -div.DTFC_RightFootWrapper table, -div.DTFC_LeftFootWrapper table { - border-top: none; - margin-top: 0 !important; -} - - -/* - * FixedHeader styles - */ -div.FixedHeader_Cloned table { - margin: 0 !important -} - diff --git a/css/default/dataTables.bootstrap.min.css b/css/default/dataTables.bootstrap.min.css deleted file mode 100644 index aad0098..0000000 --- a/css/default/dataTables.bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -div.dataTables_length label{font-weight:400;text-align:left;white-space:nowrap}div.dataTables_length select{width:75px;display:inline-block}div.dataTables_filter{text-align:right}div.dataTables_filter label{font-weight:400;white-space:nowrap;text-align:left}div.dataTables_filter input{margin-left:.5em;display:inline-block}div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}@media screen and (max-width:767px){div.dataTables_filter,div.dataTables_info,div.dataTables_length,div.dataTables_paginate{text-align:center}}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable{clear:both;margin-top:6px!important;margin-bottom:6px!important;max-width:none!important}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable thead .sorting{background:url(../images/sort_both.png) center right no-repeat}table.dataTable thead .sorting_asc{background:url(../images/sort_asc.png) center right no-repeat}table.dataTable thead .sorting_desc{background:url(../images/sort_desc.png) center right no-repeat}table.dataTable thead .sorting_asc_disabled{background:url(../images/sort_asc_disabled.png) center right no-repeat}table.dataTable thead .sorting_desc_disabled{background:url(../images/sort_desc_disabled.png) center right no-repeat}table.dataTable thead>tr>th{padding-left:18px;padding-right:18px}table.dataTable th:active{outline:0}div.dataTables_scrollHead table{margin-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}div.dataTables_scrollHead table thead tr:last-child td:first-child,div.dataTables_scrollHead table thead tr:last-child th:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.dataTables_scrollBody table{border-top:none;margin-top:0!important;margin-bottom:0!important}div.dataTables_scrollBody tbody tr:first-child td,div.dataTables_scrollBody tbody tr:first-child th{border-top:none}div.dataTables_scrollFoot table{margin-top:0!important;border-top:none}table.table-bordered.dataTable{border-collapse:separate!important}table.table-bordered thead td,table.table-bordered thead th{border-left-width:0;border-top-width:0}table.table-bordered tbody td,table.table-bordered tbody th{border-left-width:0;border-bottom-width:0}table.table-bordered td:last-child,table.table-bordered th:last-child{border-right-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}.table.dataTable tbody tr.active td,.table.dataTable tbody tr.active th{background-color:#08C;color:#fff}.table.dataTable tbody tr.active:hover td,.table.dataTable tbody tr.active:hover th{background-color:#0075b0!important}.table.dataTable tbody tr.active td>a,.table.dataTable tbody tr.active th>a{color:#fff}.table-striped.dataTable tbody tr.active:nth-child(odd) td,.table-striped.dataTable tbody tr.active:nth-child(odd) th{background-color:#017ebc}table.DTTT_selectable tbody tr{cursor:pointer}div.DTTT .btn:hover{text-decoration:none!important}ul.DTTT_dropdown.dropdown-menu{z-index:2003}ul.DTTT_dropdown.dropdown-menu a{color:#333!important}ul.DTTT_dropdown.dropdown-menu li{position:relative}ul.DTTT_dropdown.dropdown-menu li:hover a{background-color:#08c;color:#fff!important}div.DTTT_collection_background{z-index:2002}div.DTTT_print_info{position:fixed;top:50%;left:50%;width:400px;height:150px;margin-left:-200px;margin-top:-75px;text-align:center;color:#333;padding:10px 30px;opacity:.95;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.5);box-shadow:0 3px 7px rgba(0,0,0,.5)}div.DTTT_print_info h6{font-weight:400;font-size:28px;line-height:28px;margin:1em}div.DTTT_print_info p{font-size:14px;line-height:20px}div.dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:60px;margin-left:-50%;margin-top:-25px;padding-top:20px;padding-bottom:20px;text-align:center;font-size:1.2em;background:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}div.DTFC_LeftFootWrapper table,div.DTFC_LeftHeadWrapper table,div.DTFC_RightFootWrapper table,div.DTFC_RightHeadWrapper table,table.DTFC_Cloned tr.even{background-color:#fff;margin-bottom:0}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{border-bottom:none!important;margin-bottom:0!important;border-top-right-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{border-top:none;margin:0!important}div.DTFC_LeftBodyWrapper tbody tr:first-child td,div.DTFC_LeftBodyWrapper tbody tr:first-child th,div.DTFC_RightBodyWrapper tbody tr:first-child td,div.DTFC_RightBodyWrapper tbody tr:first-child th{border-top:none}div.DTFC_LeftFootWrapper table,div.DTFC_RightFootWrapper table{border-top:none;margin-top:0!important}div.FixedHeader_Cloned table{margin:0!important} \ No newline at end of file diff --git a/css/default/dataTables.responsive.css b/css/default/dataTables.responsive.css deleted file mode 100644 index b1cd2f1..0000000 --- a/css/default/dataTables.responsive.css +++ /dev/null @@ -1,94 +0,0 @@ -table.dataTable.dtr-inline.collapsed tbody td:first-child, -table.dataTable.dtr-inline.collapsed tbody th:first-child { - position: relative; - padding-left: 30px; - cursor: pointer; -} -table.dataTable.dtr-inline.collapsed tbody td:first-child:before, -table.dataTable.dtr-inline.collapsed tbody th:first-child:before { - top: 8px; - left: 4px; - height: 16px; - width: 16px; - display: block; - position: absolute; - color: white; - border: 2px solid white; - border-radius: 16px; - text-align: center; - line-height: 14px; - box-shadow: 0 0 3px #444; - box-sizing: content-box; - content: '+'; - background-color: #31b131; -} -table.dataTable.dtr-inline.collapsed tbody td:first-child.dataTables_empty:before, -table.dataTable.dtr-inline.collapsed tbody th:first-child.dataTables_empty:before { - display: none; -} -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-column tbody td.control, -table.dataTable.dtr-column tbody th.control { - position: relative; - cursor: pointer; -} -table.dataTable.dtr-column tbody td.control:before, -table.dataTable.dtr-column tbody 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: 16px; - text-align: center; - line-height: 14px; - box-shadow: 0 0 3px #444; - box-sizing: content-box; - content: '+'; - background-color: #31b131; -} -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 tr.child { - padding: 0.5em 1em; -} -table.dataTable tr.child:hover { - background: transparent !important; -} -table.dataTable tr.child ul { - display: inline-block; - list-style-type: none; - margin: 0; - padding: 0; -} -table.dataTable tr.child ul li { - border-bottom: 1px solid #efefef; - padding: 0.5em 0; - white-space: nowrap; -} -table.dataTable tr.child ul li:first-child { - padding-top: 0; -} -table.dataTable tr.child ul li:last-child { - border-bottom: none; -} -table.dataTable tr.child span.dtr-title { - display: inline-block; - min-width: 75px; - font-weight: bold; -} diff --git a/css/default/dataTables.responsive.min.css b/css/default/dataTables.responsive.min.css deleted file mode 100644 index 6caa7dd..0000000 --- a/css/default/dataTables.responsive.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable.dtr-inline.collapsed tbody td:first-child,table.dataTable.dtr-inline.collapsed tbody th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed tbody td:first-child:before,table.dataTable.dtr-inline.collapsed tbody th:first-child:before{top:8px;left:4px;height:16px;width:16px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;box-shadow:0 0 3px #444;box-sizing:content-box;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed tbody td:first-child.dataTables_empty:before,table.dataTable.dtr-inline.collapsed tbody th:first-child.dataTables_empty:before{display:none}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-column tbody td.control,table.dataTable.dtr-column tbody th.control{position:relative;cursor:pointer}table.dataTable.dtr-column tbody td.control:before,table.dataTable.dtr-column tbody th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;box-shadow:0 0 3px #444;box-sizing:content-box;content:'+';background-color:#31b131}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 tr.child{padding:.5em 1em}table.dataTable tr.child:hover{background:0 0!important}table.dataTable tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable tr.child ul li{border-bottom:1px solid #efefef;padding:.5em 0;white-space:nowrap}table.dataTable tr.child ul li:first-child{padding-top:0}table.dataTable tr.child ul li:last-child{border-bottom:none}table.dataTable tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:700} \ No newline at end of file diff --git a/css/default/sb-admin-2.css b/css/default/sb-admin-2.css index 55f2bf7..3b464dd 100644 --- a/css/default/sb-admin-2.css +++ b/css/default/sb-admin-2.css @@ -340,38 +340,38 @@ dl > dt { height: 100%; } -.dataTables_wrapper { - position: relative; - clear: both; -} - -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 { +table thead .sorting, +table thead .sorting_asc, +table thead .sorting_desc, +table thead .sorting_asc_disabled, +table thead .sorting_desc_disabled { background: 0 0; } -table.dataTable thead .sorting_asc:after { +table thead .sorting_asc:after { content: "\f0de"; float: right; font-family: fontawesome; } -table.dataTable thead .sorting_desc:after { +table thead .sorting_desc:after { content: "\f0dd"; float: right; font-family: fontawesome; } -table.dataTable thead .sorting:after { +table thead .sorting:after { content: "\f0dc"; float: right; font-family: fontawesome; color: rgba(50,50,50,.5); } +table th > a { + color: #333; + display: block; +} + .btn-circle { width: 30px; height: 30px; diff --git a/css/default/sb-admin-2.min.css b/css/default/sb-admin-2.min.css index cfb0a46..42db9e4 100644 --- a/css/default/sb-admin-2.min.css +++ b/css/default/sb-admin-2.min.css @@ -2,4 +2,4 @@ * Start Bootstrap - SB Admin 2 Bootstrap Admin Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. - */body{background-color:#222}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-default{background-color:#222;border-color:#000}.navbar li a:focus,.navbar li a:hover,.sidebar li a:focus,.sidebar li a:hover{outline:0;background-color:#000!important}.navbar li a,.sidebar li a{color:#9d9d9d}.sidebar li ul{padding:0}.navbar li a:hover,.sidebar li a:hover{color:#fff}.sidebar li a.active{color:#fff;background-color:#080808}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}table>tbody>tr>td>a>span{color:#333}.footer,.footer>p>a{text-align:center;color:#9d9d9d;margin-top:10px}.btn-gr-gray{margin-top:-15px;margin-bottom:5px;margin-left:5px;border-radius:15px;background-color:#F5F5F5;background-image:-moz-linear-gradient(top,#FFF,#E6E6E6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#FFF),to(#E6E6E6));background-image:-webkit-linear-gradient(top,#FFF,#E6E6E6);background-image:-o-linear-gradient(top,#FFF,#E6E6E6);background-image:linear-gradient(to bottom,#FFF,#E6E6E6);background-repeat:repeat-x;border:1px solid #CCC;color:#333;border-color:#E6E6E6 #E6E6E6 #BFBFBF;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);box-shadow:none}.btn-gr-gray:active,.btn-gr-gray:focus,.btn-gr-gray:hover{background:#F5F5F5;color:#333;border-color:#E6E6E6 #E6E6E6 #BFBFBF;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25)}.btn-gr-gray .caret{border-top-color:#333}.page-header.pull-right{padding-bottom:9px;margin:10px 0 0;border-bottom:0 solid #eee}.breadcrumb>li,.breadcrumb>li>a{color:#c7c7c7!important}.breadcrumb>li.active,.breadcrumb>li.active>a{color:#9d9d9d!important}.label-white{color:#000!important;background-color:#FFF!important}.badge-red{background-color:#c00!important;color:#fee!important}.badge-black{background-color:#333;color:#fff}fieldset{padding-top:5px}dl>dd{margin-left:120px}dl>dt{float:left;text-align:right;width:100px}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links .dropdown-menu li:last-child{margin-right:0}.navbar-top-links .dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar .nav-second-level li,.sidebar .nav-third-level li{border-bottom:0!important}.sidebar .nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks,.navbar-top-links .dropdown-user{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-danger.btn-outline:hover,.btn-info.btn-outline:hover,.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-warning.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li .chat-body p{margin:0}.chat .glyphicon,.panel .slidedown .glyphicon{margin-right:5px}.chat-panel .panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}.dataTables_wrapper{position:relative;clear:both}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{background:0 0}table.dataTable thead .sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead .sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead .sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red .panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow .panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13} \ No newline at end of file + */body{background-color:#222}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-default{background-color:#222;border-color:#000}.navbar li a:focus,.navbar li a:hover,.sidebar li a:focus,.sidebar li a:hover{outline:0;background-color:#000!important}.navbar li a,.sidebar li a{color:#9d9d9d}.sidebar li ul{padding:0}.navbar li a:hover,.sidebar li a:hover{color:#fff}.sidebar li a.active{color:#fff;background-color:#080808}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}table>tbody>tr>td>a>span{color:#333}.footer,.footer>p>a{text-align:center;color:#9d9d9d;margin-top:10px}.btn-gr-gray{margin-top:-15px;margin-bottom:5px;margin-left:5px;border-radius:15px;background-color:#F5F5F5;background-image:-moz-linear-gradient(top,#FFF,#E6E6E6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#FFF),to(#E6E6E6));background-image:-webkit-linear-gradient(top,#FFF,#E6E6E6);background-image:-o-linear-gradient(top,#FFF,#E6E6E6);background-image:linear-gradient(to bottom,#FFF,#E6E6E6);background-repeat:repeat-x;border:1px solid #CCC;color:#333;border-color:#E6E6E6 #E6E6E6 #BFBFBF;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);box-shadow:none}.btn-gr-gray:active,.btn-gr-gray:focus,.btn-gr-gray:hover{background:#F5F5F5;color:#333;border-color:#E6E6E6 #E6E6E6 #BFBFBF;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25)}.btn-gr-gray .caret{border-top-color:#333}.page-header.pull-right{padding-bottom:9px;margin:10px 0 0;border-bottom:0 solid #eee}.breadcrumb>li,.breadcrumb>li>a{color:#c7c7c7!important}.breadcrumb>li.active,.breadcrumb>li.active>a{color:#9d9d9d!important}.label-white{color:#000!important;background-color:#FFF!important}.badge-red{background-color:#c00!important;color:#fee!important}.badge-black{background-color:#333;color:#fff}fieldset{padding-top:5px}dl>dd{margin-left:120px}dl>dt{float:left;text-align:right;width:100px}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links .dropdown-menu li:last-child{margin-right:0}.navbar-top-links .dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar .nav-second-level li,.sidebar .nav-third-level li{border-bottom:0!important}.sidebar .nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks,.navbar-top-links .dropdown-user{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-danger.btn-outline:hover,.btn-info.btn-outline:hover,.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-warning.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li .chat-body p{margin:0}.chat .glyphicon,.panel .slidedown .glyphicon{margin-right:5px}.chat-panel .panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}table thead .sorting,table thead .sorting_asc,table thead .sorting_asc_disabled,table thead .sorting_desc,table thead .sorting_desc_disabled{background:0 0}table thead .sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table thead .sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table thead .sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}table th>a{color:#333;display:block}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red .panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow .panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13} \ No newline at end of file diff --git a/js/default/dataTables.bootstrap.js b/js/default/dataTables.bootstrap.js deleted file mode 100644 index 3af2f72..0000000 --- a/js/default/dataTables.bootstrap.js +++ /dev/null @@ -1,186 +0,0 @@ -/*! DataTables Bootstrap 3 integration - * ©2011-2014 SpryMedia Ltd - datatables.net/license - */ - -/** - * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and - * DataTables 1.10 or newer. - * - * This file sets the defaults and adds options to DataTables to style its - * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap - * for further information. - */ -(function(window, document, undefined){ - -var factory = function( $, DataTable ) { -"use strict"; - - -/* Set the defaults for DataTables initialisation */ -$.extend( true, DataTable.defaults, { - dom: - "<'row'<'col-sm-6'l><'col-sm-6'f>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-6'i><'col-sm-9'p>>", - renderer: 'bootstrap' -} ); - - -/* Default class modification */ -$.extend( DataTable.ext.classes, { - sWrapper: "dataTables_wrapper form-inline dt-bootstrap", - sFilterInput: "form-control input-sm", - sLengthSelect: "form-control input-sm" -} ); - - -/* Bootstrap paging button renderer */ -DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { - var api = new DataTable.Api( settings ); - var classes = settings.oClasses; - var lang = settings.oLanguage.oPaginate; - var btnDisplay, btnClass; - - var attach = function( container, buttons ) { - var i, ien, node, button; - var clickHandler = function ( e ) { - e.preventDefault(); - if ( !$(e.currentTarget).hasClass('disabled') ) { - api.page( e.data.action ).draw( false ); - } - }; - - for ( i=0, ien=buttons.length ; i 0 ? - '' : ' disabled'); - break; - - case 'previous': - btnDisplay = lang.sPrevious; - btnClass = button + (page > 0 ? - '' : ' disabled'); - break; - - case 'next': - btnDisplay = lang.sNext; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - case 'last': - btnDisplay = lang.sLast; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - default: - btnDisplay = button + 1; - btnClass = page === button ? - 'active' : ''; - break; - } - - if ( btnDisplay ) { - node = $('
  • ', { - 'class': classes.sPageButton+' '+btnClass, - 'aria-controls': settings.sTableId, - 'tabindex': settings.iTabIndex, - 'id': idx === 0 && typeof button === 'string' ? - settings.sTableId +'_'+ button : - null - } ) - .append( $('', { - 'href': '#' - } ) - .html( btnDisplay ) - ) - .appendTo( container ); - - settings.oApi._fnBindAction( - node, {action: button}, clickHandler - ); - } - } - } - }; - - attach( - $(host).empty().html('
      ').children('ul'), - buttons - ); -}; - - -/* - * TableTools Bootstrap compatibility - * Required TableTools 2.1+ - */ -if ( DataTable.TableTools ) { - // Set the classes that TableTools uses to something suitable for Bootstrap - $.extend( true, DataTable.TableTools.classes, { - "container": "DTTT btn-group", - "buttons": { - "normal": "btn btn-default", - "disabled": "disabled" - }, - "collection": { - "container": "DTTT_dropdown dropdown-menu", - "buttons": { - "normal": "", - "disabled": "disabled" - } - }, - "print": { - "info": "DTTT_print_info" - }, - "select": { - "row": "active" - } - } ); - - // Have the collection use a bootstrap compatible drop down - $.extend( true, DataTable.TableTools.DEFAULTS.oTags, { - "collection": { - "container": "ul", - "button": "li", - "liner": "a" - } - } ); -} - -}; // /factory - - -// Define as an AMD module if possible -if ( typeof define === 'function' && define.amd ) { - define( ['jquery', 'datatables'], factory ); -} -else if ( typeof exports === 'object' ) { - // Node/CommonJS - factory( require('jquery'), require('datatables') ); -} -else if ( jQuery ) { - // Otherwise simply initialise as normal, stopping multiple evaluation - factory( jQuery, jQuery.fn.dataTable ); -} - - -})(window, document); - diff --git a/js/default/dataTables.bootstrap.min.js b/js/default/dataTables.bootstrap.min.js deleted file mode 100644 index 918b964..0000000 --- a/js/default/dataTables.bootstrap.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! - DataTables Bootstrap 3 integration - ©2011-2014 SpryMedia Ltd - datatables.net/license -*/ -!function(){var e=function(e,t){"use strict";e.extend(!0,t.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-9'p>>",renderer:"bootstrap"}),e.extend(t.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"}),t.ext.renderer.pageButton.bootstrap=function(a,n,o,s,r,l){var i,d,c=new t.Api(a),u=a.oClasses,b=a.oLanguage.oPaginate,p=function(t,n){var s,f,T,m,g=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||c.page(t.data.action).draw(!1)};for(s=0,f=n.length;f>s;s++)if(m=n[s],e.isArray(m))p(t,m);else{switch(i="",d="",m){case"ellipsis":i="…",d="disabled";break;case"first":i=b.sFirst,d=m+(r>0?"":" disabled");break;case"previous":i=b.sPrevious,d=m+(r>0?"":" disabled");break;case"next":i=b.sNext,d=m+(l-1>r?"":" disabled");break;case"last":i=b.sLast,d=m+(l-1>r?"":" disabled");break;default:i=m+1,d=r===m?"active":""}i&&(T=e("
    • ",{"class":u.sPageButton+" "+d,"aria-controls":a.sTableId,tabindex:a.iTabIndex,id:0===o&&"string"==typeof m?a.sTableId+"_"+m:null}).append(e("",{href:"#"}).html(i)).appendTo(t),a.oApi._fnBindAction(T,{action:m},g))}};p(e(n).empty().html('
        ').children("ul"),s)},t.TableTools&&(e.extend(!0,t.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),e.extend(!0,t.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"==typeof define&&define.amd?define(["jquery","datatables"],e):"object"==typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)}(window,document); \ No newline at end of file diff --git a/js/default/functions.js b/js/default/functions.js index 56c235c..f87f682 100644 --- a/js/default/functions.js +++ b/js/default/functions.js @@ -51,15 +51,6 @@ $(document).ready(function(){ type: 'post', success: function(output) { if (output == 'success') { - // check if table is a dataTable - /* - if (t.parent().parent().parent().parent().hasClass('dataTable')) { - // remove entry from dataTable - var row = t.parent().parent().closest("tr").get(0); - var oTable = $('.dataTable').dataTable(); - oTable.fnDeleteRow(oTable.fnGetPosition(row)); - } - */ t.parent().parent().remove(); } else { @@ -176,87 +167,6 @@ $(document).ready(function(){ }); })(); - /* dataTable */ - /* - (function(){ - $('.dataTable').each(function () { - var t = $(this); - var dontsort = []; - var data = undefined; - var sortType = undefined; - var sortTarget = []; - var length = undefined; - - // dynamic default sort - // example: data-sort="asc,1" - data = t.attr('data-sort'); - if (data) { - var a = data.split(',') - a.forEach(function(entry) { - if (entry == "asc" || entry == "desc") { - sortType = entry.toString(); - } - else { - sortTarget = [ parseInt(entry) ]; - } - }); - } - else { - // default - sortType = 'asc'; - sortTarget = [ 0 ]; - } - - // dynamic sort disabling - // example: data-dontsort="4" - data = t.attr('data-dontsort'); - if (data) { - var a = data.split(',') - a.forEach(function(entry) { - dontsort.push(parseInt(entry)); - }); - } - else { - // default - // nothing - } - - // dynamic length - // example: data-length="40" - data = t.attr('data-length'); - if (data && data != 0) { - length = parseInt(t.attr('data-length')); - } - else { - // default - length = 20; - } - - t.dataTable( { - oLanguage: { - sEmptyTable: language['datatable.empty'], - oPaginate: { - "sFirst": language['datatable.first'], - "sPrevious": language['datatable.previous'], - "sNext": language['datatable.next'], - "sLast": language['datatable.last'], - }, - }, - aoColumnDefs: [ - { "bSortable": false, "aTargets": dontsort }, - ], - aaSorting: [[ sortTarget, sortType]], // default sort - bFilter: false, - bInfo: false, - iDisplayLength: length, - bLengthChange: false, - sPaginationType: "full_numbers" - }); - $('.dataTables_wrapper .sOption').wrapAll('
        '); - $('.dataTables_wrapper .pagin').wrapAll('
        '); - }); - })(); - */ /* dns input fields */ (function(){ $('#type').unbind('keyup keydown keypress change'); diff --git a/js/default/functions.min.js b/js/default/functions.min.js index 18b0783..235dcb9 100644 --- a/js/default/functions.min.js +++ b/js/default/functions.min.js @@ -1 +1 @@ -$(document).ready(function(){function a(a){$("#errorConfirmModal").remove(),$("#page-wrapper").append('"),$("#errorConfirmModal").find(".modal-body").text(a),$("#errorConfirmModal").modal({show:!0})}!function(){var t=void 0;$("span[delete-confirm]").unbind("click"),$("span[delete-confirm]").on("click",function(e){return e.preventDefault(),t=$(this),$("#dataConfirmModal").remove(),$("body").append('
        "),$("#dataConfirmModal").find(".modal-body").text(t.attr("delete-confirm")),$("#dataConfirmOK").unbind("click"),$("#dataConfirmOK").on("click",function(e){e.preventDefault(),$("#dataConfirmModal").modal("hide");var i=void 0,d=t.attr("delete-id");if(d){if(t.hasClass("deleteDomain"))i="deleteDomain";else if(t.hasClass("deleteRecord"))i="deleteRecord";else if(t.hasClass("deleteSec"))i="deleteSec";else{if(!t.hasClass("deleteUser"))return a(language["javascript.error"]),!1;i="deleteUser"}$.ajax({url:"index.php?page=action",data:{action:i,dataID:d},type:"post",success:function(e){if("success"==e){if(t.parent().parent().parent().parent().hasClass("dataTable")){var i=t.parent().parent().closest("tr").get(0),d=$(".dataTable").dataTable();d.fnDeleteRow(d.fnGetPosition(i))}t.parent().parent().remove()}else a(language["javascript.error"])}})}else a(language["javascript.error"]);return!1}),$("#dataConfirmModal").modal({show:!0}),!1})}(),function(){$("#requestApiKey").unbind("click"),$("#requestApiKey").on("click",function(){$.ajax({url:"index.php?page=action",data:{action:"requestApiKey",dataID:1},type:"post",success:function(t){"failure"==t?a(language["javascript.error"]):$("#apiKey").text(t)}})})}(),function(){$("span[toggle-id]").unbind("click"),$("span[toggle-id]").on("click",function(t){t.preventDefault();var e=$(this),i=void 0,d=e.attr("toggle-id");if(d){if(e.hasClass("toggleDomain"))i="toggleDomain";else if(e.hasClass("toggleRecord"))i="toggleRecord";else if(e.hasClass("toggleSec"))i="toggleSec";else{if(!e.hasClass("toggleUser"))return a(language["javascript.error"]),!1;i="toggleUser"}$.ajax({url:"index.php?page=action",data:{action:i,dataID:d},type:"post",success:function(t){"success"==t?e.hasClass("fa-square-o")?(e.removeClass("fa-square-o").addClass("fa-check-square-o"),e.tooltip("hide").attr("data-original-title",e.attr("data-disable-message")).tooltip("fixTitle").tooltip("show"),e.parent().parent().children().first().next().find("span.badge").remove()):e.hasClass("fa-check-square-o")?(e.removeClass("fa-check-square-o").addClass("fa-square-o"),e.tooltip("hide").attr("data-original-title",e.attr("data-enable-message")).tooltip("fixTitle").tooltip("show"),e.parent().parent().children().first().next().prepend(''+language["domain.disabled"]+" ")):a(language["javascript.error"]):a(language["javascript.error"])}})}else a(language["javascript.error"]);return!1})}(),function(){$(".ttips").each(function(){$(this).tooltip()})}(),function(){$(".dataTable").each(function(){var a=$(this),t=[],e=void 0,i=void 0,d=[],o=void 0;if(e=a.attr("data-sort")){var s=e.split(",");s.forEach(function(a){"asc"==a||"desc"==a?i=a.toString():d=[parseInt(a)]})}else i="asc",d=[0];if(e=a.attr("data-dontsort")){var s=e.split(",");s.forEach(function(a){t.push(parseInt(a))})}e=a.attr("data-length"),o=e&&0!=e?parseInt(a.attr("data-length")):20,a.dataTable({oLanguage:{sEmptyTable:language["datatable.empty"],oPaginate:{sFirst:language["datatable.first"],sPrevious:language["datatable.previous"],sNext:language["datatable.next"],sLast:language["datatable.last"]}},aoColumnDefs:[{bSortable:!1,aTargets:t}],aaSorting:[[d,i]],bFilter:!1,bInfo:!1,iDisplayLength:o,bLengthChange:!1,sPaginationType:"full_numbers"}),$(".dataTables_wrapper .sOption").wrapAll('
        '),$(".dataTables_wrapper .pagin").wrapAll('
        ')})}(),function(){$("#type").unbind("keyup keydown keypress change"),$("#type").on("keyup keydown keypress change",function(){var a=$.trim($(this).val());switch($("dl#aux").find("dt").text("Prio"),$("dl#weight").find("dt").text("weight"),$("dl#port").find("dt").text("port"),$("dl#data").find("dt").text("Data"),$("dl#aux").hide(),$("dl#weight").hide(),$("dl#port").hide(),$("dl#data").hide(),a){case"A":case"AAAA":case"CNAME":case"TXT":case"NS":case"PTR":$("dl#data").show();break;case"DS":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show(),$("dl#aux").find("dt").text("Key-ID"),$("dl#weight").find("dt").text("Algorithm"),$("dl#port").find("dt").text("Digest Type"),$("dl#data").find("dt").text("Digest");break;case"TLSA":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show(),$("dl#aux").find("dt").text("Usage"),$("dl#weight").find("dt").text("Selector"),$("dl#port").find("dt").text("Hash Type"),$("dl#data").find("dt").text("Hash");break;case"MX":$("dl#aux").show(),$("dl#data").show();break;case"SRV":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show()}})}(),function(){$("#export").unbind("click"),$("#export").on("click",function(){console.log("click");var a=$(this),t=a.attr("export-id");$.ajax({url:"index.php?page=action",data:{action:"export",dataID:t},type:"post",success:function(a){console.log(a),"failure"==a||($("#exportModal").remove(),$("#page-wrapper").append('"),$("#exportModal").modal({show:!0}),setTimeout(function(){$("#exportTextarea").focus()},700))}})})}(),function(){$("#import").unbind("click"),$("#import").on("click",function(){var t=$(this),e=t.attr("import-id");$("#importModal").remove(),$("#page-wrapper").append('"),$("#importModal").modal({show:!0}),setTimeout(function(){$("#importTextarea").focus()},700),$("#importSubmit").unbind("click"),$("#importSubmit").on("click",function(){var t=$("#importModal").find(".modal-body").find("#importOrigin").val(),i=$("#importModal").find(".modal-body").find("#importTextarea").val();$.ajax({url:"index.php?page=action",data:{action:"import",dataID:e?e:0,origin:t?t:"",zone:i},type:"post",success:function(t){$("#importModal").modal("hide"),"failure"==t?a(language["javascript.error"]):e?$(location).attr("href","index.php?page=RecordList&id="+e):$(location).attr("href","index.php?page=DomainList")}})})})}(),function(){$("#side-menu").metisMenu()}()}),$(window).load(function(){!function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")})}()}); \ No newline at end of file +$(document).ready(function(){function a(a){$("#errorConfirmModal").remove(),$("#page-wrapper").append('"),$("#errorConfirmModal").find(".modal-body").text(a),$("#errorConfirmModal").modal({show:!0})}!function(){var t=void 0;$("span[delete-confirm]").unbind("click"),$("span[delete-confirm]").on("click",function(e){return e.preventDefault(),t=$(this),$("#dataConfirmModal").remove(),$("body").append('"),$("#dataConfirmModal").find(".modal-body").text(t.attr("delete-confirm")),$("#dataConfirmOK").unbind("click"),$("#dataConfirmOK").on("click",function(e){e.preventDefault(),$("#dataConfirmModal").modal("hide");var i=void 0,d=t.attr("delete-id");if(d){if(t.hasClass("deleteDomain"))i="deleteDomain";else if(t.hasClass("deleteRecord"))i="deleteRecord";else if(t.hasClass("deleteSec"))i="deleteSec";else{if(!t.hasClass("deleteUser"))return a(language["javascript.error"]),!1;i="deleteUser"}$.ajax({url:"index.php?page=action",data:{action:i,dataID:d},type:"post",success:function(e){"success"==e?t.parent().parent().remove():a(language["javascript.error"])}})}else a(language["javascript.error"]);return!1}),$("#dataConfirmModal").modal({show:!0}),!1})}(),function(){$("#requestApiKey").unbind("click"),$("#requestApiKey").on("click",function(){$.ajax({url:"index.php?page=action",data:{action:"requestApiKey",dataID:1},type:"post",success:function(t){"failure"==t?a(language["javascript.error"]):$("#apiKey").text(t)}})})}(),function(){$("span[toggle-id]").unbind("click"),$("span[toggle-id]").on("click",function(t){t.preventDefault();var e=$(this),i=void 0,d=e.attr("toggle-id");if(d){if(e.hasClass("toggleDomain"))i="toggleDomain";else if(e.hasClass("toggleRecord"))i="toggleRecord";else if(e.hasClass("toggleSec"))i="toggleSec";else{if(!e.hasClass("toggleUser"))return a(language["javascript.error"]),!1;i="toggleUser"}$.ajax({url:"index.php?page=action",data:{action:i,dataID:d},type:"post",success:function(t){"success"==t?e.hasClass("fa-square-o")?(e.removeClass("fa-square-o").addClass("fa-check-square-o"),e.tooltip("hide").attr("data-original-title",e.attr("data-disable-message")).tooltip("fixTitle").tooltip("show"),e.parent().parent().children().first().next().find("span.badge").remove()):e.hasClass("fa-check-square-o")?(e.removeClass("fa-check-square-o").addClass("fa-square-o"),e.tooltip("hide").attr("data-original-title",e.attr("data-enable-message")).tooltip("fixTitle").tooltip("show"),e.parent().parent().children().first().next().prepend(''+language["domain.disabled"]+" ")):a(language["javascript.error"]):a(language["javascript.error"])}})}else a(language["javascript.error"]);return!1})}(),function(){$(".ttips").each(function(){$(this).tooltip()})}(),function(){$("#type").unbind("keyup keydown keypress change"),$("#type").on("keyup keydown keypress change",function(){var a=$.trim($(this).val());switch($("dl#aux").find("dt").text("Prio"),$("dl#weight").find("dt").text("weight"),$("dl#port").find("dt").text("port"),$("dl#data").find("dt").text("Data"),$("dl#aux").hide(),$("dl#weight").hide(),$("dl#port").hide(),$("dl#data").hide(),a){case"A":case"AAAA":case"CNAME":case"TXT":case"NS":case"PTR":$("dl#data").show();break;case"DS":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show(),$("dl#aux").find("dt").text("Key-ID"),$("dl#weight").find("dt").text("Algorithm"),$("dl#port").find("dt").text("Digest Type"),$("dl#data").find("dt").text("Digest");break;case"TLSA":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show(),$("dl#aux").find("dt").text("Usage"),$("dl#weight").find("dt").text("Selector"),$("dl#port").find("dt").text("Hash Type"),$("dl#data").find("dt").text("Hash");break;case"MX":$("dl#aux").show(),$("dl#data").show();break;case"SRV":$("dl#aux").show(),$("dl#weight").show(),$("dl#port").show(),$("dl#data").show()}})}(),function(){$("#export").unbind("click"),$("#export").on("click",function(){console.log("click");var a=$(this),t=a.attr("export-id");$.ajax({url:"index.php?page=action",data:{action:"export",dataID:t},type:"post",success:function(a){console.log(a),"failure"==a||($("#exportModal").remove(),$("#page-wrapper").append('"),$("#exportModal").modal({show:!0}),setTimeout(function(){$("#exportTextarea").focus()},700))}})})}(),function(){$("#import").unbind("click"),$("#import").on("click",function(){var t=$(this),e=t.attr("import-id");$("#importModal").remove(),$("#page-wrapper").append('"),$("#importModal").modal({show:!0}),setTimeout(function(){$("#importTextarea").focus()},700),$("#importSubmit").unbind("click"),$("#importSubmit").on("click",function(){var t=$("#importModal").find(".modal-body").find("#importOrigin").val(),i=$("#importModal").find(".modal-body").find("#importTextarea").val();$.ajax({url:"index.php?page=action",data:{action:"import",dataID:e?e:0,origin:t?t:"",zone:i},type:"post",success:function(t){$("#importModal").modal("hide"),"failure"==t?a(language["javascript.error"]):e?$(location).attr("href","index.php?page=RecordList&id="+e):$(location).attr("href","index.php?page=DomainList")}})})})}(),function(){$("#side-menu").metisMenu()}()}),$(window).load(function(){!function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")})}()}); \ No newline at end of file diff --git a/js/default/jquery.dataTables.js b/js/default/jquery.dataTables.js deleted file mode 100644 index c39ae8c..0000000 --- a/js/default/jquery.dataTables.js +++ /dev/null @@ -1,14840 +0,0 @@ -/*! DataTables 1.10.4 - * ©2008-2014 SpryMedia Ltd - datatables.net/license - */ - -/** - * @summary DataTables - * @description Paginate, search and order HTML tables - * @version 1.10.4 - * @file jquery.dataTables.js - * @author SpryMedia Ltd (www.sprymedia.co.uk) - * @contact www.sprymedia.co.uk/contact - * @copyright Copyright 2008-2014 SpryMedia Ltd. - * - * This source file is free software, available under the following license: - * MIT license - http://datatables.net/license - * - * This source file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. - * - * For details please refer to: http://www.datatables.net - */ - -/*jslint evil: true, undef: true, browser: true */ -/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnScrollBarWidth,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/ - -(/** @lends */function( window, document, undefined ) { - -(function( factory ) { - "use strict"; - - if ( typeof define === 'function' && define.amd ) { - // Define as an AMD module if possible - define( 'datatables', ['jquery'], factory ); - } - else if ( typeof exports === 'object' ) { - // Node/CommonJS - factory( require( 'jquery' ) ); - } - else if ( jQuery && !jQuery.fn.dataTable ) { - // Define using browser globals otherwise - // Prevent multiple instantiations if the script is loaded twice - factory( jQuery ); - } -} -(/** @lends */function( $ ) { - "use strict"; - - /** - * DataTables is a plug-in for the jQuery Javascript library. It is a highly - * flexible tool, based upon the foundations of progressive enhancement, - * which will add advanced interaction controls to any HTML table. For a - * full list of features please refer to - * [DataTables.net](href="http://datatables.net). - * - * Note that the `DataTable` object is not a global variable but is aliased - * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may - * be accessed. - * - * @class - * @param {object} [init={}] Configuration object for DataTables. Options - * are defined by {@link DataTable.defaults} - * @requires jQuery 1.7+ - * - * @example - * // Basic initialisation - * $(document).ready( function { - * $('#example').dataTable(); - * } ); - * - * @example - * // Initialisation with configuration options - in this case, disable - * // pagination and sorting. - * $(document).ready( function { - * $('#example').dataTable( { - * "paginate": false, - * "sort": false - * } ); - * } ); - */ - var DataTable; - - - /* - * It is useful to have variables which are scoped locally so only the - * DataTables functions can access them and they don't leak into global space. - * At the same time these functions are often useful over multiple files in the - * core and API, so we list, or at least document, all variables which are used - * by DataTables as private variables here. This also ensures that there is no - * clashing of variable names and that they can easily referenced for reuse. - */ - - - // Defined else where - // _selector_run - // _selector_opts - // _selector_first - // _selector_row_indexes - - var _ext; // DataTable.ext - var _Api; // DataTable.Api - var _api_register; // DataTable.Api.register - var _api_registerPlural; // DataTable.Api.registerPlural - - var _re_dic = {}; - var _re_new_lines = /[\r\n]/g; - var _re_html = /<.*?>/g; - var _re_date_start = /^[\w\+\-]/; - var _re_date_end = /[\w\+\-]$/; - - // Escape regular expression special characters - var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' ); - - // U+2009 is thin space and U+202F is narrow no-break space, both used in many - // standards as thousands separators - var _re_formatted_numeric = /[',$£€¥%\u2009\u202F]/g; - - - var _empty = function ( d ) { - return !d || d === true || d === '-' ? true : false; - }; - - - var _intVal = function ( s ) { - var integer = parseInt( s, 10 ); - return !isNaN(integer) && isFinite(s) ? integer : null; - }; - - // Convert from a formatted number with characters other than `.` as the - // decimal place, to a Javascript number - var _numToDecimal = function ( num, decimalPoint ) { - // Cache created regular expressions for speed as this function is called often - if ( ! _re_dic[ decimalPoint ] ) { - _re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' ); - } - return typeof num === 'string' && decimalPoint !== '.' ? - num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) : - num; - }; - - - var _isNumber = function ( d, decimalPoint, formatted ) { - var strType = typeof d === 'string'; - - if ( decimalPoint && strType ) { - d = _numToDecimal( d, decimalPoint ); - } - - if ( formatted && strType ) { - d = d.replace( _re_formatted_numeric, '' ); - } - - return _empty( d ) || (!isNaN( parseFloat(d) ) && isFinite( d )); - }; - - - // A string without HTML in it can be considered to be HTML still - var _isHtml = function ( d ) { - return _empty( d ) || typeof d === 'string'; - }; - - - var _htmlNumeric = function ( d, decimalPoint, formatted ) { - if ( _empty( d ) ) { - return true; - } - - var html = _isHtml( d ); - return ! html ? - null : - _isNumber( _stripHtml( d ), decimalPoint, formatted ) ? - true : - null; - }; - - - var _pluck = function ( a, prop, prop2 ) { - var out = []; - var i=0, ien=a.length; - - // Could have the test in the loop for slightly smaller code, but speed - // is essential here - if ( prop2 !== undefined ) { - for ( ; i') - .css( { - position: 'absolute', - top: 0, - left: 0, - height: 1, - width: 1, - overflow: 'hidden' - } ) - .append( - $('
        ') - .css( { - position: 'absolute', - top: 1, - left: 1, - width: 100, - overflow: 'scroll' - } ) - .append( - $('
        ') - .css( { - width: '100%', - height: 10 - } ) - ) - ) - .appendTo( 'body' ); - - var test = n.find('.test'); - - // IE6/7 will oversize a width 100% element inside a scrolling element, to - // include the width of the scrollbar, while other browsers ensure the inner - // element is contained without forcing scrolling - browser.bScrollOversize = test[0].offsetWidth === 100; - - // In rtl text layout, some browsers (most, but not all) will place the - // scrollbar on the left, rather than the right. - browser.bScrollbarLeft = test.offset().left !== 1; - - n.remove(); - } - - - /** - * Array.prototype reduce[Right] method, used for browsers which don't support - * JS 1.6. Done this way to reduce code size, since we iterate either way - * @param {object} settings dataTables settings object - * @memberof DataTable#oApi - */ - function _fnReduce ( that, fn, init, start, end, inc ) - { - var - i = start, - value, - isSet = false; - - if ( init !== undefined ) { - value = init; - isSet = true; - } - - while ( i !== end ) { - if ( ! that.hasOwnProperty(i) ) { - continue; - } - - value = isSet ? - fn( value, that[i], i, that ) : - that[i]; - - isSet = true; - i += inc; - } - - return value; - } - - /** - * Add a column to the list used for the table with default values - * @param {object} oSettings dataTables settings object - * @param {node} nTh The th element for this column - * @memberof DataTable#oApi - */ - function _fnAddColumn( oSettings, nTh ) - { - // Add column to aoColumns array - var oDefaults = DataTable.defaults.column; - var iCol = oSettings.aoColumns.length; - var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, { - "nTh": nTh ? nTh : document.createElement('th'), - "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '', - "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol], - "mData": oDefaults.mData ? oDefaults.mData : iCol, - idx: iCol - } ); - oSettings.aoColumns.push( oCol ); - - // Add search object for column specific search. Note that the `searchCols[ iCol ]` - // passed into extend can be undefined. This allows the user to give a default - // with only some of the parameters defined, and also not give a default - var searchCols = oSettings.aoPreSearchCols; - searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] ); - - // Use the default column options function to initialise classes etc - _fnColumnOptions( oSettings, iCol, null ); - } - - - /** - * Apply options for a column - * @param {object} oSettings dataTables settings object - * @param {int} iCol column index to consider - * @param {object} oOptions object with sType, bVisible and bSearchable etc - * @memberof DataTable#oApi - */ - function _fnColumnOptions( oSettings, iCol, oOptions ) - { - var oCol = oSettings.aoColumns[ iCol ]; - var oClasses = oSettings.oClasses; - var th = $(oCol.nTh); - - // Try to get width information from the DOM. We can't get it from CSS - // as we'd need to parse the CSS stylesheet. `width` option can override - if ( ! oCol.sWidthOrig ) { - // Width attribute - oCol.sWidthOrig = th.attr('width') || null; - - // Style attribute - var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/); - if ( t ) { - oCol.sWidthOrig = t[1]; - } - } - - /* User specified column options */ - if ( oOptions !== undefined && oOptions !== null ) - { - // Backwards compatibility - _fnCompatCols( oOptions ); - - // Map camel case parameters to their Hungarian counterparts - _fnCamelToHungarian( DataTable.defaults.column, oOptions ); - - /* Backwards compatibility for mDataProp */ - if ( oOptions.mDataProp !== undefined && !oOptions.mData ) - { - oOptions.mData = oOptions.mDataProp; - } - - if ( oOptions.sType ) - { - oCol._sManualType = oOptions.sType; - } - - // `class` is a reserved word in Javascript, so we need to provide - // the ability to use a valid name for the camel case input - if ( oOptions.className && ! oOptions.sClass ) - { - oOptions.sClass = oOptions.className; - } - - $.extend( oCol, oOptions ); - _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" ); - - /* iDataSort to be applied (backwards compatibility), but aDataSort will take - * priority if defined - */ - if ( typeof oOptions.iDataSort === 'number' ) - { - oCol.aDataSort = [ oOptions.iDataSort ]; - } - _fnMap( oCol, oOptions, "aDataSort" ); - } - - /* Cache the data get and set functions for speed */ - var mDataSrc = oCol.mData; - var mData = _fnGetObjectDataFn( mDataSrc ); - var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null; - - var attrTest = function( src ) { - return typeof src === 'string' && src.indexOf('@') !== -1; - }; - oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && ( - attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter) - ); - - oCol.fnGetData = function (rowData, type, meta) { - var innerData = mData( rowData, type, undefined, meta ); - - return mRender && type ? - mRender( innerData, type, rowData, meta ) : - innerData; - }; - oCol.fnSetData = function ( rowData, val, meta ) { - return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta ); - }; - - // Indicate if DataTables should read DOM data as an object or array - // Used in _fnGetRowElements - if ( typeof mDataSrc !== 'number' ) { - oSettings._rowReadObject = true; - } - - /* Feature sorting overrides column specific when off */ - if ( !oSettings.oFeatures.bSort ) - { - oCol.bSortable = false; - th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called - } - - /* Check that the class assignment is correct for sorting */ - var bAsc = $.inArray('asc', oCol.asSorting) !== -1; - var bDesc = $.inArray('desc', oCol.asSorting) !== -1; - if ( !oCol.bSortable || (!bAsc && !bDesc) ) - { - oCol.sSortingClass = oClasses.sSortableNone; - oCol.sSortingClassJUI = ""; - } - else if ( bAsc && !bDesc ) - { - oCol.sSortingClass = oClasses.sSortableAsc; - oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed; - } - else if ( !bAsc && bDesc ) - { - oCol.sSortingClass = oClasses.sSortableDesc; - oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed; - } - else - { - oCol.sSortingClass = oClasses.sSortable; - oCol.sSortingClassJUI = oClasses.sSortJUI; - } - } - - - /** - * Adjust the table column widths for new data. Note: you would probably want to - * do a redraw after calling this function! - * @param {object} settings dataTables settings object - * @memberof DataTable#oApi - */ - function _fnAdjustColumnSizing ( settings ) - { - /* Not interested in doing column width calculation if auto-width is disabled */ - if ( settings.oFeatures.bAutoWidth !== false ) - { - var columns = settings.aoColumns; - - _fnCalculateColumnWidths( settings ); - for ( var i=0 , iLen=columns.length ; i