Skip to content

Commit

Permalink
Merge 8b74212 into bdbb7b6
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Nov 9, 2017
2 parents bdbb7b6 + 8b74212 commit 05eaa31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ define([
function fetchData(searchTerm) {
searchTerm = searchTerm || '';
if (dataSource === 'ftp_staging') {
return Promise.resolve(stagingService.search({path: searchTerm}))
return Promise.resolve(stagingService.search({query: searchTerm}))
.then(function(results) {
results = JSON.parse(results).filter(function(file) {
return !file.isFolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ define([
},

updateView: function() {
this.stagingServiceClient.list()
this.stagingServiceClient.list({path: this.subpath})
.then(function(data) {
var files = JSON.parse(data);
files.forEach(function(f) {
Expand Down Expand Up @@ -227,7 +227,6 @@ define([

$('td:eq(0)', nRow).find('i[data-name]').on('click', function(e) {
var fileName = $(e.currentTarget).data().name;

var myFile = getFileFromName(fileName);

$(e.currentTarget).toggleClass('fa-caret-down fa-caret-right');
Expand Down Expand Up @@ -261,7 +260,12 @@ define([
var $tabsDiv = $.jqElem('div')
.append('Loading file info...please wait');

this.stagingServiceClient.metadata({ path : fileData.name }).then( function(dataString, status, xhr) {
var filePath = this.subpath;
if (filePath.length) {
filePath += '/';
}
filePath += fileData.name;
this.stagingServiceClient.metadata({ path : filePath }).then( function(dataString, status, xhr) {
$tabsDiv.empty();
var data = JSON.parse(dataString);

Expand Down

0 comments on commit 05eaa31

Please sign in to comment.