Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix floating "No Results Found" in the search engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 7, 2013
1 parent 8455078 commit 7adbae5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
6 changes: 2 additions & 4 deletions core/src/plugins/core.ajaxplorer/ajxp_registry.xsd
Expand Up @@ -515,10 +515,8 @@
<xs:element minOccurs="0" ref="extensionOnInit"/>
<xs:element minOccurs="0" ref="clientListener"/>
<xs:element minOccurs="0" ref="standardFormDefinition"/>
<xs:choice minOccurs="0">
<xs:element ref="serverCallback"/>
<xs:element ref="activeCondition"/>
</xs:choice>
<xs:element minOccurs="0" ref="serverCallback"/>
<xs:element minOccurs="0" ref="activeCondition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/en.php
Expand Up @@ -532,5 +532,6 @@
"474" => "No description available",
"475" => "Files shared amongst all users",
"476" => "Your personal workspace",
"477" => "Select a file or folder to see its details here"
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
);
Expand Up @@ -513,7 +513,9 @@ Class.create("SearchEngine", AjxpPane, {
this.hasResults = true;
},
addNoResultString : function(){
$(this._resultsBoxId).insert(new Element('div').update("No results found."));
if(!$(this._resultsBoxId).down('#no-results-found')){
$(this._resultsBoxId).insert({top: new Element('div', {id:'no-results-found'}).update(MessageHash[478])});
}
},
/**
* Put a folder to search in the queue
Expand All @@ -534,6 +536,41 @@ Class.create("SearchEngine", AjxpPane, {
this.updateStateFinished();
}
},

buildNodeProviderProperties: function(currentFolder, remote_indexation){

var props = {};
if(this._searchMode == "remote"){
/* REMOTE INDEXER CASE */
props.get_action = 'search';
props.query = this.crtText;
if(this.hasMetaSearch()){
props.fields = this.getSearchColumns().join(',');
}
}else{

if(remote_indexation){

props.get_action = remote_indexation;
props.query = this.crtText;
if(this.hasMetaSearch()){
props.fields = this.getSearchColumns().join(',');
}
props.dir = currentFolder;

}else{

props.get_action = 'ls';
props.options = 'a' + (this.hasMetaSearch()?'l':'');
props.dir = currentFolder;

}

}
return props;

},

/**
* Get a folder content and searches its children
* Should reference the IAjxpNodeProvider instead!! Still a "ls" here!
Expand Down Expand Up @@ -629,6 +666,9 @@ Class.create("SearchEngine", AjxpPane, {
var nodes = XPathSelectNodes(oXmlDoc.documentElement, "tree");
if(!nodes.length){
this.addNoResultString();
}else{
var noRes = $(this._resultsBoxId).down('#no-results-found');
if(noRes) noRes.remove();
}
for (var i = 0; i < nodes.length; i++)
{
Expand Down
Expand Up @@ -2554,6 +2554,11 @@ div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed span.text_lab
padding-top: 0;
}

#no-results-found {
text-align: center;
margin-top: 10%;
}

.infoPanelActions
{
padding:5px;
Expand Down Expand Up @@ -4240,7 +4245,7 @@ div.innerTabulator > div.tabulatorContainer > #display_toolbar a
display: none;
}

.ipanel_no_selection_select {
.ipanel_no_selection_select, #no-results-found {
color: rgb(180, 184, 190);
text-shadow: 1px 1px 0 #ffffff;
}
Expand Down

0 comments on commit 7adbae5

Please sign in to comment.