| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?php
- session_start();
- if (!isset($_SESSION['loggedin'])) {
- header('Location: pages-signin.html');
- exit;
- }
- ?>
- <!doctype html>
- <html class="fixed">
- <head>
- <?php include("bim-support-header.html"); ?>
- <script src="./script/js/global.js"></script>
- <script type="application/javascript">
- var delFavoriteList = [];
- var i = 0;
- var path = [];
- var categoryList = [];
- var categoryTable = [];
- var id = [];
- var revitVersion = [];
- var userName = '<?php echo $_SESSION['name']; ?>';
- var $grid;
- //var year = [];
- pageHeader = "元件庫";
- </script>
- </head>
- <body>
- <canvas id="c"></canvas>
- <section class="body">
- <!-- start: header -->
- <header-menu></header-menu>
- <!-- end: header -->
- <div class="inner-wrapper">
- <!-- start: sidebar -->
- <side-bar></side-bar>
- <!-- end: sidebar -->
- <section role="main" class="content-body">
- <header class="page-header">
- <h2>{{pageHeader}}</h2>
- </header>
- <!-- start: page -->
- <section class="content-with-menu content-with-menu-has-toolbar media-gallery">
- <div class="content-with-menu-container">
- <inner-menu>
- <template v-slot:inner-upload>
- <upload-component></upload-component>
- <hr class="separator" />
- </template>
- <template v-slot:inner-equipment>
- <equipment-list></equipment-list>
- </template>
- </inner-menu>
- <div class="inner-body mg-main">
- <div class="inner-toolbar">
- <ul>
- <search-bar></search-bar>
- <filter-bar></filter-bar>
- <li class="right">
- <a href="#" id="mgSelectAll"><i class="fa fa-check-square"></i> <span data-all-text="選擇全部" data-none-text="取消全選">選擇全部</span></a>
- </li>
- <li class="right">
- <a href="#" onclick="DelFavorite();"><i class="fa fa-trash-o"></i> 移出清單</a>
- </li>
- </ul>
- </div>
- <filter-content></filter-content>
- <div class="row mg-files" data-sort-destination data-sort-id="media-gallery" id="content">
- </div>
- </div>
- </div>
- </section>
- <!-- end: page -->
- </section>
- </div>
- </section>
- <script>
- /*Vue */
- vm.mount('.body');
- </script>
- <?php include("bim-support-body.html"); ?>
- <script>
- $(document).ready(function() {
- $.ajax({
- url: "./script/php/equipment_group_favorite.php",
- type: "GET",
- data: {
- userName: userName,
- },
- contentType: "application/json",
- dataType: "json"
- }).done(function(data) {
- id = data.id;
- path = data.path;
- revitVersion = data.revitVersion;
- for (var i = 0; i < data.year.length; i++) {
- $("#revitVersion").append('<label><input type="checkbox" value=".' + data.year[i] + '" /> ' + data.year[i] + '</label> ');
- }
- $grid = $("#content").isotope({
- itemSelector: ".isotope-item",
- layoutMode: 'fitRows'
- })
- $.when(initThreeJS()).then(
- $grid.isotope()
- );
- }).error(function(error) {
- console.log(error);
- });
- });
- function DelFavorite() {
- $.ajax({
- url: "./script/php/addFavorite.php",
- type: "POST",
- data: {
- delFavoriteList: delFavoriteList,
- username: userName
- }
- }).done(function(data) {
- window.location.reload();
- }).error(function(error) {
- console.log(error);
- });
- }
- </script>
- <script src="script/js/3Dpic-favorite.js" type="module"></script>
-
- </body>
- </html>
|