diff --git a/public/self/dataset_preview.js b/public/self/dataset_preview.js index 57bf7b7e3..6c58a80d7 100644 --- a/public/self/dataset_preview.js +++ b/public/self/dataset_preview.js @@ -605,8 +605,11 @@ function last(){ function showfilelist(){ - var filename_title = $('a.section:first').text() - filename_title = filename_title.substring(0,filename_title.lastIndexOf('.')) + // var filename_title = $('a.section:first').text() + // filename_title = filename_title.substring(0,filename_title.lastIndexOf('.')) + var filename_index = labeltastresult[0].pic_image_field.indexOf("/",70); + filename_title = labeltastresult[0].pic_image_field.substring(filename_index + 1); + filename_title = filename_title.substring(0,fname.indexOf('/')) var htmlstr = ''; // htmlstr += '
'; htmlstr += '
' @@ -623,6 +626,7 @@ function showfilelist(){ console.log(tmpIndex) if(tmpIndex != -1){ fname = labeltastresult[i].pic_image_field.substring(tmpIndex + 1); + fname = fname.substring(fname.indexOf('/')); } }