themes_for_rails integrated with original theme

This commit is contained in:
Wojciech Todryk 2011-06-25 18:19:07 +02:00
parent 573356a3a4
commit 921de13cc0
95 changed files with 511 additions and 208 deletions

View file

@ -9,7 +9,7 @@ gem 'sqlite3-ruby',:require => 'sqlite3'
gem 'arel' gem 'arel'
gem 'mysql2' gem 'mysql2'
gem 'will_paginate' gem 'will_paginate'
gem 'web-app-theme' gem 'themes_for_rails'
gem 'tmail' gem 'tmail'
# Use unicorn as the web server # Use unicorn as the web server

View file

@ -60,12 +60,14 @@ GEM
sqlite3 (1.3.3) sqlite3 (1.3.3)
sqlite3-ruby (1.3.3) sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3) sqlite3 (>= 1.3.3)
themes_for_rails (0.4.2)
rails (~> 3.0.0)
themes_for_rails
thor (0.14.6) thor (0.14.6)
tmail (1.2.7.1) tmail (1.2.7.1)
treetop (1.4.9) treetop (1.4.9)
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.24) tzinfo (0.3.24)
web-app-theme (0.6.3)
will_paginate (2.3.15) will_paginate (2.3.15)
PLATFORMS PLATFORMS
@ -76,6 +78,6 @@ DEPENDENCIES
mysql2 mysql2
rails (= 3.0.7) rails (= 3.0.7)
sqlite3-ruby sqlite3-ruby
themes_for_rails
tmail tmail
web-app-theme
will_paginate will_paginate

View file

@ -4,4 +4,4 @@
require File.expand_path('../config/application', __FILE__) require File.expand_path('../config/application', __FILE__)
require 'rake' require 'rake'
Rails3::Application.load_tasks Mailr::Application.load_tasks

View file

@ -12,6 +12,11 @@ class ApplicationController < ActionController::Base
#filter_parameter_logging :password #upgrade to Rails3 #filter_parameter_logging :password #upgrade to Rails3
protected protected
def theme_resolver
CDF::CONFIG[:theme] || CDF::CONFIG[:default_theme]
end
def secure_user?() true end def secure_user?() true end
def secure_cust?() false end def secure_cust?() false end
def additional_scripts() "" end def additional_scripts() "" end

View file

@ -1,28 +1,32 @@
class ContactGroupsController < ApplicationController class ContactGroupsController < ApplicationController
theme :theme_resolver
layout 'public' layout 'public'
def index def index
@contact_group = ContactGroup.new @contact_group = ContactGroup.new
@contact_group.customer_id = logged_user @contact_group.customer_id = logged_user
@contactgroups = ContactGroup.find_by_user(logged_user) @contactgroups = ContactGroup.find_by_user(logged_user)
end end
def add def add
@contactgroup = ContactGroup.new @contactgroup = ContactGroup.new
@contactgroup.customer_id = logged_user @contactgroup.customer_id = logged_user
render("/contact_group/edit") render("/contact_group/edit")
end end
def delete def delete
contactgroup = ContactGroup.find(@params["id"]) contactgroup = ContactGroup.find(@params["id"])
contactgroup.destroy contactgroup.destroy
redirect_to(:action=>"list") redirect_to(:action=>"list")
end end
def edit def edit
@contactgroup = ContactGroup.find(@params["id"]) @contactgroup = ContactGroup.find(@params["id"])
end end
def save def save
begin begin
if @params["contactgroup"]["id"].nil? or @params["contactgroup"]["id"] == "" if @params["contactgroup"]["id"].nil? or @params["contactgroup"]["id"] == ""
@ -33,7 +37,7 @@ class ContactGroupsController < ApplicationController
@contactgroup = ContactGroup.find(@params["contactgroup"]["id"]) @contactgroup = ContactGroup.find(@params["contactgroup"]["id"])
@contactgroup.attributes = @params["contactgroup"] @contactgroup.attributes = @params["contactgroup"]
end end
if @contactgroup.save if @contactgroup.save
redirect_to(:action=>"list") redirect_to(:action=>"list")
else else
@ -45,8 +49,8 @@ class ContactGroupsController < ApplicationController
render("/contact_group/edit") render("/contact_group/edit")
end end
end end
protected protected
def secure_user?() true end def secure_user?() true end
end end

View file

@ -1,6 +1,9 @@
class ContactsController < ApplicationController class ContactsController < ApplicationController
theme :theme_resolver
layout :select_layout layout :select_layout
def index def index
if params[:letter] && params[:letter].any? if params[:letter] && params[:letter].any?
@contacts = Contact.for_customer(logged_user).letter(params[:letter]).paginate :page => params[:page], @contacts = Contact.for_customer(logged_user).letter(params[:letter]).paginate :page => params[:page],
@ -9,14 +12,14 @@ class ContactsController < ApplicationController
@contacts = Contact.for_customer(logged_user).paginate :page => params[:page], :per_page => CDF::CONFIG[:contacts_per_page] @contacts = Contact.for_customer(logged_user).paginate :page => params[:page], :per_page => CDF::CONFIG[:contacts_per_page]
end end
end end
def listLetter def listLetter
letters = CDF::CONFIG[:contact_letters] letters = CDF::CONFIG[:contact_letters]
@contact_pages = Paginator.new(self, Contact.count( @contact_pages = Paginator.new(self, Contact.count(
["customer_id = %s and substr(UPPER(fname),1,1) = '%s'", logged_user, letters[params['id'].to_i]]), CDF::CONFIG[:contacts_per_page], params['page']) ["customer_id = %s and substr(UPPER(fname),1,1) = '%s'", logged_user, letters[params['id'].to_i]]), CDF::CONFIG[:contacts_per_page], params['page'])
@contacts = Contact.find(:all, :conditions=>["customer_id = %s and substr(UPPER(fname),1,1) = '%s'", logged_user, letters[params['id'].to_i]], @contacts = Contact.find(:all, :conditions=>["customer_id = %s and substr(UPPER(fname),1,1) = '%s'", logged_user, letters[params['id'].to_i]],
:order=>['fname'], :limit=>CDF::CONFIG[:contacts_per_page], :offset=>@contact_pages.current.offset) :order=>['fname'], :limit=>CDF::CONFIG[:contacts_per_page], :offset=>@contact_pages.current.offset)
if params["mode"] == "groups" if params["mode"] == "groups"
if params["group_id"] and not params["group_id"].nil? and not params["group_id"] == '' if params["group_id"] and not params["group_id"].nil? and not params["group_id"] == ''
@group_id = params["group_id"].to_i @group_id = params["group_id"].to_i
@ -31,17 +34,17 @@ class ContactsController < ApplicationController
end end
end end
end end
render :action => "list" render :action => "list"
end end
def new def new
@contact = Contact.new @contact = Contact.new
@contact.customer_id = logged_user @contact.customer_id = logged_user
# load related lists # load related lists
loadLists loadLists
# Init groups: because of checkbox # Init groups: because of checkbox
# Set all to 0 => unchecked # Set all to 0 => unchecked
@groups = Hash.new @groups = Hash.new
@ -49,12 +52,12 @@ class ContactsController < ApplicationController
@groups[g.id] = 0 @groups[g.id] = 0
} }
end end
def add_multiple def add_multiple
@contact = Contact.new @contact = Contact.new
@contact["file_type"] = "1" @contact["file_type"] = "1"
end end
def add_from_mail def add_from_mail
cstr = params['cstr'] cstr = params['cstr']
retmsg = params['retmsg'] retmsg = params['retmsg']
@ -69,13 +72,13 @@ class ContactsController < ApplicationController
else else
fname, lname, email = "", "", cstr fname, lname, email = "", "", cstr
end end
if @contact = Contact.find_by_user_email(logged_user, email) if @contact = Contact.find_by_user_email(logged_user, email)
# load related lists # load related lists
loadLists loadLists
@contact.fname, @contact.lname = fname, lname @contact.fname, @contact.lname = fname, lname
# groups = @contact.groups # groups = @contact.groups
@groups = Hash.new @groups = Hash.new
@contactgroups.each {|g| @contactgroups.each {|g|
@ -95,82 +98,82 @@ class ContactsController < ApplicationController
else else
@contact = Contact.new("fname"=>fname, "lname" => lname, "email" => email) @contact = Contact.new("fname"=>fname, "lname" => lname, "email" => email)
@contact.customer_id = logged_user @contact.customer_id = logged_user
# load related lists # load related lists
loadLists loadLists
# Init groups: because of checkbox # Init groups: because of checkbox
# Set all to 0 => unchecked # Set all to 0 => unchecked
@groups = Hash.new @groups = Hash.new
@contactgroups.each {|g| @contactgroups.each {|g|
@groups[g.id] = 0 @groups[g.id] = 0
} }
end end
render :action => "new" render :action => "new"
end end
def import_preview def import_preview
file = params["contact"]["data"] file = params["contact"]["data"]
flash["errors"] = Array.new flash["errors"] = Array.new
if file.size == 0 if file.size == 0
flash["errors"] << _('You haven\'t selected file or the file is empty') flash["errors"] << _('You haven\'t selected file or the file is empty')
@contact = Contact.new @contact = Contact.new
@contact["file_type"] = params["contact"]["file_type"] @contact["file_type"] = params["contact"]["file_type"]
render :action => "add_multiple" render :action => "add_multiple"
end end
file_type = params["contact"]["file_type"] file_type = params["contact"]["file_type"]
if file_type.nil? or file_type == '1' if file_type.nil? or file_type == '1'
separator = ',' separator = ','
else else
separator = /\t/ separator = /\t/
end end
@contacts = Array.new @contacts = Array.new
emails = Array.new emails = Array.new
file.each {|line| file.each {|line|
cdata = line.strip.chomp.split(separator) cdata = line.strip.chomp.split(separator)
cont = Contact.new cont = Contact.new
cont.fname = cdata[0].to_s.strip.chomp cont.fname = cdata[0].to_s.strip.chomp
cont.lname = cdata[1].to_s.strip.chomp cont.lname = cdata[1].to_s.strip.chomp
cont.email = cdata[2].to_s.strip.chomp cont.email = cdata[2].to_s.strip.chomp
# Check for duplicate emails in the file # Check for duplicate emails in the file
if emails.include?(cont.email) if emails.include?(cont.email)
flash["errors"] << sprintf(_('Contact %'), file.lineno.to_s) + ": " + _('The e-mail duplicates the e-mail of another record!') flash["errors"] << sprintf(_('Contact %'), file.lineno.to_s) + ": " + _('The e-mail duplicates the e-mail of another record!')
else else
emails << cont.email emails << cont.email
end end
@contacts << cont @contacts << cont
} }
end end
def import def import
contacts_count = params["contact"].length contacts_count = params["contact"].length
contacts_to_import = params["contact"] contacts_to_import = params["contact"]
@contacts = Array.new @contacts = Array.new
emails = Array.new emails = Array.new
flash["errors"] = Array.new flash["errors"] = Array.new
for i in 0...contacts_count for i in 0...contacts_count
contact = Contact.new contact = Contact.new
contact.customer_id = logged_user contact.customer_id = logged_user
contact.fname = contacts_to_import[i.to_s]["fname"] contact.fname = contacts_to_import[i.to_s]["fname"]
contact.lname = contacts_to_import[i.to_s]["lname"] contact.lname = contacts_to_import[i.to_s]["lname"]
contact.email = contacts_to_import[i.to_s]["email"] contact.email = contacts_to_import[i.to_s]["email"]
begin begin
# Check for duplicate emails in the submitted data # Check for duplicate emails in the submitted data
if emails.include?(contact.email) if emails.include?(contact.email)
flash["errors"] << sprintf(_('Contact %'), (i+1).to_s) + ": " + _('The e-mail duplicates the e-mail of another record!') flash["errors"] << sprintf(_('Contact %'), (i+1).to_s) + ": " + _('The e-mail duplicates the e-mail of another record!')
else else
emails << contact.email emails << contact.email
end end
# Check if contact is valid # Check if contact is valid
@ -180,7 +183,7 @@ class ContactsController < ApplicationController
["fname", "lname", "email"].each do |attr| ["fname", "lname", "email"].each do |attr|
attr_errors = contact.errors.on(attr) attr_errors = contact.errors.on(attr)
attr_errors = [attr_errors] unless attr_errors.nil? or attr_errors.is_a? Array attr_errors = [attr_errors] unless attr_errors.nil? or attr_errors.is_a? Array
if not attr_errors.nil? if not attr_errors.nil?
attr_errors.each do |msg| attr_errors.each do |msg|
flash["errors"] << l(:contact_addmultiple_errorforcontact, (i+1).to_s) + ": " + l(msg) flash["errors"] << l(:contact_addmultiple_errorforcontact, (i+1).to_s) + ": " + l(msg)
@ -189,10 +192,10 @@ class ContactsController < ApplicationController
end end
end end
end # rescue end # rescue
@contacts << contact @contacts << contact
end # for end # for
# If there are validation errors - display them # If there are validation errors - display them
if not flash["errors"].nil? and not flash["errors"].empty? if not flash["errors"].nil? and not flash["errors"].empty?
render :action => "import_preview" render :action => "import_preview"
@ -214,49 +217,49 @@ class ContactsController < ApplicationController
end end
end end
def choose def choose
if params["mode"] == "groups" if params["mode"] == "groups"
save_groups save_groups
end end
@tos, @ccs, @bccs = Array.new, Array.new, Array.new @tos, @ccs, @bccs = Array.new, Array.new, Array.new
params["contacts_to"].each{ |id,value| @tos << Contact.find(id) if value == "1" } if params["contacts_to"] params["contacts_to"].each{ |id,value| @tos << Contact.find(id) if value == "1" } if params["contacts_to"]
params["contacts_cc"].each{ |id,value| @ccs << Contact.find(id) if value == "1" } if params["contacts_cc"] params["contacts_cc"].each{ |id,value| @ccs << Contact.find(id) if value == "1" } if params["contacts_cc"]
params["contacts_bcc"].each{ |id,value| @bccs << Contact.find(id) if value == "1" } if params["contacts_bcc"] params["contacts_bcc"].each{ |id,value| @bccs << Contact.find(id) if value == "1" } if params["contacts_bcc"]
params["groups_to"].each{ |id,value| params["groups_to"].each{ |id,value|
ContactGroup.find(id).contacts.each {|c| @tos << c} if value == "1" } if params["groups_to"] ContactGroup.find(id).contacts.each {|c| @tos << c} if value == "1" } if params["groups_to"]
params["groups_cc"].each{ |id,value| params["groups_cc"].each{ |id,value|
ContactGroup.find(id).contacts.each {|c| @ccs << c} if value == "1" } if params["groups_cc"] ContactGroup.find(id).contacts.each {|c| @ccs << c} if value == "1" } if params["groups_cc"]
params["groups_bcc"].each{ |id,value| params["groups_bcc"].each{ |id,value|
ContactGroup.find(id).contacts.each {|c| @bccs << c} if value == "1" } if params["groups_bcc"] ContactGroup.find(id).contacts.each {|c| @bccs << c} if value == "1" } if params["groups_bcc"]
end end
def save_groups def save_groups
contacts_for_group = params["contacts_for_group"] contacts_for_group = params["contacts_for_group"]
group_id = params["group_id"] group_id = params["group_id"]
contact_group = ContactGroup.find(group_id) contact_group = ContactGroup.find(group_id)
contacts_for_group.each { |contact_id,value| contacts_for_group.each { |contact_id,value|
contact = Contact.find(contact_id) contact = Contact.find(contact_id)
if value == "1" and not contact_group.contacts.include?(contact) if value == "1" and not contact_group.contacts.include?(contact)
contact_group.contacts << contact contact_group.contacts << contact
end end
if value == "0" and contact_group.contacts.include?(contact) if value == "0" and contact_group.contacts.include?(contact)
contact_group.contacts.delete(contact) contact_group.contacts.delete(contact)
end end
} }
redirect_to(:action=>"index", :id=>group_id, :params=>{"mode"=>params["mode"]}) redirect_to(:action=>"index", :id=>group_id, :params=>{"mode"=>params["mode"]})
end end
def edit def edit
@contact = Contact.find(params["id"]) @contact = Contact.find(params["id"])
# load related lists # load related lists
loadLists loadLists
# groups = @contact.groups # groups = @contact.groups
@groups = Hash.new @groups = Hash.new
@contactgroups.each {|g| @contactgroups.each {|g|
@ -272,10 +275,10 @@ class ContactsController < ApplicationController
else else
@groups[g.id] = 0 # unchecked @groups[g.id] = 0 # unchecked
end end
} }
render :action => "new" render :action => "new"
end end
# Insert or update # Insert or update
def create def create
if params["contact"]["id"] == "" if params["contact"]["id"] == ""
@ -286,14 +289,14 @@ class ContactsController < ApplicationController
@contact = Contact.find(params["contact"]["id"]) @contact = Contact.find(params["contact"]["id"])
@contact.attributes = params["contact"] @contact.attributes = params["contact"]
end end
@contactgroups = ContactGroup.find_by_user(logged_user) @contactgroups = ContactGroup.find_by_user(logged_user)
# Groups displayed # Groups displayed
groups = params['groups'] groups = params['groups']
tempGroups = Array.new tempGroups = Array.new
tempGroups.concat(@contact.groups) tempGroups.concat(@contact.groups)
@contactgroups.each { |cgroup| @contactgroups.each { |cgroup|
includesCGroup = false includesCGroup = false
tempGroups.each {|gr| tempGroups.each {|gr|
if gr.contact_group_id.to_i == cgroup.id.to_i if gr.contact_group_id.to_i == cgroup.id.to_i
@ -304,7 +307,7 @@ class ContactsController < ApplicationController
if groups["#{cgroup.id}"] == "1" and not includesCGroup if groups["#{cgroup.id}"] == "1" and not includesCGroup
@contact.groups << cgroup @contact.groups << cgroup
end end
if groups["#{cgroup.id}"] == "0" and includesCGroup if groups["#{cgroup.id}"] == "0" and includesCGroup
@contact.groups.delete(cgroup) @contact.groups.delete(cgroup)
end end
@ -323,34 +326,34 @@ class ContactsController < ApplicationController
@groups[g.id] = 1 @groups[g.id] = 1
else else
@groups[g.id] = 0 @groups[g.id] = 0
end end
} }
render :action => :new render :action => :new
end end
end end
def delete def delete
Contact.destroy(params['id']) Contact.destroy(params['id'])
redirect_to(:action=>'index') redirect_to(:action=>'index')
end end
protected protected
def secure_user?() true end def secure_user?() true end
def additional_scripts() def additional_scripts()
add_s = '' add_s = ''
if action_name == "choose" if action_name == "choose"
add_s<<'<script type="text/javascript" src="/javascripts/global.js"></script>' add_s<<'<script type="text/javascript" src="/javascripts/global.js"></script>'
add_s<<'<script type="text/javascript" src="/javascripts/contact_choose.js"></script>' add_s<<'<script type="text/javascript" src="/javascripts/contact_choose.js"></script>'
end end
add_s add_s
end end
def onload_function() def onload_function()
if action_name == "choose" if action_name == "choose"
"javascript:respondToCaller();" "javascript:respondToCaller();"
else else
"" ""
end end
end end
private private
def select_layout def select_layout
@ -366,7 +369,7 @@ class ContactsController < ApplicationController
'public' 'public'
end end
end end
def loadLists def loadLists
if @contactgroups.nil? if @contactgroups.nil?
@contactgroups = ContactGroup.find_by_user(logged_user) @contactgroups = ContactGroup.find_by_user(logged_user)

View file

@ -6,6 +6,8 @@ class FoldersController < ApplicationController
before_filter :load_imap_session before_filter :load_imap_session
after_filter :close_imap_session after_filter :close_imap_session
theme :theme_resolver
layout 'public' layout 'public'
def index def index

View file

@ -3,6 +3,8 @@ require 'imapmailbox'
class LoginController < ApplicationController class LoginController < ApplicationController
theme :theme_resolver
def index def index
if not(logged_user.nil?) if not(logged_user.nil?)
redirect_to :controller =>"webmail", :action=>"index" redirect_to :controller =>"webmail", :action=>"index"

View file

@ -10,6 +10,8 @@ require 'imap_utils'
class WebmailController < ApplicationController class WebmailController < ApplicationController
include ImapUtils include ImapUtils
theme :theme_resolver
logger.info "*** WebmailController #{logger.inspect}" logger.info "*** WebmailController #{logger.inspect}"
# Administrative functions # Administrative functions

View file

@ -1,8 +1,8 @@
# The methods added to this helper will be available to all templates in the application. # The methods added to this helper will be available to all templates in the application.
module ApplicationHelper module ApplicationHelper
include NavigationHelper include NavigationHelper
protected protected
def format_datetime(datetime) def format_datetime(datetime)
datetime.strftime "%d.%m.%Y %H:%M" datetime.strftime "%d.%m.%Y %H:%M"
@ -70,7 +70,7 @@ module ApplicationHelper
end end
end end
# Helper method that has the same signature as real input field helpers, but simply displays # Helper method that has the same signature as real input field helpers, but simply displays
# the value of a given field enclosed within <p> </p> tags. # the value of a given field enclosed within <p> </p> tags.
# Usage: # Usage:
# <%= form_input :read_only_field, 'new_user', 'name', _('user_name')) %> # <%= form_input :read_only_field, 'new_user', 'name', _('user_name')) %>
@ -88,22 +88,22 @@ module ApplicationHelper
def attributes(hash) def attributes(hash)
hash.keys.inject("") { |attrs, key| attrs + %{#{key}="#{hash[key]}" } } hash.keys.inject("") { |attrs, key| attrs + %{#{key}="#{hash[key]}" } }
end end
def initListClass def initListClass
@itClass = 1 @itClass = 1
end end
def popListClass def popListClass
ret = getListClass ret = getListClass
@itClass = @itClass + 1 @itClass = @itClass + 1
return ret return ret
end end
def getListClass def getListClass
return "even" if @itClass%2 == 0 return "even" if @itClass%2 == 0
return "odd" if @itClass%2 == 1 return "odd" if @itClass%2 == 1
end end
def get_meta_info def get_meta_info
'<meta name="rating" content="General">' '<meta name="rating" content="General">'
'<meta name="robots" content="Index, ALL">' '<meta name="robots" content="Index, ALL">'
@ -111,13 +111,13 @@ module ApplicationHelper
'<meta name="keywords" content="">' '<meta name="keywords" content="">'
'<meta name content="">' '<meta name content="">'
end end
def user def user
@user = Customer.find(@session["user"]) if @user.nil? @user = Customer.find(@session["user"]) if @user.nil?
@user @user
end end
def link_main def link_main
link_to( t(:contacts), contacts_path) link_to( t(:contacts), contacts_path)
end end
@ -125,9 +125,9 @@ module ApplicationHelper
if @alternator.nil? if @alternator.nil?
@alternator = 1 @alternator = 1
end end
@alternator = -@alternator @alternator = -@alternator
if @alternator == -1 if @alternator == -1
return "even" return "even"
else else

View file

@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
run Rails3::Application run Mailr::Application

View file

@ -6,7 +6,7 @@ require 'rails/all'
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler) Bundler.require(:default, Rails.env) if defined?(Bundler)
module Rails3 module Mailr
class Application < Rails::Application class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers

View file

@ -3,7 +3,7 @@
# some of them - create file config/site.rb # some of them - create file config/site.rb
# containing new constants in LOCALCONFIG module variable - they # containing new constants in LOCALCONFIG module variable - they
# will overwrite default values. Example site.rb: # will overwrite default values. Example site.rb:
# #
# module CDF # module CDF
# LOCALCONFIG = { # LOCALCONFIG = {
# :mysql_version => '4.1', # :mysql_version => '4.1',
@ -42,10 +42,11 @@ module CDF
:encryption_salt => 'EnCr1p10n$@lt', :encryption_salt => 'EnCr1p10n$@lt',
:encryption_password => '$0MeEncr1pt10nP@a$sw0rd', :encryption_password => '$0MeEncr1pt10nP@a$sw0rd',
:debug_imap => false, :debug_imap => false,
:crypt_session_pass => true, # Set it to false (in site.rb) if you get any error messages like :crypt_session_pass => true, # Set it to false (in site.rb) if you get any error messages like
# "Unsupported cipher algorithm (aes-128-cbc)." - meaning that OpenSSL modules for crypt algo is not loaded. Setting it to false will store password in session in plain format! # "Unsupported cipher algorithm (aes-128-cbc)." - meaning that OpenSSL modules for crypt algo is not loaded. Setting it to false will store password in session in plain format!
:send_from_domain => nil, # Set this variable to your domain name in site.rb if you make login to imap only with username (without '@domain') :send_from_domain => nil, # Set this variable to your domain name in site.rb if you make login to imap only with username (without '@domain')
:imap_bye_timeout_retry_seconds => 2 :imap_bye_timeout_retry_seconds => 2,
:default_theme => 'original'
} }
end end

View file

@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__) require File.expand_path('../application', __FILE__)
# Initialize the rails application # Initialize the rails application
Rails3::Application.initialize! Mailr::Application.initialize!

View file

@ -1,4 +1,4 @@
Rails3::Application.configure do Mailr::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on # In the development environment your application's code is reloaded on

View file

@ -1,4 +1,4 @@
Rails3::Application.configure do Mailr::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps. # The production environment is meant for finished, "live" apps.

View file

@ -1,4 +1,4 @@
Rails3::Application.configure do Mailr::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's

View file

@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid! # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random, # Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks. # no regular words or you'll be exposed to dictionary attacks.
Rails3::Application.config.secret_token = 'ade84d567b0c637fd3547fd18b97d1677fd6ca3c5331e6ed1a1b13bb6a7823cc367cbe317caf102f29f8c35eb487ff3ca33e6321d037c14ebb055eb530841ff6' Mailr::Application.config.secret_token = 'ade84d567b0c637fd3547fd18b97d1677fd6ca3c5331e6ed1a1b13bb6a7823cc367cbe317caf102f29f8c35eb487ff3ca33e6321d037c14ebb055eb530841ff6'

View file

@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Rails3::Application.config.session_store :cookie_store, :key => '_rails3_session' Mailr::Application.config.session_store :cookie_store, :key => '_mailr_session'
# Use the database for sessions instead of the cookie-based default, # Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information # which shouldn't be used to store highly confidential information

View file

@ -1,4 +1,6 @@
Rails3::Application.routes.draw do Mailr::Application.routes.draw do
themes_for_rails
resources :folders resources :folders
resources :contacts do resources :contacts do
collection do collection do

View file

0
public/javascripts/application.js Executable file → Normal file
View file

0
public/javascripts/controls.js vendored Executable file → Normal file
View file

0
public/javascripts/dragdrop.js vendored Executable file → Normal file
View file

0
public/javascripts/effects.js vendored Executable file → Normal file
View file

View file

@ -1 +0,0 @@
function changeLoc(loc){window.location=loc}function getCookie(name){var prefix=name+"=";var cStr=document.cookie;var start=cStr.indexOf(prefix);if(start==-1){return null;}var end=cStr.indexOf(";",start+prefix.length);if(end==-1){end=cStr.length;}var value=cStr.substring(start+prefix.length,end);return unescape(value);}function setCookie(name,value,expiration){document.cookie=name+"="+value+"; expires="+expiration;}function toggleCheckbox(checkBox){var element=document.getElementById(checkBox.id);if(element.value=="1"||element.checked){element.checked=false;element.value="0";}else{element.checked=true;element.value="1";}}function toggleChkbox(checkBox){if(checkBox.checked){checkBox.checked=true;}else{checkBox.checked=false;}}function toggle_list(id){ul="ul_"+id;img="img_"+id;hid="h_"+id;ulElement=document.getElementById(ul);imgElement=document.getElementById(img);hiddenElement=document.getElementById(hid);if(ulElement){if(ulElement.className=='closed'){ulElement.className="open";imgElement.src="/images/list_opened.gif";hiddenElement.value="1"}else{ulElement.className="closed";imgElement.src="/images/list_closed.gif";hiddenElement.value="0"}}}function toggle_layer(id){lElement=document.getElementById(id);imgElement=document.getElementById("img_"+id);if(lElement){if(lElement.className=='closed'){lElement.className="open";imgElement.src="/images/list_opened.gif";return true;}else{lElement.className="closed";imgElement.src="/images/list_closed.gif";return false;}}return true;}function toggle_layer_status(id){lElement=document.getElementById(id);if(lElement){if(lElement.className=='closed'){return false;}else{return true;}}return true;}function toggle_text(id){if(document.getElementById)elem=document.getElementById(id);else if(document.all)elem=eval("document.all."+id);else return false;if(!elem)return true;elemStyle=elem.style;if(elemStyle.display!="block"){elemStyle.display="block"}else{elemStyle.display="none"}return true;}function getFF(id){if(document.getElementById)elem=document.getElementById(id);else if(document.all)elem=document.eval("document.all."+id);return elem}function setFF(id,value){if(getFF(id))getFF(id).value=value;}function setCFF(id){if(getFF(id))getFF(id).checked=true;}function updateSUFromC(btnName){var suem=getCookie('_cdf_em');var sueg=getCookie('_cdf_gr');if(suem!=""&&suem!=null&&suem!="undefined"){setFF('sup_email',suem);setFF('signup_submit_button',btnName);}if(sueg&&sueg!=""){if(sueg.indexOf(",")<0&&sueg!=""){gr_id=sueg;setCFF('supgr_'+gr_id);}else while((i=sueg.indexOf(","))>=0){gr_id=sueg.substring(0,i);sueg=sueg.substring(i+1);setCFF('supgr_'+gr_id);}if(sueg.indexOf(",")<0&&sueg!=""){gr_id=sueg;setCFF('supgr_'+gr_id);}}}function updateLUEfC(){var suem=getCookie('_cdf_em');if(suem!=""&&suem!=null&&suem!="undefined"){setFF('login_user_email',suem);}}function replaceHRFST(ifrm){var o=ifrm;var w=null;if(o.contentWindow){w=o.contentWindow;}else if(window.frames&&window.frames[o.id].window){w=window.frames[o.id];}else return;var doc=w.document;if(!doc.getElementsByTagName)return;var anchors=doc.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute("href"))anchor.target="_top";}iHeight=doc.body.scrollHeight;ifrm.style.height=iHeight+"px"}function rs(n,u,w,h,x){args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status=0";remote=window.open(u,n,args);if(remote!=null&&remote.opener==null)remote.opener=self;if(x==1)return remote;}function wizard_step_onclick(direction,alt_url){if(document.forms[0]){direction_elem='';if(document.getElementById){direction_elem=document.getElementById('wiz_dir');}else if(document.all){direction_elem=document.eval("document.all.wiz_dir");}if(direction_elem){direction_elem.value=direction;}if(document.forms[0].onsubmit){document.forms[0].onsubmit();}document.forms[0].submit();}else{window.location=alt_url;}}function toggle_adtype(ad_type){toggle_text('upload_banner_label');toggle_text('upload_banner');toggle_text('radio1_label');toggle_text('radio1');toggle_text('radio2_label');toggle_text('radio2');toggle_text('adtitle_label');toggle_text('adtitle');toggle_text('adtext_label');toggle_text('adtext');toggle_text('banner_size_label');toggle_text('banner_size');}function show_date_as_local_time(){var spans=document.getElementsByTagName('span');for(var i=0;i<spans.length;i++)if(spans[i].className.match(/\bLOCAL_TIME\b/i)){system_date=new Date(Date.parse(spans[i].innerHTML));if(system_date.getHours()>=12){adds='&nbsp;PM';h=system_date.getHours()-12;}else{adds='&nbsp;AM';h=system_date.getHours();}spans[i].innerHTML=h+":"+(system_date.getMinutes()+"").replace(/\b(\d)\b/g,'0$1')+adds;}}function PopupPic(sPicURL,sWidth,sHeight){window.open("/popup.htm?"+sPicURL,"","resizable=1,HEIGHT="+sHeight+",WIDTH="+sWidth+",scrollbars=yes");}function open_link(target,location){if(target=='blank'){window.open(location);}else{window.top.location=location;}}

0
public/javascripts/prototype.js vendored Executable file → Normal file
View file

0
public/javascripts/rails.js Executable file → Normal file
View file

View file

View file

View file

View file

View file

View file

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 657 B

View file

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 97 B

View file

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 180 B

View file

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 84 B

View file

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 109 B

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

View file

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 84 B

View file

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

View file

View file

@ -0,0 +1,216 @@
function changeLoc(loc) {
window.location = loc
}
function getCookie(name) {
var prefix = name + "=";
var cStr = document.cookie;
var start = cStr.indexOf(prefix);
if (start == -1) {
return null;
}
var end = cStr.indexOf(";", start + prefix.length);
if (end == -1) {
end = cStr.length;
}
var value = cStr.substring(start + prefix.length, end);
return unescape(value);
}
function setCookie(name, value, expiration) {
document.cookie = name + "=" + value + "; expires=" + expiration;
}
function toggleCheckbox(checkBox) {
var element = document.getElementById(checkBox.id);
if (element.value == "1" || element.checked) {
element.checked = false;
element.value = "0";
} else {
element.checked = true;
element.value = "1";
}
}
function toggleChkbox(checkBox) {
if (checkBox.checked) {
checkBox.checked = true;
} else {
checkBox.checked = false;
}
}
function toggle_list(id) {
ul = "ul_" + id;
img = "img_" + id;
hid = "h_" + id;
ulElement = document.getElementById(ul);
imgElement = document.getElementById(img);
hiddenElement = document.getElementById(hid);
if (ulElement) {
if (ulElement.className == 'closed') {
ulElement.className = "open";
imgElement.src = "/themes/original/images/list_opened.gif";
hiddenElement.value = "1"
} else {
ulElement.className = "closed";
imgElement.src = "/themes/original/images/list_closed.gif";
hiddenElement.value = "0"
}
}
}
function toggle_layer(id) {
lElement = document.getElementById(id);
imgElement = document.getElementById("img_" + id);
if (lElement) {
if (lElement.className == 'closed') {
lElement.className = "open";
imgElement.src = "/themes/original/images/list_opened.gif";
return true;
} else {
lElement.className = "closed";
imgElement.src = "/themes/original/images/list_closed.gif";
return false;
}
}
return true;
}
function toggle_layer_status(id) {
lElement = document.getElementById(id);
if (lElement) {
if (lElement.className == 'closed') {
return false;
} else {
return true;
}
}
return true;
}
function toggle_text(id) {
if (document.getElementById) elem = document.getElementById(id);
else if (document.all) elem = eval("document.all." + id);
else return false;
if (!elem) return true;
elemStyle = elem.style;
if (elemStyle.display != "block") {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
function getFF(id) {
if (document.getElementById) elem = document.getElementById(id);
else if (document.all) elem = document.eval("document.all." + id);
return elem
}
function setFF(id, value) {
if (getFF(id)) getFF(id).value = value;
}
function setCFF(id) {
if (getFF(id)) getFF(id).checked = true;
}
function updateSUFromC(btnName) {
var suem = getCookie('_cdf_em');
var sueg = getCookie('_cdf_gr');
if (suem != "" && suem != null && suem != "undefined") {
setFF('sup_email', suem);
setFF('signup_submit_button', btnName);
}
if (sueg && sueg != "") {
if (sueg.indexOf(",") < 0 && sueg != "") {
gr_id = sueg;
setCFF('supgr_' + gr_id);
} else while ((i = sueg.indexOf(",")) >= 0) {
gr_id = sueg.substring(0, i);
sueg = sueg.substring(i + 1);
setCFF('supgr_' + gr_id);
}
if (sueg.indexOf(",") < 0 && sueg != "") {
gr_id = sueg;
setCFF('supgr_' + gr_id);
}
}
}
function updateLUEfC() {
var suem = getCookie('_cdf_em');
if (suem != "" && suem != null && suem != "undefined") {
setFF('login_user_email', suem);
}
}
function replaceHRFST(ifrm) {
var o = ifrm;
var w = null;
if (o.contentWindow) {
w = o.contentWindow;
} else if (window.frames && window.frames[o.id].window) {
w = window.frames[o.id];
} else return;
var doc = w.document;
if (!doc.getElementsByTagName) return;
var anchors = doc.getElementsByTagName("a");
for (var i = 0; i < anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href")) anchor.target = "_top";
}
iHeight = doc.body.scrollHeight;
ifrm.style.height = iHeight + "px"
}
function rs(n, u, w, h, x) {
args = "width=" + w + ",height=" + h + ",resizable=yes,scrollbars=yes,status=0";
remote = window.open(u, n, args);
if (remote != null && remote.opener == null) remote.opener = self;
if (x == 1) return remote;
}
function wizard_step_onclick(direction, alt_url) {
if (document.forms[0]) {
direction_elem = '';
if (document.getElementById) {
direction_elem = document.getElementById('wiz_dir');
} else if (document.all) {
direction_elem = document.eval("document.all.wiz_dir");
}
if (direction_elem) {
direction_elem.value = direction;
}
if (document.forms[0].onsubmit) {
document.forms[0].onsubmit();
}
document.forms[0].submit();
} else {
window.location = alt_url;
}
}
function toggle_adtype(ad_type) {
toggle_text('upload_banner_label');
toggle_text('upload_banner');
toggle_text('radio1_label');
toggle_text('radio1');
toggle_text('radio2_label');
toggle_text('radio2');
toggle_text('adtitle_label');
toggle_text('adtitle');
toggle_text('adtext_label');
toggle_text('adtext');
toggle_text('banner_size_label');
toggle_text('banner_size');
}
function show_date_as_local_time() {
var spans = document.getElementsByTagName('span');
for (var i = 0; i < spans.length; i++) if (spans[i].className.match(/\bLOCAL_TIME\b/i)) {
system_date = new Date(Date.parse(spans[i].innerHTML));
if (system_date.getHours() >= 12) {
adds = '&nbsp;PM';
h = system_date.getHours() - 12;
} else {
adds = '&nbsp;AM';
h = system_date.getHours();
}
spans[i].innerHTML = h + ":" + (system_date.getMinutes() + "").replace(/\b(\d)\b/g, '0$1') + adds;
}
}
function PopupPic(sPicURL, sWidth, sHeight) {
window.open("/popup.htm?" + sPicURL, "", "resizable=1,HEIGHT=" + sHeight + ",WIDTH=" + sWidth + ",scrollbars=yes");
}
function open_link(target, location) {
if (target == 'blank') {
window.open(location);
} else {
window.top.location = location;
}
}

View file

@ -1,19 +1,19 @@
function changeLoc(loc) { window.location = loc } function changeLoc(loc) { window.location = loc }
function getCookie(name) { function getCookie(name) {
var prefix = name + "="; var prefix = name + "=";
var cStr = document.cookie; var cStr = document.cookie;
var start = cStr.indexOf(prefix); var start = cStr.indexOf(prefix);
if (start==-1) { if (start==-1) {
return null; return null;
} }
var end = cStr.indexOf(";", start+prefix.length); var end = cStr.indexOf(";", start+prefix.length);
if (end==-1) { end=cStr.length; } if (end==-1) { end=cStr.length; }
var value=cStr.substring(start+prefix.length, end); var value=cStr.substring(start+prefix.length, end);
return unescape(value); return unescape(value);
} }
function setCookie(name, value, expiration) { function setCookie(name, value, expiration) {
document.cookie = name+"="+value+"; expires="+expiration; document.cookie = name+"="+value+"; expires="+expiration;
} }
function toggleCheckbox(checkBox) { function toggleCheckbox(checkBox) {
@ -43,11 +43,11 @@ function toggle_list(id){
if (ulElement){ if (ulElement){
if (ulElement.className == 'closed'){ if (ulElement.className == 'closed'){
ulElement.className = "open"; ulElement.className = "open";
imgElement.src = "/images/list_opened.gif"; imgElement.src = "/themes/original/images/list_opened.gif";
hiddenElement.value = "1" hiddenElement.value = "1"
}else{ }else{
ulElement.className = "closed"; ulElement.className = "closed";
imgElement.src = "/images/list_closed.gif"; imgElement.src = "/themes/original/images/list_closed.gif";
hiddenElement.value = "0" hiddenElement.value = "0"
} }
} }
@ -58,11 +58,11 @@ function toggle_layer(id) {
if (lElement){ if (lElement){
if (lElement.className == 'closed'){ if (lElement.className == 'closed'){
lElement.className = "open"; lElement.className = "open";
imgElement.src = "/images/list_opened.gif"; imgElement.src = "/themes/original/images/list_opened.gif";
return true; return true;
}else{ }else{
lElement.className = "closed"; lElement.className = "closed";
imgElement.src = "/images/list_closed.gif"; imgElement.src = "/themes/original/images/list_closed.gif";
return false; return false;
} }
} }
@ -86,9 +86,9 @@ function toggle_text(id){
elem = eval( "document.all." + id ); elem = eval( "document.all." + id );
else else
return false; return false;
if(!elem) return true; if(!elem) return true;
elemStyle = elem.style; elemStyle = elem.style;
if ( elemStyle.display != "block" ) { if ( elemStyle.display != "block" ) {
elemStyle.display = "block" elemStyle.display = "block"
@ -107,7 +107,7 @@ function setCFF(id) {if(getFF(id))getFF(id).checked=true;}
function updateSUFromC(btnName) { function updateSUFromC(btnName) {
var suem = getCookie('_cdf_em');var sueg = getCookie('_cdf_gr'); var suem = getCookie('_cdf_em');var sueg = getCookie('_cdf_gr');
if (suem != "" && suem != null && suem != "undefined") { setFF('sup_email', suem); setFF('signup_submit_button',btnName); } if (suem != "" && suem != null && suem != "undefined") { setFF('sup_email', suem); setFF('signup_submit_button',btnName); }
if (sueg && sueg != "") { if (sueg && sueg != "") {
if (sueg.indexOf(",") < 0 && sueg != "") { gr_id = sueg; setCFF('supgr_'+gr_id); if (sueg.indexOf(",") < 0 && sueg != "") { gr_id = sueg; setCFF('supgr_'+gr_id);
} else while ((i = sueg.indexOf(",")) >= 0) { gr_id = sueg.substring(0,i); sueg = sueg.substring(i+1); setCFF('supgr_'+gr_id); } } else while ((i = sueg.indexOf(",")) >= 0) { gr_id = sueg.substring(0,i); sueg = sueg.substring(i+1); setCFF('supgr_'+gr_id); }
@ -133,7 +133,7 @@ function replaceHRFST(ifrm) {
for (var i=0; i<anchors.length; i++) { for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i]; var anchor = anchors[i];
if (anchor.getAttribute("href")) anchor.target = "_top"; if (anchor.getAttribute("href")) anchor.target = "_top";
} }
iHeight = doc.body.scrollHeight; iHeight = doc.body.scrollHeight;
ifrm.style.height = iHeight + "px" ifrm.style.height = iHeight + "px"
} }
@ -146,24 +146,24 @@ function rs(n,u,w,h,x){
function wizard_step_onclick(direction, alt_url) { function wizard_step_onclick(direction, alt_url) {
if(document.forms[0]) { if(document.forms[0]) {
direction_elem=''; direction_elem='';
if ( document.getElementById ) { if ( document.getElementById ) {
direction_elem = document.getElementById( 'wiz_dir' ); direction_elem = document.getElementById( 'wiz_dir' );
} else if ( document.all ) { } else if ( document.all ) {
direction_elem = document.eval( "document.all.wiz_dir"); direction_elem = document.eval( "document.all.wiz_dir");
} }
if(direction_elem) { if(direction_elem) {
direction_elem.value = direction; direction_elem.value = direction;
} }
if (document.forms[0].onsubmit) { if (document.forms[0].onsubmit) {
document.forms[0].onsubmit(); document.forms[0].onsubmit();
} }
document.forms[0].submit(); document.forms[0].submit();
} else { } else {
window.location=alt_url; window.location=alt_url;
} }
} }
function toggle_adtype(ad_type){ function toggle_adtype(ad_type){
toggle_text('upload_banner_label'); toggle_text('upload_banner_label');
toggle_text('upload_banner'); toggle_text('upload_banner');
toggle_text('radio1_label'); toggle_text('radio1_label');
@ -176,16 +176,16 @@ function toggle_adtype(ad_type){
toggle_text('adtext'); toggle_text('adtext');
toggle_text('banner_size_label'); toggle_text('banner_size_label');
toggle_text('banner_size'); toggle_text('banner_size');
} }
function show_date_as_local_time() { function show_date_as_local_time() {
var spans = document.getElementsByTagName('span'); var spans = document.getElementsByTagName('span');
for (var i=0; i<spans.length; i++) for (var i=0; i<spans.length; i++)
if (spans[i].className.match(/\bLOCAL_TIME\b/i)) { if (spans[i].className.match(/\bLOCAL_TIME\b/i)) {
system_date = new Date(Date.parse(spans[i].innerHTML)); system_date = new Date(Date.parse(spans[i].innerHTML));
if (system_date.getHours() >= 12) { adds = '&nbsp;PM'; h = system_date.getHours() - 12; } if (system_date.getHours() >= 12) { adds = '&nbsp;PM'; h = system_date.getHours() - 12; }
else { adds = '&nbsp;AM'; h = system_date.getHours(); } else { adds = '&nbsp;AM'; h = system_date.getHours(); }
spans[i].innerHTML = h + ":" + (system_date.getMinutes()+"").replace(/\b(\d)\b/g, '0$1') + adds; spans[i].innerHTML = h + ":" + (system_date.getMinutes()+"").replace(/\b(\d)\b/g, '0$1') + adds;
} }
} }
function PopupPic(sPicURL,sWidth,sHeight) { function PopupPic(sPicURL,sWidth,sHeight) {
@ -198,4 +198,4 @@ function open_link(target, location){
} else { } else {
window.top.location = location; window.top.location = location;
} }
} }

View file

View file

@ -28,11 +28,11 @@ a {
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
} }
a:hover { a:hover {
color: #444; color: #444;
} }
a:active { a:active {
color: #000; color: #000;
background-color: transparent; background-color: transparent;
@ -45,7 +45,7 @@ a {
margin: 1em auto; margin: 1em auto;
text-align: left; text-align: left;
background-color: #fff; background-color: #fff;
color: #858585; color: #858585;
} }
@ -68,7 +68,7 @@ a {
height: 240px; height: 240px;
margin: 15px 30px; margin: 15px 30px;
padding: 0; padding: 0;
border: 0; border: 0;
} }
#advert img { #advert img {
@ -158,7 +158,7 @@ table.list th {
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
color: #e70; color: #e70;
text-align: left; text-align: left;
padding-left: 1em; padding-left: 1em;
} }
@ -181,9 +181,9 @@ div.gal img {border: 1px solid; border-color: #444 #AAA #AAA #444;}
div.lc img {height: 96px; width: 128px; margin: 40px 0 0 0;} div.lc img {height: 96px; width: 128px; margin: 40px 0 0 0;}
div.pt img {height: 128px; width: 96px; margin: 8px 16px 0 0; margin-left:10px;} div.pt img {height: 128px; width: 96px; margin: 8px 16px 0 0; margin-left:10px;}
div.gal ul {margin: 0.25em 0 0 0; padding: 0; font: bold small Arial, Verdana, sans-serif;} div.gal ul {margin: 0.25em 0 0 0; padding: 0; font: bold small Arial, Verdana, sans-serif;}
div.gal ul li {padding: 0; list-style-type:none; } div.gal ul li {padding: 0; list-style-type:none; }
div.gal ul li.galcaption {display: block; text-align: left; padding: 0 15px; margin: 0;} div.gal ul li.galcaption {display: block; text-align: left; padding: 0 15px; margin: 0;}
div.gal ul li.galedit {display: block; text-align: left; padding: 0 15px; margin: 0;} div.gal ul li.galedit {display: block; text-align: left; padding: 0 15px; margin: 0;}
div.gal ul li.galdel {display: block; text-align: left; padding: 0 15px; margin: 0;} div.gal ul li.galdel {display: block; text-align: left; padding: 0 15px; margin: 0;}
#iconmenu { #iconmenu {
@ -213,7 +213,7 @@ div.gal ul li.galdel {display: block; text-align: left; padding: 0 15px; margin:
color: gray; color: gray;
display: block; display: block;
width: 110px; width: 110px;
margin: 0; margin: 0;
padding: 64px 0 0 0; padding: 64px 0 0 0;
background-position: center top; background-position: center top;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -222,40 +222,40 @@ div.gal ul li.galdel {display: block; text-align: left; padding: 0 15px; margin:
text-decoration: none; text-decoration: none;
} }
#iconmenu li a:hover { #iconmenu li a:hover {
color: black; color: black;
text-decoration: none; text-decoration: none;
background-position: center top; background-position: center top;
border: 1px dashed #DCDCDC; border: 1px dashed #DCDCDC;
} }
#mmhomepage, #mmhomepage a { background-image: url(/images/homepage.gif); } #mmhomepage, #mmhomepage a { background-image: url("/themes/original/images/homepage.gif"); }
#mmlogo, #mmlogo a { background-image: url(/images/logo.gif); } #mmlogo, #mmlogo a { background-image: url("/themes/original/images/logo.gif"); }
#mmwebmail, #mmwebmail a { background-image: url(/images/webmail.gif); } #mmwebmail, #mmwebmail a { background-image: url("/themes/original/images/webmail.gif"); }
#mmcontacts, #mmcontacts a { background-image: url(/images/contacts.gif); } #mmcontacts, #mmcontacts a { background-image: url("/themes/original/images/contacts.gif"); }
#mmcontactgroups, #mmcontactgroups a { background-image: url(/images/contact_groups.gif); } #mmcontactgroups, #mmcontactgroups a { background-image: url("/themes/original/images/contact_groups.gif"); }
#mmcontactscales, #mmcontactscales a { background-image: url(/images/contact_scales.gif); } #mmcontactscales, #mmcontactscales a { background-image: url("/themes/original/images/contact_scales.gif"); }
#mmarticletypes, #mmarticletypes a { background-image: url(/images/article_types.gif); } #mmarticletypes, #mmarticletypes a { background-image: url("/themes/original/images/article_types.gif"); }
#mmarticles, #mmarticles a { background-image: url(/images/articles.gif); } #mmarticles, #mmarticles a { background-image: url("/themes/original/images/articles.gif"); }
#mmgallery, #mmgallery a { background-image: url(/images/image.gif); } #mmgallery, #mmgallery a { background-image: url("/themes/original/images/image.gif"); }
#mmcategories, #mmcategories a { background-image: url(/images/categories.gif); } #mmcategories, #mmcategories a { background-image: url("/themes/original/images/categories.gif"); }
#mmregion, #mmregion a { background-image: url(/images/region.gif); } #mmregion, #mmregion a { background-image: url("/themes/original/images/region.gif"); }
#mmlogout, #mmlogout a { background-image: url(/images/logout.gif); } #mmlogout, #mmlogout a { background-image: url("/themes/original/images/logout.gif"); }
#mmwizard, #mmwizard a { background-image: url(/images/wizard_mirr.gif); } #mmwizard, #mmwizard a { background-image: url("/themes/original/images/wizard_mirr.gif"); }
#mmpages, #mmpages a { background-image: url(/images/pages.gif); } #mmpages, #mmpages a { background-image: url("/themes/original/images/pages.gif"); }
#mmmenueditor, #mmmenueditor a { background-image: url(/images/menueditor.gif); } #mmmenueditor, #mmmenueditor a { background-image: url("/themes/original/images/menueditor.gif"); }
#mmforumcats, #mmforumcats a { background-image: url(/images/forum.gif); } #mmforumcats, #mmforumcats a { background-image: url("/themes/original/images/forum.gif"); }
#mmforums, #mmforums a { background-image: url(/images/forum.gif); } #mmforums, #mmforums a { background-image: url("/themes/original/images/forum.gif"); }
#mmchnagepassword, #mmchnagepassword a { background-image: url(/images/password.gif); } #mmchnagepassword, #mmchnagepassword a { background-image: url("/themes/original/images/password.gif"); }
#mmblog, #mmblog a { background-image: url(/images/blog.gif); } #mmblog, #mmblog a { background-image: url("/themes/original/images/blog.gif"); }
#mmcar, #mmcar a { background-image: url(/images/car.gif); } #mmcar, #mmcar a { background-image: url("/themes/original/images/car.gif"); }
#mmpathstatpath, #mmpathstatpath a { background-image: url(/images/stats.gif); } #mmpathstatpath, #mmpathstatpath a { background-image: url("/themes/original/images/stats.gif"); }
#mmnewsletters, #mmnewsletters a { background-image: url(/images/newsletters.gif); } #mmnewsletters, #mmnewsletters a { background-image: url("/themes/original/images/newsletters.gif"); }
#mmadvert, #mmadvert a { background-image: url(/images/advert.gif); } #mmadvert, #mmadvert a { background-image: url("/themes/original/images/advert.gif"); }
#mmforms, #mmforms a { background-image: url(/images/formbuilder.gif); } #mmforms, #mmforms a { background-image: url("/themes/original/images/formbuilder.gif"); }
#mmattachments, #mmattachments a { background-image: url(/images/attachment.gif); } #mmattachments, #mmattachments a { background-image: url("/themes/original/images/attachment.gif"); }
#mmphoto, #mmphoto a { background-image: url(/images/photo.gif); } #mmphoto, #mmphoto a { background-image: url("/themes/original/images/photo.gif"); }
#mmtypo, #mmtypo a { background-image: url(/images/typo.gif); } #mmtypo, #mmtypo a { background-image: url("/themes/original/images/typo.gif"); }
/* Wizard */ /* Wizard */
@ -390,20 +390,20 @@ td.htmlarea {
border: 1px solid; border: 1px solid;
} }
#suggest { #suggest {
padding: 10px; padding: 10px;
margin: 10px; margin: 10px;
border: 1px dotted; border: 1px dotted;
width: 362px; width: 362px;
voice-family: "\"}\""; voice-family: "\"}\"";
voice-family: inherit; voice-family: inherit;
width: 383px; width: 383px;
} }
#suggest p { #suggest p {
padding: 0; padding: 0;
margin-left: 0; margin-left: 0;
margin-top:0; margin-top:0;
font-size: 10px; font-size: 10px;
} }
@ -466,22 +466,22 @@ li.error { color: red; }
.cpointer { cursor: pointer; cursor: hand; } .cpointer { cursor: pointer; cursor: hand; }
.partactive { .partactive {
padding-top: 10px; padding-top: 10px;
width: 150px; width: 150px;
height: 25px; height: 25px;
text-align: center; text-align: center;
background-color: rgb(220,220,220); background-color: rgb(220,220,220);
border: #555 solid 0.5px; border: #555 solid 0.5px;
} }
.partsel { .partsel {
padding-top: 10px; padding-top: 10px;
width: 150px; width: 150px;
height: 25px; height: 25px;
text-align: center; text-align: center;
background-color: rgb(190,190,190); background-color: rgb(190,190,190);
border: #555 solid 0.5px; border: #555 solid 0.5px;
} }
div#parts a img { border: 0; align: right } div#parts a img { border: 0; align: right }
@ -496,7 +496,7 @@ div#parts a img { border: 0; align: right }
} }
.part-editor h2 { padding: 0; margin: 0; color: #00F; margin-bottom: 20px } .part-editor h2 { padding: 0; margin: 0; color: #00F; margin-bottom: 20px }
.part-editor label { font-size: 10px; color: #00F } .part-editor label { font-size: 10px; color: #00F }
div#parts { div#parts {
width: 150px; width: 150px;
@ -513,11 +513,11 @@ div#compose-choose {
} }
div#compose-radios { div#compose-radios {
padding-top: 10px; padding-top: 10px;
width: 150px; width: 150px;
height: 25px; height: 25px;
float: left; float: left;
background-color: rgb(220,220,220); background-color: rgb(220,220,220);
} }
div#compose-radios a img { border: 0px; } div#compose-radios a img { border: 0px; }
@ -538,11 +538,11 @@ div#tab_content table tr td.cpointer a img { border: 0; }
div#choose-urls { font-size: 0.75em; text-align: left; padding: 5px; } div#choose-urls { font-size: 0.75em; text-align: left; padding: 5px; }
div#choose-urls h4 { margin: 0; padding: 0; } div#choose-urls h4 { margin: 0; padding: 0; }
div#choose-urls ul { margin: 0; padding: 0; } div#choose-urls ul { margin: 0; padding: 0; }
div#choose-urls li { list-style-type:none; background: #EDF4F5; border: 1px solid #AAA; margin: 1px; } div#choose-urls li { list-style-type:none; background: #EDF4F5; border: 1px solid #AAA; margin: 1px; }
div#left-menu-items ul { margin: 0; padding: 0; } div#left-menu-items ul { margin: 0; padding: 0; }
div#left-menu-items li { list-style-type:none; background: #EDF4F5; border: 1px solid #AAA; margin: 1px;} div#left-menu-items li { list-style-type:none; background: #EDF4F5; border: 1px solid #AAA; margin: 1px;}
div#left-menu-items a img { border: 0;} div#left-menu-items a img { border: 0;}
div#left-menu-items ul li ul li { list-style-type:none; background: #F4F5ED; border: 1px solid #AAA; margin: 1px; } div#left-menu-items ul li ul li { list-style-type:none; background: #F4F5ED; border: 1px solid #AAA; margin: 1px; }
div#left-menu-items ul li ul { margin: 2px; padding: 2px; } div#left-menu-items ul li ul { margin: 2px; padding: 2px; }
@ -551,4 +551,4 @@ div.lm-subitems { margin: 5px; }
.comboarrow {} .comboarrow {}
.combodivshow {position:absolute; display: inline;z-index:10000 } .combodivshow {position:absolute; display: inline;z-index:10000 }
.combodiv { position:abcoslute; display:none; z-index:10000 } .combodiv { position:abcoslute; display:none; z-index:10000 }
.combosel { width: 220px; border-style: none; } .combosel { width: 220px; border-style: none; }

View file

@ -3,7 +3,7 @@
.closed { display: none; } .closed { display: none; }
#logo { #logo {
background-image: url("/images/logo.png"); background-image: url("/themes/original/images/logo.png");
background-repeat: no-repeat; background-repeat: no-repeat;
height: 125px; height: 125px;
} }
@ -46,7 +46,7 @@ table.form_layout td.form_actions { text-align: right; }
/* Rounded Box Corners /* Rounded Box Corners
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
.box {margin: 0 0 0.75em 0; clear: both; position: relative;} .box {margin: 0 0 0.75em 0; clear: both; position: relative;}
b.cn { position: absolute; height: 10px; width: 10px; margin: 0; padding: 0; background: url(../images/white.png) no-repeat; line-height: 1px; font-size: 1px; } b.cn { position: absolute; height: 10px; width: 10px; margin: 0; padding: 0; background: url("/themes/original/images/white.png") no-repeat; line-height: 1px; font-size: 1px; }
b.tl {top: -1px; left: -1px; background-position: top left;} b.tl {top: -1px; left: -1px; background-position: top left;}
b.tr {top: -1px; right: -1px; background-position: top right;} b.tr {top: -1px; right: -1px; background-position: top right;}
b.bl {bottom: -1px; left: -1px; background-position: bottom left;} b.bl {bottom: -1px; left: -1px; background-position: bottom left;}
@ -55,9 +55,9 @@ b.br {bottom: -1px; right: -1px; background-position: bottom right;}
/* IE Filters */ /* IE Filters */
* html b.bl {bottom:-2px} * html b.bl {bottom:-2px}
* html b.br {bottom:-2px} * html b.br {bottom:-2px}
* html b.cn {background-image: url(../images/white.gif);} * html b.cn {background-image: url("/themes/original/images/white.gif");}
#container { background: url("../images/d6deec.gif") top left repeat-y; } #container { background: url("/themes/original/images/d6deec.gif") top left repeat-y; }
#tab_content { width: 100%; } #tab_content { width: 100%; }

View file

@ -2,7 +2,7 @@
background: #789A9F; background: #789A9F;
padding-top: 1.8em; padding-top: 1.8em;
width: 98%; width: 98%;
background-image: url(../images/select.png); background-image: url("/themes/original/images/select.png");
} }
#tab_content { #tab_content {
@ -49,7 +49,7 @@
border: 1px solid #666; border: 1px solid #666;
border-bottom: none; border-bottom: none;
background: #789A9F; background: #789A9F;
background-image: url(../images/select.png); background-image: url("/themes/original/images/select.png");
padding-bottom: 4px; padding-bottom: 4px;
margin-top: 0; margin-top: 0;
color: #000; color: #000;
@ -59,7 +59,7 @@
background: #EDF4F5; background: #EDF4F5;
border: 1px solid #AAA; border: 1px solid #AAA;
border-bottom: none; border-bottom: none;
background-image: url(../images/deselect.png); background-image: url("/themes/original/images/deselect.png");
} }
#header ul#primary a:hover { #header ul#primary a:hover {
@ -108,4 +108,4 @@
background: transparent; background: transparent;
} }
#header ul#secondary li:last-child a { border: none; } #header ul#secondary li:last-child a { border: none; }

View file

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 155 B

View file

View file

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
<head>
<title><%=@title%></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<%=stylesheet_link_tag current_theme_stylesheet_path('admin') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('tabs') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('mailr') %>
<%=javascript_include_tag current_theme_javascript_path('global') %>
</head>
<body id="bodyID" onload="<%=@onload_function%>">
<%= @content_for_layout %>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><%=t(:mailr) %> &raquo; <%= t(:please_login)%></title>
<%=stylesheet_link_tag current_theme_stylesheet_path('admin') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('mailr') %>
</head>
<body>
<%= yield %>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
<head>
<title><%= t :mailr %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<%=stylesheet_link_tag current_theme_stylesheet_path('admin') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('tabs') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('mailr') %>
<%=javascript_include_tag current_theme_javascript_path('global') %>
<%=javascript_include_tag current_theme_javascript_path('webmail') %>
<%=javascript_include_tag :defaults %>
</head>
<body id="bodyID" onload="<%=@onload_function%>">
<div id="wholepage">
<div id="container">
<div id="sidebar_outer">
<div id="logo"></div>
<div id="sidebar">
<%= yield :sidebar %>
</div>
</div>
<div id="content"><%= yield %></div>
<br class="clear"/>
</div>
</div>
</body>
</html>

View file

@ -10,5 +10,5 @@
</td> </td>
<td class="date"><%= message_date(message_row.date) %></td> <td class="date"><%= message_date(message_row.date) %></td>
<td class="size"><%= message_size(message_row.size) %></td> <td class="size"><%= message_size(message_row.size) %></td>
<td class="attachind"><%= message_row.content_type == 'multipart' ? image_tag('attachment.png') : '&nbsp;' %></td> <td class="attachind"><%= message_row.content_type == 'multipart' ? image_tag(current_theme_image_path('attachment.png')) : '&nbsp;' %></td>
</tr> </tr>

View file

@ -1,7 +1,7 @@
<a href='#' onclick='toggle_msg_search(true);'> <a href='#' onclick='toggle_msg_search(true);'>
<%= t :search%><img id='img_msg_search' alt='open' src='/images/list_<%=@srch_img_src%>.gif'/> <%= t :search%><img id='img_msg_search' alt='open' src="<%= current_theme_image_path(@srch_img_src+'.gif') %>"/>
</a> </a>
<div id="msg_search" class='<%=@srch_class%>'> <div id="msg_search" class='<%=@srch_class%>'>
<%= t :search_txt %>&nbsp; <%= t :search_txt %>&nbsp;
<select name="search_field"> <select name="search_field">
<%= options_for_select(CDF::CONFIG[:mail_search_fields], @search_field)%> <%= options_for_select(CDF::CONFIG[:mail_search_fields], @search_field)%>
@ -10,4 +10,4 @@
<input type="text" name="search_value" value="<%=@search_value%>" size='16' id='search_value'/>&nbsp; <input type="text" name="search_value" value="<%=@search_value%>" size='16' id='search_value'/>&nbsp;
<%= submit_tag(t(:search), :name=>'op')%>&nbsp; <%= submit_tag(t(:search), :name=>'op')%>&nbsp;
<%= submit_tag(t(:show_all), :name=>'op')%> <%= submit_tag(t(:show_all), :name=>'op')%>
</div> </div>

View file

@ -27,7 +27,7 @@
<input type="hidden" name="page" value="<%=@page%>"/> <input type="hidden" name="page" value="<%=@page%>"/>
<a href='#' onclick='toggle_msg_operations(true);'> <a href='#' onclick='toggle_msg_operations(true);'>
<%=t :operations%><img id='img_msgops' alt='open' src='../images/list_<%=@ops_img_src%>.gif'/> <%=t :operations%><img id='img_msgops' alt='open' src="<%= current_theme_image_path(@ops_img_src+'.gif') %>"/>
</a> </a>
<div id="msgops" class='<%=@ops_class%>'> <div id="msgops" class='<%=@ops_class%>'>