Browse Source

js生成切换目录

tags/6.1.7
tianya 2 years ago
parent
commit
b88d88b689
4 changed files with 9 additions and 6 deletions
  1. +2
    -0
      .gitignore
  2. +5
    -5
      src/admin/makehtml_js_action.php
  3. +1
    -1
      src/admin/templets/makehtml_js.htm
  4. +1
    -0
      src/static/js/.gitkeep

+ 2
- 0
.gitignore View File

@@ -45,3 +45,5 @@ src/static/litimg/*/
src/data/sqlite_error_trace.inc
src/static/soft/*/
src/static/userup/*/
src/static/js/*.js
src/apps/special/*.html

+ 5
- 5
src/admin/makehtml_js_action.php View File

@@ -25,19 +25,19 @@ if ($uptype == "all") {
} else {
$pv = new PartView($row['id']);
$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
$pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0);
$pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/static/js/".$row['id'].".js", 0);
$typeid = $row['id'];;
ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100);
ShowMsg("成功更新".$cfg_cmspath."/static/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100);
exit();
}
} else {
$pv = new PartView($typeid);
$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
$pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0);
$pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/static/js/".$typeid.".js", 0);
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-success\" role=\"alert\">成功更新".$cfg_cmspath."/data/js/".$typeid.".js";
echo "<div class=\"alert alert-success\" role=\"alert\">成功更新".$cfg_cmspath."/static/js/".$typeid.".js";
echo "预览:</div>";
echo "<hr>";
echo "<script src='".$cfg_cmspath."/data/js/".$typeid.".js'></script>";
echo "<script src='".$cfg_cmspath."/static/js/".$typeid.".js'></script>";
exit();
}

+ 1
- 1
src/admin/templets/makehtml_js.htm View File

@@ -47,7 +47,7 @@
<td height="36" bgcolor="#FFFFFF">JS文件:</td>
<td height="36" bgcolor="#FFFFFF">
<span>
<?php echo "&lt;script src='".$cfg_cmspath."/data/js/".$cid.".js' language='javascript'&gt;&lt;/script&gt;"; ?>
<?php echo "&lt;script src='".$cfg_cmspath."/static/js/".$cid.".js' language='javascript'&gt;&lt;/script&gt;"; ?>
</span>
</td>
</tr>


+ 1
- 0
src/static/js/.gitkeep View File

@@ -0,0 +1 @@
DedeBIZ

Loading…
Cancel
Save