[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Smarty/templates/ -> Rss.tpl (source)

   1  {*<!--
   2  /*********************************************************************************
   3    ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4     * ("License"); You may not use this file except in compliance with the License
   5     * The Original Code is:  vtiger CRM Open Source
   6     * The Initial Developer of the Original Code is vtiger.
   7     * Portions created by vtiger are Copyright (C) vtiger.
   8     * All Rights Reserved.
   9    *
  10   ********************************************************************************/
  11  -->*}
  12  <script language="JavaScript" type="text/javascript" src="modules/Rss/Rss.js"></script>
  13  <script src="include/scriptaculous/prototype.js" type="text/javascript"></script>
  14  <script src="include/scriptaculous/scriptaculous.js" type="text/javascript"></script>
  15  <script>
  16  {literal}
  17  
  18  function GetRssFeedList(id)
  19  {
  20      $("status").style.display="inline";
  21          new Ajax.Request(
  22                  'index.php',
  23                  {queue: {position: 'end', scope: 'command'},
  24                          method: 'post',
  25                          postBody: 'module=Rss&action=RssAjax&file=ListView&directmode=ajax&record='+id,
  26                          onComplete: function(response) {
  27                                  $("status").style.display="none";
  28                  $("rssfeedscont").innerHTML=response.responseText;
  29                          }
  30                  }
  31          );
  32  }
  33  
  34  function DeleteRssFeeds(id)
  35  {
  36     if(id != '')    
  37     {        
  38        if(confirm('Are you sure to delete the rss feed?'))
  39      {    
  40          show('status');    
  41          var feed = 'feed_'+id;
  42          $(feed).parentNode.removeChild($(feed));
  43          new Ajax.Request(
  44                      'index.php',
  45                      {queue: {position: 'end', scope: 'command'},
  46                              method: 'post',
  47                              postBody: 'module=Rss&return_module=Rss&action=RssAjax&file=Delete&directmode=ajax&record='+id,
  48                              onComplete: function(response) {
  49                                  $("status").style.display="none";
  50                                      $("rssfeedscont").innerHTML=response.responseText;
  51                      $("mysite").src = '';
  52                      $("rsstitle").innerHTML = "&nbsp";
  53                              }
  54                      }
  55              );
  56      }
  57     }
  58  }
  59  function SaveRssFeeds()
  60  {
  61      $("status").style.display="inline";
  62      var rssurl = $('rssurl').value;
  63      rssurl = rssurl.replace(/&/gi,"##amp##");
  64      new Ajax.Request(
  65          'index.php',
  66          {queue: {position: 'end', scope: 'command'},
  67              method: 'post',
  68              postBody:'module=Rss&action=RssAjax&file=Popup&directmode=ajax&rssurl='+rssurl, 
  69              onComplete: function(response) {
  70      
  71                                          $("status").style.display="none";
  72                      if(isNaN(parseInt(response.responseText)))
  73                          {
  74                                  alert(response.responseText);
  75                                  $('rssurl').value = '';
  76                      }
  77                      else
  78                          {
  79                                  GetRssFeedList(response.responseText);
  80                                  getrssfolders();
  81                                  $('rssurl').value = '';
  82                                  Effect.Puff('PopupLay');
  83                          }
  84                                  }
  85                          }
  86                  );
  87  }
  88  {/literal}
  89  </script>
  90  
  91  <!-- Contents -->
  92  {include file="Buttons_List1.tpl"}
  93  <table border=0 cellspacing=0 cellpadding=0 width=98% align=center>
  94  <tr>
  95      <td valign=top align=right width=8><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td>
  96      <td class="showPanelBg" valign="top" width="100%" align=center >    
  97  
  98              <!-- RSS Reader UI Starts here--><br>
  99                  <table width="100%"  border="0" cellspacing="0" cellpadding="5" class="mailClient mailClientBg">
 100                  <tr>
 101                      <td align=left>
 102                      
 103                          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
 104                          <tr>
 105                              <td width=95% align=left><img src='{$IMAGE_PATH}rssroot.gif' align='absmiddle'/><a href="javascript:;" onClick="fnvshobj(this,'PopupLay');$('rssurl').focus();" title='{$APP.LBL_ADD_RSS_FEEDS}'>{$MOD.LBL_ADD_RSS_FEED}</a></td>
 106                              <td  class="componentName" nowrap>vtiger RSS Reader</td>
 107                          </tr>
 108                          <tr>
 109                              <td colspan="2">
 110                                  <table border=0 cellspacing=0 cellpadding=2 width=100%>
 111                                  <tr>
 112                                      <td width=30% valign=top>
 113                                      <!-- Feed Folders -->
 114                                          <table border=0 cellspacing=0 cellpadding=0 width=100%>
 115                                          <tr><td class="small mailSubHeader" height="25"><b>Feed Sources</b></td></tr>
 116                                          <tr><td class="hdrNameBg" bgcolor="#fff" height=155><div id="rssfolders" style="height:100%;overflow:auto;">{$RSSFEEDS}</div></td></tr>
 117                                          </table>
 118                                      </td>
 119                                      <td width=1%>&nbsp;</td>
 120                                      <td width=69% valign=top>
 121                                      <!-- Feed Header List -->
 122                                          <table border=0 cellspacing=0 cellpadding=0 width=100%>
 123                                          <tr>
 124                                              <td><div id="rssfeedscont">
 125                                              {include file='RssFeeds.tpl'}    
 126                                              </div>
 127                                              </td>
 128                                          </tr>
 129                                          </table>
 130                                      </td>
 131                                  </tr>
 132                                  </table>
 133                                  
 134                              </td>
 135                          </tr>
 136                          <tr>        
 137                              <td>&nbsp;</td>
 138                              <td>&nbsp;</td>
 139                              <td height="5"></td>
 140                          </tr>
 141                          <tr>
 142                              
 143                              <td colspan="3" class="mailSubHeader" id="rsstitle">&nbsp;</td>
 144                          </tr>
 145                          <tr>
 146                              <!-- RSS Display -->
 147                              <td colspan="3" style="padding:2px">
 148                              <iframe width="100%" height="250" frameborder="0" id="mysite" scrolling="auto" marginheight="0" marginwidth="0" style="background-color:#FFFFFF;"></iframe>
 149                              </td>
 150                          </tr>
 151                          </table>
 152                      </td>
 153                  </tr>
 154                  </table>
 155              <!-- RSS Reader UI ends here -->
 156      </td>
 157      <td valign=top align=right width=8><img src="{$IMAGE_PATH}showPanelTopRight.gif"></td>            
 158      </tr>
 159      </table>
 160      
 161      
 162      
 163      <div id="PopupLay" class="layerPopup">
 164      <table width="100%" border="0" cellpadding="5" cellspacing="0" class="layerHeadingULine">
 165      <tr>
 166      <td class="layerPopupHeading" align="left"><img src="{$IMAGE_PATH}rssroot.gif" width="24" height="22" align="absmiddle" />&nbsp;{$MOD.LBL_ADD_RSS_FEED}</td>
 167      <td align="right"><a href="javascript:fninvsh('PopupLay');"><img src="{$IMAGE_PATH}close.gif" border="0"  align="absmiddle" /></a></td>
 168      </tr>
 169      </table>
 170      <table border=0 cellspacing=0 cellpadding=5 width=95% align=center> 
 171      <tr>
 172          <td class=small >
 173          
 174              <!-- popup specific content fill in starts -->
 175  
 176              <table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
 177                  <tr>
 178                      <td align="right" width="25%"><b>{$MOD.LBL_FEED}</b></td>
 179                      <td align="left" width="75%"><input type="text" id="rssurl" class="txtBox" value=""/></td>
 180                  </tr>
 181              </table>
 182              <!-- popup specific content fill in ends -->
 183          
 184          </td>
 185      </tr>
 186      </table>
 187      <table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport">
 188      <tr>
 189      <td align="center">
 190      <input type="button" name="save" value=" &nbsp;{$APP.LBL_SAVE_BUTTON_LABEL}&nbsp; " class="crmbutton small save" onClick="SaveRssFeeds();"/>&nbsp;&nbsp;
 191      </td>
 192      </tr>
 193      </table>
 194      </div>
 195  
 196  <script type="text/javascript" language="Javascript">
 197  function makedefaultRss(id)
 198  {ldelim}
 199      if(id != '')
 200      {ldelim}
 201          $("status").style.display="inline";
 202          new Ajax.Request(
 203                      'index.php',
 204                      {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
 205                              method: 'post',
 206                              postBody:'module=Rss&action=RssAjax&file=Popup&directmode=ajax&record='+id, 
 207                              onComplete: function(response) {ldelim}
 208                                      $("status").style.display="none";
 209                          getrssfolders();
 210                             {rdelim}
 211                      {rdelim}
 212              );
 213      {rdelim}
 214  {rdelim}
 215  function getrssfolders()
 216  {ldelim}
 217      new Ajax.Request(
 218              'index.php',
 219                  {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
 220                      method: 'post',
 221                          postBody:'module=Rss&action=RssAjax&file=ListView&folders=true',
 222              onComplete: function(response) {ldelim}
 223                                  $("status").style.display="none";
 224                      $("rssfolders").innerHTML=response.responseText;
 225                                 {rdelim}
 226                          {rdelim}
 227                  );
 228  {rdelim}
 229  </script>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7