|
|
@@ -90,7 +90,14 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
</inner-menu>
|
|
|
<div class="inner-body mg-main">
|
|
|
<div class="inner-toolbar">
|
|
|
-
|
|
|
+ <ul>
|
|
|
+ <search-bar></search-bar>
|
|
|
+ <li id="reset" style="padding-top: 10px; display:none;">
|
|
|
+ <div class="input-group input-search" style="table-layout: auto;">
|
|
|
+ <button class="btn btn-primary" type="button" id="resetbtn" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="清除搜尋結果"><i class="fa fa-undo"></i></button>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
<filter-content2></filter-content2>
|
|
|
<div class="row">
|
|
|
@@ -213,7 +220,6 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
<?php include("bim-support-body.html"); ?>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
$(document).ready(function() {
|
|
|
PDFObject.embed("./assets/null.pdf", "#pdfFile");
|
|
|
console.log(type);
|
|
|
@@ -227,6 +233,9 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
'url': './script/php/getBIMData.php?folder=' + type,
|
|
|
}
|
|
|
},
|
|
|
+ 'search': {
|
|
|
+ 'show_only_matches': true,
|
|
|
+ },
|
|
|
'types': {
|
|
|
'default': {
|
|
|
'icon': 'fa fa-folder'
|
|
|
@@ -253,7 +262,7 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
'icon': 'fa fa-folder'
|
|
|
}
|
|
|
},
|
|
|
- 'plugins': ['types']
|
|
|
+ 'plugins': ['types', 'search']
|
|
|
}).on(
|
|
|
'select_node.jstree',
|
|
|
function(event, data) {
|
|
|
@@ -270,7 +279,7 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
document.body.removeChild(link);
|
|
|
|
|
|
} else */
|
|
|
-
|
|
|
+
|
|
|
if (data.node.text.includes(".pdf")) {
|
|
|
PDFObject.embed(data.node.a_attr.href, "#pdfFile");
|
|
|
} else {
|
|
|
@@ -283,7 +292,7 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
$("#fileName").empty();
|
|
|
$("#fileName").append(data.node.text);
|
|
|
$("#fileHerf").attr("href", data.node.a_attr.href);
|
|
|
-
|
|
|
+
|
|
|
$("#fileDate").empty();
|
|
|
$("#fileDate").append(data.node.a_attr.time);
|
|
|
}
|
|
|
@@ -313,8 +322,25 @@ if (!isset($_SESSION['loggedin'])) {
|
|
|
data.instance.set_type(data.node, 'f-closed');
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ $("#resetbtn").on('click', function(event) {
|
|
|
+ $("#treeAjaxHTML").jstree("clear_search");
|
|
|
+ $("#quicksearch").val('');
|
|
|
+ })
|
|
|
+ $("#searchBtn").on('click', function(event) {
|
|
|
+ var search = $("#quicksearch").val();
|
|
|
+ $("#treeAjaxHTML").jstree("search", search);
|
|
|
+ })
|
|
|
+ $("#quicksearch").on('keyup', function(e) {
|
|
|
+ if (e.key === 'Enter' || e.keyCode === 13) {
|
|
|
+ var search = $("#quicksearch").val();
|
|
|
+ $("#treeAjaxHTML").jstree("search", search);
|
|
|
+ }
|
|
|
+ });
|
|
|
</script>
|
|
|
<script src="assets/vendor/jstree/jstree.js"></script>
|
|
|
+
|
|
|
+
|
|
|
</body>
|
|
|
|
|
|
</html>
|