parent
c206a678bd
commit
304a41f610
@ -0,0 +1,12 @@
|
|||||||
|
class DefaultColor < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
change_column :users, :pref_color, :integer, :default => 0, :null => false
|
||||||
|
User.find(:all).each do |user|
|
||||||
|
user.update_attribute(:pref_color, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
change_column :users, :pref_color, :integer, :default => 6, :null => false
|
||||||
|
end
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
events['.color_radio:click'] = function(element, e) {
|
events['.color_radio:click'] = function(element, e) {
|
||||||
style = document.createElement('link');
|
style = document.createElement('link');
|
||||||
style.rel = 'Stylesheet';
|
style.rel = 'Stylesheet';
|
||||||
style.href = BASE_PATH + "/stylesheets/themes/color." + element.value + ".css";
|
style.href = BASE_PATH + "/stylesheets/cache/color." + element.value + ".css";
|
||||||
$$('head')[0].appendChild(style);
|
$$('head')[0].appendChild(style);
|
||||||
}
|
}
|
||||||
|
Reference in new issue