diff --git a/app/assets/javascripts/desktopload.js.erb b/app/assets/javascripts/desktopload.js.erb index c4e9d1e7a..e0e914b9a 100644 --- a/app/assets/javascripts/desktopload.js.erb +++ b/app/assets/javascripts/desktopload.js.erb @@ -1,6 +1,6 @@ orbitDesktop.prototype.themefolder = "desktop_themes"; orbitDesktopAPI.prototype.notifyImgPath = "/assets/"; -alert("<%= @desktop.inspect %>") +// alert("<%= @desktop.inspect %>") var od = new orbitDesktop("#ajax_container"); diff --git a/app/assets/javascripts/event.js b/app/assets/javascripts/event.js index 7db3e47c1..7efd1ce7d 100644 --- a/app/assets/javascripts/event.js +++ b/app/assets/javascripts/event.js @@ -55,7 +55,7 @@ $(document).ready(function(){ } return false; }); - getEvent(selet); + function resetText() { $events.find('li').find($mon).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($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(); - /*$('
  • ') - .html('
    '+startMon_text+''+startDay_text+'
    ') - .appendTo('.events ul');*/ - });//close each( - } - }); //close $.ajax( - } }); \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 653300feb..5a8283ec5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,24 +2,16 @@ - R4 - + <%= @title || APP_CONFIG['orbit'] %> + "> <%= yield :page_specific_link %> - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> + <%= stylesheet_link_tag "new_admin" %> + <%= javascript_include_tag "new_admin" %> <%= csrf_meta_tag %> - + + <%= render 'layouts/orbit_bar' %>
    - - - -

    <%= notice %>

    <%= alert %>

    @@ -27,10 +19,6 @@
    <%= yield :secondary %>
    <%= yield :tertiary %>
    - -
    <%= yield :page_specific_javascript %> diff --git a/public/403.html b/public/403.html index fa192f1e4..b86f7f4ea 100644 --- a/public/403.html +++ b/public/403.html @@ -1 +1,28 @@ -403 FORIBDDEN \ No newline at end of file + + + + + + + + + + +
    +
    +
    +
    +

    We're Sorry

    +

    You are not authorized to view this page

    +
    +
    +
    + + + \ No newline at end of file diff --git a/public/404.html b/public/404.html index 9a48320a5..70fbea4aa 100644 --- a/public/404.html +++ b/public/404.html @@ -1,26 +1,28 @@ - - + + - The page you were looking for doesn't exist (404) - + + + - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    + + +
    +
    +
    +
    +

    We're Sorry

    +

    The page you were looking for doesn’t exist.

    +
    +
    +
    + - + \ No newline at end of file diff --git a/public/500.html b/public/500.html index b80307fc1..2d5301c31 100644 --- a/public/500.html +++ b/public/500.html @@ -1,26 +1,28 @@ - - + + - We're sorry, but something went wrong (500) - + + + - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    + + +
    +
    +
    +
    +

    We're Sorry

    +

    We’ve been notified about this issue and we’ll take a look at it shortly.

    +
    +
    +
    + - + \ No newline at end of file diff --git a/public/img/403.png b/public/img/403.png new file mode 100644 index 000000000..cba3006ee Binary files /dev/null and b/public/img/403.png differ diff --git a/public/img/404.png b/public/img/404.png new file mode 100644 index 000000000..cb36793d4 Binary files /dev/null and b/public/img/404.png differ diff --git a/public/img/500.png b/public/img/500.png new file mode 100644 index 000000000..8a7e378b3 Binary files /dev/null and b/public/img/500.png differ diff --git a/public/stylesheets/error-pages.css b/public/stylesheets/error-pages.css new file mode 100644 index 000000000..9c8fb14b3 --- /dev/null +++ b/public/stylesheets/error-pages.css @@ -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; +} \ No newline at end of file