[Vtigercrm-commits] [vtiger-commits] r5070 - /vtigercrm/trunk/Smarty/templates/Rss.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 12 05:25:10 EDT 2006
Author: don
Date: Wed Apr 12 03:25:04 2006
New Revision: 5070
Log:
New Rss Integrated
Modified:
vtigercrm/trunk/Smarty/templates/Rss.tpl
Modified: vtigercrm/trunk/Smarty/templates/Rss.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Rss.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Rss.tpl Wed Apr 12 03:25:04 2006
@@ -1,5 +1,64 @@
+<script language="JavaScript" type="text/javascript" src="modules/Rss/Rss.js"></script>
+<script>
+{literal}
-<script language="JavaScript" type="text/javascript" src="modules/Rss/Rss.js"></script>
+function ajaxSetDefault(response)
+{
+ hide('status');
+ getrssfolders();
+ //window.location = "index.php?module=Rss&action=ListView&record="+response.responseText;
+}
+function GetRssFeedList(id)
+{
+ show('status');
+ var ajaxObj = new Ajax(ajaxRssFeedResponse);
+ var urlstring = 'module=Rss&action=RssAjax&vtigerfile=ListView&directmode=ajax&record='+id;
+ ajaxObj.process("index.php?",urlstring);
+}
+function ajaxRssFeedResponse(response)
+{
+ hide('status');
+ document.getElementById("rssfeedscont").innerHTML=response.responseText;
+}
+function DeleteRssFeeds(id)
+{
+ show('status');
+ var feed = 'feed_'+id;
+ document.getElementById(feed).parentNode.removeChild(document.getElementById(feed));
+ var ajaxObj = new Ajax(ajaxRssFeedResponse);
+ var urlstring = 'module=Rss&return_module=Rss&action=RssAjax&vtigerfile=Delete&directmode=ajax&record='+id;
+ ajaxObj.process("index.php?",urlstring);
+}
+function SaveRssFeeds()
+{
+ show('status');
+ var ajaxObj = new Ajax(ajaxRssSaveResponse);
+ var rssurl = document.getElementById('rssurl').value;
+ var category = document.getElementById('rsscategory')[document.getElementById('rsscategory').selectedIndex].value;
+ var urlstring = 'module=Rss&action=RssAjax&vtigerfile=Popup&directmode=ajax&rssurl='+rssurl+'&rsscategory='+category;
+ ajaxObj.process("index.php?",urlstring);
+}
+function ajaxRssSaveResponse(response)
+{
+ hide('status')
+ if(isNaN(parseInt(response.responseText)))
+ {
+ alert(response.responseText);
+ document.getElementById('rssurl').value = '';
+ }
+ else
+ {
+ GetRssFeedList(response.responseText);
+ getrssfolders();
+ document.getElementById('rssurl').value = '';
+ fninvsh('PopupLay');
+ //window.location = "index.php?module=Rss&action=ListView&record="+response.responseText;
+ }
+
+}
+{/literal}
+</script>
+
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
<tr>
<td class="showPanelBg" valign="top" width="95%" style="padding-left:20px; "><br />
@@ -24,35 +83,30 @@
<td bgcolor="#ECECEC" style="padding-left:10px;height:20px;vertical-align:middle;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td style="padding:10px;vertical-align:middle;" width="28%">{$RSSFEEDS_TITLE}</td>
+
+ <td style="padding:10px;vertical-align:middle;" width="28%">
+ <img src='{$IMAGEPATH}rssroot.gif' align='absmiddle'/><a href="javascript:;" onClick="fnvshobj(this,'PopupLay');" title='{$APP.LBL_ADD_RSS_FEEDS}'>Add Rss Feed</a>
+ </td>
<td width="2%"> </td>
-
<td width="60%"><img src="{$IMAGEPATH}rssimage.gif" width="176" height="44" align="right"/></td>
</tr>
- <tr>
- <td bgcolor="#949494"> </td>
- <td> </td>
- <td class="subHdr"><b>Feeds list from : {$TITLE}</b>
+ <tr><td colspan="3">
+
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td bgcolor="#949494" width="25%" height="25"> </td>
+ <td rowspan="2" width="2%"> </td>
+ <td rowspan="2">
+ <div id="rssfeedscont">
+ {include file='RssFeeds.tpl'}
+ </div>
</td>
- </tr>
+ </tr>
+ <tr><td valign="top" bgcolor="#FFFFFF"><div id="rssfolders">{$RSSFEEDS}</div></td></tr>
+ </table>
+
+ </td></tr>
- <tr>
- <td rowspan="2" valign="top" bgcolor="#FFFFFF">{$RSSFEEDS}</td>
- <td> </td>
- <td class="delBg"><input type="button" name="delete" value=" Delete " class="classBtn" /></td>
- </tr>
- <tr>
- <td> </td>
- <td style="padding:1px;" align="left">
- <div id="rssScroll">
-
- <table class="rssTable" cellspacing="0" cellpadding="0">
- <tr><td colspan="4">{$RSSDETAILS}</td></tr>
- </table>
- </div>
- </td>
- </tr>
-
<tr>
<td> </td>
<td> </td>
@@ -61,19 +115,6 @@
<tr>
<td colspan="3" class="frameHdr" id="rsstitle"> </td>
- </tr>
- <tr>
- <td colspan="3" class="forwardBg">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="10%">Forward to </td>
- <td width="50%"><input type="text" name="textfield" class="detailedViewTextBox"/></td>
- <td width="5%"><input type="button" name="Button" value=" Send Now " class="classBtn"/></td>
- <td width="35%"> </td>
- </tr>
- </table>
-
- </td>
</tr>
<tr>
<td colspan="3">
@@ -96,3 +137,62 @@
<td> </td>
</tr>
</table>
+<div id="status" style="display:none;position:absolute;background-color:#bbbbbb;left:887px;top:0px;height:17px;white-space:nowrap;"">Processing Request...</div>
+ <div id="PopupLay">
+ <table width="100%" border="0" cellpadding="5" cellspacing="0">
+ <tr>
+ <td class="genHeaderSmall" align="left"><img src="{$IMAGEPATH}rssroot.gif" width="24" height="22" align="absmiddle" /> Add RSS Feed</td>
+ <td align="right"><a href="javascript:fninvsh('PopupLay');"><img src="{$IMAGEPATH}close.gif" border="0" align="absmiddle" /></a></td>
+ </tr>
+ <tr><td colspan="2"><hr /></td></tr>
+ <tr>
+ <td align="right" width="30%"><b>Feed :</b></td>
+ <td align="left" width="70%"><input type="text" id="rssurl" class="txtBox" /></td>
+ </tr>
+
+ <tr>
+ <td align="right"><b>Category : </b></td>
+ <td align="left"><select id="rsscategory" class="importBox" style="width:100%">{$RSSCATEG}</select></td>
+ </tr>
+ <tr><td colspan="2" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input type="button" name="save" value=" Save " class="classBtn" onClick="SaveRssFeeds();"/>
+ </td>
+ </tr>
+ <tr><td colspan="2" style="border-top:1px dashed #CCCCCC;"> </td></tr>
+ </table>
+ </div>
+
+<script type="text/javascript" language="Javascript">
+function toggleRSSFolder(id) {ldelim}
+ if (document.getElementById(id+"_feeds").style.display=="none") {ldelim}
+ document.getElementById(id+"_feeds").style.display="block"
+ document.getElementById(id+"_folder").src="{$IMAGEPATH}rss_folder_opn.gif"
+ document.getElementById(id+"_toggle").src="{$IMAGEPATH}minus.gif"
+ {rdelim} else {ldelim}
+ document.getElementById(id+"_feeds").style.display="none"
+ document.getElementById(id+"_folder").src="{$IMAGEPATH}rss_folder_cls.gif"
+ document.getElementById(id+"_toggle").src="{$IMAGEPATH}plus.gif"
+ {rdelim}
+
+{rdelim}
+function makedefaultRss(id)
+{ldelim}
+ show('status');
+ var ajaxObj = new Ajax(ajaxSetDefault);
+ var urlstring = 'module=Rss&action=RssAjax&vtigerfile=Popup&directmode=ajax&record='+id;
+ ajaxObj.process("index.php?",urlstring);
+{rdelim}
+function getrssfolders()
+{ldelim}
+ var ajaxObj = new Ajax(ajaxrssfolders);
+ var urlstring = 'module=Rss&action=RssAjax&vtigerfile=ListView&folders=true';
+ ajaxObj.process("index.php?",urlstring);
+{rdelim}
+function ajaxrssfolders(response)
+{ldelim}
+ hide('status')
+ document.getElementById("rssfolders").innerHTML=response.responseText;
+{rdelim}
+</script>
More information about the vtigercrm-commits
mailing list