Migrating to jQuery the feed feature.

master
ravenlp 2007-10-09 06:20:31 +00:00
parent 183deccc15
commit 27ef090425
2 changed files with 7 additions and 8 deletions

View File

@ -51,6 +51,7 @@ if ($user->isAdmin()) {
$("#divMessages").fadeOut(5000,function(){
$("#divMessages").css({display:"none"});
});
$("#source").change(function (){selectFeedType('<?php echo __("Feed Url:")?>','<?php echo __(" username:")?>')})
});
</script>
<style type="text/css" media="screen">
@ -84,7 +85,7 @@ if ($user->isAdmin()) {
<ul>
<li>
<label for="source"><?php echo __("Import data from:")?></label>
<select name="source" id="source" onchange="selectFeedType('<?php echo __("Feed Url:")?>','<?php echo __(" username:")?>' )">
<select name="source" id="source">
<option value="Rss" selected="selected">Rss/atom Feed</option>
<option value="Twitter">Twitter</option>
<option value="Youtube">Youtube</option>

View File

@ -48,13 +48,11 @@ function exit(el, path) {
}
function selectFeedType(feed_url,username){
var source = $('source');
if(source.selectedIndex != 0){
$('import_as').style.display="none";
$('url_label').firstChild.nodeValue = source[source.selectedIndex].firstChild.nodeValue + username;
if( $('#source').val() != 'Rss'){
$('#import_as').hide();
$('#url_label').text($('#source').val() + username) ;
}else{
$('import_as').style.display="block";
$('url_label').firstChild.nodeValue = feed_url;
$('#import_as').show();
$('#url_label').text(feed_url);
}
}