diff --git a/arts/logo3.xcf b/arts/logo3.xcf index 5310356..a941cac 100644 Binary files a/arts/logo3.xcf and b/arts/logo3.xcf differ diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 9cf4ef9..857b72d 100755 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -3,7 +3,7 @@ pl: email: E-mail password: Hasło log_in: Zaloguj - wrong_email_or_password: Podano nieprawidłowy login lub hasło. + wrong_email_or_password: Podano nieprawidłowy login lub hasło mailbox: Poczta folders: Foldery folder: Folder @@ -64,9 +64,9 @@ pl: add_folder: Dodaj folder total_messages: Total messages unseen: Unseen - add_edit_folder: Zarządzanie folderami + add_edit_folder: Zarządzaj user_logged_out: Użytkownik został wylogowany please_login: Logowanie add_to_contacts: Dodaj do kontaktów want_to_empty_trash_message: Czy chcesz opróznic kosz? - + site_link: https://github.com/lmanolov/mailr diff --git a/themes/empty/views/layouts/login.html.erb b/themes/empty/views/layouts/login.html.erb deleted file mode 100755 index d55723e..0000000 --- a/themes/empty/views/layouts/login.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - <%=t(:mailr) %> » <%= t(:please_login)%> - <%=stylesheet_link_tag "admin", "mailr" %> - - - <%= yield %> - - diff --git a/themes/empty/views/layouts/xapplication.html.erb b/themes/empty/views/layouts/xapplication.html.erb deleted file mode 100755 index 9aa6bbe..0000000 --- a/themes/empty/views/layouts/xapplication.html.erb +++ /dev/null @@ -1,27 +0,0 @@ - - - - <%= t :mailr %> - - <% @additional_css ||= [] %> - <% @additional_js ||= [] %> - <%=stylesheet_link_tag "admin", "tabs", "mailr", @additional_css %> - <%=javascript_include_tag :defaults, "global", "webmail", @additional_js %> - <%#=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%> - - -
-
- -
<%= yield %>
-
-
-
- - diff --git a/themes/olive/README.olive b/themes/olive/README.olive new file mode 100644 index 0000000..bf812cf --- /dev/null +++ b/themes/olive/README.olive @@ -0,0 +1,3 @@ +Theme based on Web App Theme Olive theme. + +http://pilu.github.com/web-app-theme/#themes/olive diff --git a/themes/empty/images/.gitkeep b/themes/olive/images/.gitkeep similarity index 100% rename from themes/empty/images/.gitkeep rename to themes/olive/images/.gitkeep diff --git a/themes/olive/images/key.png b/themes/olive/images/key.png new file mode 100644 index 0000000..4ec1a92 Binary files /dev/null and b/themes/olive/images/key.png differ diff --git a/themes/olive/images/logo_small.png b/themes/olive/images/logo_small.png new file mode 100644 index 0000000..3263e4c Binary files /dev/null and b/themes/olive/images/logo_small.png differ diff --git a/themes/empty/javascripts/.gitkeep b/themes/olive/javascripts/.gitkeep similarity index 100% rename from themes/empty/javascripts/.gitkeep rename to themes/olive/javascripts/.gitkeep diff --git a/themes/olive/javascripts/contact_choose.js b/themes/olive/javascripts/contact_choose.js new file mode 100755 index 0000000..fc27f07 --- /dev/null +++ b/themes/olive/javascripts/contact_choose.js @@ -0,0 +1,52 @@ + +var fieldTo = "" +var fieldToc = "" +var fieldCC = "" +var fieldBCC = "" + +function respondTo(str) { + if (fieldTo == "") fieldTo += str + else fieldTo += "," + str +} + +function respondTo(str, contactId) { + if (fieldTo == "") fieldTo += str + else fieldTo += "," + str + + if (fieldToc == "") fieldToc += contactId + else fieldToc += "," + contactId +} + +function respondCC(str) { + if (fieldCC == "") fieldCC += str + else fieldCC += "," + str +} + +function respondBCC(str) { + if (fieldBCC == "") fieldBCC += str + else fieldBCC += "," + str +} + +function respondToCaller() { + if (window.opener) { + doc = window.opener.document; + setAddrField(getFormFieldPoint(doc, 'mail_to'), fieldTo); + setAddrField(getFormFieldPoint(doc, 'mail_toc'), fieldToc); + setAddrField(getFormFieldPoint(doc, 'mail_cc'), fieldCC); + setAddrField(getFormFieldPoint(doc, 'mail_bcc'), fieldBCC); + window.close(); + } +} + +function getFormFieldPoint(doc, id) { + if ( doc.getElementById ) elem = doc.getElementById( id ); + else if ( doc.all ) elem = doc.eval( "document.all." + id ); + return elem +} + +function setAddrField(fld, value) { + if (value != "") { + if (fld.value == "") fld.value = value; + else fld.value += "," + value; + } +} \ No newline at end of file diff --git a/themes/olive/javascripts/effects2.js b/themes/olive/javascripts/effects2.js new file mode 100755 index 0000000..6b73620 --- /dev/null +++ b/themes/olive/javascripts/effects2.js @@ -0,0 +1,349 @@ +// Copyright (c) 2005 Thomas Fuchs (http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + Effect2 = {} + + /* ------------- transitions ------------- */ + + Effect2.Transitions = {} + Effect2.Transitions.linear = function(pos) { + return pos; + } + Effect2.Transitions.sinoidal = function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; + } + Effect2.Transitions.reverse = function(pos) { + return 1-pos; + } + Effect2.Transitions.flicker = function(pos) { + return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random(0.25); + } + Effect2.Transitions.wobble = function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; + } + + /* ------------- core effects ------------- */ + + Effect2.Base = function() {}; + Effect2.Base.prototype = { + setOptions: function(options) { + this.options = { + transition: Effect2.Transitions.sinoidal, + duration: 1.0, // seconds + fps: 25.0, // max. 100fps + sync: false, // true for combining + from: 0.0, + to: 1.0 + }.extend(options || {}); + }, + start: function(options) { + this.setOptions(options || {}); + this.currentFrame = 0; + this.startOn = new Date().getTime(); + this.finishOn = this.startOn + (this.options.duration*1000); + if(this.options.beforeStart) this.options.beforeStart(this); + if(!this.options.sync) this.loop(); + }, + loop: function() { + timePos = new Date().getTime(); + if(timePos >= this.finishOn) { + this.render(this.options.to); + if(this.finish) this.finish(); + if(this.options.afterFinish) this.options.afterFinish(this); + return; + } + pos = (timePos - this.startOn) / (this.finishOn - this.startOn); + frame = Math.round(pos * this.options.fps * this.options.duration); + if(frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + this.timeout = setTimeout(this.loop.bind(this), 10); + }, + render: function(pos) { + if(this.options.transition) pos = this.options.transition(pos); + pos = pos * (this.options.to-this.options.from); + pos += this.options.from; + if(this.options.beforeUpdate) this.options.beforeUpdate(this); + if(this.update) this.update(pos); + if(this.options.afterUpdate) this.options.afterUpdate(this); + }, + cancel: function() { + if(this.timeout) clearTimeout(this.timeout); + } + } + + Effect2.Parallel = Class.create(); + Effect2.Parallel.prototype = (new Effect2.Base()).extend({ + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + for (var i = 0; i < this.effects.length; i++) + this.effects[i].render(position); + }, + finish: function(position) { + for (var i = 0; i < this.effects.length; i++) + if(this.effects[i].finish) this.effects[i].finish(position); + } + }); + + Effect2.Opacity = Class.create(); + Effect2.Opacity.prototype = (new Effect2.Base()).extend({ + initialize: function() { + this.element = $(arguments[0] || document.rootElement); + options = { + from: 0.0, + to: 1.0 + }.extend(arguments[1] || {}); + this.start(options); + }, + update: function(position) { + this.setOpacity(position); + }, + setOpacity: function(opacity) { + opacity = (opacity == 1) ? 0.99999 : opacity; + this.element.style.opacity = opacity; + this.element.style.filter = "alpha(opacity:"+opacity*100+")"; + } + }); + + Effect2.MoveBy = Class.create(); + Effect2.MoveBy.prototype = (new Effect2.Base()).extend({ + initialize: function(element, toTop, toLeft) { + this.element = $(element); + this.originalTop = + this.element.style.top ? parseFloat(this.element.style.top) : 0; + this.originalLeft = + this.element.style.left ? parseFloat(this.element.style.left) : 0; + this.toTop = toTop; + this.toLeft = toLeft; + if(this.element.style.position == "") + this.element.style.position = "relative"; + this.start(arguments[3]); + }, + update: function(position) { + topd = this.toTop * position + this.originalTop; + leftd = this.toLeft * position + this.originalLeft; + this.setPosition(topd, leftd); + }, + setPosition: function(topd, leftd) { + this.element.style.top = topd + "px"; + this.element.style.left = leftd + "px"; + } + }); + + Effect2.Scale = Class.create(); + Effect2.Scale.prototype = (new Effect2.Base()).extend({ + initialize: function(element, percent) { + this.element = $(element) + options = { + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' + scaleFrom: 100.0 + }.extend(arguments[2] || {}); + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + if (this.element.style.fontSize=="") this.sizeEm = 1.0; + if (this.element.style.fontSize && this.element.style.fontSize.indexOf("em")>0) + this.sizeEm = parseFloat(this.element.style.fontSize); + this.factor = (percent/100.0) - (options.scaleFrom/100.0); + if(options.scaleMode=='box') { + this.originalHeight = this.element.clientHeight; + this.originalWidth = this.element.clientWidth; + } else + if(options.scaleMode=='contents') { + this.originalHeight = this.element.scrollHeight; + this.originalWidth = this.element.scrollWidth; + } + this.start(options); + }, + + update: function(position) { + currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if(this.options.scaleContent && this.sizeEm) + this.element.style.fontSize = this.sizeEm*currentScale + "em"; + this.setDimensions( + this.originalWidth * currentScale, + this.originalHeight * currentScale); + }, + + setDimensions: function(width, height) { + if(this.options.scaleX) this.element.style.width = width + 'px'; + if(this.options.scaleY) this.element.style.height = height + 'px'; + if(this.options.scaleFromCenter) { + topd = (height - this.originalHeight)/2; + leftd = (width - this.originalWidth)/2; + if(this.element.style.position=='absolute') { + if(this.options.scaleY) this.element.style.top = this.originalTop-topd + "px"; + if(this.options.scaleX) this.element.style.left = this.originalLeft-leftd + "px"; + } else { + if(this.options.scaleY) this.element.style.top = -topd + "px"; + if(this.options.scaleX) this.element.style.left = -leftd + "px"; + } + } + } + }); + + /* ------------- prepackaged effects ------------- */ + + Effect2.Fade = function(element) { + options = { + from: 1.0, + to: 0.0, + afterFinish: function(effect) + { Element.hide(effect.element); + effect.setOpacity(1); } + }.extend(arguments[1] || {}); + new Effect2.Opacity(element,options); + } + +Effect2.Appear = function(element) { + options = { + from: 0.0, + to: 1.0, + beforeStart: function(effect) + { effect.setOpacity(0); + Element.show(effect.element); }, + afterUpdate: function(effect) + { Element.show(effect.element); } + }.extend(arguments[1] || {}); + new Effect2.Opacity(element,options); +} + + Effect2.Puff = function(element) { + new Effect2.Parallel( + [ new Effect2.Scale(element, 200, { sync: true, scaleFromCenter: true }), + new Effect2.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], + { duration: 1.0, + afterUpdate: function(effect) + { effect.effects[0].element.style.position = 'absolute'; }, + afterFinish: function(effect) + { Element.hide(effect.effects[0].element); } + } + ); + } + + Effect2.BlindUp = function(element) { + $(element).style.overflow = 'hidden'; + new Effect2.Scale(element, 0, + { scaleContent: false, + scaleX: false, + afterFinish: function(effect) + { Element.hide(effect.element) } + }.extend(arguments[1] || {}) + ); + } + + Effect2.BlindDown = function(element) { + $(element).style.height = '0px'; + $(element).style.overflow = 'hidden'; + Element.show(element); + new Effect2.Scale(element, 100, + { scaleContent: false, + scaleX: false, + scaleMode: 'contents', + scaleFrom: 0 + }.extend(arguments[1] || {}) + ); + } + + Effect2.SwitchOff = function(element) { + new Effect2.Appear(element, + { duration: 0.4, + transition: Effect2.Transitions.flicker, + afterFinish: function(effect) + { effect.element.style.overflow = 'hidden'; + new Effect2.Scale(effect.element, 1, + { duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, + afterUpdate: function(effect) { + if(effect.element.style.position=="") + effect.element.style.position = 'relative'; }, + afterFinish: function(effect) { Element.hide(effect.element); } + } ) + } + } ) + } + + Effect2.DropOut = function(element) { + new Effect2.Parallel( + [ new Effect2.MoveBy(element, 100, 0, { sync: true }), + new Effect2.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], + { duration: 0.5, + afterFinish: function(effect) + { Element.hide(effect.effects[0].element); } + }); + } + + Effect2.Shake = function(element) { + new Effect2.MoveBy(element, 0, 20, + { duration: 0.05, afterFinish: function(effect) { + new Effect2.MoveBy(effect.element, 0, -40, + { duration: 0.1, afterFinish: function(effect) { + new Effect2.MoveBy(effect.element, 0, 40, + { duration: 0.1, afterFinish: function(effect) { + new Effect2.MoveBy(effect.element, 0, -40, + { duration: 0.1, afterFinish: function(effect) { + new Effect2.MoveBy(effect.element, 0, 40, + { duration: 0.1, afterFinish: function(effect) { + new Effect2.MoveBy(effect.element, 0, -20, + { duration: 0.05, afterFinish: function(effect) { + }}) }}) }}) }}) }}) }}); + } + + Effect2.SlideDown = function(element) { + $(element).style.height = '0px'; + $(element).style.overflow = 'hidden'; + $(element).firstChild.style.position = 'relative'; + Element.show(element); + new Effect2.Scale(element, 100, + { scaleContent: false, + scaleX: false, + scaleMode: 'contents', + scaleFrom: 0, + afterUpdate: function(effect) + { effect.element.firstChild.style.bottom = + (effect.originalHeight - effect.element.clientHeight) + 'px'; } + }.extend(arguments[1] || {}) + ); + } + + Effect2.SlideUp = function(element) { + $(element).style.overflow = 'hidden'; + $(element).firstChild.style.position = 'relative'; + Element.show(element); + new Effect2.Scale(element, 0, + { scaleContent: false, + scaleX: false, + afterUpdate: function(effect) + { effect.element.firstChild.style.bottom = + (effect.originalHeight - effect.element.clientHeight) + 'px'; }, + afterFinish: function(effect) + { Element.hide(effect.element); } + }.extend(arguments[1] || {}) + ); + } \ No newline at end of file diff --git a/themes/olive/javascripts/global.js b/themes/olive/javascripts/global.js new file mode 100755 index 0000000..1176552 --- /dev/null +++ b/themes/olive/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/themes/olive/javascripts/global_src.js b/themes/olive/javascripts/global_src.js new file mode 100755 index 0000000..76b3fb7 --- /dev/null +++ b/themes/olive/javascripts/global_src.js @@ -0,0 +1,201 @@ +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) { + // For IE5.5 and IE6 + 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; + } +} diff --git a/themes/olive/javascripts/htmlstyle.js b/themes/olive/javascripts/htmlstyle.js new file mode 100755 index 0000000..ece3392 --- /dev/null +++ b/themes/olive/javascripts/htmlstyle.js @@ -0,0 +1,21 @@ +var config = new HTMLArea.Config(); // create a new configuration object + // having all the default values +config.width = '520px'; +config.pageStyle = + 'body { font-family: verdana,sans-serif; font-size: 12px } '; + +config.toolbar = [ +[ "fontname", "fontsize","formatblock","bold", "italic", "underline", "separator", "insertimage", "createlink"], +["justifyleft", "justifycenter", "justifyright", "justifyfull", "separator", "forecolor", "hilitecolor", "separator", "popupeditor", "htmlmode"] +]; +config.statusBar = false; + +var configView = new HTMLArea.Config(); // create a new configuration object + // having all the default values +configView.width = '670px'; +configView.pageStyle = + 'body { font-family: verdana,sans-serif; font-size: 12px } '; + +configView.toolbar = []; +configView.statusBar = false; +configView.readonly = true; \ No newline at end of file diff --git a/themes/olive/javascripts/jstrim.pl b/themes/olive/javascripts/jstrim.pl new file mode 100755 index 0000000..7829efc --- /dev/null +++ b/themes/olive/javascripts/jstrim.pl @@ -0,0 +1,76 @@ +#! /usr/bin/perl -w + +jsTrim("prototype_src.js", "prototype.js"); +jsTrim("global_src.js", "global.js"); +#jsTrim("jscripts/tiny_mce/themes/simple/editor_template_src.js", "jscripts/tiny_mce/themes/simple/editor_template.js"); +#jsTrim("jscripts/tiny_mce/themes/default/editor_template_src.js", "jscripts/tiny_mce/themes/default/editor_template.js"); +#jsTrim("jscripts/tiny_mce/themes/advanced/editor_template_src.js", "jscripts/tiny_mce/themes/advanced/editor_template.js"); +#jsTrim("jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js", "jscripts/tiny_mce/plugins/advhr/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js", "jscripts/tiny_mce/plugins/advimage/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js", "jscripts/tiny_mce/plugins/advlink/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js", "jscripts/tiny_mce/plugins/emotions/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/flash/editor_plugin_src.js", "jscripts/tiny_mce/plugins/flash/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js", "jscripts/tiny_mce/plugins/iespell/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js", "jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/preview/editor_plugin_src.js", "jscripts/tiny_mce/plugins/preview/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/print/editor_plugin_src.js", "jscripts/tiny_mce/plugins/print/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/save/editor_plugin_src.js", "jscripts/tiny_mce/plugins/save/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js", "jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js", "jscripts/tiny_mce/plugins/zoom/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/table/editor_plugin_src.js", "jscripts/tiny_mce/plugins/table/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js", "jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/paste/editor_plugin_src.js", "jscripts/tiny_mce/plugins/paste/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js", "jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js"); +#jsTrim("jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js", "jscripts/tiny_mce/plugins/directionality/editor_plugin.js"); + +sub jsTrim { + my $inFile = $_[0]; + my $outFile = $_[1]; + my $comment = ''; + my $content = ''; + + # Load input file + open(FILE, "<$inFile"); + undef $/; + $content = ; + close(FILE); + + if ($content =~ s#^\s*(/\*.*?\*/)##s or $content =~ s#^\s*(//.*?)\n\s*[^/]##s) { + $comment = "$1\n"; + } + + local $^W; + + # removing C/C++ - style comments: + $content =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs; + + # save string literals + my @strings = (); + $content =~ s/("(\\.|[^"\\])*"|'(\\.|[^'\\])*')/push(@strings, "$1");'__CMPRSTR_'.$#strings.'__';/egs; + + # remove C-style comments + $content =~ s#/\*.*?\*/##gs; + # remove C++-style comments + $content =~ s#//.*?\n##gs; + # removing leading/trailing whitespace: + #$content =~ s#(?:(?:^|\n)\s+|\s+(?:$|\n))##gs; + # removing newlines: + #$content =~ s#\r?\n##gs; + + # removing other whitespace (between operators, etc.) (regexp-s stolen from Mike Hall's JS Crunchinator) + $content =~ s/\s+/ /gs; # condensing whitespace + #$content =~ s/^\s(.*)/$1/gs; # condensing whitespace + #$content =~ s/(.*)\s$/$1/gs; # condensing whitespace + $content =~ s/\s([\x21\x25\x26\x28\x29\x2a\x2b\x2c\x2d\x2f\x3a\x3b\x3c\x3d\x3e\x3f\x5b\x5d\x5c\x7b\x7c\x7d\x7e])/$1/gs; + $content =~ s/([\x21\x25\x26\x28\x29\x2a\x2b\x2c\x2d\x2f\x3a\x3b\x3c\x3d\x3e\x3f\x5b\x5d\x5c\x7b\x7c\x7d\x7e])\s/$1/gs; + + # restore string literals + $content =~ s/__CMPRSTR_([0-9]+)__/$strings[$1]/egs; + + # Write to ouput file + open(FILE, ">$outFile"); + flock(FILE, 2); + seek(FILE, 0, 2); + print FILE $comment, $content; + close(FILE); +} diff --git a/themes/olive/javascripts/prototype_src.js b/themes/olive/javascripts/prototype_src.js new file mode 100755 index 0000000..87aa729 --- /dev/null +++ b/themes/olive/javascripts/prototype_src.js @@ -0,0 +1,521 @@ +var Prototype = { + Version: '1.2.1' +}; + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +}; + +var Abstract = new Object(); +Object.prototype.extend = function(object) { + for (property in object) { + this[property] = object[property]; + } + return this; +}; +Function.prototype.bind = function(object) { + var method = this; + return function() { + method.apply(object, arguments); + } +}; + +Function.prototype.bindAsEventListener = function(object) { + var method = this; + return function(event) { + method.call(object, event || window.event); + } +}; + +Number.prototype.toColorPart = function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; +}; + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +}; + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setTimeout(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + + this.registerCallback(); + } +}; +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +}; +if (!Array.prototype.push) { + Array.prototype.push = function() { + var startLength = this.length; + for (var i = 0; i < arguments.length; i++) + this[startLength + i] = arguments[i]; + return this.length; + }; +}; + +if (!Function.prototype.apply) { + // Based on code from http://www.youngpup.net/ + Function.prototype.apply = function(object, parameters) { + var parameterStrings = new Array(); + if (!object) object = window; + if (!parameters) parameters = new Array(); + + for (var i = 0; i < parameters.length; i++) + parameterStrings[i] = 'x[' + i + ']'; + + object.__apply__ = this; + var result = eval('obj.__apply__(' + + parameterStrings[i].join(', ') + ')'); + object.__apply__ = null; + + return result; + }; +}; + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')}, + function() {return new XMLHttpRequest()} + ) || false; + }, + + emptyFunction: function() {} +}; + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + parameters: '' + }.extend(options || {}); + } +}; + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = (new Ajax.Base()).extend({ + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + + try { + if (this.options.method == 'get') + url += '?' + this.options.parameters + '&_='; + + this.transport.open(this.options.method, url, + this.options.asynchronous); + + if (this.options.asynchronous) { + this.transport.onreadystatechange = this.onStateChange.bind(this); + setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); + } + + this.transport.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + this.transport.setRequestHeader('X-Prototype-Version', Prototype.Version); + + if (this.options.method == 'post') { + this.transport.setRequestHeader('Connection', 'close'); + this.transport.setRequestHeader('Content-type', + 'application/x-www-form-urlencoded'); + } + + this.transport.send(this.options.method == 'post' ? + this.options.parameters + '&_=' : null); + + } catch (e) { + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState != 1) + this.respondToReadyState(this.transport.readyState); + }, + + respondToReadyState: function(readyState) { + var event = Ajax.Request.Events[readyState]; + (this.options['on' + event] || Ajax.emptyFunction)(this.transport); + } +}); + +Ajax.Updater = Class.create(); +Ajax.Updater.prototype = (new Ajax.Base()).extend({ + initialize: function(container, url, options) { + this.container = $(container); + this.setOptions(options); + + if (this.options.asynchronous) { + this.onComplete = this.options.onComplete; + this.options.onComplete = this.updateContent.bind(this); + } + + this.request = new Ajax.Request(url, this.options); + + if (!this.options.asynchronous) + this.updateContent(); + }, + + updateContent: function() { + if (this.options.insertion) { + new this.options.insertion(this.container, + this.request.transport.responseText); + } else { + this.container.innerHTML = this.request.transport.responseText; + } + + if (this.onComplete) { + setTimeout((function() {this.onComplete(this.request)}).bind(this), 10); + } + } +}); +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + focus: function(element) { + $(element).focus(); + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + $(element).focus(); + $(element).select(); + } +}; +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disable = 'true'; + } + }, + + focusFirstElement: function(form) { + form = $(form); + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + if (element.type != 'hidden' && !element.disabled) { + Field.activate(element); + break; + } + } + }, + + reset: function(form) { + $(form).reset(); + } +}; + +Form.Element = { + serialize: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return encodeURIComponent(parameter[0]) + '=' + + encodeURIComponent(parameter[1]); + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +}; + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + var index = element.selectedIndex; + var value = element.options[index].value || element.options[index].text; + return [element.name, (index >= 0) ? value : '']; + } +}; + +var $F = Form.Element.getValue; + +Abstract.TimedObserver = function() {}; +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setTimeout(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + + this.registerCallback(); + } +}; + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = (new Abstract.TimedObserver()).extend({ + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = (new Abstract.TimedObserver()).extend({ + getValue: function() { + return Form.serialize(this.element); + } +}); + +document.getElementsByClassName = function(className) { + var children = document.getElementsByTagName('*') || document.all; + var elements = new Array(); + + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var classNames = child.className.split(' '); + for (var j = 0; j < classNames.length; j++) { + if (classNames[j] == className) { + elements.push(child); + break; + } + } + } + + return elements; +}; + +var Element = { + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = + (element.style.display == 'none' ? '' : 'none'); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + } +}; + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +}; + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content; + + if (this.adjacency && this.element.insertAdjacentHTML) { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.fragment = this.range.createContextualFragment(this.content); + this.insertContent(); + } + } +}; + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = (new Abstract.Insertion('beforeBegin')).extend({ + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function() { + this.element.parentNode.insertBefore(this.fragment, this.element); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = (new Abstract.Insertion('afterBegin')).extend({ + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function() { + this.element.insertBefore(this.fragment, this.element.firstChild); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = (new Abstract.Insertion('beforeEnd')).extend({ + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function() { + this.element.appendChild(this.fragment); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = (new Abstract.Insertion('afterEnd')).extend({ + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function() { + this.element.parentNode.insertBefore(this.fragment, + this.element.nextSibling); + } +}); \ No newline at end of file diff --git a/themes/olive/javascripts/scriptaculous.js b/themes/olive/javascripts/scriptaculous.js new file mode 100755 index 0000000..cd0e341 --- /dev/null +++ b/themes/olive/javascripts/scriptaculous.js @@ -0,0 +1,47 @@ +// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Scriptaculous = { + Version: '1.5_rc3', + require: function(libraryName) { + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write(''); + }, + load: function() { + if((typeof Prototype=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.4) + throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); + var scriptTags = document.getElementsByTagName("script"); + for(var i=0;i this.maximum) sliderValue = this.maximum; + if(sliderValue < this.minimum) sliderValue = this.minimum; + var offsetDiff = (sliderValue - (this.value||this.minimum)) * this.increment; + + if(this.isVertical()){ + this.setCurrentTop(offsetDiff + this.currentTop()); + } else { + this.setCurrentLeft(offsetDiff + this.currentLeft()); + } + this.value = sliderValue; + this.updateFinished(); + }, + minimumOffset: function(){ + return(this.isVertical() ? + this.trackTop() + this.alignY : + this.trackLeft() + this.alignX); + }, + maximumOffset: function(){ + return(this.isVertical() ? + this.trackTop() + this.alignY + (this.maximum - this.minimum) * this.increment : + this.trackLeft() + this.alignX + (this.maximum - this.minimum) * this.increment); + }, + isVertical: function(){ + return (this.axis == 'vertical'); + }, + startDrag: function(event) { + if(Event.isLeftClick(event)) { + if(!this.disabled){ + this.active = true; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var offsets = Position.cumulativeOffset(this.handle); + this.offsetX = (pointer[0] - offsets[0]); + this.offsetY = (pointer[1] - offsets[1]); + this.originalLeft = this.currentLeft(); + this.originalTop = this.currentTop(); + } + Event.stop(event); + } + }, + update: function(event) { + if(this.active) { + if(!this.dragging) { + var style = this.handle.style; + this.dragging = true; + if(style.position=="") style.position = "relative"; + style.zIndex = this.options.zindex; + } + this.draw(event); + // fix AppleWebKit rendering + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + Event.stop(event); + } + }, + draw: function(event) { + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var offsets = Position.cumulativeOffset(this.handle); + + offsets[0] -= this.currentLeft(); + offsets[1] -= this.currentTop(); + + // Adjust for the pointer's position on the handle + pointer[0] -= this.offsetX; + pointer[1] -= this.offsetY; + var style = this.handle.style; + + if(this.isVertical()){ + if(pointer[1] > this.maximumOffset()) + pointer[1] = this.maximumOffset(); + if(pointer[1] < this.minimumOffset()) + pointer[1] = this.minimumOffset(); + + // Increment by values + if(this.values){ + this.value = this.getNearestValue(Math.round((pointer[1] - this.minimumOffset()) / this.increment) + this.minimum); + pointer[1] = this.trackTop() + this.alignY + (this.value - this.minimum) * this.increment; + } else { + this.value = Math.round((pointer[1] - this.minimumOffset()) / this.increment) + this.minimum; + } + style.top = pointer[1] - offsets[1] + "px"; + } else { + if(pointer[0] > this.maximumOffset()) pointer[0] = this.maximumOffset(); + if(pointer[0] < this.minimumOffset()) pointer[0] = this.minimumOffset(); + // Increment by values + if(this.values){ + this.value = this.getNearestValue(Math.round((pointer[0] - this.minimumOffset()) / this.increment) + this.minimum); + pointer[0] = this.trackLeft() + this.alignX + (this.value - this.minimum) * this.increment; + } else { + this.value = Math.round((pointer[0] - this.minimumOffset()) / this.increment) + this.minimum; + } + style.left = (pointer[0] - offsets[0]) + "px"; + } + if(this.options.onSlide) this.options.onSlide(this.value); + }, + endDrag: function(event) { + if(this.active && this.dragging) { + this.finishDrag(event, true); + Event.stop(event); + } + this.active = false; + this.dragging = false; + }, + finishDrag: function(event, success) { + this.active = false; + this.dragging = false; + this.handle.style.zIndex = this.originalZ; + this.originalLeft = this.currentLeft(); + this.originalTop = this.currentTop(); + this.updateFinished(); + }, + updateFinished: function() { + if(this.options.onChange) this.options.onChange(this.value); + }, + keyPress: function(event) { + if(this.active && !this.disabled) { + switch(event.keyCode) { + case Event.KEY_ESC: + this.finishDrag(event, false); + Event.stop(event); + break; + } + if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); + } + } +} diff --git a/themes/olive/javascripts/webmail.js b/themes/olive/javascripts/webmail.js new file mode 100755 index 0000000..3abc2dd --- /dev/null +++ b/themes/olive/javascripts/webmail.js @@ -0,0 +1,35 @@ +function chooseContacts(url) { + rs('', url + '?mode=choose',550,480,0); +} + +function setBulk() { + if (getFormField("mail_bulk").checked) getFormField("set_bulk").value = "set_bulk" + document.forms['composeMail'].submit(); +} + +function getFormField(id) { + if ( document.getElementById ) elem = document.getElementById( id ); + else if ( document.all ) elem = document.eval( "document.all." + id ); + return elem; +} + +function toggle_msg_operations(setc) { + var isOpened = toggle_layer('msgops'); + if (setc) setCookie("_wmlmo", ( isOpened ? "opened" : "closed"), 1000000); +} + +function toggle_msg_search(setc) { + var isOpened = toggle_layer('msg_search'); + if (setc) setCookie("_wmlms", (isOpened ? "opened" : "closed"), 1000000); +} + +function checkAll(theForm) { // check all the checkboxes in the list + for (var i=0;i<%=_('Edit/Create Contact Group')%> + <%= + form_tag( + link_save, + 'method' => 'post', + 'class' => 'two_columns' + ) + %> +<%= form_input(:hidden_field, 'contactgroup', 'id') %> +<%= form_input(:hidden_field, 'contactgroup', 'customer_id') %> + + + <%= form_input(:text_field, 'contactgroup', 'name', _('Name'), 'class'=>'two_columns') %> +
+ + + + +
+ + +
+ + <%= end_form_tag %> diff --git a/themes/olive/views/contact_groups/index.html.erb b/themes/olive/views/contact_groups/index.html.erb new file mode 100755 index 0000000..a3dc585 --- /dev/null +++ b/themes/olive/views/contact_groups/index.html.erb @@ -0,0 +1,26 @@ +

<%=_('Contact Groups')%>

+ +<%- form_for @contact_group do |f| %> +<%= hidden_field "contactgroup", "user_id" %> + + + + + +<% + for contactgroup in @contactgroups %> + + + + + + +<% end %> + + + +
<%=_('Name')%> 
<%= contactgroup.name %><%= link_to(_('members'), :controller=>'contact', :action=>'list', :id=>contactgroup.id, :params=>{"mode"=>"groups"}) %><%= link_to(_('edit'), :controller=>'/contacts/contact_group', :action=>'edit', :id=>contactgroup.id) %><%= link_to(_('delete'), {:controller=>'/contacts/contact_group', :action=>'delete', :id=>contactgroup.id}, {:confirm=>sprintf(_('DELETE CONTACT GROUP \'%s\'?'), contactgroup.name)})%>
+ + +
+<%- end %> diff --git a/themes/olive/views/contacts/add_multiple.html.erb b/themes/olive/views/contacts/add_multiple.html.erb new file mode 100755 index 0000000..8ab1494 --- /dev/null +++ b/themes/olive/views/contacts/add_multiple.html.erb @@ -0,0 +1,26 @@ +

<%=t :add_multiple_contacts %>

+<% if flash["errors"] and not flash["errors"].empty?%> + <%= t(:errors)%> +
    + <% flash["errors"].each do |message| %> +
  • <%= message %> + <% end %> +
+<% end %> +
+ <%= radio_button("contact", "file_type", "1")%> <%= t(:csv_file)%> + <%= radio_button("contact", "file_type", "2")%> <%= t(:tab_file)%> + + + + + + + + +
+ + + +
+
diff --git a/themes/olive/views/contacts/choose.html.erb b/themes/olive/views/contacts/choose.html.erb new file mode 100755 index 0000000..65fb2ac --- /dev/null +++ b/themes/olive/views/contacts/choose.html.erb @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/themes/olive/views/contacts/import_preview.html.erb b/themes/olive/views/contacts/import_preview.html.erb new file mode 100755 index 0000000..b972081 --- /dev/null +++ b/themes/olive/views/contacts/import_preview.html.erb @@ -0,0 +1,43 @@ +

<%= _('Contacts You Are About To Import')%>

+ +<% if flash["errors"] and not flash["errors"].empty?%> + <%= _('Errors')%> +
    + <% flash["errors"].each do |message| %> +
  • <%= message %> + <% end %> +
+<% end %> + +
+ + + + + + + + + <% + for i in 0...@contacts.length + contact = @contacts[i] + %> + + + + + + + + <% end %> + + + + +
 <%= _('First name')%><%= _('Last name')%><%= _('E-mail')%>
<%=i+1%>
+ + + + +
+
diff --git a/themes/olive/views/contacts/index.html.erb b/themes/olive/views/contacts/index.html.erb new file mode 100755 index 0000000..87e5217 --- /dev/null +++ b/themes/olive/views/contacts/index.html.erb @@ -0,0 +1,115 @@ +

<%= t :contacts %>

+<% unless @mode == "choose" %> + +<% end -%> +
+
+ + <% if flash["alert"] %>
  • <%= flash["alert"] %>
<% end %> +
+ + <% if @group_id and not @group_id.nil? %> + + <% end %> + + + + + + + + <% if @mode == "choose" %> + + + + + + <% for contact in @contacts %> + + + + + + <% end %> + + <% for group in @contactgroups %> + + + + + + <% end %> + + + + <% elsif @mode == "groups"%> + + + + + + <% for contact in @contacts %> + + + + + + + <% end %> + + + + <% else %> + + + + + + <% for contact in @contacts %> + + + + + + <% end %> + <% end %> +
+ <% CDF::CONFIG[:contact_letters].each do |letter| %> + <%= link_to letter, contacts_path(:letter => letter) %> + <% end %> +       + <%= link_to t(:show_all), contacts_path %> +
<%= will_paginate @contacts %>
<%= "#{t :to} #{t :cc} #{t :bcc}" %><%= t :name %><%= t :email %>
+ + <%=contact.full_name%><%=contact.email%>
<%=t(:groups)%>:
+ + <%=group.name%> 
+ + +
<%= t(:name)%><%= t(:email)%>
><%=contact.full_name%><%=contact.email%>
+ + +
<%= t(:name)%><%= t(:email)%> 
<%= link_to(contact.full_name, :controller=>:contacts, :action => "edit", :id => contact.id ) %><%= link_to( contact.email, :controller => :webmail, :action => "compose", :params => { "mail[to]" => contact.email } ) %><%= link_to(t(:delete), {:controller=>:contacts, :action=>'delete', :id=>contact.id}, + {:confirm=>t(:delete_contact_question, :name => contact.show_name, :email => contact.email)})%> +
+
+
+
diff --git a/themes/olive/views/contacts/new.html.erb b/themes/olive/views/contacts/new.html.erb new file mode 100755 index 0000000..dd19e45 --- /dev/null +++ b/themes/olive/views/contacts/new.html.erb @@ -0,0 +1,73 @@ +

<%=t(:edit_create_contact)%>

+ + +
+
+ + + <%= form_tag( contacts_path, 'method' => 'post', 'class' => 'two_columns') do %> + <%= form_input(:hidden_field, 'contact', 'id') %> + <%= form_input(:hidden_field, 'contact', 'customer_id') %> + + + <%= form_input(:text_field, 'contact', 'fname', t(:first_name), 'class'=>'two_columns') %> + <%= form_input(:text_field, 'contact', 'lname', t(:last_name), 'class'=>'two_columns') %> + <%= form_input((@contact.new_record? ? :text_field : :read_only_field), 'contact', 'email', t(:email), 'class'=>'two_columns')%> +
+ + <% for group in @contactgroups %> + + <% end %> + <% if not(@contactgroups.empty?) %> + <%=_('Contact belong to these groups')%>: + + + <% + end + col = 1 + for group in @contactgroups %> + + <% if col%2 == 0 %> + + + <% end + col = col + 1 %> + <% end %> + <% if col%2 == 0 and not(@contactgroups.empty?) %> + + <% end %> + <% if not(@contactgroups.empty?) %> + +
+ > +  <%=group.name %> +
 
+ <% end %> + + + + + +
+ + +
+ <% end %> +
+
diff --git a/themes/olive/views/folders/index.html.erb b/themes/olive/views/folders/index.html.erb new file mode 100755 index 0000000..530e2ab --- /dev/null +++ b/themes/olive/views/folders/index.html.erb @@ -0,0 +1,48 @@ +

<%=t :mailbox %>

+ +
+
+ +<% content_for('sidebar') { %> +
+

<%= t :add_folder %>

+
+ <%= form_tag folders_path, :id => 'new_folder' do %> +
    +
  • +
  • <%= text_field_tag 'folder', '', :size => 18 %>
  • +
  • <%= submit_tag t(:add_folder) %>
  • +
+ <% end %> +
+<% } %> + +
+
+ + + + <% for folder in @folders %> + + + + + <% end %> + +
<%= t :folder %><%= t :total_messages %><%= t :unseen%>
<%=folder_manage_link(folder)%><%= folder.total %><%= folder.unseen > 0 ? "#{folder.unseen}" : "#{folder.unseen}" %>
+
+
+
+
diff --git a/themes/empty/views/layouts/.gitkeep b/themes/olive/views/layouts/.gitkeep similarity index 100% rename from themes/empty/views/layouts/.gitkeep rename to themes/olive/views/layouts/.gitkeep diff --git a/themes/empty/views/layouts/chooser.html.erb b/themes/olive/views/layouts/chooser.html.erb similarity index 100% rename from themes/empty/views/layouts/chooser.html.erb rename to themes/olive/views/layouts/chooser.html.erb diff --git a/themes/olive/views/layouts/login.html.erb b/themes/olive/views/layouts/login.html.erb new file mode 100755 index 0000000..638396d --- /dev/null +++ b/themes/olive/views/layouts/login.html.erb @@ -0,0 +1,13 @@ + + + + <%=t(:mailr) %> - <%= t(:please_login)%> + <%=stylesheet_link_tag current_theme_stylesheet_path('base') %> + <%=stylesheet_link_tag current_theme_stylesheet_path('style') %> + + + <%= yield %> + + diff --git a/themes/olive/views/layouts/public.html.erb b/themes/olive/views/layouts/public.html.erb new file mode 100755 index 0000000..c9c94a1 --- /dev/null +++ b/themes/olive/views/layouts/public.html.erb @@ -0,0 +1,29 @@ + + + + <%= t(:mailr) %> + + + <%=stylesheet_link_tag current_theme_stylesheet_path('base') %> + <%=stylesheet_link_tag current_theme_stylesheet_path('style') %> + <%=javascript_include_tag current_theme_javascript_path('global') %> + <%=javascript_include_tag current_theme_javascript_path('webmail') %> + + <%=javascript_include_tag :defaults %> + + + +
+
+ +
<%= yield %>
+
+
+
+ + diff --git a/themes/olive/views/login/index.html.erb b/themes/olive/views/login/index.html.erb new file mode 100644 index 0000000..6240f03 --- /dev/null +++ b/themes/olive/views/login/index.html.erb @@ -0,0 +1,41 @@ +
+
+ +

<%= t(:please_login) %>

+ +
+
diff --git a/themes/olive/views/shared/_folders.html.erb b/themes/olive/views/shared/_folders.html.erb new file mode 100755 index 0000000..f06e12c --- /dev/null +++ b/themes/olive/views/shared/_folders.html.erb @@ -0,0 +1,9 @@ +
+

<%=t :folders %> <%= link_to t(:add_edit_folder), folders_path %>

+ +
+ diff --git a/themes/olive/views/webmail/_contacts.html.erb b/themes/olive/views/webmail/_contacts.html.erb new file mode 100755 index 0000000..f1b2a63 --- /dev/null +++ b/themes/olive/views/webmail/_contacts.html.erb @@ -0,0 +1,12 @@ +
    + <% for contact in @contacts do -%> +
  • + <%=h contact.fname %> <%= h contact.lname %> + +
  • + <% end -%> +
diff --git a/themes/olive/views/webmail/_expr.html.erb b/themes/olive/views/webmail/_expr.html.erb new file mode 100755 index 0000000..f7fa44c --- /dev/null +++ b/themes/olive/views/webmail/_expr.html.erb @@ -0,0 +1,18 @@ + <% @expression = @expressions[expr_counter] %> + + + + + + + <%= text_field 'expression', 'expr_value', 'index'=>expr_counter %> + + + <%= hidden_field "expression", 'case_sensitive', 'index'=>expr_counter %> + <%= check_box "expression", 'case_sensitive', {'onclick'=>'toggleCheckbox(this)', "index"=>expr_counter } %>  <%= _('case sensitive') %> + + \ No newline at end of file diff --git a/themes/olive/views/webmail/_filter.html.erb b/themes/olive/views/webmail/_filter.html.erb new file mode 100755 index 0000000..f4fbe10 --- /dev/null +++ b/themes/olive/views/webmail/_filter.html.erb @@ -0,0 +1,19 @@ + + <%=h @user.filters[filter_counter].name%> + + <% if filter_counter > 0 %> + <%=link_filter_up(@user.filters[filter_counter].id)%> + <% else %> +   + <% end %> + + + <% if filter_counter < @user.filters.size - 1 %> + <%=link_filter_down(@user.filters[filter_counter].id)%> + <% else %> +   + <% end %> + + <%=link_filter_edit(@user.filters[filter_counter].id)%> + <%=link_filter_delete(@user.filters[filter_counter].id)%> + \ No newline at end of file diff --git a/themes/olive/views/webmail/_message_row.html.erb b/themes/olive/views/webmail/_message_row.html.erb new file mode 100755 index 0000000..9509d13 --- /dev/null +++ b/themes/olive/views/webmail/_message_row.html.erb @@ -0,0 +1,14 @@ + + + <% if @folder_name == CDF::CONFIG[:mail_sent] %> + <%= short_address(message_row.to_addr) %> +<% else %> + <%= short_address(message_row.from_addr) %> +<% end %> +
+ <%= link_to(parse_subject(message_row.subject) << " " , :controller=>'webmail', :action=>'message', :msg_id=>message_row.uid)%> + + <%= message_date(message_row.date) %> + <%= message_size(message_row.size) %> + <%= message_row.content_type == 'multipart' ? image_tag(current_theme_image_path('attachment.png')) : ' ' %> + diff --git a/themes/olive/views/webmail/_search.html.erb b/themes/olive/views/webmail/_search.html.erb new file mode 100755 index 0000000..e967c1d --- /dev/null +++ b/themes/olive/views/webmail/_search.html.erb @@ -0,0 +1,13 @@ + + <%= t :search%>open + + diff --git a/themes/olive/views/webmail/compose.html.erb b/themes/olive/views/webmail/compose.html.erb new file mode 100755 index 0000000..43ea2c9 --- /dev/null +++ b/themes/olive/views/webmail/compose.html.erb @@ -0,0 +1,67 @@ +<% content_for('sidebar') { %> + <%= render :partial => 'shared/folders' %> +<% } %> + +

<%= t :mailbox %>

+
+ +
+
+ +
+ + +
+ + + + + +
<%= text_field_with_auto_complete(:mail, :to, {"size"=>65}, :skip_style => true, :tokens=> ",") %>
<%= text_field_with_auto_complete(:mail, :cc, {"size"=>65}, :skip_style => true, :tokens=> ",") %>
<%= text_field_with_auto_complete(:mail, :bcc, {"size"=>65}, :skip_style => true, :tokens=> ",") %>
<%= text_field('mail', 'subject', {"size"=>65}) %>
+ <%= hidden_field('mail', 'from') %> + <%= hidden_field('mail', 'content_type') %> +
+ +
+ <%= text_area "mail", "body", "rows"=>20, "cols"=>75 %> +
+ +
+ <% if @mail.attachments and @mail.attachments.size > 0%> + + <% i = 0 + @mail.attachments.each { |att| %> + + <% i = i + 1 + }%> +
<%=attachment(att, i)%>
+ <% end %> +
+ <%=%> + +
+
+
+
+ +<% content_for("scripts") { %> +<%= @additional_scripts %> +<% if ['text/html', 'multipart'].include?(@mail.content_type) %> +<%= include_tinymce %> +<% end %> +<% } %> diff --git a/themes/olive/views/webmail/error_connection.html.erb b/themes/olive/views/webmail/error_connection.html.erb new file mode 100755 index 0000000..ee08a7b --- /dev/null +++ b/themes/olive/views/webmail/error_connection.html.erb @@ -0,0 +1,26 @@ +

<%=_('Mailbox')%>

+ +
+
+ +<% content_for('sidebar') { %> +
+ <%=_('Error occured obtaining connection to mail server. Please excuse us!')%> +
+<% } %> +
+
+ +
diff --git a/themes/olive/views/webmail/filter.html.erb b/themes/olive/views/webmail/filter.html.erb new file mode 100755 index 0000000..4bb728c --- /dev/null +++ b/themes/olive/views/webmail/filter.html.erb @@ -0,0 +1,41 @@ +

<%=_('Mailbox')%>

+ +
+
+ +
+
+ <%=hidden_field 'filter', 'id' %> + + + + + + + <%= render_partial_collection "expr", @expressions %> + + + + + + +
<%=text_field 'filter', 'name' %>
<%=_('Messages matching')%>
+ +
+ + +
+ +
+
+
diff --git a/themes/olive/views/webmail/filters.html.erb b/themes/olive/views/webmail/filters.html.erb new file mode 100755 index 0000000..24fbb24 --- /dev/null +++ b/themes/olive/views/webmail/filters.html.erb @@ -0,0 +1,42 @@ +<% content_for('sidebar') { %> + <%= render :partial => 'shared/folders' %> +<% } %> +

<%=_('Mailbox')%>

+ +
+
+ +
+
+<% if @user.filters and @user.filters.size > 0 %> + + + + + + + + + <%= render_partial_collection "filter", @user.filters %> +
<%=_('Filter name')%>    
+<% end %> +
+ <% if flash['error'] %> +
<%= flash['error'] %>
+ <% elsif flash['status'] %> +
<%= flash['status'] %>
+ <% end %> +
+
diff --git a/themes/olive/views/webmail/folders.html.erb b/themes/olive/views/webmail/folders.html.erb new file mode 100755 index 0000000..1b579ea --- /dev/null +++ b/themes/olive/views/webmail/folders.html.erb @@ -0,0 +1,29 @@ +

<%=_('Mailbox')%>

+ +
+
+ + <% content_for('sidebar') { %> + <%= render :partial => 'shared' %> + <% } %> +
+ <% if not(request['msg_id'] == '') %> + <%= render_component(:controller => "webmail/webmail", :action => "message", :params => { 'msg_id' => request['msg_id']})%> + <% else %> + <%= render_component(:controller => "webmail/webmail", :action => "messages") %> + <% end %> +
+ +
diff --git a/themes/olive/views/webmail/mailsent.html.erb b/themes/olive/views/webmail/mailsent.html.erb new file mode 100755 index 0000000..d991b0c --- /dev/null +++ b/themes/olive/views/webmail/mailsent.html.erb @@ -0,0 +1,31 @@ +

<%=t(:mailbox)%>

+ +
+
+ +
+
+
<%=t(:to)%>
<%= CGI.escapeHTML(@mail.to) %>
+ <% if @mail.cc %> +
<%=t(:cc)%>
<%= CGI.escapeHTML(@mail.cc) %>
+ <% end + if @mail.bcc %> +
<%=t(:bcc)%>
<%= CGI.escapeHTML(@mail.bcc) %>
+ <% end %> +
<%=t(:subject)%>
<%= CGI.escapeHTML(@mail.subject) %>
+
+
+
+
diff --git a/themes/olive/views/webmail/message.html.erb b/themes/olive/views/webmail/message.html.erb new file mode 100755 index 0000000..772bc11 --- /dev/null +++ b/themes/olive/views/webmail/message.html.erb @@ -0,0 +1,42 @@ +

<%=t :mailbox %>

+ +
+
+ +<% content_for('sidebar') { %> + <%= render :partial => 'shared/folders' %> +<% } %> +
+ +
+
+
    +
  • + <%= link_to("« #{t :back_to_list}", :controller=>"webmail", :action=>"messages") %> +
  • +
  • <%=link_reply_to_sender(@msg_id)%>
  • +
  • <%=link_forward_message(@msg_id)%>
  • +
  • <%=link_flag_for_deletion(@msg_id)%>
  • +
  • <%=link_view_source(@msg_id)%>
  • +
+
+ + <%= mail2html(@mail, @msg_id) %> +
+ +
+ +
+ diff --git a/themes/olive/views/webmail/messages.html.erb b/themes/olive/views/webmail/messages.html.erb new file mode 100755 index 0000000..b1652e5 --- /dev/null +++ b/themes/olive/views/webmail/messages.html.erb @@ -0,0 +1,80 @@ +

<%= t :mailbox %>

+ +
+
+ +<% content_for :sidebar do %> +<%= render :partial => 'shared/folders' %> +<% end %> + +
+
+

<%= @folder_name %>

+ <%= form_tag({:controller=>'webmail', :action=>'messages'})%> +
+ + + + <%=t :operations%>open + + +
+

<%= t :operations_txt %>

+ + <%= submit_tag(t(:delete), :name=>'op')%> + <%= submit_tag(t(:copy), :name=> 'op')%> + <%= submit_tag(t(:move), :name=>'op')%> + <%= submit_tag(t(:mark_read), :name=>'op')%> + <%= submit_tag(t(:mark_unread), :name=>'op')%> +
+ + <%= t :destination_txt %>  + + +
+ <%= render :partial => "search" %> + <%= page_navigation_webmail @pages if @pages.page_count > 1 %> + + + + + <% if @folder_name == CDF::CONFIG[:mail_sent] %> + + <% else %> + + <% end%> + + + + + + + + <% for message in @messages %> + <%= render :partial => 'message_row', :object => message %> + <% end %> + +
<%= link_to(t(:to), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'to_flat')%><%= link_to(t(:from), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'from_flat')%><%= link_to(t(:subject), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'subject')%><%= link_to(t(:date), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'date')%><%= link_to(t(:size), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'size')%> 
+ <%= page_navigation_webmail @pages if @pages.page_count > 1 %> + +
+
+ +
+
diff --git a/themes/olive/views/webmail/noattachment.html.erb b/themes/olive/views/webmail/noattachment.html.erb new file mode 100755 index 0000000..3599892 --- /dev/null +++ b/themes/olive/views/webmail/noattachment.html.erb @@ -0,0 +1 @@ +No attachment found! \ No newline at end of file diff --git a/themes/olive/views/webmail/prefs.html.erb b/themes/olive/views/webmail/prefs.html.erb new file mode 100755 index 0000000..a759c42 --- /dev/null +++ b/themes/olive/views/webmail/prefs.html.erb @@ -0,0 +1,55 @@ +<% content_for('sidebar') { %> + <%= render :partial => 'shared/folders' %> +<% } %> +

<%= t :mailbox %>

+ +
+
+
+
+ <%= hidden_field "mailpref", "id" %> + <%= hidden_field "mailpref", "customer_id" %> + + <%= form_input(:text_field, 'customer', 'fname', t(:first_name), 'class'=>'two_columns') %> + <%= form_input(:text_field, 'customer', 'lname', t(:last_name), 'class'=>'two_columns') %> + + + + + + + + + + + + + + + + + + +
+ <%=check_box('mailpref', 'check_external_mail')%> + <%= t :check_external_mail_txt %> +
+ + +
+
+
+
+
diff --git a/themes/olive/views/webmail/view_source.html.erb b/themes/olive/views/webmail/view_source.html.erb new file mode 100755 index 0000000..44e2f6a --- /dev/null +++ b/themes/olive/views/webmail/view_source.html.erb @@ -0,0 +1,13 @@ + + + + <%=_('Mailr')%> + + + +
+ <%=@msg_source%> +
+ + diff --git a/themes/original/views/layouts/public.html.erb b/themes/original/views/layouts/public.html.erb old mode 100755 new mode 100644