Mudancas na interface e suporte a IE6/7
This commit is contained in:
@@ -97,7 +97,7 @@ class EventsController < ApplicationController
|
|||||||
@event.update_attribute(:deleted_at, nil)
|
@event.update_attribute(:deleted_at, nil)
|
||||||
flash[:notice] = "Event restored"[]
|
flash[:notice] = "Event restored"[]
|
||||||
|
|
||||||
EventRestoreLogEntry.create!(:target_id => @event.id, :user => @current_user, :course => @course)
|
EventRestoreLogEntry.create!(:target_id => @event.id, :user => @current_user, :course => @event.course)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to course_event_url(@event.course, @event) }
|
format.html { redirect_to course_event_url(@event.course, @event) }
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def spinner(name)
|
def spinner(name)
|
||||||
return image_tag "loading.gif", :id => "spinner_#{name}", :style => "display:none"
|
return image_tag("loading.gif", :id => "spinner_#{name}", :style => "display:none")
|
||||||
end
|
end
|
||||||
|
|
||||||
def gravatar_url_for(email, size=80)
|
def gravatar_url_for(email, size=80)
|
||||||
@@ -64,6 +64,6 @@ module ApplicationHelper
|
|||||||
|
|
||||||
def action_icon(action_name, description, options = {}, html_options = {})
|
def action_icon(action_name, description, options = {}, html_options = {})
|
||||||
html_options.merge!({:class => 'icon', :alt => description, :title => description})
|
html_options.merge!({:class => 'icon', :alt => description, :title => description})
|
||||||
link_to(image_tag("action/#{action_name}.gif"), options, html_options)
|
link_to(image_tag("action/#{action_name}.gif", :title => description), options, html_options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ class Event < ActiveRecord::Base
|
|||||||
acts_as_paranoid
|
acts_as_paranoid
|
||||||
generate_validations
|
generate_validations
|
||||||
|
|
||||||
|
belongs_to :course
|
||||||
|
|
||||||
def Event.to_ical(courses)
|
def Event.to_ical(courses)
|
||||||
courses = [courses] unless courses.kind_of?(Array)
|
courses = [courses] unless courses.kind_of?(Array)
|
||||||
cal = Icalendar::Calendar.new
|
cal = Icalendar::Calendar.new
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class EventDeleteLogEntry < EventLogEntry
|
|||||||
e = Event.find_with_deleted(target_id)
|
e = Event.find_with_deleted(target_id)
|
||||||
e.update_attribute(:deleted_at, nil)
|
e.update_attribute(:deleted_at, nil)
|
||||||
EventRestoreLogEntry.create!(:target_id => e.id, :user_id => current_user.id,
|
EventRestoreLogEntry.create!(:target_id => e.id, :user_id => current_user.id,
|
||||||
:course => e.course)
|
:course_id => e.course_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
|
|
||||||
%link{'href' => "#{App.base_path}/stylesheets/cache/wiki.css", 'rel' => 'Stylesheet', 'type' => %'text/css'}
|
%link{'href' => "#{App.base_path}/stylesheets/cache/wiki.css", 'rel' => 'Stylesheet', 'type' => %'text/css'}
|
||||||
%link#css_color{'href' => "#{App.base_path}/stylesheets/cache/color.#@color.css", 'rel' => 'Stylesheet', 'type' => %'text/css'}
|
%link#css_color{'href' => "#{App.base_path}/stylesheets/cache/color.#@color.css", 'rel' => 'Stylesheet', 'type' => %'text/css'}
|
||||||
|
|
||||||
|
/[if IE]
|
||||||
|
%link{:href => "#{App.base_path}/stylesheets/ie/ie.css", :rel => "stylesheet", :type => "text/css"}
|
||||||
|
|
||||||
|
/[if lte IE 6]
|
||||||
|
%link{:href => "#{App.base_path}/stylesheets/ie/ie6.css", :rel => "stylesheet", :type => "text/css"}
|
||||||
|
|
||||||
%script{:type => 'text/javascript'}
|
%script{:type => 'text/javascript'}
|
||||||
== BASE_PATH = "#{App.base_path}";
|
== BASE_PATH = "#{App.base_path}";
|
||||||
|
|||||||
@@ -31,3 +31,7 @@ h1, h2, h3, h4, h5, th {
|
|||||||
.icon img:hover {
|
.icon img:hover {
|
||||||
background-color: <%= color[1] %>;
|
background-color: <%= color[1] %>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.specialDay {
|
||||||
|
color: <%= color[1] %>;
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ ul ul, ol ol {
|
|||||||
padding: 9px 15px;
|
padding: 9px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content code {
|
.content code, .content pre {
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ body {
|
|||||||
background-position: top;
|
background-position: top;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
height: 28px;
|
height: 50px;
|
||||||
margin: 0px -9px;
|
margin: 0px -9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +156,9 @@ body {
|
|||||||
height: 22px;
|
height: 22px;
|
||||||
border-bottom: 3px solid #ddd;
|
border-bottom: 3px solid #ddd;
|
||||||
margin: 0px -9px;
|
margin: 0px -9px;
|
||||||
|
margin-top: -22px;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header_menu ul {
|
#header_menu ul {
|
||||||
@@ -264,7 +266,6 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.calendario {
|
.calendario {
|
||||||
width: 170px;
|
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
padding: 9px 0px;
|
padding: 9px 0px;
|
||||||
@@ -273,6 +274,7 @@ body {
|
|||||||
.calendario tr td {
|
.calendario tr td {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendario th {
|
.calendario th {
|
||||||
@@ -284,6 +286,14 @@ body {
|
|||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.specialDay {
|
||||||
|
background-image: url(<%= App.base_path %>/images/bg_day.gif);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specialDay a, .specialDay a:hover {
|
||||||
|
border-bottom: 0px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
.widget_news li, .widget_events li, #shoutbox li, #shoutbox {
|
.widget_news li, .widget_events li, #shoutbox li, #shoutbox {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|||||||
@@ -40,5 +40,5 @@
|
|||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_color_pref'} Esquema de cores
|
%label{:for => 'user_color_pref'} Esquema de cores
|
||||||
= render :partial => 'widgets/color', :collection => App.color_schemes
|
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||||
%br.clear
|
%br.clear
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
<div class="menu">
|
<div class="menu">
|
||||||
<%= image_tag "loading.gif", :id => "spinner_calendar",
|
<%= image_tag "loading.gif", :id => "spinner_calendar",
|
||||||
:class => "spinner", :style => "display:none" %>
|
:class => "spinner", :style => "display:none" %>
|
||||||
<div class="cmd">
|
<div class="cmd">
|
||||||
<%= action_icon 'add', 'Adicionar evento', new_course_event_url(@course) %>
|
<%= action_icon 'add', 'Adicionar evento', new_course_event_url(@course) %>
|
||||||
</div>
|
</div>
|
||||||
<h1>Calendário</h1>
|
<h1>Calendário</h1>
|
||||||
<div id="calendar">
|
<div id="calendar">
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%=
|
<%=
|
||||||
@year ||= Time.now.year
|
@year ||= Time.now.year
|
||||||
@month ||= Time.now.month
|
@month ||= Time.now.month
|
||||||
@events ||= @course.events
|
@events ||= @course.events
|
||||||
|
|
||||||
calendar({:year => @year, :month => @month, :table_class => 'calendario',
|
calendar({:year => @year, :month => @month, :table_class => 'calendario',
|
||||||
:abbrev => (0..1) }) do |d|
|
:abbrev => (0..1) }) do |d|
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
cell_text = d.mday
|
cell_text = d.mday
|
||||||
cell_attrs = {:class => 'day'}
|
cell_attrs = {:class => 'day'}
|
||||||
@events.each do |e|
|
@events.each do |e|
|
||||||
if e.time == d
|
if (e.time.year == d.year and e.time.month == d.month and e.time.day == d.day)
|
||||||
cell_attrs[:onclick] = "show_events('#{d.to_s}')"
|
cell_attrs[:onclick] = "show_events('#{d.strftime('%Y_%m-%d')}')"
|
||||||
cell_attrs[:class] = 'specialDay'
|
cell_attrs[:class] = 'specialDay'
|
||||||
cell_text = link_to d.mday, "#"
|
cell_text = d.mday
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
[cell_text, cell_attrs]
|
[cell_text, cell_attrs]
|
||||||
@@ -35,9 +35,9 @@
|
|||||||
<div class="widget_events">
|
<div class="widget_events">
|
||||||
<ul>
|
<ul>
|
||||||
<% @events.each do |e| -%>
|
<% @events.each do |e| -%>
|
||||||
<li style="display: none" class="event_item events_<%=e.time.to_s%>">
|
<li style="display: none" class="event_item events_<%=e.time.strftime('%Y_%m-%d')%>">
|
||||||
<%= link_to e.time.strftime("%d de %B"), course_event_url(@course, e) %>.
|
<%= link_to e.time.strftime("%d de %B"), course_event_url(@course, e) %>.
|
||||||
<%= h(e.title) %>. <%= h(e.description) %>
|
<%= h(e.title) %>. <%= truncate(h(e.description), 50) %>
|
||||||
</li>
|
</li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
BIN
public/images/action/back.gif
Normal file
BIN
public/images/action/back.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 B |
BIN
public/images/bg_day.gif
Normal file
BIN
public/images/bg_day.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 B |
29
public/stylesheets/ie/ie.css
Normal file
29
public/stylesheets/ie/ie.css
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#innerwrapper_2column, #innerwrapper_3column {
|
||||||
|
height: 500px;
|
||||||
|
padding: 0px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#innerwrapper_2column {
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diff table tr td {
|
||||||
|
margin: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box ul h3 {
|
||||||
|
border-bottom: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
margin-top: 9px;
|
||||||
|
margin-bottom: -9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float_panel_right .menu {
|
||||||
|
padding-bottom: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.menu h1 {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
7
public/stylesheets/ie/ie6.css
Normal file
7
public/stylesheets/ie/ie6.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#header, .specialDay {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard * {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user