rabin 5 years ago
parent
commit
bc8ede0da0

+ 2 - 0
assets/layadmin/html/project/database/list.html

@@ -36,6 +36,8 @@
   white-space: inherit;
 }
 </style>
+<div id="load_style" style="display:none;">
+</div>
 <span id="dever-name" style="display:none;"></span>
 <div class="topbar">
     <div class="banner dever-layout" style="display:none;">

+ 2 - 0
assets/layadmin/html/project/database/update.html

@@ -37,6 +37,8 @@
     </style>
 </head>
 <body>
+  <div id="load_style" style="display:none;">
+</div>
 <div class="topbar">
     <div class="banner dever-layout" style="display:none;">
         <a target="_blank"><img src="#"></a>

+ 7 - 1
src/Database.php

@@ -727,7 +727,13 @@ class Database
             }
             
             $file = $base . $value . '.' . $path;
-            $res = '<script type="text/javascript" src="'.$file.'"></script>';
+            if ($path == 'js') {
+                $res = '<script type="text/javascript" src="'.$file.'"></script>';
+            } else {
+                $res = '<link rel="stylesheet" type="text/css" href="'.$file.'">
+';
+            }
+            
             return $res;
         }
     }

+ 1 - 0
template/layadmin/project/database/list.php

@@ -8,6 +8,7 @@ $method = 'list';
 include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'common.php');
  
 $view  
+->fetch('#load_style', 'manage/database.res#css')
 ->fetch('#search_param', 'manage/database.info#search_param')
 ->fetch('#addstyle', 'manage/database.listStyle')    
 #->fetch('#list-desc', 'manage/database.info#list_desc')

+ 1 - 0
template/layadmin/project/database/update.php

@@ -8,6 +8,7 @@ $method = 'update';
 include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'common.php');
 
 $view
+->fetch('#load_style', 'manage/database.res#css')
 //->fetch('#list-desc', 'manage/database.info#update_desc')
 # form表单
 ->fetch('.form1@action',	'manage/database.info#action')