Browse Source

Module sub-mount error 404 page

Vova Tkach 6 years ago
parent
commit
e3fb7f369b
7 changed files with 9 additions and 1 deletions
  1. BIN
      assets/cp.bg.404.jpg
  2. 2 0
      assets/cp.bg.404.jpg.go
  3. 5 0
      assets/cp.styles.css
  4. 0 0
      assets/cp.styles.css.go
  5. 1 0
      consts/consts.go
  6. 1 0
      main.go
  7. 0 1
      modules/modules.go

BIN
assets/cp.bg.404.jpg


File diff suppressed because it is too large
+ 2 - 0
assets/cp.bg.404.jpg.go


+ 5 - 0
assets/cp.styles.css

@@ -225,6 +225,11 @@ body.cp .wrap .sidebar .btn-sidebar {
 	width: 100%;
 }
 
+/* CP module not found page */
+body.cp.cp-404 .wrap .content .scroll {
+	background: url(/assets/sys/bg404.jpg) no-repeat 50% 50%;
+}
+
 /* Admin table */
 .data-table.table-hover tbody tr:hover {
 	background-color: #fffbdf;

File diff suppressed because it is too large
+ 0 - 0
assets/cp.styles.css.go


+ 1 - 0
consts/consts.go

@@ -17,6 +17,7 @@ const AssetsJqueryJs = AssetsPath + "/jquery.js"
 const AssetsPopperJs = AssetsPath + "/popper.js"
 
 // System resources
+const AssetsSysBg404Jpg = AssetsPath + "/sys/bg404.jpg"
 const AssetsCpScriptsJs = AssetsPath + "/cp/scripts.js"
 const AssetsCpStylesCss = AssetsPath + "/cp/styles.css"
 const AssetsSysBgPng = AssetsPath + "/sys/bg.png"

+ 1 - 0
main.go

@@ -53,6 +53,7 @@ func main() {
 
 	// Init mounted resources
 	res := resource.New()
+	res.Add(consts.AssetsSysBg404Jpg, "image/jpeg", assets.CpBg404Jpg)
 	res.Add(consts.AssetsCpScriptsJs, "application/javascript; charset=utf-8", assets.CpScriptsJs)
 	res.Add(consts.AssetsCpStylesCss, "text/css", assets.CpStylesCss)
 	res.Add(consts.AssetsSysBgPng, "image/png", assets.SysBgPng)

+ 0 - 1
modules/modules.go

@@ -307,7 +307,6 @@ func (this *Modules) XXXBackEnd(wrap *wrapper.Wrapper) bool {
 			}
 			if content == "" {
 				body_class = body_class + " cp-404"
-				content = "Panel 404"
 			}
 			if sidebar_right != "" {
 				body_class = body_class + " cp-sidebar-right"

Some files were not shown because too many files changed in this diff