Created
March 12, 2011 06:44
-
-
Save pragmaticobjects/867096 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Titanium File Explorer</title> | |
| <link rel="stylesheet" href="css/sunny/jquery-ui-1.8.10.custom.css" type="text/css" media="screen" charset="utf-8" /> | |
| <link rel="stylesheet" href="css/ui.jqgrid.css" type="text/css" media="screen" charset="utf-8" /> | |
| <link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" charset="utf-8" /> | |
| <link rel='stylesheet' href="css/app.css" type="text/css" media="screen" charset="utf-8" /> | |
| <script src="js/jquery-1.4.4.min.js" type="text/javascript"></script> | |
| <script src="js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script> | |
| <script src="js/jqGrid/js/i18n/grid.locale-en.js" type="text/javascript"></script> | |
| <script src="js/jqGrid/jquery.jqGrid.js" type="text/javascript"></script> | |
| <script type="text/python"> | |
| import fileexplorer | |
| </script> | |
| <script> | |
| $(document).ready(function() { | |
| jQuery("#files-list").jqGrid({ | |
| datatype: "local", | |
| height: 350, | |
| colNames:['File Name', 'Type', 'Size', 'Last Modified'], | |
| colModel:[ | |
| {name: 'filename', index: 'filename', width: 400, sorttype: "string"}, | |
| {name: 'isfolder', index: 'isfolder', width: 110, sorttype: "string"}, | |
| {name: 'filesize', index: 'filesize', width: 100, sorttype: "float"}, | |
| {name: 'lastmodified', index: 'lastmodified', width: 320, sorttype: "string"} | |
| ], | |
| multiselect: true, | |
| caption: "Titanium File Explorer" | |
| }); | |
| var files = fileexplorer.listFiles(''); | |
| $.each(files, function(i, e) { | |
| var rowData = { | |
| filename: e.filename, | |
| isfolder: (e.isdir == true) ? 'Folder': 'File', | |
| filesize: e.filesize, | |
| lastmodified: e.lastmodified | |
| }; | |
| jQuery("#files-list").jqGrid('addRowData', i+1, rowData); | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="header"><h1>Titanium File Explorer</h1></div> | |
| <hr> | |
| <div class="span-22 last"> | |
| <table id="files-list"></table> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment