Move IE 6 detection to javascript files
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 12 Jun 2009 17:23:58 +0000 (11:23 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 12 Jun 2009 17:23:58 +0000 (11:23 -0600)
imp/js/src/DimpBase.js
imp/js/src/DimpCore.js
imp/templates/javascript_defs_dimp.php

index 8608e75..bef77eb 100644 (file)
@@ -2434,7 +2434,7 @@ var DimpBase = {
         /* Init quicksearch. */
         $('qsearch_input').observe('blur', this._quicksearchOnBlur.bind(this));
 
-        if (DIMP.conf.is_ie6) {
+        if (DimpCore.is_ie6) {
             /* Disable text selection in preview pane for IE 6. */
             document.observe('selectstart', Event.stop);
             Event.observe(window, 'resize', this._resizeIE6.bind(this));
@@ -2456,7 +2456,7 @@ var DimpBase = {
     // IE 6 width fixes (See Bug #6793)
     _resizeIE6: function()
     {
-        if (DIMP.conf.is_ie6) {
+        if (DimpCore.is_ie6) {
             var tmp = parseInt($('sidebarPanel').getStyle('width'), 10),
                 tmp1 = document.viewport.getWidth() - tmp - 30;
             $('normalfolders').setStyle({ width: tmp + 'px' });
@@ -2472,7 +2472,7 @@ var DimpBase = {
 
     _resizeIE6Iframe: function(iframe)
     {
-        if (DIMP.conf.is_ie6) {
+        if (DimpCore.is_ie6) {
             iframe.setStyle({ width: $('dimpmain').getStyle('width'), height: (document.viewport.getHeight() - 20) + 'px' });
         }
     }
index fd1cd8d..3fe9a0f 100644 (file)
@@ -13,6 +13,7 @@ var DimpCore = {
     // Vars used and defaulting to null/false:
     //   DMenu, Growler, inAjaxCallback, is_init, is_logout,
     //   onDoActionComplete
+    is_ie6: false /*@cc_on || @_jscript_version < 5.7 @*/,
     server_error: 0,
 
     doActionOpts: {
index ba1c666..739cb38 100644 (file)
@@ -66,7 +66,6 @@ $code['conf'] = array_filter(array(
         : array_map(array('DIMP', '_appendedFolderPref'), $GLOBALS['conf']['server']['fixed_folders']),
     'flags' => $flags,
     'ham_spammbox' => intval(!empty($GLOBALS['conf']['notspam']['spamfolder'])),
-    'is_ie6' => intval($GLOBALS['browser']->isBrowser('msie') && ($GLOBALS['browser']->getMajor() < 7)),
     'limit_factor' => intval($GLOBALS['conf']['dimp']['viewport']['limit_factor']),
     'login_view' => $GLOBALS['prefs']->getValue('dimp_login_view'),
     'name' => $GLOBALS['registry']->get('name', 'dimp'),