summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js51
1 files changed, 5 insertions, 46 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 722eb3f60..2b20ff5ee 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -53,7 +53,6 @@ function roundcube_browser()
this.ie = (document.all && !window.opera) || (this.win && this.agent_lc.indexOf('trident/') > 0);
if (this.ie) {
- this.ie6 = this.appver.indexOf('MSIE 6') > 0;
this.ie7 = this.appver.indexOf('MSIE 7') > 0;
this.ie8 = this.appver.indexOf('MSIE 8') > 0;
this.ie9 = this.appver.indexOf('MSIE 9') > 0;
@@ -256,13 +255,17 @@ remove_listener: function(p)
cancel: function(evt)
{
var e = evt ? evt : window.event;
+
if (e.preventDefault)
e.preventDefault();
+ else
+ e.returnValue = false;
+
if (e.stopPropagation)
e.stopPropagation();
e.cancelBubble = true;
- e.returnValue = false;
+
return false;
},
@@ -530,36 +533,6 @@ function getCookie(name)
roundcube_browser.prototype.set_cookie = setCookie;
roundcube_browser.prototype.get_cookie = getCookie;
-// tiny replacement for Firebox functionality
-function rcube_console()
-{
- this.log = function(msg)
- {
- var box = rcube_find_object('dbgconsole');
-
- if (box) {
- if (msg.charAt(msg.length-1)=='\n')
- msg += '--------------------------------------\n';
- else
- msg += '\n--------------------------------------\n';
-
- // Konqueror doesn't allow to just change the value of hidden element
- if (bw.konq) {
- box.innerText += msg;
- box.value = box.innerText;
- } else
- box.value += msg;
- }
- };
-
- this.reset = function()
- {
- var box = rcube_find_object('dbgconsole');
- if (box)
- box.innerText = box.value = '';
- };
-};
-
var bw = new roundcube_browser();
bw.set_html_class();
@@ -597,20 +570,6 @@ if (!String.prototype.startsWith) {
};
}
-// Make getElementById() case-sensitive on IE
-if (bw.ie) {
- document._getElementById = document.getElementById;
- document.getElementById = function(id) {
- var i = 0, obj = document._getElementById(id);
-
- if (obj && obj.id != id)
- while ((obj = document.all[i]) && obj.id != id)
- i++;
-
- return obj;
- }
-}
-
// jQuery plugin to emulate HTML5 placeholder attributes on input elements
jQuery.fn.placeholder = function(text) {
return this.each(function() {