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
|
# Erro de validacao
|
||||||
elsif exception.is_a?(ActiveRecord::RecordInvalid)
|
elsif exception.is_a?(ActiveRecord::RecordInvalid)
|
||||||
respond_to do |format|
|
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 }
|
format.xml { render :xml => exception.record.errors, :status => :unprocessable_entity }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ module ApplicationHelper
|
|||||||
return {:class => 'highlight'} if (flash[:highlight] == name)
|
return {:class => 'highlight'} if (flash[:highlight] == name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def spinner(name)
|
||||||
|
return image_tag "loading.gif", :id => "spinner_#{name}", :style => "display:none"
|
||||||
|
end
|
||||||
|
|
||||||
def gravatar_url_for(email, size=80)
|
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}"
|
"http://www.gravatar.com/avatar.php?gravatar_id=#{Digest::MD5.hexdigest(email)}&size=#{size}&default=#{App.default_avatar}"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -490,6 +490,7 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#passmeter {
|
#passmeter {
|
||||||
|
margin-left: 5px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,8 +514,6 @@ select {
|
|||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.history {
|
.history {
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
@@ -718,6 +717,10 @@ text-align: center;
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.box dl {
|
||||||
|
margin: 0px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
.top { vertical-align: top; }
|
.top { vertical-align: top; }
|
||||||
.center { text-align: center !important; }
|
.center { text-align: center !important; }
|
||||||
.left { float: left !important; }
|
.left { float: left !important; }
|
||||||
|
|||||||
@@ -1,37 +1,44 @@
|
|||||||
= javascript_include_tag 'color'
|
= javascript_include_tag 'color'
|
||||||
= error_messages_for 'user'
|
= error_messages_for 'user'
|
||||||
|
|
||||||
%dl
|
= hidden_field_tag 'from', 'settings'
|
||||||
- if defined?(signup) and signup
|
|
||||||
|
.box
|
||||||
|
%h3 Informações Pessoais
|
||||||
|
%dl
|
||||||
|
- if defined?(signup) and signup
|
||||||
|
%dt
|
||||||
|
%label{:for => 'user_login'} Login
|
||||||
|
%dd= text_field('user', 'login')
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_login'} Login
|
%label{:for => 'user_name'} Nome completo
|
||||||
%dd= text_field('user', 'login')
|
%dd= text_field('user', 'name')
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_name'} Nome completo
|
%label{:for => 'user_display_name'} Nome de exibição
|
||||||
%dd= text_field('user', 'name')
|
%dd= text_field('user', 'display_name')
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_display_name'} Nome de exibição
|
%laber{:for => 'user_email'} Email
|
||||||
%dd= text_field('user', 'display_name')
|
%dd= text_field('user', 'email')
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%laber{:for => 'user_email'} Email
|
%label{:for => 'user_password'} Senha
|
||||||
%dd= text_field('user', 'email')
|
%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
|
.box
|
||||||
%label{:for => 'user_password'} Senha
|
%h3 Preferências
|
||||||
%dd= password_field('user', 'password', {:value => '', :id => 'password'})
|
%dl
|
||||||
|
%dt
|
||||||
%dt
|
%label{:for => 'user_color_pref'} Esquema de cores
|
||||||
%label{:for => 'user_password_confirmation'} Confirmação de Senha
|
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||||
%dd= password_field('user', 'password_confirmation', {:value => ''})
|
%br.clear
|
||||||
|
|
||||||
#passmeter
|
|
||||||
|
|
||||||
%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/"
|
#App.forum_uri = "http://127.0.0.1:3001/"
|
||||||
|
|
||||||
# Tema
|
# Tema
|
||||||
App.default_color = 6
|
App.default_color = 0
|
||||||
App.default_avatar = "http://wikiufc.gelsol.org/images/avatar.png"
|
App.default_avatar = "http://wikiufc.gelsol.org/images/avatar.png"
|
||||||
App.color_schemes = [
|
App.color_schemes = [
|
||||||
# Default
|
# 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" ],
|
[ "#7b7", "#455", "#899", "#abb" ],
|
||||||
[ "#005B9A", "#455", "#899", "#abb" ],
|
[ "#005B9A", "#455", "#899", "#abb" ],
|
||||||
[ "#8D009A", "#455", "#899", "#abb" ],
|
[ "#8D009A", "#455", "#899", "#abb" ],
|
||||||
[ "#9A000D", "#455", "#899", "#abb" ],
|
[ "#9A000D", "#455", "#899", "#abb" ],
|
||||||
[ "#5A9A00", "#455", "#899", "#abb" ],
|
[ "#5A9A00", "#455", "#899", "#abb" ],
|
||||||
|
|
||||||
# Mono
|
|
||||||
[ "#037", "#069", "#455", "#778" ],
|
|
||||||
[ "#900", "#c00", "#444", "#888" ],
|
|
||||||
|
|
||||||
# Complementar
|
# Complementar
|
||||||
[ "#037", "#c60", "#457", "#568" ],
|
#[ "#037", "#c60", "#457", "#568" ],
|
||||||
[ "#070", "#c00", "#474", "#585" ],
|
#[ "#070", "#c00", "#474", "#585" ],
|
||||||
|
|
||||||
# Pink
|
# Pink
|
||||||
[ "#d18", "#d18", "#457", "#668" ],
|
[ "#d18", "#d18", "#457", "#668" ],
|
||||||
[ "#609", "#455", "#547", "#658" ],
|
#[ "#609", "#455", "#547", "#658" ],
|
||||||
|
|
||||||
# Sand
|
# Sand
|
||||||
[ "#900", "#663", "#888", "#cc9" ],
|
[ "#900", "#663", "#888", "#cc9" ],
|
||||||
[ "#036", "#663", "#888", "#cc9" ],
|
[ "#036", "#663", "#888", "#cc9" ],
|
||||||
[ "#680", "#663", "#888", "#cc9" ],
|
[ "#680", "#663", "#888", "#cc9" ]
|
||||||
|
|
||||||
# Original
|
|
||||||
[ "#000", "#690", "#444", "#666" ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ class MoreParanoid < ActiveRecord::Migration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
add_column :courses, :deleted_at
|
remove_column :courses, :deleted_at
|
||||||
add_column :log_entries, :deleted_at
|
remove_column :log_entries, :deleted_at
|
||||||
add_column :users, :deleted_at
|
remove_column :users, :deleted_at
|
||||||
end
|
end
|
||||||
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.
|
# 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|
|
create_table "attachments", :force => true do |t|
|
||||||
t.string "file_name", :null => false
|
t.string "file_name", :null => false
|
||||||
@@ -83,7 +83,7 @@ ActiveRecord::Schema.define(:version => 32) do
|
|||||||
t.string "salt", :null => false
|
t.string "salt", :null => false
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.string "name", :default => "", :null => false
|
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.string "display_name", :null => false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.datetime "last_seen", :null => false
|
t.datetime "last_seen", :null => false
|
||||||
|
|||||||
@@ -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
Block a user