[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] email inc/class.bocompose.inc.php inc/class.uic...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] email inc/class.bocompose.inc.php inc/class.uic... |
Date: |
Sun, 17 Dec 2006 19:46:12 +0000 |
CVSROOT: /sources/phpgroupware
Module name: email
Changes by: Sigurd Nes <sigurdne> 06/12/17 19:46:11
Modified files:
inc : class.bocompose.inc.php class.uicompose.inc.php
templates/base : compose.tpl
Log message:
fix js-link from compose to addressbook
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.bocompose.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.uicompose.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/email/templates/base/compose.tpl?cvsroot=phpgroupware&r1=1.3&r2=1.4
Patches:
Index: inc/class.bocompose.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.bocompose.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.bocompose.inc.php 17 Dec 2006 11:21:01 -0000 1.14
+++ inc/class.bocompose.inc.php 17 Dec 2006 19:46:11 -0000 1.15
@@ -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.bocompose.inc.php,v 1.14 2006/12/17 11:21:01
sigurdne Exp $
+ * @version $Id: class.bocompose.inc.php,v 1.15 2006/12/17 19:46:11
sigurdne Exp $
* @internal Based on AngleMail http://www.anglemail.org/
*/
@@ -596,16 +596,23 @@
// (1) the original addressbook "orig"
// NOTE: "bogusarg" is needed to fill the "extraparam"
arg in the javascript
// or else this will fail if there is nothing to give
as an "extraparam"
- $addylink_orig = $GLOBALS['phpgw']->link(
+ /* $addylink_orig = $GLOBALS['phpgw']->link(
'/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/addressbook.php',
array(
"bogusarg" => "0"
)
);
+ */
+ $addylink_orig = array
+ (
+ 'link' =>
'/'.$GLOBALS['phpgw_info']['flags']['currentapp'].'/addressbook.php',
+ 'oArgs' =>
'{bogusarg:0}'
+ );
+
//echo '$addylink_orig: '.$addylink_orig .'<br />';
// (2) the new addressbook "lex"
- $addylink_lex = $GLOBALS['phpgw']->link(
+ /* $addylink_lex = $GLOBALS['phpgw']->link(
"/index.php",
array(
"menuaction"=>"phpgwapi.uijsaddressbook.show",
@@ -614,6 +621,20 @@
"update_opener" => "1"
)
);
+ */
+
+ $addylink_lex = array
+ (
+ 'link' =>
'/index.php',
+ 'oArgs' => "{
+
menuaction:'phpgwapi.uijsaddressbook.show',
+
viewmore:1,
+
cat_id:-1,
+
update_opener:1
+
}"
+ );
+
+
//echo '$addylink_lex: '.$addylink_lex.'<br />';
// grab your value from the prefs
@@ -630,7 +651,6 @@
$js_addylink = $addylink_orig;
}
-
$this->xi['js_addylink'] = $js_addylink;
//we need to set the width of the addybook window
according to user prefs
$addywidth =
$GLOBALS['phpgw']->msg->get_pref_value('js_addressbook_screensize',$acctnum);
Index: inc/class.uicompose.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.uicompose.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uicompose.inc.php 17 Dec 2006 11:21:02 -0000 1.11
+++ inc/class.uicompose.inc.php 17 Dec 2006 19:46:11 -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/gpl.html GNU General Public
License
* @package email
- * @version $Id: class.uicompose.inc.php,v 1.11 2006/12/17 11:21:02
sigurdne Exp $
+ * @version $Id: class.uicompose.inc.php,v 1.12 2006/12/17 19:46:11
sigurdne Exp $
* @internal Based on AngleMail http://www.anglemail.org/
*/
@@ -97,8 +97,17 @@
$this->widgets = CreateObject('email.html_widgets');
$this->tpl->set_var('widget_toolbar',$this->widgets->get_toolbar());
+
+ //FIX this
+ /* if(!isset($GLOBALS['phpgw']->js) ||
!is_object($GLOBALS['phpgw']->js))
+ {
+ $GLOBALS['phpgw']->js =
CreateObject('phpgwapi.javascript');
+ }
+
$GLOBALS['phpgw']->js->validate_file('core','base','phpgwapi');
+ */
// fill template vars
$tpl_vars = Array(
+ 'webserver_url' =>
$GLOBALS['phpgw_info']['server']['webserver_url'],
'to_box_value' =>
$this->bo->xi['to_box_value'],
'cc_box_value' =>
$this->bo->xi['cc_box_value'],
'bcc_box_value' =>
$this->bo->xi['bcc_box_value'],
@@ -111,7 +120,8 @@
'jsaddybook_height' =>
$this->bo->xi['jsaddybook_height'],
'form1_name' =>
$this->bo->xi['form1_name'],
'form1_method' =>
$this->bo->xi['form1_method'],
- 'js_addylink' =>
$this->bo->xi['js_addylink'],
+ 'js_addylink_link' =>
$this->bo->xi['js_addylink']['link'],
+ 'js_addylink_oArgs' =>
$this->bo->xi['js_addylink']['oArgs'],
'buttons_bgcolor' =>
$this->bo->xi['buttons_bgcolor'],
'buttons_bgcolor_class' =>
$this->bo->xi['buttons_bgcolor_class'],
'to_boxs_bgcolor' =>
$this->bo->xi['to_boxs_bgcolor'],
Index: templates/base/compose.tpl
===================================================================
RCS file: /sources/phpgroupware/email/templates/base/compose.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- templates/base/compose.tpl 13 Mar 2005 23:22:44 -0000 1.3
+++ templates/base/compose.tpl 17 Dec 2006 19:46:11 -0000 1.4
@@ -1,10 +1,14 @@
<!-- begin compose.tpl -->
+<script type="text/javascript"
src="{webserver_url}/phpgwapi/js/core/base.js"></script>
<script type="text/javascript">
<!--
self.name="first_Window";
- function addybook(extraparm)
+ function addybook()
{
-
Window1=window.open('{js_addylink}'+extraparm,"Search","width={jsaddybook_width},height={jsaddybook_height},toolbar=no,scrollbars=yes,resizable=yes");
+ var oArgs = {js_addylink_oArgs};
+ var strURL = phpGWLink('{js_addylink_link}', oArgs);
+
+
Window1=window.open(strURL,"Search","width={jsaddybook_width},height={jsaddybook_height},toolbar=no,scrollbars=yes,resizable=yes");
}
function attach_window(url)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] email inc/class.bocompose.inc.php inc/class.uic...,
Sigurd Nes <=