phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] email/inc class.html_widgets.inc.php class.uiin...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] email/inc class.html_widgets.inc.php class.uiin...
Date: Mon, 18 Dec 2006 14:44:38 +0000

CVSROOT:        /sources/phpgroupware
Module name:    email
Changes by:     Sigurd Nes <sigurdne>   06/12/18 14:44:38

Modified files:
        inc            : class.html_widgets.inc.php 
                         class.uiindex.inc.php 

Log message:
        fix auto_refresh as js-link

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.html_widgets.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.uiindex.inc.php?cvsroot=phpgroupware&r1=1.30&r2=1.31

Patches:
Index: class.html_widgets.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.html_widgets.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- class.html_widgets.inc.php  17 Dec 2006 11:21:02 -0000      1.11
+++ class.html_widgets.inc.php  18 Dec 2006 14:44:38 -0000      1.12
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package email
-       * @version $Id: class.html_widgets.inc.php,v 1.11 2006/12/17 11:21:02 
sigurdne Exp $
+       * @version $Id: class.html_widgets.inc.php,v 1.12 2006/12/18 14:44:38 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -1666,15 +1666,32 @@
                        if (($reload_me != '')
                        && ($refresh_ms != ''))
                        {
-                               $reload_me_full = 
$GLOBALS['phpgw']->link('/index.php',$reload_me);
+                                       
+                               //$reload_me_full = 
$GLOBALS['phpgw']->link('/index.php',$reload_me);
                                // set refresh time in miliseconds  (1000 = 1 
sec)  (180000 = 180 sec = 3 minutes)
                                //  ( 240000 = 240 sec = 4 min)   (300000 = 5 
min)   (600000 = 10 min)
                                //$refresh_ms = '240000';
-                               $reload_js = 
+
+                               $oArgs = '{';
+                               foreach($reload_me as $key => $value)
+                               {
+                                       $oArgs .= 
str_ireplace(array('fldball[',']'),'',$key) . ":'" . $value . "',\r\n";
+                               }
+                               $oArgs .= '};';
+
+       /*                      $reload_js = 
                                         '<script language="javascript">'."\r\n"
                                        
.'window.setTimeout('."'".'window.location="'
                                        .$reload_me_full.'"; 
'."'".','.$refresh_ms.');'."\r\n"
                                        .'</script>'."\r\n";
+       */      
+                               $reload_js = 
+                                        '<script language="javascript">'."\r\n"
+                                       .' var oArgs = ' . $oArgs . "\r\n"
+                                       ." var strURL = phpGWLink('/index.php', 
oArgs); \r\n"
+                                       
.'window.setTimeout('."'".'window.location=strURL;'."'".','.$refresh_ms.');'."\r\n"
+                                       .'</script>'."\r\n";
+
                        }
                        else
                        {

Index: class.uiindex.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.uiindex.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- class.uiindex.inc.php       17 Dec 2006 11:21:02 -0000      1.30
+++ class.uiindex.inc.php       18 Dec 2006 14:44:38 -0000      1.31
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package email
-       * @version $Id: class.uiindex.inc.php,v 1.30 2006/12/17 11:21:02 
sigurdne Exp $
+       * @version $Id: class.uiindex.inc.php,v 1.31 2006/12/18 14:44:38 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -32,6 +32,24 @@
 
                function uiindex()
                {
+                       if(!isset($GLOBALS['phpgw']->js) || 
!is_object($GLOBALS['phpgw']->js))
+                       {
+                               $GLOBALS['phpgw']->js = 
CreateObject('phpgwapi.javascript');
+                       }
+                       
$GLOBALS['phpgw']->js->validate_file('core','base','phpgwapi');
+                       
+                       $folder = get_var('folder',array('POST','GET'));
+                       if($folder)
+                       {
+                               $_GET['fldball[folder]']=$folder;
+                       }
+                       
+                       $acctnum = get_var('acctnum',array('POST','GET'));
+                       if($acctnum)
+                       {
+                               $_GET['fldball[acctnum]']=$folder;
+                       }
+
                        //return;
                }
                




reply via email to

[Prev in Thread] Current Thread [Next in Thread]