[Vtigercrm-commits] [vtiger-commits] r5354 - in /vtigercrm/trunk: Smarty/templates/Portal.tpl modules/Portal/ListView.php modules/Portal/Popup.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 25 10:18:47 EDT 2006
Author: don
Date: Tue Apr 25 08:18:40 2006
New Revision: 5354
Log:
issue in adding portal has been fixed
Modified:
vtigercrm/trunk/Smarty/templates/Portal.tpl
vtigercrm/trunk/modules/Portal/ListView.php
vtigercrm/trunk/modules/Portal/Popup.php
Modified: vtigercrm/trunk/Smarty/templates/Portal.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Portal.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Portal.tpl Tue Apr 25 08:18:40 2006
@@ -20,14 +20,14 @@
<!--Portal info starts-->
<ul id="tablist" style="margin-left: 40px;">
{section name=portalinfo loop=$PORTALS}
- {if $smarty.section.portalinfo.iteration eq '1'}
+ {if $PORTALS[portalinfo].portalid eq $DEFPORTAL_DETAILS.1}
<li><a class="current" href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a><a href="index.php?module=Portal&action=Delete&return_module=Portal&return_action=index&record={$PORTALS[portalinfo].portalid}"><img src='{$IMAGEPATH}/del.gif' border=0 align=absmiddle></a></li>
{else}
<li><a href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a><a href="index.php?module=Portal&action=Delete&return_module=Portal&return_action=index&record={$PORTALS[portalinfo].portalid}"><img src='{$IMAGEPATH}/del.gif' border=0 align=absmiddle></a></li>
{/if}
{/section}
</ul>
- <iframe id="tabiframe" src="{$PORTALS.0.portalurl}" width="90%" height="400px" style="margin-left: 40px;"></iframe>
+ <iframe id="tabiframe" src="{$DEFPORTAL_DETAILS.0}" width="90%" height="400px" style="margin-left: 40px;"></iframe>
<form name="tabcontrol" style="margin-top:0">
<input name="tabcheck" type="checkbox" onClick="handleview()" style="margin-left: 40px;">{$MOD.LBL_OPEN_IN_BROWSER}</form>
<br><br>
Modified: vtigercrm/trunk/modules/Portal/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Portal/ListView.php (original)
+++ vtigercrm/trunk/modules/Portal/ListView.php Tue Apr 25 08:18:40 2006
@@ -19,7 +19,7 @@
global $current_language;
$current_module_strings = return_module_language($current_language, 'Portal');
global $adb;
-
+
$query="select * from portal";
$result=$adb->query($query);
$no_of_portals=$adb->num_rows($result);
@@ -34,6 +34,18 @@
$portal_info[]=$portal_array;
}
$smarty = new vtigerCRM_Smarty;
+$portal_def = Array();
+if($_REQUEST['portalid'] != '')
+{
+ $query="select * from portal where portalid =".$_REQUEST['portalid'];
+}else
+{
+ $query="select * from portal";
+}
+ $result=$adb->query($query);
+ $portal_def [] = $adb->query_result($result,0,'portalurl');
+ $portal_def [] = $adb->query_result($result,0,'portalid');
+ $smarty->assign("DEFPORTAL_DETAILS", $portal_def);
$smarty->assign("IMAGEPATH", $image_path);
$smarty->assign("MOD", $mod_strings);
Modified: vtigercrm/trunk/modules/Portal/Popup.php
==============================================================================
--- vtigercrm/trunk/modules/Portal/Popup.php (original)
+++ vtigercrm/trunk/modules/Portal/Popup.php Tue Apr 25 08:18:40 2006
@@ -17,8 +17,15 @@
if(isset($_REQUEST['portalurl']) && $_REQUEST['portalurl']!='')
{
$result=SavePortal($_REQUEST['portalname'],$_REQUEST['portalurl']);
- if($result == 'true')
- $portal_inputs.="<script>window.opener.location.href=window.opener.location.href;window.self.close();</script>";
+ if($result != '')
+ {
+ $portal_inputs.="<script>";
+ $portal_inputs.="var location_portal = window.opener.location.href;";
+ $portal_inputs.="location_array = location_portal.split('&portalid=');";
+ $portal_inputs.="location_portal = location_array[0]+'&portalid=".$result."';";
+ $portal_inputs.="window.opener.location.href = location_portal;";
+ $portal_inputs.="window.self.close();</script>";
+ }
}
@@ -41,6 +48,6 @@
$portal_url=$_REQUEST['portalurl'];
$query="insert into portal values(".$portalid.",'".$portal_name."','".$portal_url."',0)";
$result=$adb->query($query);
-return true;
+return $portalid;
}
?>
More information about the vtigercrm-commits
mailing list