clean 403 404 500
This commit is contained in:
parent
2806dd35a9
commit
3e0b7d81ae
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||||
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
||||||
alert("<%= @desktop.inspect %>")
|
// alert("<%= @desktop.inspect %>")
|
||||||
var od = new orbitDesktop("#ajax_container");
|
var od = new orbitDesktop("#ajax_container");
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
getEvent(selet);
|
|
||||||
function resetText() {
|
function resetText() {
|
||||||
$events.find('li').find($mon).html('');
|
$events.find('li').find($mon).html('');
|
||||||
$events.find('li').find($day).html('');
|
$events.find('li').find($day).html('');
|
||||||
|
@ -63,60 +63,4 @@ $(document).ready(function(){
|
||||||
$events.find('li').find($link_text).attr('href', '');
|
$events.find('li').find($link_text).attr('href', '');
|
||||||
$events.find('li').find($time).html('');
|
$events.find('li').find($time).html('');
|
||||||
}
|
}
|
||||||
function getEvent(selet){
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: "/static/nccu_calendar.xml",
|
|
||||||
dataType: "xml",
|
|
||||||
timeout: 1000,
|
|
||||||
error: function(xml){
|
|
||||||
$events.find('.links_next').addClass('disabled')
|
|
||||||
$events.find('.error_mag').show();
|
|
||||||
$events.find('ul').hide();
|
|
||||||
$events.find('.error_mag').html("讀取錯誤");
|
|
||||||
},
|
|
||||||
success: function(xml) {
|
|
||||||
xmlLength = $(xml).find('entry').length;
|
|
||||||
$(xml).find('entry').slice(selet, selet+objLength).each(function(i){
|
|
||||||
title_text = $(this).find('title').text()
|
|
||||||
link_text = $(this).find('link').attr('href')
|
|
||||||
summary_text = $(this).find('summary').text()
|
|
||||||
indexA = summary_text.indexOf("-");
|
|
||||||
indexB = summary_text.indexOf(" ");
|
|
||||||
indexC = summary_text.indexOf("/");
|
|
||||||
//清除前後空白字元
|
|
||||||
summary_text = jQuery.trim(summary_text);
|
|
||||||
//篩選標題
|
|
||||||
title_text = title_text.slice(0, 16)
|
|
||||||
if (summary_text.length == 31) {
|
|
||||||
startDate_text = summary_text.slice(0, indexA);
|
|
||||||
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
|
||||||
startDay_text = startDate_text.slice(7);
|
|
||||||
endDate_text = summary_text.slice((indexA+1), indexB);
|
|
||||||
time_text = summary_text.slice((indexB+1));
|
|
||||||
} else {
|
|
||||||
startDate_text = summary_text.slice(0, indexB);
|
|
||||||
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
|
||||||
startDay_text = startDate_text.slice(7);
|
|
||||||
endDate_text = '';
|
|
||||||
time_text = summary_text.slice((indexB+1));
|
|
||||||
}
|
|
||||||
if(startMon_text.slice(0, 1) == '0'){
|
|
||||||
startMon_text = month[startMon_text.slice(1)-1];
|
|
||||||
} else {
|
|
||||||
startMon_text = month[startMon_text-1];
|
|
||||||
}
|
|
||||||
$events.find('li').eq(i).find($mon).html(startMon_text);
|
|
||||||
$events.find('li').eq(i).find($day).html(startDay_text);
|
|
||||||
$events.find('li').eq(i).find($link_text).html(title_text+"…");
|
|
||||||
$events.find('li').eq(i).find($link_text).attr('href', link_text);
|
|
||||||
$events.find('li').eq(i).find($time).html('時間:'+time_text);
|
|
||||||
//console.log();
|
|
||||||
/*$('<li></li>')
|
|
||||||
.html('<div class="event_date"><span class="mon">'+startMon_text+'</span><span class="day">'+startDay_text+'</div>')
|
|
||||||
.appendTo('.events ul');*/
|
|
||||||
});//close each(
|
|
||||||
}
|
|
||||||
}); //close $.ajax(
|
|
||||||
}
|
|
||||||
});
|
});
|
|
@ -2,24 +2,16 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<title>R4</title>
|
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||||
<link rel="shortcut icon" href="/favicon.ico">
|
<link rel="shortcut icon" href="<%= asset_path "ncculogo.ico" %>">
|
||||||
<%= yield :page_specific_link %>
|
<%= yield :page_specific_link %>
|
||||||
<%= stylesheet_link_tag "application" %>
|
<%= stylesheet_link_tag "new_admin" %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "new_admin" %>
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="folded">
|
||||||
|
<%= render 'layouts/orbit_bar' %>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<ul class="hmenu">
|
|
||||||
<%= render 'devise/menu/registration_items' %>
|
|
||||||
<%= render 'devise/menu/login_items' %>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div id="header">
|
|
||||||
<h1>RulingSite</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p class="notice"><%= notice %></p>
|
<p class="notice"><%= notice %></p>
|
||||||
<p class="alert"><%= alert %></p>
|
<p class="alert"><%= alert %></p>
|
||||||
|
@ -27,10 +19,6 @@
|
||||||
<div class="secondary"><%= yield :secondary %></div>
|
<div class="secondary"><%= yield :secondary %></div>
|
||||||
<div class="tertiary"><%= yield :tertiary %></div>
|
<div class="tertiary"><%= yield :tertiary %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
|
||||||
<p>Rulingcom</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<%= yield :page_specific_javascript %>
|
<%= yield :page_specific_javascript %>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1 +1,28 @@
|
||||||
403 FORIBDDEN
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en-US">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title></title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="stylesheets/error-pages.css" media="all"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 40px 0 0 0;
|
||||||
|
background-color: #F3F3F3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Error Pages Start Here -->
|
||||||
|
<div id="error-page">
|
||||||
|
<div class="card">
|
||||||
|
<div class="figure code-403"></div>
|
||||||
|
<div class="message">
|
||||||
|
<h1>We're Sorry</h1>
|
||||||
|
<p>You are not authorized to view this page</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Error Pages End Here -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,26 +1,28 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<title>The page you were looking for doesn't exist (404)</title>
|
<meta charset="UTF-8">
|
||||||
<style type="text/css">
|
<title></title>
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
<link rel="stylesheet" type="text/css" href="stylesheets/error-pages.css" media="all"/>
|
||||||
div.dialog {
|
|
||||||
width: 25em;
|
|
||||||
padding: 0 4em;
|
|
||||||
margin: 4em auto 0 auto;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-bottom-color: #999;
|
|
||||||
}
|
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- This file lives in public/404.html -->
|
<style type="text/css">
|
||||||
<div class="dialog">
|
body {
|
||||||
<h1>The page you were looking for doesn't exist.</h1>
|
margin: 0;
|
||||||
<p>You may have mistyped the address or the page may have moved.</p>
|
padding: 40px 0 0 0;
|
||||||
|
background-color: #F3F3F3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Error Pages Start Here -->
|
||||||
|
<div id="error-page">
|
||||||
|
<div class="card">
|
||||||
|
<div class="figure code-404"></div>
|
||||||
|
<div class="message">
|
||||||
|
<h1>We're Sorry</h1>
|
||||||
|
<p>The page you were looking for doesn’t exist.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Error Pages End Here -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,26 +1,28 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<title>We're sorry, but something went wrong (500)</title>
|
<meta charset="UTF-8">
|
||||||
<style type="text/css">
|
<title></title>
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
<link rel="stylesheet" type="text/css" href="stylesheets/error-pages.css" media="all"/>
|
||||||
div.dialog {
|
|
||||||
width: 25em;
|
|
||||||
padding: 0 4em;
|
|
||||||
margin: 4em auto 0 auto;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-bottom-color: #999;
|
|
||||||
}
|
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- This file lives in public/500.html -->
|
<style type="text/css">
|
||||||
<div class="dialog">
|
body {
|
||||||
<h1>We're sorry, but something went wrong.</h1>
|
margin: 0;
|
||||||
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
padding: 40px 0 0 0;
|
||||||
|
background-color: #F3F3F3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Error Pages Start Here -->
|
||||||
|
<div id="error-page">
|
||||||
|
<div class="card">
|
||||||
|
<div class="figure code-500"></div>
|
||||||
|
<div class="message">
|
||||||
|
<h1>We're Sorry</h1>
|
||||||
|
<p>We’ve been notified about this issue and we’ll take a look at it shortly.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Error Pages End Here -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
|
@ -0,0 +1,41 @@
|
||||||
|
@import url(http://fonts.googleapis.com/css?family=Roboto+Condensed);
|
||||||
|
|
||||||
|
#error-page {
|
||||||
|
width: 820px;
|
||||||
|
margin: 160px auto 0 auto;
|
||||||
|
}
|
||||||
|
#error-page .card {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#error-page .figure {
|
||||||
|
width: 460px;
|
||||||
|
height: 260px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#error-page .figure.code-403 { background: url(../img/403.png) center bottom no-repeat; }
|
||||||
|
#error-page .figure.code-404 { background: url(../img/404.png) center bottom no-repeat; }
|
||||||
|
#error-page .figure.code-500 { background: url(../img/500.png) center bottom no-repeat; }
|
||||||
|
#error-page .message {
|
||||||
|
float: right;
|
||||||
|
width: 330px;
|
||||||
|
margin: 60px 0 0 0;
|
||||||
|
padding: 16px 0;
|
||||||
|
border: solid 3px #D8D8D8;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#error-page .message > * {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#error-page .message h1 {
|
||||||
|
color: #333;
|
||||||
|
font-size: 52px;
|
||||||
|
font-family: 'Roboto Condensed', sans-serif;
|
||||||
|
}
|
||||||
|
#error-page .message p {
|
||||||
|
color: #999;
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
padding: 16px 0;
|
||||||
|
}
|
Loading…
Reference in New Issue