Modificando os esquemas de cores e alguns detalhes na interface
This commit is contained in:
@@ -41,7 +41,7 @@ class ApplicationController < ActionController::Base
|
||||
# Erro de validacao
|
||||
elsif exception.is_a?(ActiveRecord::RecordInvalid)
|
||||
respond_to do |format|
|
||||
format.html { render :action => (exception.record.new_record? ? 'new' : 'edit') }
|
||||
format.html { render :action => (params[:from].nil? ? (exception.record.new_record? ? 'new' : 'edit') : params[:from]) }
|
||||
format.xml { render :xml => exception.record.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
|
||||
|
||||
@@ -54,6 +54,10 @@ module ApplicationHelper
|
||||
return {:class => 'highlight'} if (flash[:highlight] == name)
|
||||
end
|
||||
|
||||
def spinner(name)
|
||||
return image_tag "loading.gif", :id => "spinner_#{name}", :style => "display:none"
|
||||
end
|
||||
|
||||
def gravatar_url_for(email, size=80)
|
||||
"http://www.gravatar.com/avatar.php?gravatar_id=#{Digest::MD5.hexdigest(email)}&size=#{size}&default=#{App.default_avatar}"
|
||||
end
|
||||
|
||||
@@ -490,6 +490,7 @@ select {
|
||||
}
|
||||
|
||||
#passmeter {
|
||||
margin-left: 5px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -513,8 +514,6 @@ select {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.history {
|
||||
margin-top: 18px;
|
||||
margin-left: 18px;
|
||||
@@ -718,6 +717,10 @@ text-align: center;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.box dl {
|
||||
margin: 0px 18px;
|
||||
}
|
||||
|
||||
.top { vertical-align: top; }
|
||||
.center { text-align: center !important; }
|
||||
.left { float: left !important; }
|
||||
|
||||
@@ -1,37 +1,44 @@
|
||||
= javascript_include_tag 'color'
|
||||
= error_messages_for 'user'
|
||||
|
||||
%dl
|
||||
- if defined?(signup) and signup
|
||||
= hidden_field_tag 'from', 'settings'
|
||||
|
||||
.box
|
||||
%h3 Informações Pessoais
|
||||
%dl
|
||||
- if defined?(signup) and signup
|
||||
%dt
|
||||
%label{:for => 'user_login'} Login
|
||||
%dd= text_field('user', 'login')
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_login'} Login
|
||||
%dd= text_field('user', 'login')
|
||||
%label{:for => 'user_name'} Nome completo
|
||||
%dd= text_field('user', 'name')
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_name'} Nome completo
|
||||
%dd= text_field('user', 'name')
|
||||
%dt
|
||||
%label{:for => 'user_display_name'} Nome de exibição
|
||||
%dd= text_field('user', 'display_name')
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_display_name'} Nome de exibição
|
||||
%dd= text_field('user', 'display_name')
|
||||
%dt
|
||||
%laber{:for => 'user_email'} Email
|
||||
%dd= text_field('user', 'email')
|
||||
|
||||
%dt
|
||||
%laber{:for => 'user_email'} Email
|
||||
%dd= text_field('user', 'email')
|
||||
%dt
|
||||
%label{:for => 'user_password'} Senha
|
||||
%dd
|
||||
= password_field('user', 'password', {:value => '', :id => 'password'})
|
||||
%span#passmeter
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_password_confirmation'} Confirmação de Senha
|
||||
%dd
|
||||
=password_field('user', 'password_confirmation', {:value => ''})
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_password'} Senha
|
||||
%dd= password_field('user', 'password', {:value => '', :id => 'password'})
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_password_confirmation'} Confirmação de Senha
|
||||
%dd= password_field('user', 'password_confirmation', {:value => ''})
|
||||
|
||||
#passmeter
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_color_pref'} Esquema de cores
|
||||
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||
%br.clear
|
||||
.box
|
||||
%h3 Preferências
|
||||
%dl
|
||||
%dt
|
||||
%label{:for => 'user_color_pref'} Esquema de cores
|
||||
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||
%br.clear
|
||||
|
||||
|
||||
@@ -10,38 +10,39 @@ App.max_upload_file_size = 5.megabytes
|
||||
#App.forum_uri = "http://127.0.0.1:3001/"
|
||||
|
||||
# Tema
|
||||
App.default_color = 6
|
||||
App.default_color = 0
|
||||
App.default_avatar = "http://wikiufc.gelsol.org/images/avatar.png"
|
||||
App.color_schemes = [
|
||||
# Default
|
||||
[ "#000", "#069", "#455", "#455" ],
|
||||
[ "#037", "#069", "#455", "#778" ],
|
||||
|
||||
# Aqua
|
||||
# Legado
|
||||
[ "#000", "#069", "#455", "#455" ],
|
||||
[ "#000", "#690", "#444", "#666" ],
|
||||
|
||||
# Mono
|
||||
|
||||
[ "#900", "#c00", "#444", "#888" ],
|
||||
|
||||
# Aqua
|
||||
[ "#7b7", "#455", "#899", "#abb" ],
|
||||
[ "#005B9A", "#455", "#899", "#abb" ],
|
||||
[ "#8D009A", "#455", "#899", "#abb" ],
|
||||
[ "#9A000D", "#455", "#899", "#abb" ],
|
||||
[ "#5A9A00", "#455", "#899", "#abb" ],
|
||||
|
||||
# Mono
|
||||
[ "#037", "#069", "#455", "#778" ],
|
||||
[ "#900", "#c00", "#444", "#888" ],
|
||||
|
||||
# Complementar
|
||||
[ "#037", "#c60", "#457", "#568" ],
|
||||
[ "#070", "#c00", "#474", "#585" ],
|
||||
#[ "#037", "#c60", "#457", "#568" ],
|
||||
#[ "#070", "#c00", "#474", "#585" ],
|
||||
|
||||
# Pink
|
||||
[ "#d18", "#d18", "#457", "#668" ],
|
||||
[ "#609", "#455", "#547", "#658" ],
|
||||
#[ "#609", "#455", "#547", "#658" ],
|
||||
|
||||
# Sand
|
||||
[ "#900", "#663", "#888", "#cc9" ],
|
||||
[ "#036", "#663", "#888", "#cc9" ],
|
||||
[ "#680", "#663", "#888", "#cc9" ],
|
||||
|
||||
# Original
|
||||
[ "#000", "#690", "#444", "#666" ]
|
||||
[ "#680", "#663", "#888", "#cc9" ]
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ class MoreParanoid < ActiveRecord::Migration
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :courses, :deleted_at
|
||||
add_column :log_entries, :deleted_at
|
||||
add_column :users, :deleted_at
|
||||
remove_column :courses, :deleted_at
|
||||
remove_column :log_entries, :deleted_at
|
||||
remove_column :users, :deleted_at
|
||||
end
|
||||
end
|
||||
|
||||
12
db/migrate/033_default_color.rb
Normal file
12
db/migrate/033_default_color.rb
Normal file
@@ -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
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 32) do
|
||||
ActiveRecord::Schema.define(:version => 33) do
|
||||
|
||||
create_table "attachments", :force => true do |t|
|
||||
t.string "file_name", :null => false
|
||||
@@ -83,7 +83,7 @@ ActiveRecord::Schema.define(:version => 32) do
|
||||
t.string "salt", :null => false
|
||||
t.datetime "created_at"
|
||||
t.string "name", :default => "", :null => false
|
||||
t.integer "pref_color", :default => 6, :null => false
|
||||
t.integer "pref_color", :default => 0, :null => false
|
||||
t.string "display_name", :null => false
|
||||
t.text "description"
|
||||
t.datetime "last_seen", :null => false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
events['.color_radio:click'] = function(element, e) {
|
||||
style = document.createElement('link');
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user