Closes FS #100
authorx2000bedo <x2000bedo>
Sat, 30 Oct 2004 09:09:02 +0000 (09:09 +0000)
committerx2000bedo <x2000bedo>
Sat, 30 Oct 2004 09:09:02 +0000 (09:09 +0000)
+
A funny feature : opening the add/remove contact page in the main window of the site x.org
Should we keep it or should we open a new window each time ?

htdocs/javascript/popwin.js.php
templates/fiche.tpl
templates/include/minifiche.tpl
templates/include/minifiche_pvt.tpl

index c019b6f..f2373e5 100644 (file)
@@ -45,4 +45,11 @@ function popWin(theURL) {
 function popWin2(theURL) {
     popupWin(theURL,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=200,height=100');
 }
+function popSimple(theURL) {
+    popupWin(theURL,'');
+}
 function x() { return; }
+
+function remote(url){
+    window.opener.location=url
+}
index 8d3eebb..12d26d6 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: fiche.tpl,v 1.18 2004-10-29 02:11:05 x2000habouzit Exp $
+        $Id: fiche.tpl,v 1.19 2004-10-30 09:09:04 x2000bedo Exp $
  ***************************************************************************}
 
-
+{literal}
+<script type="text/javascript">
+function chgMainWinLoc( strPage ) {
+  parent.opener.document.location = strPage;
+}
+</script>
+{/literal}
 {dynamic}
 <div id="fiche">
 
       <img src="images/vcard.png" alt="Afficher la carte de visite" title="Afficher la carte de visite"/>
     </a>
     {if !$is_contact}
-    <a href="javascript:x()"  onclick="popWin('mescontacts.php?action=ajouter&amp;user={$forlife}')">
+    <a href="javascript:x()"  onclick="chgMainWinLoc('mescontacts.php?action=ajouter&amp;user={$forlife}')">
       <img src="images/ajouter.gif" alt="Ajouter à mes contacts" title="Ajouter à mes contacts" />
     </a>
     {else}
-    <a href="javascript:x()"  onclick="popWin('mescontacts.php?action=retirer&amp;user={$forlife}')">
+    <a href="javascript:x()"  onclick="chgMainWinLoc('mescontacts.php?action=retirer&amp;user={$forlife}')">
       <img src="images/retirer.gif" alt="Retirer de mes contacts" title="Retirer de mes contacts" />
     </a>
     {/if}
@@ -57,7 +63,7 @@
     {if $section}<em class="intitule">Section : </em><span>{$section}</span><br />{/if}
     {if $binets}<em class="intitule">Binet(s) : </em><span>{$binets}</span><br />{/if}
     {if $groupes}<em class="intitule">Groupe(s) X : </em><span>{$groupes|smarty:nodefaults}</span><br />{/if}
-    {if $web}<em class="intitule">Site Web : </em><br /><a href="{$web}" onclick="return popup(this)">{$web}</a><br />{/if}
+    {if $web}<em class="intitule">Site Web : </em><br /><a href="javascript:x()" onclick="popSimple('{$web}')">{$web}</a><br />{/if}
     {if $libre}<br /><em class="intitule">Commentaires : </em><br /><span>{$libre|nl2br}</span>{/if}
 </div>
 {if $adr|@count > 0}
index 0d8734e..e8b51bf 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: minifiche.tpl,v 1.9 2004-10-29 13:26:15 x2000habouzit Exp $
+        $Id: minifiche.tpl,v 1.10 2004-10-30 09:09:07 x2000bedo Exp $
  ***************************************************************************}
 
 
@@ -26,7 +26,7 @@
     {if $c.sexe}&bull;{/if}
     {min_auth level="cookie"}
     {if !$c.dcd && $inscrit}
-    <a href="javascript:x()" onclick="popWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">
+    <a href="javascript:x()" onclick="popupWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">
     {/if}
     {/min_auth}
     {if $c.epouse}{$c.epouse} {$c.prenom}<br />(née {$c.nom}){else}{$c.nom} {$c.prenom}{/if}
index 09c171a..1eb7542 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: minifiche_pvt.tpl,v 1.7 2004-10-28 13:30:27 x2000habouzit Exp $
+        $Id: minifiche_pvt.tpl,v 1.8 2004-10-30 09:09:07 x2000bedo Exp $
  ***************************************************************************}
 
 
 {if $inscrit==1}
   <div class="bits">
-    <a href="javascript:x()" onclick="popWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">
+    <a href="javascript:x()"
+    onclick="popupWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">
       <img src="images/loupe.gif" alt="Afficher la fiche" title="Afficher la fiche" />
     </a>
     <a href="vcard.php/{$c.forlife}.vcf?x={$c.forlife}">