Search the Community
Showing results for tags 'cover'.
-
Hi We use SIMS and cover lists are generated as HTML files. We used to be able to pull this into Frog 3 via Frog web, but can't do that any longer. It was suggested that I created a file drop and dragged and dropped the HTML files into it, placing an HTML widget above it and asking it to displace the files in file drop. Done that, and it works.... BUT the files, whilst dated chronologically don't display that way. eg 160916, 170916, 180916, 200916, 210916, 220916 display as 200916, 210916, 220916, 160916, 170916, 180916 which is really frustrating. Does anyone have any HTML code I can add in that woud fix the order in which it is shown? <div id="coverpage"></div> <script type="text/javascript"> var baseURL = Frog.Utilities.getBaseUrl(), // Change fileDropUuid to the UUID of your file drop widget fileDropUuid = '70BDB7422002874EC49D5FBFB7EEAC03C6C22C9CB651A4D8'; Frog.Model .api('filedrop.get', { filedrop: fileDropUuid }).done(function(filesResponse) { var $fileList = $('#coverpage'); filesResponse.data.resources.forEach(function(file, index) { // Check whether the file is one of these filetypes; Want to add more? Add to the array if (['html','htm'].indexOf(file.file.ext.toLowerCase()) > -1) { console.log(file); // This only runs when you have uncommented the the HTML code above // This code adds file names to the ul#filelist $fileList.append( '<iframe width="800" height="300" style="margin-left:auto; margin-right:auto;" src="'+ baseURL + '/app/file/resource/' + file.file.uuid + '.' + file.file.ext + '"></iframe>' ); } }); }); </script> OR Anyone got a better way of doing this? I am not popular with the teaching staff at the moment