Devin's changes to integrate the store

This commit is contained in:
OrbitServer 2012-12-06 16:06:47 +08:00
parent e68c52bc00
commit 9683741ec9
26 changed files with 1639 additions and 37 deletions

BIN
app/assets/images/ar1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

BIN
app/assets/images/f1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
app/assets/images/f2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
app/assets/images/f3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
app/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
app/assets/images/ui_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
$('#feature .holder ul').cycle({
fx: 'scrollDown',
pager: '#feature-nav ul',
pause: 1,
pagerAnchorBuilder: function(idx, slide) {
// return selector string for existing anchor
return '#feature-nav ul li:eq(' + idx + ') a';
}
});

View File

@ -0,0 +1,9 @@
$(document).ready(function(){
$('#screen-shot .holder')
.before('<div id="scr-nav"/>')
.cycle({
pager: '#scr-nav',
fx: 'scrollLeft',
pause: 1
});
});

View File

@ -1,9 +1,9 @@
/* list page */
header {
background-image: url(../image/mheader_bg.jpg);
background-image: url(<%= asset_path "mheader_bg.jpg"%>);
}
#toolbar {
background-image: url(../image/mfilter_bg.jpg);
background-image: url(<%= asset_path "mfilter_bg.jpg"%>);
border: solid 1px #8b8b8b;
box-shadow: inset 0 -1px 0 #9a9a9a;
}
@ -17,6 +17,7 @@ header {
margin: 0;
padding: 0;
list-style: none;
height: 220px;
}
#feature .holder {
width: 740px;
@ -92,7 +93,7 @@ header {
/* content page */
#content {
background: #fff url(../image/mside_bg.png) 0 0 repeat-y;
background: #fff url(<%= asset_path "mside_bg.png"%>) 0 0 repeat-y;
padding: 20px 0;
}
.user-list {
@ -106,5 +107,5 @@ header {
border-top: solid 1px #f1f1f1;
padding: 8px;
padding-left: 20px;
background: url(../image/ar1.png) 10px 14px no-repeat;
background: url(<%= asset_path "ar1.png"%>) 10px 14px no-repeat;
}

View File

@ -17,10 +17,10 @@ body {
list-style: none;
}
header {
background-color: #e0e0e0;
/*background-color: #e0e0e0;
background-position: center 60px;
background-repeat: no-repeat;
height: 200px;
height: 200px;*/
}
#orbit-logo {
margin: 0;
@ -32,7 +32,7 @@ header {
height: 32px;
overflow: hidden;
text-indent: -9999px;
background: url(../image/logo.png) 0 0 no-repeat;
background: url(<%= asset_path "logo.png"%>) 0 0 no-repeat;
margin-top: 14px;
}
#orbit-logo span {
@ -45,7 +45,7 @@ header {
-webkit-text-size-adjust: none;
}
#main-menu {
background: url(../image/topnav_bg.png) 0 0 repeat-x;
background: url(<%= asset_path "topnav_bg.png"%>) 0 0 repeat-x;
}
#main-menu ul {
float: right;
@ -104,7 +104,7 @@ header {
background-color: #cecece;
}
#toolbar {
margin: -25px 0 35px 0;
margin: 35px 0;
height: 50px;
background-color: #fff;
background-repeat: repeat-x;
@ -112,10 +112,10 @@ header {
border-radius: 3px;
box-shadow: inset 0 -1px 0 #c9c9c9;
position: relative;
z-index: 99;
z-index: 9;
}
.ui {
background: #F2F2F2 url(../image/ui_bg.png) left center repeat-x;
background: #F2F2F2 url(<%= asset_path "ui_bg.png" %>) left center repeat-x;
height: 28px;
line-height: 28px;
border: solid 1px #e0e0e0;
@ -148,6 +148,10 @@ header {
line-height: 28px;
color: #999;
margin-right: 8px;
font-size: 1em;
font-weight: normal;
text-shadow: none;
background: none;
}
.option-default {
font-weight: bold;
@ -186,7 +190,7 @@ header {
}
.drop-menu .arrow {
display: inline-block;
background: url(../image/dropdown_ad.png) 0 0 no-repeat;
background: url(<%= asset_path "dropdown_ad.png"%>) 0 0 no-repeat;
width: 16px;
height: 18px;
vertical-align: top;
@ -249,7 +253,7 @@ header {
#item-list li a:hover {}
.item-thumb {
display: block;
background: #ccc url(../image/thumb_default.png) center center no-repeat;
background: #ccc url(<%= asset_path "thumb_default.png"%>) center center no-repeat;
}
#item-list .item-info {
position: relative;

View File

@ -1,9 +1,9 @@
/* list page */
header {
background-image: url(../image/theader_bg.jpg);
background-image: url(<%= asset_path "theader_bg.jpg"%>);
}
#toolbar {
background-image: url(../image/tfilter_bg.jpg);
background-image: url(<%= asset_path "tfilter_bg.jpg"%>);
}
#item-list li {
width: 25%;
@ -11,7 +11,7 @@ header {
#item-list li a {
width: 220px;
height: 220px;
background: url(../image/tlist_tap.png) center top no-repeat;
background: url(<%= asset_path "tlist_tap.png"%>) center top no-repeat;
padding-top: 16px;
margin: 0 auto 35px auto;
background-color: #fff;
@ -106,5 +106,5 @@ header {
/* content page */
#item-info .item-thumb, #screen-shot {
box-shadow: 0 4px 6px rgba(0,0,0,0.2);
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

View File

@ -3,6 +3,7 @@
class ImageUploader < CarrierWave::Uploader::Base
require 'mime/types'
require 'carrierwave/processing/mini_magick'
include Sprockets::Helpers::RailsHelper
process :set_content_type
@ -61,15 +62,21 @@ class ImageUploader < CarrierWave::Uploader::Base
# def filename
# "something.jpg" if original_filename
# end
def cache_dir
"#{Rails.root}/tmp/uploads"
end
def manipulate!
cache_stored_file! if !cached?
#raise File.extname(current_path.to_s).to_s
image = ::MiniMagick::Image.open(current_path)
image = yield(image)
image.write(current_path)
::MiniMagick::Image.open(current_path)
rescue
nil
# image = yield(image)
# image.write(current_path)
# ::MiniMagick::Image.open(current_path)
# rescue
# nil
end
end

View File

@ -8,6 +8,10 @@
<%= stylesheet_link_tag 'rulingorbit' %>
<%= stylesheet_link_tag 'module-store' %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.cycle" %>
<%= javascript_include_tag "modules" %>
<% end %>
<div class="wrapper">
<div id="toolbar">
@ -60,16 +64,16 @@
<div id="feature" class="clearfix">
<div id="feature-nav">
<ul>
<li><a href=""><img class="item-thumb" src="assets/image/f_sample.jpg" alt="Thumbnail 1" width="228" height="67"></a></li>
<li><a href=""><img class="item-thumb" src="" alt="Thumbnail 2" width="228" height="67"></a></li>
<li><a href=""><img class="item-thumb" src="" alt="Thumbnail 3" width="228" height="67"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="228" height="67"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="228" height="67"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="228" height="67"></a></li>
</ul>
</div>
<div class="holder">
<ul>
<li><a href=""><img class="item-thumb" src="assets/image/f_sample.jpg" alt="Thumbnail 1" width="740" height="220"></a></li>
<li><a href=""><img class="item-thumb" src="" alt="Thumbnail 2" width="740" height="220"></a></li>
<li><a href=""><img class="item-thumb" src="" alt="Thumbnail 3" width="740" height="220"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="740" height="220"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="740" height="220"></a></li>
<li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="740" height="220"></a></li>
</ul>
</div>
</div>

View File

@ -8,6 +8,10 @@
<%= stylesheet_link_tag 'rulingorbit' %>
<%= stylesheet_link_tag 'module-store' %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.cycle" %>
<%= javascript_include_tag "rulingorbit" %>
<% end %>
<div class="wrapper">

View File

@ -1,12 +1,12 @@
<div class="main2">
<h1><%= t('list.purchase') %></h1>
<table>
<h1 class="list_title"><%= t('list.purchase') %></h1>
<table class="table main-list">
<thead>
<tr>
<td><%= t(:title) %></td>
<td><%= t(:intro) %></td>
<td><%= t(:author) %></td>
<td><%= t(:action) %></td>
<th><%= t(:title) %></th>
<th><%= t(:intro) %></th>
<th><%= t(:author) %></th>
<th><%= t(:action) %></th>
</tr>
</thead>
<%# @purchases.each do |purchase| %>
@ -15,7 +15,7 @@
<td><%= purchase.title %></td>
<td><%= purchase.intro %></td>
<td><%= purchase.author %></td>
<td class="action">
<td>
<% if purchase.downloaded %>
<%= t(:downloaded) %>
<% else %>
@ -25,4 +25,13 @@
</tr>
<%# end %>
</table>
</div>
</div>
<style type="text/css">
.list_title {
background: #eee;
font-weight: bold;
margin: 0;
padding: 20px 6px;
font-size: 18px;
}
</style>

View File

@ -8,7 +8,10 @@
<%= stylesheet_link_tag 'rulingorbit' %>
<%= stylesheet_link_tag 'template-store' %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.cycle" %>
<%= javascript_include_tag "rulingorbit" %>
<% end %>
<div class="wrapper">
<div id="toolbar">