Mudancas na interface e suporte a IE6/7

master
Alinson S. Xavier 18 years ago
parent 8671d2350b
commit 42b43c3c2b

@ -97,7 +97,7 @@ class EventsController < ApplicationController
@event.update_attribute(:deleted_at, nil)
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|
format.html { redirect_to course_event_url(@event.course, @event) }

@ -55,7 +55,7 @@ module ApplicationHelper
end
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
def gravatar_url_for(email, size=80)
@ -64,6 +64,6 @@ module ApplicationHelper
def action_icon(action_name, description, options = {}, html_options = {})
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

@ -16,6 +16,8 @@ class Event < ActiveRecord::Base
acts_as_paranoid
generate_validations
belongs_to :course
def Event.to_ical(courses)
courses = [courses] unless courses.kind_of?(Array)
cal = Icalendar::Calendar.new

@ -26,7 +26,7 @@ class EventDeleteLogEntry < EventLogEntry
e = Event.find_with_deleted(target_id)
e.update_attribute(:deleted_at, nil)
EventRestoreLogEntry.create!(:target_id => e.id, :user_id => current_user.id,
:course => e.course)
:course_id => e.course_id)
end
end

@ -9,6 +9,12 @@
%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'}
/[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'}
== BASE_PATH = "#{App.base_path}";

@ -31,3 +31,7 @@ h1, h2, h3, h4, h5, th {
.icon img:hover {
background-color: <%= color[1] %>;
}
.specialDay {
color: <%= color[1] %>;
}

@ -57,7 +57,7 @@ ul ul, ol ol {
padding: 9px 15px;
}
.content code {
.content code, .content pre {
background-color: #f4f4f4;
}
@ -136,7 +136,7 @@ body {
background-position: top;
background-repeat: repeat-x;
color: #eee;
height: 28px;
height: 50px;
margin: 0px -9px;
}
@ -156,7 +156,9 @@ body {
height: 22px;
border-bottom: 3px solid #ddd;
margin: 0px -9px;
margin-top: -22px;
color: #eee;
background-color: transparent !important;
}
#header_menu ul {
@ -264,7 +266,6 @@ body {
}
.calendario {
width: 170px;
border-top: 1px solid #eee;
margin-top: -1px;
padding: 9px 0px;
@ -273,6 +274,7 @@ body {
.calendario tr td {
font-size: 11px;
text-align: center;
width: 25px;
}
.calendario th {
@ -284,6 +286,14 @@ body {
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 {
font-size: 11px;

@ -40,5 +40,5 @@
%dt
%label{:for => 'user_color_pref'} Esquema de cores
= render :partial => 'widgets/color', :collection => App.color_schemes
%br.clear
%br.clear

@ -4,16 +4,16 @@
<div class="menu">
<%= image_tag "loading.gif", :id => "spinner_calendar",
:class => "spinner", :style => "display:none" %>
<div class="cmd">
<%= action_icon 'add', 'Adicionar evento', new_course_event_url(@course) %>
</div>
<div class="cmd">
<%= action_icon 'add', 'Adicionar evento', new_course_event_url(@course) %>
</div>
<h1>Calendário</h1>
<div id="calendar">
<% end -%>
<%=
@year ||= Time.now.year
@month ||= Time.now.month
@events ||= @course.events
@events ||= @course.events
calendar({:year => @year, :month => @month, :table_class => 'calendario',
:abbrev => (0..1) }) do |d|
@ -21,10 +21,10 @@
cell_text = d.mday
cell_attrs = {:class => 'day'}
@events.each do |e|
if e.time == d
cell_attrs[:onclick] = "show_events('#{d.to_s}')"
if (e.time.year == d.year and e.time.month == d.month and e.time.day == d.day)
cell_attrs[:onclick] = "show_events('#{d.strftime('%Y_%m-%d')}')"
cell_attrs[:class] = 'specialDay'
cell_text = link_to d.mday, "#"
cell_text = d.mday
end
end
[cell_text, cell_attrs]
@ -35,9 +35,9 @@
<div class="widget_events">
<ul>
<% @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) %>.
<%= h(e.title) %>. <%= h(e.description) %>
<%= h(e.title) %>. <%= truncate(h(e.description), 50) %>
</li>
<% end -%>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

@ -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;
}

@ -0,0 +1,7 @@
#header, .specialDay {
background-image: none;
}
.dashboard * {
font-size: 12px !important;
}