diff --git a/Gemfile b/Gemfile index d910b4b..79bbe16 100755 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'sqlite3-ruby',:require => 'sqlite3' gem 'arel' gem 'mysql2' gem 'will_paginate' -gem 'web-app-theme' +gem 'themes_for_rails' gem 'tmail' # Use unicorn as the web server diff --git a/Gemfile.lock b/Gemfile.lock index eb08281..1f3e0d8 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,12 +60,14 @@ GEM sqlite3 (1.3.3) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) + themes_for_rails (0.4.2) + rails (~> 3.0.0) + themes_for_rails thor (0.14.6) tmail (1.2.7.1) treetop (1.4.9) polyglot (>= 0.3.1) tzinfo (0.3.24) - web-app-theme (0.6.3) will_paginate (2.3.15) PLATFORMS @@ -76,6 +78,6 @@ DEPENDENCIES mysql2 rails (= 3.0.7) sqlite3-ruby + themes_for_rails tmail - web-app-theme will_paginate diff --git a/Rakefile b/Rakefile index f7fac98..29283be 100755 --- a/Rakefile +++ b/Rakefile @@ -4,4 +4,4 @@ require File.expand_path('../config/application', __FILE__) require 'rake' -Rails3::Application.load_tasks +Mailr::Application.load_tasks diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7882e6f..279d8db 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,6 +12,11 @@ class ApplicationController < ActionController::Base #filter_parameter_logging :password #upgrade to Rails3 protected + + def theme_resolver + CDF::CONFIG[:theme] || CDF::CONFIG[:default_theme] + end + def secure_user?() true end def secure_cust?() false end def additional_scripts() "" end diff --git a/app/controllers/contact_groups_controller.rb b/app/controllers/contact_groups_controller.rb index 4bdb75d..b09a1b6 100755 --- a/app/controllers/contact_groups_controller.rb +++ b/app/controllers/contact_groups_controller.rb @@ -1,28 +1,32 @@ class ContactGroupsController < ApplicationController + + theme :theme_resolver + layout 'public' - + + def index @contact_group = ContactGroup.new @contact_group.customer_id = logged_user @contactgroups = ContactGroup.find_by_user(logged_user) end - + def add @contactgroup = ContactGroup.new @contactgroup.customer_id = logged_user render("/contact_group/edit") end - + def delete contactgroup = ContactGroup.find(@params["id"]) contactgroup.destroy redirect_to(:action=>"list") end - + def edit @contactgroup = ContactGroup.find(@params["id"]) end - + def save begin if @params["contactgroup"]["id"].nil? or @params["contactgroup"]["id"] == "" @@ -33,7 +37,7 @@ class ContactGroupsController < ApplicationController @contactgroup = ContactGroup.find(@params["contactgroup"]["id"]) @contactgroup.attributes = @params["contactgroup"] end - + if @contactgroup.save redirect_to(:action=>"list") else @@ -45,8 +49,8 @@ class ContactGroupsController < ApplicationController render("/contact_group/edit") end end - + protected def secure_user?() true end - + end diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb index 7e530aa..ace89c3 100755 --- a/app/controllers/contacts_controller.rb +++ b/app/controllers/contacts_controller.rb @@ -1,6 +1,9 @@ class ContactsController < ApplicationController + + theme :theme_resolver + layout :select_layout - + def index if params[:letter] && params[:letter].any? @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] end end - + def listLetter letters = CDF::CONFIG[:contact_letters] @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']) - @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) - + if params["mode"] == "groups" if params["group_id"] and not params["group_id"].nil? and not params["group_id"] == '' @group_id = params["group_id"].to_i @@ -31,17 +34,17 @@ class ContactsController < ApplicationController end end end - + render :action => "list" end - + def new @contact = Contact.new @contact.customer_id = logged_user - + # load related lists loadLists - + # Init groups: because of checkbox # Set all to 0 => unchecked @groups = Hash.new @@ -49,12 +52,12 @@ class ContactsController < ApplicationController @groups[g.id] = 0 } end - + def add_multiple @contact = Contact.new @contact["file_type"] = "1" end - + def add_from_mail cstr = params['cstr'] retmsg = params['retmsg'] @@ -69,13 +72,13 @@ class ContactsController < ApplicationController else fname, lname, email = "", "", cstr end - + if @contact = Contact.find_by_user_email(logged_user, email) # load related lists loadLists - + @contact.fname, @contact.lname = fname, lname - + # groups = @contact.groups @groups = Hash.new @contactgroups.each {|g| @@ -95,82 +98,82 @@ class ContactsController < ApplicationController else @contact = Contact.new("fname"=>fname, "lname" => lname, "email" => email) @contact.customer_id = logged_user - + # load related lists loadLists - + # Init groups: because of checkbox # Set all to 0 => unchecked @groups = Hash.new @contactgroups.each {|g| @groups[g.id] = 0 } - end + end render :action => "new" end - + def import_preview file = params["contact"]["data"] - + flash["errors"] = Array.new - + if file.size == 0 flash["errors"] << _('You haven\'t selected file or the file is empty') @contact = Contact.new @contact["file_type"] = params["contact"]["file_type"] render :action => "add_multiple" end - + file_type = params["contact"]["file_type"] if file_type.nil? or file_type == '1' separator = ',' else separator = /\t/ - + end - + @contacts = Array.new emails = Array.new - - file.each {|line| + + file.each {|line| cdata = line.strip.chomp.split(separator) cont = Contact.new cont.fname = cdata[0].to_s.strip.chomp cont.lname = cdata[1].to_s.strip.chomp cont.email = cdata[2].to_s.strip.chomp - + # Check for duplicate emails in the file if emails.include?(cont.email) flash["errors"] << sprintf(_('Contact %'), file.lineno.to_s) + ": " + _('The e-mail duplicates the e-mail of another record!') - else + else emails << cont.email end - + @contacts << cont } - + end - + def import contacts_count = params["contact"].length contacts_to_import = params["contact"] @contacts = Array.new emails = Array.new - + flash["errors"] = Array.new - + for i in 0...contacts_count contact = Contact.new contact.customer_id = logged_user contact.fname = contacts_to_import[i.to_s]["fname"] contact.lname = contacts_to_import[i.to_s]["lname"] contact.email = contacts_to_import[i.to_s]["email"] - + begin # Check for duplicate emails in the submitted data if emails.include?(contact.email) flash["errors"] << sprintf(_('Contact %'), (i+1).to_s) + ": " + _('The e-mail duplicates the e-mail of another record!') - else + else emails << contact.email end # Check if contact is valid @@ -180,7 +183,7 @@ class ContactsController < ApplicationController ["fname", "lname", "email"].each do |attr| attr_errors = contact.errors.on(attr) attr_errors = [attr_errors] unless attr_errors.nil? or attr_errors.is_a? Array - + if not attr_errors.nil? attr_errors.each do |msg| flash["errors"] << l(:contact_addmultiple_errorforcontact, (i+1).to_s) + ": " + l(msg) @@ -189,10 +192,10 @@ class ContactsController < ApplicationController end end end # rescue - + @contacts << contact end # for - + # If there are validation errors - display them if not flash["errors"].nil? and not flash["errors"].empty? render :action => "import_preview" @@ -214,49 +217,49 @@ class ContactsController < ApplicationController end end - + def choose if params["mode"] == "groups" save_groups end - + @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_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["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"] - 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"] - 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"] end - + def save_groups contacts_for_group = params["contacts_for_group"] group_id = params["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) - if value == "1" and not contact_group.contacts.include?(contact) - contact_group.contacts << contact + if value == "1" and not contact_group.contacts.include?(contact) + contact_group.contacts << contact end - if value == "0" and contact_group.contacts.include?(contact) - contact_group.contacts.delete(contact) + if value == "0" and contact_group.contacts.include?(contact) + contact_group.contacts.delete(contact) end } redirect_to(:action=>"index", :id=>group_id, :params=>{"mode"=>params["mode"]}) end - + def edit @contact = Contact.find(params["id"]) # load related lists loadLists - + # groups = @contact.groups @groups = Hash.new @contactgroups.each {|g| @@ -272,10 +275,10 @@ class ContactsController < ApplicationController else @groups[g.id] = 0 # unchecked end - } + } render :action => "new" end - + # Insert or update def create if params["contact"]["id"] == "" @@ -286,14 +289,14 @@ class ContactsController < ApplicationController @contact = Contact.find(params["contact"]["id"]) @contact.attributes = params["contact"] end - + @contactgroups = ContactGroup.find_by_user(logged_user) # Groups displayed groups = params['groups'] tempGroups = Array.new tempGroups.concat(@contact.groups) - - @contactgroups.each { |cgroup| + + @contactgroups.each { |cgroup| includesCGroup = false tempGroups.each {|gr| 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 @contact.groups << cgroup end - + if groups["#{cgroup.id}"] == "0" and includesCGroup @contact.groups.delete(cgroup) end @@ -323,34 +326,34 @@ class ContactsController < ApplicationController @groups[g.id] = 1 else @groups[g.id] = 0 - end + end } render :action => :new end end - + def delete Contact.destroy(params['id']) redirect_to(:action=>'index') end - + protected def secure_user?() true end - def additional_scripts() + def additional_scripts() add_s = '' if action_name == "choose" - add_s<<'' - add_s<<'' + add_s<<'' + add_s<<'' end - add_s - end - + add_s + end + def onload_function() if action_name == "choose" - "javascript:respondToCaller();" + "javascript:respondToCaller();" else "" - end + end end private def select_layout @@ -366,7 +369,7 @@ class ContactsController < ApplicationController 'public' end end - + def loadLists if @contactgroups.nil? @contactgroups = ContactGroup.find_by_user(logged_user) diff --git a/app/controllers/folders_controller.rb b/app/controllers/folders_controller.rb index 88afe98..5a542fa 100755 --- a/app/controllers/folders_controller.rb +++ b/app/controllers/folders_controller.rb @@ -6,6 +6,8 @@ class FoldersController < ApplicationController before_filter :load_imap_session after_filter :close_imap_session + theme :theme_resolver + layout 'public' def index diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index 462a634..fc0f2a6 100755 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -3,6 +3,8 @@ require 'imapmailbox' class LoginController < ApplicationController + theme :theme_resolver + def index if not(logged_user.nil?) redirect_to :controller =>"webmail", :action=>"index" diff --git a/app/controllers/webmail_controller.rb b/app/controllers/webmail_controller.rb index 12c6a1e..e780276 100755 --- a/app/controllers/webmail_controller.rb +++ b/app/controllers/webmail_controller.rb @@ -10,6 +10,8 @@ require 'imap_utils' class WebmailController < ApplicationController include ImapUtils + theme :theme_resolver + logger.info "*** WebmailController #{logger.inspect}" # Administrative functions diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f800b5a..108ec48 100755 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,8 +1,8 @@ # The methods added to this helper will be available to all templates in the application. module ApplicationHelper include NavigationHelper - - protected + + protected def format_datetime(datetime) datetime.strftime "%d.%m.%Y %H:%M" @@ -70,7 +70,7 @@ module ApplicationHelper 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

tags. # Usage: # <%= form_input :read_only_field, 'new_user', 'name', _('user_name')) %> @@ -88,22 +88,22 @@ module ApplicationHelper def attributes(hash) hash.keys.inject("") { |attrs, key| attrs + %{#{key}="#{hash[key]}" } } end - + def initListClass @itClass = 1 end - + def popListClass ret = getListClass @itClass = @itClass + 1 return ret end - + def getListClass return "even" if @itClass%2 == 0 return "odd" if @itClass%2 == 1 end - + def get_meta_info '' '' @@ -111,13 +111,13 @@ module ApplicationHelper '' '' end - + def user @user = Customer.find(@session["user"]) if @user.nil? @user end - def link_main + def link_main link_to( t(:contacts), contacts_path) end @@ -125,9 +125,9 @@ module ApplicationHelper if @alternator.nil? @alternator = 1 end - + @alternator = -@alternator - + if @alternator == -1 return "even" else diff --git a/public/stylesheets/.gitkeep b/app/views/contents_moved_to_original_theme_directory old mode 100755 new mode 100644 similarity index 100% rename from public/stylesheets/.gitkeep rename to app/views/contents_moved_to_original_theme_directory diff --git a/config.ru b/config.ru index 8476511..de888a9 100755 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run Rails3::Application +run Mailr::Application diff --git a/config/application.rb b/config/application.rb index 6e5c572..16387c7 100755 --- a/config/application.rb +++ b/config/application.rb @@ -6,7 +6,7 @@ require 'rails/all' # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) -module Rails3 +module Mailr class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/default_site.rb b/config/default_site.rb index 6ab509c..c76969d 100755 --- a/config/default_site.rb +++ b/config/default_site.rb @@ -3,7 +3,7 @@ # some of them - create file config/site.rb # containing new constants in LOCALCONFIG module variable - they # will overwrite default values. Example site.rb: -# +# # module CDF # LOCALCONFIG = { # :mysql_version => '4.1', @@ -42,10 +42,11 @@ module CDF :encryption_salt => 'EnCr1p10n$@lt', :encryption_password => '$0MeEncr1pt10nP@a$sw0rd', :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! - :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 + :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, + :default_theme => 'original' } end diff --git a/config/environment.rb b/config/environment.rb index 4317a43..0d0a345 100755 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,4 +2,4 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application -Rails3::Application.initialize! +Mailr::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 787a9e7..d598c9d 100755 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -Rails3::Application.configure do +Mailr::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on diff --git a/config/environments/production.rb b/config/environments/production.rb index baa574b..41aeea9 100755 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,4 @@ -Rails3::Application.configure do +Mailr::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The production environment is meant for finished, "live" apps. diff --git a/config/environments/test.rb b/config/environments/test.rb index 8065328..1dafbaa 100755 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -Rails3::Application.configure do +Mailr::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 4beb550..d168e04 100755 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Rails3::Application.config.secret_token = 'ade84d567b0c637fd3547fd18b97d1677fd6ca3c5331e6ed1a1b13bb6a7823cc367cbe317caf102f29f8c35eb487ff3ca33e6321d037c14ebb055eb530841ff6' +Mailr::Application.config.secret_token = 'ade84d567b0c637fd3547fd18b97d1677fd6ca3c5331e6ed1a1b13bb6a7823cc367cbe317caf102f29f8c35eb487ff3ca33e6321d037c14ebb055eb530841ff6' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index a3c4157..b5dbc5b 100755 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,6 +1,6 @@ # 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, # which shouldn't be used to store highly confidential information diff --git a/config/routes.rb b/config/routes.rb index 289e679..80ae421 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,6 @@ -Rails3::Application.routes.draw do +Mailr::Application.routes.draw do + themes_for_rails + resources :folders resources :contacts do collection do diff --git a/public/javascripts/.gitkeep b/public/javascripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/javascripts/application.js b/public/javascripts/application.js old mode 100755 new mode 100644 diff --git a/public/javascripts/controls.js b/public/javascripts/controls.js old mode 100755 new mode 100644 diff --git a/public/javascripts/dragdrop.js b/public/javascripts/dragdrop.js old mode 100755 new mode 100644 diff --git a/public/javascripts/effects.js b/public/javascripts/effects.js old mode 100755 new mode 100644 diff --git a/public/javascripts/global.js b/public/javascripts/global.js deleted file mode 100755 index a1367b9..0000000 --- a/public/javascripts/global.js +++ /dev/null @@ -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=12){adds=' PM';h=system_date.getHours()-12;}else{adds=' 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;}} \ No newline at end of file diff --git a/public/javascripts/prototype.js b/public/javascripts/prototype.js old mode 100755 new mode 100644 diff --git a/public/javascripts/rails.js b/public/javascripts/rails.js old mode 100755 new mode 100644 diff --git a/themes/empty/images/.gitkeep b/themes/empty/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/empty/javascripts/.gitkeep b/themes/empty/javascripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/empty/stylesheets/.gitkeep b/themes/empty/stylesheets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/empty/views/layouts/.gitkeep b/themes/empty/views/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/views/layouts/chooser.html.erb b/themes/empty/views/layouts/chooser.html.erb similarity index 100% rename from app/views/layouts/chooser.html.erb rename to themes/empty/views/layouts/chooser.html.erb diff --git a/app/views/layouts/login.html.erb b/themes/empty/views/layouts/login.html.erb similarity index 100% rename from app/views/layouts/login.html.erb rename to themes/empty/views/layouts/login.html.erb diff --git a/app/views/layouts/public.html.erb b/themes/empty/views/layouts/xapplication.html.erb similarity index 100% rename from app/views/layouts/public.html.erb rename to themes/empty/views/layouts/xapplication.html.erb diff --git a/themes/original/images/.gitkeep b/themes/original/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/images/attachment.png b/themes/original/images/attachment.png similarity index 100% rename from public/images/attachment.png rename to themes/original/images/attachment.png diff --git a/public/images/d6deec.gif b/themes/original/images/d6deec.gif similarity index 100% rename from public/images/d6deec.gif rename to themes/original/images/d6deec.gif diff --git a/public/images/deselect.png b/themes/original/images/deselect.png similarity index 100% rename from public/images/deselect.png rename to themes/original/images/deselect.png diff --git a/public/images/list_closed.gif b/themes/original/images/list_closed.gif similarity index 100% rename from public/images/list_closed.gif rename to themes/original/images/list_closed.gif diff --git a/public/images/list_opened.gif b/themes/original/images/list_opened.gif similarity index 100% rename from public/images/list_opened.gif rename to themes/original/images/list_opened.gif diff --git a/themes/original/images/logo.png b/themes/original/images/logo.png new file mode 100644 index 0000000..cb82345 Binary files /dev/null and b/themes/original/images/logo.png differ diff --git a/public/images/noprogress.gif b/themes/original/images/noprogress.gif similarity index 100% rename from public/images/noprogress.gif rename to themes/original/images/noprogress.gif diff --git a/public/images/rails.png b/themes/original/images/rails.png similarity index 100% rename from public/images/rails.png rename to themes/original/images/rails.png diff --git a/public/images/select.png b/themes/original/images/select.png similarity index 100% rename from public/images/select.png rename to themes/original/images/select.png diff --git a/public/images/white.gif b/themes/original/images/white.gif similarity index 100% rename from public/images/white.gif rename to themes/original/images/white.gif diff --git a/public/images/white.png b/themes/original/images/white.png similarity index 100% rename from public/images/white.png rename to themes/original/images/white.png diff --git a/themes/original/javascripts/.gitkeep b/themes/original/javascripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/javascripts/contact_choose.js b/themes/original/javascripts/contact_choose.js similarity index 100% rename from public/javascripts/contact_choose.js rename to themes/original/javascripts/contact_choose.js diff --git a/public/javascripts/effects2.js b/themes/original/javascripts/effects2.js similarity index 100% rename from public/javascripts/effects2.js rename to themes/original/javascripts/effects2.js diff --git a/themes/original/javascripts/global.js b/themes/original/javascripts/global.js new file mode 100755 index 0000000..1176552 --- /dev/null +++ b/themes/original/javascripts/global.js @@ -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 = ' PM'; + h = system_date.getHours() - 12; + } else { + adds = ' 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; + } +} diff --git a/public/javascripts/global_src.js b/themes/original/javascripts/global_src.js similarity index 92% rename from public/javascripts/global_src.js rename to themes/original/javascripts/global_src.js index 94e387a..76b3fb7 100755 --- a/public/javascripts/global_src.js +++ b/themes/original/javascripts/global_src.js @@ -1,19 +1,19 @@ function changeLoc(loc) { window.location = loc } function getCookie(name) { - var prefix = 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) { +function setCookie(name, value, expiration) { document.cookie = name+"="+value+"; expires="+expiration; } function toggleCheckbox(checkBox) { @@ -43,11 +43,11 @@ function toggle_list(id){ if (ulElement){ if (ulElement.className == 'closed'){ ulElement.className = "open"; - imgElement.src = "/images/list_opened.gif"; + imgElement.src = "/themes/original/images/list_opened.gif"; hiddenElement.value = "1" }else{ ulElement.className = "closed"; - imgElement.src = "/images/list_closed.gif"; + imgElement.src = "/themes/original/images/list_closed.gif"; hiddenElement.value = "0" } } @@ -58,11 +58,11 @@ function toggle_layer(id) { if (lElement){ if (lElement.className == 'closed'){ lElement.className = "open"; - imgElement.src = "/images/list_opened.gif"; + imgElement.src = "/themes/original/images/list_opened.gif"; return true; }else{ lElement.className = "closed"; - imgElement.src = "/images/list_closed.gif"; + imgElement.src = "/themes/original/images/list_closed.gif"; return false; } } @@ -86,9 +86,9 @@ function toggle_text(id){ elem = eval( "document.all." + id ); else return false; - + if(!elem) return true; - + elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" @@ -107,7 +107,7 @@ 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); } @@ -133,7 +133,7 @@ function replaceHRFST(ifrm) { for (var i=0; i= 12) { adds = ' PM'; h = system_date.getHours() - 12; } + if (system_date.getHours() >= 12) { adds = ' PM'; h = system_date.getHours() - 12; } else { adds = ' 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) { @@ -198,4 +198,4 @@ function open_link(target, location){ } else { window.top.location = location; } -} \ No newline at end of file +} diff --git a/public/javascripts/htmlstyle.js b/themes/original/javascripts/htmlstyle.js similarity index 100% rename from public/javascripts/htmlstyle.js rename to themes/original/javascripts/htmlstyle.js diff --git a/public/javascripts/jstrim.pl b/themes/original/javascripts/jstrim.pl similarity index 100% rename from public/javascripts/jstrim.pl rename to themes/original/javascripts/jstrim.pl diff --git a/public/javascripts/prototype_src.js b/themes/original/javascripts/prototype_src.js similarity index 100% rename from public/javascripts/prototype_src.js rename to themes/original/javascripts/prototype_src.js diff --git a/public/javascripts/scriptaculous.js b/themes/original/javascripts/scriptaculous.js similarity index 100% rename from public/javascripts/scriptaculous.js rename to themes/original/javascripts/scriptaculous.js diff --git a/public/javascripts/slider.js b/themes/original/javascripts/slider.js similarity index 100% rename from public/javascripts/slider.js rename to themes/original/javascripts/slider.js diff --git a/public/javascripts/webmail.js b/themes/original/javascripts/webmail.js similarity index 100% rename from public/javascripts/webmail.js rename to themes/original/javascripts/webmail.js diff --git a/themes/original/stylesheets/.gitkeep b/themes/original/stylesheets/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/public/stylesheets/admin.css b/themes/original/stylesheets/admin.css similarity index 73% rename from public/stylesheets/admin.css rename to themes/original/stylesheets/admin.css index 5d426b8..789496a 100755 --- a/public/stylesheets/admin.css +++ b/themes/original/stylesheets/admin.css @@ -28,11 +28,11 @@ a { text-decoration: none; background-color: transparent; } - + a:hover { color: #444; } - + a:active { color: #000; background-color: transparent; @@ -45,7 +45,7 @@ a { margin: 1em auto; text-align: left; background-color: #fff; - color: #858585; + color: #858585; } @@ -68,7 +68,7 @@ a { height: 240px; margin: 15px 30px; padding: 0; - border: 0; + border: 0; } #advert img { @@ -158,7 +158,7 @@ table.list th { font-size: 12px; font-weight: bold; color: #e70; - text-align: left; + text-align: left; 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.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 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.galedit {display: block; text-align: left; padding: 0 15px; margin: 0;} +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.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;} #iconmenu { @@ -213,7 +213,7 @@ div.gal ul li.galdel {display: block; text-align: left; padding: 0 15px; margin: color: gray; display: block; width: 110px; - margin: 0; + margin: 0; padding: 64px 0 0 0; background-position: center top; 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; } -#iconmenu li a:hover { +#iconmenu li a:hover { color: black; text-decoration: none; background-position: center top; - border: 1px dashed #DCDCDC; + border: 1px dashed #DCDCDC; } -#mmhomepage, #mmhomepage a { background-image: url(/images/homepage.gif); } -#mmlogo, #mmlogo a { background-image: url(/images/logo.gif); } -#mmwebmail, #mmwebmail a { background-image: url(/images/webmail.gif); } -#mmcontacts, #mmcontacts a { background-image: url(/images/contacts.gif); } -#mmcontactgroups, #mmcontactgroups a { background-image: url(/images/contact_groups.gif); } -#mmcontactscales, #mmcontactscales a { background-image: url(/images/contact_scales.gif); } -#mmarticletypes, #mmarticletypes a { background-image: url(/images/article_types.gif); } -#mmarticles, #mmarticles a { background-image: url(/images/articles.gif); } -#mmgallery, #mmgallery a { background-image: url(/images/image.gif); } -#mmcategories, #mmcategories a { background-image: url(/images/categories.gif); } -#mmregion, #mmregion a { background-image: url(/images/region.gif); } -#mmlogout, #mmlogout a { background-image: url(/images/logout.gif); } -#mmwizard, #mmwizard a { background-image: url(/images/wizard_mirr.gif); } -#mmpages, #mmpages a { background-image: url(/images/pages.gif); } -#mmmenueditor, #mmmenueditor a { background-image: url(/images/menueditor.gif); } -#mmforumcats, #mmforumcats a { background-image: url(/images/forum.gif); } -#mmforums, #mmforums a { background-image: url(/images/forum.gif); } -#mmchnagepassword, #mmchnagepassword a { background-image: url(/images/password.gif); } -#mmblog, #mmblog a { background-image: url(/images/blog.gif); } -#mmcar, #mmcar a { background-image: url(/images/car.gif); } -#mmpathstatpath, #mmpathstatpath a { background-image: url(/images/stats.gif); } -#mmnewsletters, #mmnewsletters a { background-image: url(/images/newsletters.gif); } -#mmadvert, #mmadvert a { background-image: url(/images/advert.gif); } -#mmforms, #mmforms a { background-image: url(/images/formbuilder.gif); } -#mmattachments, #mmattachments a { background-image: url(/images/attachment.gif); } -#mmphoto, #mmphoto a { background-image: url(/images/photo.gif); } -#mmtypo, #mmtypo a { background-image: url(/images/typo.gif); } +#mmhomepage, #mmhomepage a { background-image: url("/themes/original/images/homepage.gif"); } +#mmlogo, #mmlogo a { background-image: url("/themes/original/images/logo.gif"); } +#mmwebmail, #mmwebmail a { background-image: url("/themes/original/images/webmail.gif"); } +#mmcontacts, #mmcontacts a { background-image: url("/themes/original/images/contacts.gif"); } +#mmcontactgroups, #mmcontactgroups a { background-image: url("/themes/original/images/contact_groups.gif"); } +#mmcontactscales, #mmcontactscales a { background-image: url("/themes/original/images/contact_scales.gif"); } +#mmarticletypes, #mmarticletypes a { background-image: url("/themes/original/images/article_types.gif"); } +#mmarticles, #mmarticles a { background-image: url("/themes/original/images/articles.gif"); } +#mmgallery, #mmgallery a { background-image: url("/themes/original/images/image.gif"); } +#mmcategories, #mmcategories a { background-image: url("/themes/original/images/categories.gif"); } +#mmregion, #mmregion a { background-image: url("/themes/original/images/region.gif"); } +#mmlogout, #mmlogout a { background-image: url("/themes/original/images/logout.gif"); } +#mmwizard, #mmwizard a { background-image: url("/themes/original/images/wizard_mirr.gif"); } +#mmpages, #mmpages a { background-image: url("/themes/original/images/pages.gif"); } +#mmmenueditor, #mmmenueditor a { background-image: url("/themes/original/images/menueditor.gif"); } +#mmforumcats, #mmforumcats a { background-image: url("/themes/original/images/forum.gif"); } +#mmforums, #mmforums a { background-image: url("/themes/original/images/forum.gif"); } +#mmchnagepassword, #mmchnagepassword a { background-image: url("/themes/original/images/password.gif"); } +#mmblog, #mmblog a { background-image: url("/themes/original/images/blog.gif"); } +#mmcar, #mmcar a { background-image: url("/themes/original/images/car.gif"); } +#mmpathstatpath, #mmpathstatpath a { background-image: url("/themes/original/images/stats.gif"); } +#mmnewsletters, #mmnewsletters a { background-image: url("/themes/original/images/newsletters.gif"); } +#mmadvert, #mmadvert a { background-image: url("/themes/original/images/advert.gif"); } +#mmforms, #mmforms a { background-image: url("/themes/original/images/formbuilder.gif"); } +#mmattachments, #mmattachments a { background-image: url("/themes/original/images/attachment.gif"); } +#mmphoto, #mmphoto a { background-image: url("/themes/original/images/photo.gif"); } +#mmtypo, #mmtypo a { background-image: url("/themes/original/images/typo.gif"); } /* Wizard */ @@ -390,20 +390,20 @@ td.htmlarea { border: 1px solid; } -#suggest { - padding: 10px; - margin: 10px; +#suggest { + padding: 10px; + margin: 10px; border: 1px dotted; width: 362px; - voice-family: "\"}\""; - voice-family: inherit; + voice-family: "\"}\""; + voice-family: inherit; width: 383px; } -#suggest p { - padding: 0; - margin-left: 0; - margin-top:0; +#suggest p { + padding: 0; + margin-left: 0; + margin-top:0; font-size: 10px; } @@ -466,22 +466,22 @@ li.error { color: red; } .cpointer { cursor: pointer; cursor: hand; } -.partactive { - padding-top: 10px; - width: 150px; - height: 25px; +.partactive { + padding-top: 10px; + width: 150px; + height: 25px; text-align: center; - background-color: rgb(220,220,220); - border: #555 solid 0.5px; + background-color: rgb(220,220,220); + border: #555 solid 0.5px; } -.partsel { - padding-top: 10px; - width: 150px; +.partsel { + padding-top: 10px; + width: 150px; height: 25px; - text-align: center; - background-color: rgb(190,190,190); - border: #555 solid 0.5px; + text-align: center; + background-color: rgb(190,190,190); + border: #555 solid 0.5px; } 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 label { font-size: 10px; color: #00F } +.part-editor label { font-size: 10px; color: #00F } div#parts { width: 150px; @@ -513,11 +513,11 @@ div#compose-choose { } div#compose-radios { - padding-top: 10px; - width: 150px; + padding-top: 10px; + width: 150px; height: 25px; - float: left; - background-color: rgb(220,220,220); + float: left; + background-color: rgb(220,220,220); } 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 h4 { 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 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 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 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; } @@ -551,4 +551,4 @@ div.lm-subitems { margin: 5px; } .comboarrow {} .combodivshow {position:absolute; display: inline;z-index:10000 } .combodiv { position:abcoslute; display:none; z-index:10000 } -.combosel { width: 220px; border-style: none; } \ No newline at end of file +.combosel { width: 220px; border-style: none; } diff --git a/public/stylesheets/mailr.css b/themes/original/stylesheets/mailr.css similarity index 84% rename from public/stylesheets/mailr.css rename to themes/original/stylesheets/mailr.css index e659984..8657423 100755 --- a/public/stylesheets/mailr.css +++ b/themes/original/stylesheets/mailr.css @@ -3,7 +3,7 @@ .closed { display: none; } #logo { - background-image: url("/images/logo.png"); + background-image: url("/themes/original/images/logo.png"); background-repeat: no-repeat; height: 125px; } @@ -46,7 +46,7 @@ table.form_layout td.form_actions { text-align: right; } /* Rounded Box Corners ---------------------------------------------------------------------- */ .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.tr {top: -1px; right: -1px; background-position: top right;} 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 */ * html b.bl {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%; } diff --git a/public/stylesheets/tabs.css b/themes/original/stylesheets/tabs.css similarity index 89% rename from public/stylesheets/tabs.css rename to themes/original/stylesheets/tabs.css index 3f9219e..5396fed 100755 --- a/public/stylesheets/tabs.css +++ b/themes/original/stylesheets/tabs.css @@ -2,7 +2,7 @@ background: #789A9F; padding-top: 1.8em; width: 98%; - background-image: url(../images/select.png); + background-image: url("/themes/original/images/select.png"); } #tab_content { @@ -49,7 +49,7 @@ border: 1px solid #666; border-bottom: none; background: #789A9F; - background-image: url(../images/select.png); + background-image: url("/themes/original/images/select.png"); padding-bottom: 4px; margin-top: 0; color: #000; @@ -59,7 +59,7 @@ background: #EDF4F5; border: 1px solid #AAA; border-bottom: none; - background-image: url(../images/deselect.png); + background-image: url("/themes/original/images/deselect.png"); } #header ul#primary a:hover { @@ -108,4 +108,4 @@ background: transparent; } -#header ul#secondary li:last-child a { border: none; } \ No newline at end of file +#header ul#secondary li:last-child a { border: none; } diff --git a/public/stylesheets/webmail/icon-folder-open.gif b/themes/original/stylesheets/webmail/icon-folder-open.gif similarity index 100% rename from public/stylesheets/webmail/icon-folder-open.gif rename to themes/original/stylesheets/webmail/icon-folder-open.gif diff --git a/public/stylesheets/webmail/webmail.css b/themes/original/stylesheets/webmail/webmail.css similarity index 100% rename from public/stylesheets/webmail/webmail.css rename to themes/original/stylesheets/webmail/webmail.css diff --git a/app/views/contact_groups/edit.html.erb b/themes/original/views/contact_groups/edit.html.erb similarity index 100% rename from app/views/contact_groups/edit.html.erb rename to themes/original/views/contact_groups/edit.html.erb diff --git a/app/views/contact_groups/index.html.erb b/themes/original/views/contact_groups/index.html.erb similarity index 100% rename from app/views/contact_groups/index.html.erb rename to themes/original/views/contact_groups/index.html.erb diff --git a/app/views/contacts/add_multiple.html.erb b/themes/original/views/contacts/add_multiple.html.erb similarity index 100% rename from app/views/contacts/add_multiple.html.erb rename to themes/original/views/contacts/add_multiple.html.erb diff --git a/app/views/contacts/choose.html.erb b/themes/original/views/contacts/choose.html.erb similarity index 100% rename from app/views/contacts/choose.html.erb rename to themes/original/views/contacts/choose.html.erb diff --git a/app/views/contacts/import_preview.html.erb b/themes/original/views/contacts/import_preview.html.erb similarity index 100% rename from app/views/contacts/import_preview.html.erb rename to themes/original/views/contacts/import_preview.html.erb diff --git a/app/views/contacts/index.html.erb b/themes/original/views/contacts/index.html.erb similarity index 100% rename from app/views/contacts/index.html.erb rename to themes/original/views/contacts/index.html.erb diff --git a/app/views/contacts/new.html.erb b/themes/original/views/contacts/new.html.erb similarity index 100% rename from app/views/contacts/new.html.erb rename to themes/original/views/contacts/new.html.erb diff --git a/app/views/folders/index.html.erb b/themes/original/views/folders/index.html.erb similarity index 100% rename from app/views/folders/index.html.erb rename to themes/original/views/folders/index.html.erb diff --git a/themes/original/views/layouts/.gitkeep b/themes/original/views/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/original/views/layouts/chooser.html.erb b/themes/original/views/layouts/chooser.html.erb new file mode 100755 index 0000000..7c3b872 --- /dev/null +++ b/themes/original/views/layouts/chooser.html.erb @@ -0,0 +1,19 @@ + + + + <%=@title%> + + + <%=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') %> + + + + <%= @content_for_layout %> + + + + diff --git a/themes/original/views/layouts/login.html.erb b/themes/original/views/layouts/login.html.erb new file mode 100755 index 0000000..ef95149 --- /dev/null +++ b/themes/original/views/layouts/login.html.erb @@ -0,0 +1,15 @@ + + + + <%=t(:mailr) %> » <%= t(:please_login)%> + + <%=stylesheet_link_tag current_theme_stylesheet_path('admin') %> + <%=stylesheet_link_tag current_theme_stylesheet_path('mailr') %> + + + + <%= yield %> + + diff --git a/themes/original/views/layouts/public.html.erb b/themes/original/views/layouts/public.html.erb new file mode 100755 index 0000000..2eced03 --- /dev/null +++ b/themes/original/views/layouts/public.html.erb @@ -0,0 +1,31 @@ + + + + <%= t :mailr %> + + + <%=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 %> + + + +
+
+ +
<%= yield %>
+
+
+
+ + diff --git a/app/views/login/index.rhtml b/themes/original/views/login/index.rhtml similarity index 100% rename from app/views/login/index.rhtml rename to themes/original/views/login/index.rhtml diff --git a/app/views/shared/_folders.html.erb b/themes/original/views/shared/_folders.html.erb similarity index 100% rename from app/views/shared/_folders.html.erb rename to themes/original/views/shared/_folders.html.erb diff --git a/app/views/webmail/_contacts.html.erb b/themes/original/views/webmail/_contacts.html.erb similarity index 100% rename from app/views/webmail/_contacts.html.erb rename to themes/original/views/webmail/_contacts.html.erb diff --git a/app/views/webmail/_expr.html.erb b/themes/original/views/webmail/_expr.html.erb similarity index 100% rename from app/views/webmail/_expr.html.erb rename to themes/original/views/webmail/_expr.html.erb diff --git a/app/views/webmail/_filter.html.erb b/themes/original/views/webmail/_filter.html.erb similarity index 100% rename from app/views/webmail/_filter.html.erb rename to themes/original/views/webmail/_filter.html.erb diff --git a/app/views/webmail/_message_row.html.erb b/themes/original/views/webmail/_message_row.html.erb similarity index 90% rename from app/views/webmail/_message_row.html.erb rename to themes/original/views/webmail/_message_row.html.erb index e5f003c..9509d13 100755 --- a/app/views/webmail/_message_row.html.erb +++ b/themes/original/views/webmail/_message_row.html.erb @@ -10,5 +10,5 @@ <%= message_date(message_row.date) %> <%= message_size(message_row.size) %> - <%= message_row.content_type == 'multipart' ? image_tag('attachment.png') : ' ' %> + <%= message_row.content_type == 'multipart' ? image_tag(current_theme_image_path('attachment.png')) : ' ' %> diff --git a/app/views/webmail/_search.html.erb b/themes/original/views/webmail/_search.html.erb similarity index 73% rename from app/views/webmail/_search.html.erb rename to themes/original/views/webmail/_search.html.erb index 851964a..e967c1d 100755 --- a/app/views/webmail/_search.html.erb +++ b/themes/original/views/webmail/_search.html.erb @@ -1,7 +1,7 @@ - <%= t :search%>open + <%= t :search%>open - diff --git a/app/views/webmail/compose.html.erb b/themes/original/views/webmail/compose.html.erb similarity index 100% rename from app/views/webmail/compose.html.erb rename to themes/original/views/webmail/compose.html.erb diff --git a/app/views/webmail/error_connection.html.erb b/themes/original/views/webmail/error_connection.html.erb similarity index 100% rename from app/views/webmail/error_connection.html.erb rename to themes/original/views/webmail/error_connection.html.erb diff --git a/app/views/webmail/filter.html.erb b/themes/original/views/webmail/filter.html.erb similarity index 100% rename from app/views/webmail/filter.html.erb rename to themes/original/views/webmail/filter.html.erb diff --git a/app/views/webmail/filters.html.erb b/themes/original/views/webmail/filters.html.erb similarity index 100% rename from app/views/webmail/filters.html.erb rename to themes/original/views/webmail/filters.html.erb diff --git a/app/views/webmail/folders.html.erb b/themes/original/views/webmail/folders.html.erb similarity index 100% rename from app/views/webmail/folders.html.erb rename to themes/original/views/webmail/folders.html.erb diff --git a/app/views/webmail/mailsent.html.erb b/themes/original/views/webmail/mailsent.html.erb similarity index 100% rename from app/views/webmail/mailsent.html.erb rename to themes/original/views/webmail/mailsent.html.erb diff --git a/app/views/webmail/message.html.erb b/themes/original/views/webmail/message.html.erb similarity index 100% rename from app/views/webmail/message.html.erb rename to themes/original/views/webmail/message.html.erb diff --git a/app/views/webmail/messages.html.erb b/themes/original/views/webmail/messages.html.erb similarity index 96% rename from app/views/webmail/messages.html.erb rename to themes/original/views/webmail/messages.html.erb index b4b0314..b1652e5 100755 --- a/app/views/webmail/messages.html.erb +++ b/themes/original/views/webmail/messages.html.erb @@ -27,7 +27,7 @@ - <%=t :operations%>open + <%=t :operations%>open
diff --git a/app/views/webmail/noattachment.html.erb b/themes/original/views/webmail/noattachment.html.erb similarity index 100% rename from app/views/webmail/noattachment.html.erb rename to themes/original/views/webmail/noattachment.html.erb diff --git a/app/views/webmail/prefs.html.erb b/themes/original/views/webmail/prefs.html.erb similarity index 100% rename from app/views/webmail/prefs.html.erb rename to themes/original/views/webmail/prefs.html.erb diff --git a/app/views/webmail/view_source.html.erb b/themes/original/views/webmail/view_source.html.erb similarity index 100% rename from app/views/webmail/view_source.html.erb rename to themes/original/views/webmail/view_source.html.erb