|
|
@@ -123,7 +123,8 @@ include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_
|
|
|
<header class="page-header">
|
|
|
<h2>綜合登入入口</h2>
|
|
|
</header>
|
|
|
- <panel-object></panel-object>
|
|
|
+
|
|
|
+ <panel-row></panel-row>
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
@@ -134,15 +135,25 @@ include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_
|
|
|
var userName = "<?php echo $_SESSION['name'] ?>";
|
|
|
var role = "<?php echo ($groupName); ?>";
|
|
|
var right = <?php echo ($right); ?>;
|
|
|
- var tempData = [];
|
|
|
- for (i = 0; i < panel_data.length; i++) {
|
|
|
- if (right >= panel_data[i].right) {
|
|
|
- tempData.push(panel_data[i])
|
|
|
- }
|
|
|
+ var rowWidth = 3;
|
|
|
+ var panelGroup = [];
|
|
|
+ let tempData = [];
|
|
|
+
|
|
|
+ panel_data.forEach(function(data){
|
|
|
+ if(right >= data.right){
|
|
|
+ tempData.push(data);
|
|
|
+ if(tempData.length == rowWidth){
|
|
|
+ panelGroup.push(tempData);
|
|
|
+ tempData = [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(tempData.length > 0){
|
|
|
+ panelGroup.push(tempData);
|
|
|
+ tempData = [];
|
|
|
}
|
|
|
+
|
|
|
vm.mount('.body');
|
|
|
-
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<!-- Vendor -->
|
|
|
@@ -158,9 +169,9 @@ include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_
|
|
|
|
|
|
<script>
|
|
|
$(document).ready(function() {
|
|
|
- addUserImage(userName.charAt(0),role);
|
|
|
+ addUserImage(userName.charAt(0), role);
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
$('.panel').hoverIntent({
|
|
|
sensitivity: 50, //滑鼠滑動的敏感度,最少要設定為1
|
|
|
interval: 200, //滑鼠滑過後要延遲的秒數
|