Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reworked the app to use the asset pipeline for images

  • Loading branch information...
commit e73321311463a2286a3c6cd72e6c83f76eb97724 1 parent 53f104a
@agrobbin authored
Showing with 41 additions and 24 deletions.
  1. 0  {public → app/assets}/images/background.png
  2. 0  {public → app/assets}/images/google-apps-sign-in.jpg
  3. 0  {public → app/assets}/images/icons/close.gif
  4. 0  {public → app/assets}/images/icons/download.png
  5. 0  {public → app/assets}/images/icons/file-types-document-small.png
  6. 0  {public → app/assets}/images/icons/file-types-document.png
  7. 0  {public → app/assets}/images/icons/file-types-gif-small.png
  8. 0  {public → app/assets}/images/icons/file-types-gif.png
  9. 0  {public → app/assets}/images/icons/file-types-jpg-small.png
  10. 0  {public → app/assets}/images/icons/file-types-jpg.png
  11. 0  {public → app/assets}/images/icons/file-types-mp3-small.png
  12. 0  {public → app/assets}/images/icons/file-types-mp3.png
  13. 0  {public → app/assets}/images/icons/file-types-pdf-small.png
  14. 0  {public → app/assets}/images/icons/file-types-pdf.png
  15. 0  {public → app/assets}/images/icons/file-types-png-small.png
  16. 0  {public → app/assets}/images/icons/file-types-png.png
  17. 0  {public → app/assets}/images/icons/file-types-powerpoint-small.png
  18. 0  {public → app/assets}/images/icons/file-types-powerpoint.png
  19. 0  {public → app/assets}/images/icons/file-types-spreadsheet-small.png
  20. 0  {public → app/assets}/images/icons/file-types-spreadsheet.png
  21. 0  {public → app/assets}/images/icons/file-types-zip-small.png
  22. 0  {public → app/assets}/images/icons/file-types-zip.png
  23. 0  {public → app/assets}/images/icons/file-types.eps
  24. 0  {public → app/assets}/images/icons/file-types.psd
  25. 0  {public → app/assets}/images/icons/indent.png
  26. 0  {public → app/assets}/images/icons/move.png
  27. 0  {public → app/assets}/images/icons/setup-calendar.jpg
  28. 0  {public → app/assets}/images/icons/setup-complete.jpg
  29. 0  {public → app/assets}/images/icons/setup-documents.jpg
  30. 0  {public → app/assets}/images/input-field-bg.gif
  31. 0  {public → app/assets}/images/learn-how.jpg
  32. 0  {public → app/assets}/images/loading.gif
  33. 0  {public → app/assets}/images/ribbon.png
  34. 0  {public → app/assets}/images/tutorial-allow.png
  35. 0  {public → app/assets}/images/tutorial-bg.gif
  36. 0  {public → app/assets}/images/tutorial-grant.png
  37. 0  {public → app/assets}/images/uclass-large.png
  38. 0  {public → app/assets}/images/uclass-small.png
  39. +6 −0 app/assets/javascripts/application.js
  40. +21 −10 app/assets/stylesheets/{application.css.scss → application.css.scss.erb}
  41. +1 −1  app/assets/stylesheets/{calendar.scss → calendar.css.scss.erb}
  42. +1 −1  app/assets/stylesheets/{courses.scss → courses.css.scss.erb}
  43. +1 −1  app/assets/stylesheets/{documents.scss → documents.css.scss.erb}
  44. 0  app/assets/stylesheets/{institutions.scss → institutions.css.scss}
  45. +5 −5 app/assets/stylesheets/{sessions.scss → sessions.css.scss.erb}
  46. +1 −1  app/assets/stylesheets/{users.scss → users.css.scss.erb}
  47. +1 −1  app/views/courses/_document.haml
  48. +1 −1  app/views/documents/_document.haml
  49. +1 −1  app/views/documents/_edit.haml
  50. +1 −1  app/views/layouts/institutions.haml
  51. +1 −1  app/views/users/setup.haml
View
0  public/images/background.png → app/assets/images/background.png
File renamed without changes
View
0  public/images/google-apps-sign-in.jpg → app/assets/images/google-apps-sign-in.jpg
File renamed without changes
View
0  public/images/icons/close.gif → app/assets/images/icons/close.gif
File renamed without changes
View
0  public/images/icons/download.png → app/assets/images/icons/download.png
File renamed without changes
View
0  ...mages/icons/file-types-document-small.png → ...mages/icons/file-types-document-small.png
File renamed without changes
View
0  public/images/icons/file-types-document.png → ...sets/images/icons/file-types-document.png
File renamed without changes
View
0  public/images/icons/file-types-gif-small.png → ...ets/images/icons/file-types-gif-small.png
File renamed without changes
View
0  public/images/icons/file-types-gif.png → app/assets/images/icons/file-types-gif.png
File renamed without changes
View
0  public/images/icons/file-types-jpg-small.png → ...ets/images/icons/file-types-jpg-small.png
File renamed without changes
View
0  public/images/icons/file-types-jpg.png → app/assets/images/icons/file-types-jpg.png
File renamed without changes
View
0  public/images/icons/file-types-mp3-small.png → ...ets/images/icons/file-types-mp3-small.png
File renamed without changes
View
0  public/images/icons/file-types-mp3.png → app/assets/images/icons/file-types-mp3.png
File renamed without changes
View
0  public/images/icons/file-types-pdf-small.png → ...ets/images/icons/file-types-pdf-small.png
File renamed without changes
View
0  public/images/icons/file-types-pdf.png → app/assets/images/icons/file-types-pdf.png
File renamed without changes
View
0  public/images/icons/file-types-png-small.png → ...ets/images/icons/file-types-png-small.png
File renamed without changes
View
0  public/images/icons/file-types-png.png → app/assets/images/icons/file-types-png.png
File renamed without changes
View
0  ...ges/icons/file-types-powerpoint-small.png → ...ges/icons/file-types-powerpoint-small.png
File renamed without changes
View
0  ...ic/images/icons/file-types-powerpoint.png → ...ts/images/icons/file-types-powerpoint.png
File renamed without changes
View
0  ...es/icons/file-types-spreadsheet-small.png → ...es/icons/file-types-spreadsheet-small.png
File renamed without changes
View
0  ...c/images/icons/file-types-spreadsheet.png → ...s/images/icons/file-types-spreadsheet.png
File renamed without changes
View
0  public/images/icons/file-types-zip-small.png → ...ets/images/icons/file-types-zip-small.png
File renamed without changes
View
0  public/images/icons/file-types-zip.png → app/assets/images/icons/file-types-zip.png
File renamed without changes
View
0  public/images/icons/file-types.eps → app/assets/images/icons/file-types.eps
File renamed without changes
View
0  public/images/icons/file-types.psd → app/assets/images/icons/file-types.psd
File renamed without changes
View
0  public/images/icons/indent.png → app/assets/images/icons/indent.png
File renamed without changes
View
0  public/images/icons/move.png → app/assets/images/icons/move.png
File renamed without changes
View
0  public/images/icons/setup-calendar.jpg → app/assets/images/icons/setup-calendar.jpg
Diff not rendered
View
0  public/images/icons/setup-complete.jpg → app/assets/images/icons/setup-complete.jpg
Diff not rendered
View
0  public/images/icons/setup-documents.jpg → app/assets/images/icons/setup-documents.jpg
Diff not rendered
View
0  public/images/input-field-bg.gif → app/assets/images/input-field-bg.gif
Diff not rendered
View
0  public/images/learn-how.jpg → app/assets/images/learn-how.jpg
Diff not rendered
View
0  public/images/loading.gif → app/assets/images/loading.gif
Diff not rendered
View
0  public/images/ribbon.png → app/assets/images/ribbon.png
Diff not rendered
View
0  public/images/tutorial-allow.png → app/assets/images/tutorial-allow.png
Diff not rendered
View
0  public/images/tutorial-bg.gif → app/assets/images/tutorial-bg.gif
Diff not rendered
View
0  public/images/tutorial-grant.png → app/assets/images/tutorial-grant.png
Diff not rendered
View
0  public/images/uclass-large.png → app/assets/images/uclass-large.png
Diff not rendered
View
0  public/images/uclass-small.png → app/assets/images/uclass-small.png
Diff not rendered
View
6 app/assets/javascripts/application.js
@@ -1,3 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
//= require jquery
//= require jquery-ui
//= require jquery_ujs
View
31 app/assets/stylesheets/application.css.scss → ...sets/stylesheets/application.css.scss.erb
@@ -1,3 +1,16 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require calendar
+ *= require courses
+ *= require documents
+ *= require institutions
+ *= require sessions
+ *= require users
+*/
+
// Why repeat ourselves with these nasty-looking lines of CSS?
// Let's SASS it up and use mixins
@mixin border-radius($size: 4) {
@@ -29,7 +42,7 @@ body,div,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,blockquote,th,td,img
}
body {
- background: #fff url(/images/background.png) top left repeat-x;
+ background: #fff url(<%= asset_path 'background.png' %>) top left repeat-x;
color: #000;
font: {
size: 13px;
@@ -97,7 +110,7 @@ form {
margin-right: 5px;
&.text {
width: 275px;
- background: #fff url(/images/input-field-bg.gif) top left repeat-x;
+ background: #fff url(<%= asset_path 'input-field-bg.gif' %>) top left repeat-x;
border: 1px solid #666;
padding: 6px;
font-size: 14px;
@@ -145,7 +158,7 @@ img#uclass-large {
position: fixed;
bottom: 10px;
right: 10px;
- background: #bbe4ef url(/images/loading.gif) 10px 5px no-repeat;
+ background: #bbe4ef url(<%= asset_path 'loading.gif' %>) 10px 5px no-repeat;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
@@ -171,7 +184,7 @@ img#uclass-large {
}
}
a#uclass {
- background-image: url(/images/uclass-small.png);
+ background-image: url(<%= asset_path 'uclass-small.png' %>);
width: 217px;
padding-right: 25px;
}
@@ -259,7 +272,7 @@ img#uclass-large {
width: 15px;
height: 15px;
margin: -5px -5px 0 0;
- background: url(/images/icons/move.png) top left no-repeat;
+ background: url(<%= asset_path 'icons/move.png' %>) top left no-repeat;
&:hover {
text-decoration: none;
}
@@ -292,7 +305,7 @@ img#uclass-large {
span {
display: block;
float: left;
- background: url(/images/ribbon.png) top left no-repeat;
+ background: url(<%= asset_path 'ribbon.png' %>) top left no-repeat;
&.l {
width: 6px;
height: 35px;
@@ -389,7 +402,7 @@ img#uclass-large {
display: block;
height: 21px;
width: 68px;
- background: url(/images/icons/close.gif) top left no-repeat;
+ background: url(<%= asset_path 'icons/close.gif' %>) top left no-repeat;
text-indent: -10000px;
margin: 25px 0 20px 20px;
}
@@ -424,6 +437,4 @@ a.section {
font-size: 20px;
color: #ccc;
padding: 20px 0;
-}
-
-@import "calendar", "courses", "documents", "institutions", "sessions", "users";
+}
View
2  app/assets/stylesheets/calendar.scss → app/assets/stylesheets/calendar.css.scss.erb
@@ -18,7 +18,7 @@ table#calendar {
height: 100px;
vertical-align: top;
&.my {
- background: url(/images/ribbon.png) 0 -70px repeat-x;
+ background: url(<%= asset_path 'ribbon.png' %>) 0 -70px repeat-x;
color: #fff;
border: 0;
padding: 5px 10px;
View
2  app/assets/stylesheets/courses.scss → app/assets/stylesheets/courses.css.scss.erb
@@ -20,7 +20,7 @@
p.indent {
margin: 5px 0 0 10px;
padding: 5px 0 0 22px;
- background: url(/images/icons/indent.png) top left no-repeat;
+ background: url(<%= asset_path 'icons/indent.png' %>) top left no-repeat;
}
table#calendar td {
height: 50px;
View
2  app/assets/stylesheets/documents.scss → ...assets/stylesheets/documents.css.scss.erb
@@ -79,7 +79,7 @@ p.file-info {
display: inline-block;
width: 17px;
height: 17px;
- background: url(/images/icons/download.png) top left no-repeat;
+ background: url(<%= asset_path 'icons/download.png' %>) top left no-repeat;
text-indent: -10000px;
margin-left: 2px;
}
View
0  app/assets/stylesheets/institutions.scss → app/assets/stylesheets/institutions.css.scss
File renamed without changes
View
10 app/assets/stylesheets/sessions.scss → app/assets/stylesheets/sessions.css.scss.erb
@@ -8,7 +8,7 @@ form#new_session {
input.submit {
width: 435px;
height: 250px;
- background: url(/images/google-apps-sign-in.jpg) no-repeat;
+ background: url(<%= asset_path 'google-apps-sign-in.jpg' %>) no-repeat;
border: 0;
text-indent: -10000px;
margin-top: 30px;
@@ -20,7 +20,7 @@ form#new_session {
display: block;
width: 631px;
height: 155px;
- background: url(/images/learn-how.jpg) no-repeat;
+ background: url(<%= asset_path 'learn-how.jpg' %>) no-repeat;
text-indent: -10000px;
margin: 65px auto 0;
}
@@ -28,7 +28,7 @@ form#new_session {
}
#tutorial {
- background: url(/images/tutorial-bg.gif) center left no-repeat;
+ background: url(<%= asset_path 'tutorial-bg.gif' %>) center left no-repeat;
width: 571px;
height: 270px;
margin: 0 auto 90px;
@@ -72,7 +72,7 @@ form#new_session {
}
&.step-2 {
span {
- background-image: url(/images/tutorial-allow.png);
+ background-image: url(<%= asset_path 'tutorial-allow.png' %>);
width: 119px;
height: 84px;
margin-top: 5px;
@@ -83,7 +83,7 @@ form#new_session {
}
&.step-3 {
span {
- background-image: url(/images/tutorial-grant.png);
+ background-image: url(<%= asset_path 'tutorial-grant.png' %>);
width: 97px;
height: 95px;
}
View
2  app/assets/stylesheets/users.scss → app/assets/stylesheets/users.css.scss.erb
@@ -20,7 +20,7 @@ ul#setup {
}
@each $icon in calendar, documents, complete {
&.#{$icon} {
- background-image: url(/images/icons/setup-#{$icon}.jpg);
+ background-image: url(<%= asset_path 'icons/setup-#{$icon}.jpg' %>);
}
}
}
View
2  app/views/courses/_document.haml
@@ -1,5 +1,5 @@
.document{:class => current_user.is_a?(Professor) && !document.visible ? 'invisible' : nil}
- = image_tag "/images/icons/file-types-#{document.file_type_icon}-small.png"
+ = image_tag "icons/file-types-#{document.file_type_icon}-small.png"
%b= link_to document.name, course_document_path(@section, document), :class => 'modal doc-viewer'
= link_to 'Download', download_course_document_path(@section, document), :class => 'download'
- if current_user.is_a?(Professor) && !document.visible
View
2  app/views/documents/_document.haml
@@ -1,5 +1,5 @@
.document{:class => current_user.is_a?(Professor) && !document.visible ? 'invisible' : nil, :id => current_user.is_a?(Professor) ? "document_#{document.id}" : nil}
- = image_tag "/images/icons/file-types-#{document.file_type_icon}-small.png"
+ = image_tag "icons/file-types-#{document.file_type_icon}-small.png"
%b= link_to document.name, course_document_path(@section, document), :class => 'modal doc-viewer'
= link_to 'Download', download_course_document_path(@section, document), :class => 'download'
- if current_user.is_a?(Professor) && !document.visible
View
2  app/views/documents/_edit.haml
@@ -5,7 +5,7 @@
= form_for @document, :url => course_document_path(@section, @document), :remote => true do |f|
%label File Information
%p.file-info
- = image_tag "/images/icons/file-types-#{@document.file_type_icon}.png"
+ = image_tag "icons/file-types-#{@document.file_type_icon}.png"
%b= @document.upload.original_filename
%br
= number_to_human_size @document.upload_file_size
View
2  app/views/layouts/institutions.haml
@@ -45,7 +45,7 @@
.clear
#footer Copyright &copy; #{Date.today.year} #{link_to 'uClass', root_url(:subdomain => nil)} | #{link_to 'Help', '#'}
- if @startup
- = image_tag '/images/uclass-large.png', :id => 'uclass-large'
+ = image_tag 'uclass-large.png', :id => 'uclass-large'
#loading Loading...
#modal
#modal-content
View
2  app/views/users/setup.haml
@@ -28,7 +28,7 @@
%p
Before uClass can start fully integrating with your #{current_institution.name} Google account, we need to do a few setup tasks. It should only take a few seconds, and then you'll be ready to go.
%b DO NOT REFRESH YOUR BROWSER.
-= image_tag '/images/loading.gif', :id => 'setup-loading'
+= image_tag 'loading.gif', :id => 'setup-loading'
%ul#setup
%li.calendar Creating a calendar for your courses
%li.documents Connecting you to the documents folder for each of your courses
Please sign in to comment.
Something went wrong with that request. Please try again.