Skip to content

Commit

Permalink
xiku
Browse files Browse the repository at this point in the history
  • Loading branch information
wxianfeng committed Jan 5, 2012
1 parent 798cd15 commit 4e9c38c
Show file tree
Hide file tree
Showing 13 changed files with 385 additions and 163 deletions.
12 changes: 6 additions & 6 deletions app/assets/javascripts/.svn/entries
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,14 @@ deleted

step.js
file
647
649



2012-01-03T16:39:59.000000Z
21fa735784de860ddd1a67dda58ebd20
2012-01-03T16:43:23.922773Z
647
2012-01-05T16:30:48.000000Z
c7b284a9be0f3ec00bd227d4732bf0eb
2012-01-05T16:31:35.420708Z
649
wxianfeng


Expand All @@ -461,7 +461,7 @@ wxianfeng



2260
2803

up_sizes.js.coffee
file
Expand Down
22 changes: 22 additions & 0 deletions app/assets/javascripts/step.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@
$("#right_top").after(data);
}
})
},
loadXiku: function(){
$.ajax({
url: "/welcome/load_xiku",
type: "GET",
success: function(data){
if ($("#xiku_content").length != 0)
return;
$("#right_top").after(data);
}
});
},
changeXikuStyle: function(style){
$.ajax({
url: "/welcome/load_xiku",
type: "GET",
data: { 'style': style },
success: function(data){
$("#xiku_content").remove();
$("#right_top").after(data);
}
});
}
};

Expand Down
12 changes: 6 additions & 6 deletions app/controllers/.svn/entries
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,14 @@ deleted

welcome_controller.rb
file
647
649



2012-01-03T16:42:39.000000Z
56ee495c98a412dd89e539a8a36922b8
2012-01-03T16:43:23.922773Z
647
2012-01-05T16:31:02.000000Z
178e85a1c9424b63d10896e5053b2df3
2012-01-05T16:31:35.420708Z
649
wxianfeng


Expand All @@ -270,5 +270,5 @@ wxianfeng



2490
2625

8 changes: 8 additions & 0 deletions app/controllers/.svn/text-base/welcome_controller.rb.svn-base
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ class WelcomeController < ApplicationController
render :partial=>"xifu"
end

def load_xiku
if params[:style]
@user.style = params[:style]
@user.save
end
render :partial => "xiku"
end

protected
def find_user
@user = User.find_by_visitor_id(cookies[:visitor_id])
Expand Down
8 changes: 8 additions & 0 deletions app/controllers/welcome_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ def load_xifu
render :partial=>"xifu"
end

def load_xiku
if params[:style]
@user.style = params[:style]
@user.save
end
render :partial => "xiku"
end

protected
def find_user
@user = User.find_by_visitor_id(cookies[:visitor_id])
Expand Down
Loading

0 comments on commit 4e9c38c

Please sign in to comment.