From a7d5c6480cdef191b04e71005ffea0e35b84ac24 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 17 Dec 2006 16:28:37 -0500 Subject: [PATCH] Added patch for resizeable preview pane --- program/js/common.js | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/program/js/common.js b/program/js/common.js index d5ecf8f..2df349a 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -530,6 +530,33 @@ return {x:iX, y:iY}; } + + +/** + * Return the currently applied value of a css property + * + * @param {Object} html_element Node reference + * @param {String} css_property Property name to read in Javascript notation (eg. 'textAlign') + * @param {String} mozilla_equivalent Equivalent property name in CSS notation (eg. 'text-align') + * @return CSS property value + * @type String + */ +function get_elements_computed_style(html_element, css_property, mozilla_equivalent) + { + if (arguments.length==2) + mozilla_equivalent = css_property; + + var el = html_element; + if (typeof(html_element)=='string') + el = nex_get_object(html_element); + + if (el && el.currentStyle) + return el.currentStyle[css_property]; + else if (el && document.defaultView && document.defaultView.getComputedStyle) + return document.defaultView.getComputedStyle(el, null).getPropertyValue(mozilla_equivalent); + else + return false; + } // cookie functions by GoogieSpell @@ -542,6 +569,8 @@ (secure ? "; secure" : ""); document.cookie = curCookie; } + +roundcube_browser.prototype.set_cookie = setCookie; function getCookie(name) { @@ -561,5 +590,7 @@ return unescape(dc.substring(begin + prefix.length, end)); } +roundcube_browser.prototype.get_cookie = getCookie; + var bw = new roundcube_browser(); -- Gitblit v1.9.1