I created another version of your renderFeed() that allows me to utilize your nifty creation in other places in my dashboards. This one takes a feedname, if it's blank it uses the tabname logic you had, if not blank it uses the 'feedname' parm. This allows me to add more feeds to your dashrss.config and then use them in columns or sidebars on other dashboard tabs. Thanks for the cool tools.
More feeds in more places...
I created another version of your renderFeed() that allows me to utilize your nifty creation in other places in my dashboards. This one takes a feedname, if it's blank it uses the tabname logic you had, if not blank it uses the 'feedname' parm. This allows me to add more feeds to your dashrss.config and then use them in columns or sidebars on other dashboard tabs. Thanks for the cool tools.
CODE in dashrss.js (changes in bold)
fmDashRss.renderFeedExt = function(id, umbracoPath, feedname) {
if(!fmDashRss.css) {
fmDashRss.css = true;
var script = f.createElement("link");
script.setAttribute("rel", "stylesheet");
script.setAttribute("type", "text/css");
script.setAttribute("href", umbracoPath + fmDashRss.appVPath + '/dashrss.css');
head.appendChild(script);
}
if(!fmDashRss.loadingGif) {
fmDashRss.loadingGif = umbracoPath + fmDashRss.appVPath + '/ajax-loader.gif';
fmDashRss.loadingGif = '<img src="'+fmDashRss.loadingGif+'" alt="Loading" width="16" height="16"/>';
}
if (feedname == "")
{
var containerId = $('#'+id).parent().parent().attr('id');
containerId = containerId.replace(/^(.*?\_tab\d{2}).*$/, "$1");
var tabName = $('#' + containerId + ' span nobr').html();
fmDashRss.load(id, tabName, umbracoPath);
}
else
{
fmDashRss.load(id, feedname, umbracoPath);
}
}
Example Code to utilize:
<h3>Help</h3>
<div id="rssdfblog" class="dashRss">
</div>
<script type="text/javascript">
<!--
$(document).ready(function() {
$('.tabpagecontainer div:first').each(function() {
$(this).css({'display': 'block'});
});
fmDashRss.renderFeedExt('rssdfblog', '<%= ConfigurationManager.AppSettings["umbracoPath"] %>', 'Darren Ferguson');
});
// -->
</script>
Good stuff. Thanks!
I'll revisit this package at a later point to add a few new whistles and bells, i'll try and incorporate your ideas at that point.
is working on a reply...