| @@ -341,6 +341,11 @@ func getCrmFileID(urlPath string) string { | |||
| func response404Handler(w http.ResponseWriter) { | |||
| w.WriteHeader(http.StatusNotFound) | |||
| str, err := ioutil.ReadFile(GlobalPath.SinglePageEdit + "404.html") | |||
| if err == nil { | |||
| fmt.Fprintf(w, "%s", str) | |||
| return | |||
| } | |||
| fmt.Fprintf(w, "not found") | |||
| } | |||
| @@ -0,0 +1,54 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |||
| <meta name="description" content=""> | |||
| <meta name="author" content=""> | |||
| <!-- Favicons--> | |||
| <link rel="apple-touch-icon-precomposed" href="images/favicon/apple-touch-icon-152x152.png"> | |||
| <meta name="msapplication-TileColor" content="#FFFFFF"> | |||
| <meta name="msapplication-TileImage" content="images/favicon/mstile-144x144.png"> | |||
| <link rel="icon" href="images/favicon/favicon-32x32.png" sizes="32x32"> | |||
| <title>Materialize</title> | |||
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |||
| <!-- Materialize core CSS --> | |||
| <link href="materialize/css/materialize.css" rel="stylesheet"> | |||
| <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> | |||
| <!--[if lt IE 9]> | |||
| <script src="assets/js/html5shiv.js"></script> | |||
| <script src="assets/js/respond.min.js"></script> | |||
| <![endif]--> | |||
| <link href="style.css" rel="stylesheet"> | |||
| </head> | |||
| <body> | |||
| <div class="container"> | |||
| <div class="row valign center"> | |||
| <div class="col s12 valign center"> | |||
| <h3>Not Found</h3> | |||
| <p>Oops! 你要的资源没有找到</p> | |||
| </div> | |||
| </div> | |||
| <div class="row"> | |||
| <div class="col s12 valign center"> | |||
| <i class="mdi-device-location-disabled super-large"></i> | |||
| </div> | |||
| </div> | |||
| <div class="row valign center"> | |||
| <div class="col s12"> | |||
| <a id="goback" class="waves-effect waves-light btn"> <<<</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <!-- Materialize core JavaScript --> | |||
| <!-- Placed at the end of the document so the pages load faster --> | |||
| <script src="assets/js/jquery.min.js"></script> | |||
| <script src="materialize/js/materialize.js"></script> | |||
| <script src="index.js"></script> | |||
| <script> | |||
| $("#goback").click(function(){ | |||
| history.back() | |||
| }); | |||
| </script> | |||
| </body> | |||
| </html> | |||
| @@ -1 +1 @@ | |||
| {"files":{"edit.html":{"frameworks":["spa","pg.insight.events","pg.code-validator","pg.asset.manager","pg.project.items","mat0.97.5","pg.html","pg.components"],"last_page_width":896}},"breakpoints":["28.875em","33.875em","35.875em","38.875em","40.125em","46.75em","360px","390px","420px","450px","480px","510px","540px","570px","601px","630px","660px","690px","720px","750px","780px","810px","840px","870px","900px","930px","960px","993px","1200px"],"frameworks":["spa","pg.insight.events","pg.code-validator","pg.asset.manager","pg.project.items","mat0.97.5","pg.html","pg.components"],"template_framework_id":"materialize","custom_width":896} | |||
| {"files":{"edit.html":{"frameworks":["spa","pg.insight.events","pg.code-validator","pg.asset.manager","pg.project.items","mat0.97.5","pg.html","pg.components"],"last_page_width":896},"404.html":{"frameworks":["spa","pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","mat0.97.5","pg.html","pg.components"],"last_page_width":1024}},"breakpoints":["28.875em","33.875em","35.875em","38.875em","40.125em","46.75em","360px","390px","420px","450px","480px","510px","540px","570px","601px","630px","660px","690px","720px","750px","780px","810px","840px","870px","900px","930px","960px","993px","1200px"],"frameworks":["spa","pg.insight.events","pg.code-validator","pg.project.items","pg.asset.manager","mat0.97.5","pg.html","pg.components"],"template_framework_id":"materialize"} | |||
| @@ -0,0 +1,7 @@ | |||
| .super-large | |||
| { | |||
| font-size: 100px; | |||
| } | |||
| @@ -16,8 +16,9 @@ func spaEditProfile(w http.ResponseWriter, r *http.Request) { | |||
| case "GET": | |||
| lead, found := getLeadFromRequest(r) | |||
| if !found { | |||
| w.WriteHeader(http.StatusUnauthorized) | |||
| fmt.Fprintf(w, "User not found ") | |||
| response404Handler(w) | |||
| // w.WriteHeader(http.StatusUnauthorized) | |||
| // fmt.Fprintf(w, "User not found ") | |||
| return | |||
| } | |||
| spaEditProfilePopulateLeadInfo(w, lead) | |||