From: <sk...@us...> - 2008-09-30 08:56:13
|
Revision: 1313 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1313&view=rev Author: sknappe Date: 2008-09-30 08:56:01 +0000 (Tue, 30 Sep 2008) Log Message: ----------- minor changes and bugfixes Modified Paths: -------------- trunk/src/dbpedia-navigator/ajax_generate_URL.php trunk/src/dbpedia-navigator/helper_functions.php trunk/src/dbpedia-navigator/index.php trunk/src/dbpedia-navigator/js/ajax.js trunk/src/dbpedia-navigator/js/navigator.js Modified: trunk/src/dbpedia-navigator/ajax_generate_URL.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_generate_URL.php 2008-09-29 19:33:54 UTC (rev 1312) +++ trunk/src/dbpedia-navigator/ajax_generate_URL.php 2008-09-30 08:56:01 UTC (rev 1313) @@ -32,7 +32,7 @@ $attr[]='concept='.substr($last_action,strpos($last_action, "/")+1); $last_action='searchConceptInstances/Concept'; } - $attributes='?'.implode('&',$attr); + if (count($attr)>0) $attributes='?'.implode('&',$attr); $url='http://'.$_SERVER['HTTP_HOST'].'/dbpedia-navigator/'.$last_action.$attributes; Modified: trunk/src/dbpedia-navigator/helper_functions.php =================================================================== --- trunk/src/dbpedia-navigator/helper_functions.php 2008-09-29 19:33:54 UTC (rev 1312) +++ trunk/src/dbpedia-navigator/helper_functions.php 2008-09-30 08:56:01 UTC (rev 1313) @@ -49,7 +49,7 @@ function getResultsTable($names,$labels,$classes,$number) { - $ret="<p>These are your Searchresults. Show best "; + $ret="<p>These are the results of your search. Show best "; for ($k=10;$k<125;){ $ret.="<a href=\"#\" onclick=\"search_it('label='+document.getElementById('label').value+'&number=".$k."');return false;\""; if ($k==$number) $ret.=" style=\"text-decoration:none;\""; Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-09-29 19:33:54 UTC (rev 1312) +++ trunk/src/dbpedia-navigator/index.php 2008-09-30 08:56:01 UTC (rev 1313) @@ -16,7 +16,7 @@ //what happens onLoad $onLoad="onLoad=\"document.getElementById('label').focus();"; -if (isset($_GET['positives'])||isset($_GET['negatives'])) $onLoad.="setPositivesAndNegatives('positives=".$_GET['positives']."&negatives=".$_GET['negatives']."');"; +if (isset($_GET['positives'])||isset($_GET['negatives'])) $onLoad.="setPositivesAndNegatives('positives=".@$_GET['positives']."&negatives=".@$_GET['negatives']."');"; else if (isset($_SESSION['positives'])||isset($_SESSION['negatives'])) $onLoad.="setPositivesAndNegatives('positives=".$_SESSION['positives']."&negatives=".$_SESSION['negatives']."');"; if (isset($_GET['showArticle'])) $onLoad.="get_article('label=".$_GET['showArticle']."&cache=-1');"; else if (isset($_GET['search'])) $onLoad.="search_it('label=".$_GET['search']."&number=10');"; Modified: trunk/src/dbpedia-navigator/js/ajax.js =================================================================== --- trunk/src/dbpedia-navigator/js/ajax.js 2008-09-29 19:33:54 UTC (rev 1312) +++ trunk/src/dbpedia-navigator/js/ajax.js 2008-09-30 08:56:01 UTC (rev 1313) @@ -60,13 +60,11 @@ document.getElementById('Negatives').innerHTML=response[4]; if (response[5].length>0&&response[6].length>0) loadGoogleMap(response[5],response[6],''+response[1]); - if (response[1]=='Article not found') - setTimeout("search_it('label='+document.getElementById('label').value+'&number=10')",2000); else { document.getElementById('LastArticlesBox').style.display='block'; learnConcept(); } - } + }else setTimeout("search_it('label='+document.getElementById('label').value+'&number=10')",2000); } } Modified: trunk/src/dbpedia-navigator/js/navigator.js =================================================================== --- trunk/src/dbpedia-navigator/js/navigator.js 2008-09-29 19:33:54 UTC (rev 1312) +++ trunk/src/dbpedia-navigator/js/navigator.js 2008-09-30 08:56:01 UTC (rev 1313) @@ -61,7 +61,7 @@ for (var i=0;i<sitenumbers.length;i++){ if ((parseInt(sitenumbers[i].getElementsByTagName('a')[0].innerHTML)-1)*25==number) sitenumbers[i].getElementsByTagName('a')[0].style.textDecoration='none'; else sitenumbers[i].getElementsByTagName('a')[0].style.textDecoration='underline'; - if ((parseInt(sitenumbers[i].getElementsByTagName('a')[0].innerHTML)-1)*25>=j) + if ((parseInt(sitenumbers[i].getElementsByTagName('a')[0].innerHTML)-1)*25>=j||sitenumbers.length<2) sitenumbers[i].style.display='none'; else sitenumbers[i].style.display='inline'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |