Fix bug.
This commit is contained in:
parent
d5e03a1fd9
commit
f1b71aa9b7
|
@ -1,6 +1,5 @@
|
||||||
class AnnouncementsController < ApplicationController
|
class AnnouncementsController < ApplicationController
|
||||||
include AnnouncementsHelper
|
include AnnouncementsHelper
|
||||||
helper_method :complementaryColor,:lighten_color
|
|
||||||
def comment
|
def comment
|
||||||
@bulletin = Bulletin.where(:uid=>params[:uid]).first
|
@bulletin = Bulletin.where(:uid=>params[:uid]).first
|
||||||
comment_val = params['comment']
|
comment_val = params['comment']
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module AnnouncementsHelper
|
module AnnouncementsHelper
|
||||||
def complementaryColor(my_hex)
|
def self.complementaryColor(my_hex)
|
||||||
if my_hex[0] == '#'
|
if my_hex[0] == '#'
|
||||||
my_hex = my_hex[1..-1]
|
my_hex = my_hex[1..-1]
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ module AnnouncementsHelper
|
||||||
comp = rgb.map{|a| (255 - a.to_i(16)).to_s(16).rjust(2,'0')}
|
comp = rgb.map{|a| (255 - a.to_i(16)).to_s(16).rjust(2,'0')}
|
||||||
'#'+comp.join
|
'#'+comp.join
|
||||||
end
|
end
|
||||||
def lighten_color(my_hex,percent)
|
def self.lighten_color(my_hex,percent)
|
||||||
if my_hex[0] == '#'
|
if my_hex[0] == '#'
|
||||||
my_hex = my_hex[1..-1]
|
my_hex = my_hex[1..-1]
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<%
|
<%
|
||||||
require 'announcements_helper'
|
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
page = Page.where(url:params['url']).first
|
page = Page.where(url:params['url']).first
|
||||||
@show_back_and_next_flag = 0
|
@show_back_and_next_flag = 0
|
||||||
|
@ -78,9 +77,9 @@
|
||||||
hover_color = site.orbit_bar_background_hover_color rescue nil
|
hover_color = site.orbit_bar_background_hover_color rescue nil
|
||||||
hover_color = '#0095CF' if hover_color.blank?
|
hover_color = '#0095CF' if hover_color.blank?
|
||||||
bg_color = site.orbit_bar_background_color rescue nil
|
bg_color = site.orbit_bar_background_color rescue nil
|
||||||
bg_color = bg_color.blank? ? '#3a3b3c' : lighten_color(bg_color,-40)
|
bg_color = bg_color.blank? ? '#3a3b3c' : AnnouncementsHelper.lighten_color(bg_color,-40)
|
||||||
color1 = lighten_color(bg_color,-40)
|
color1 = AnnouncementsHelper.lighten_color(bg_color,-40)
|
||||||
color2 = lighten_color(complementaryColor(bg_color),40)
|
color2 = AnnouncementsHelper.lighten_color(AnnouncementsHelper.complementaryColor(bg_color),40)
|
||||||
%>
|
%>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div[contentEditable=true]:empty:before{
|
div[contentEditable=true]:empty:before{
|
||||||
|
|
Loading…
Reference in New Issue