folderGrid
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:a jQuery Plugin used for dynamic creation of folders and files structure in grid format.
# folderGrid

folderGrid is a jQuery Plugin used for dynamic creation of folders 
and files structure in a grid format instead of tree.

### Requires : 
	
	jquery.folderGrid.css
	images/folder.gif, images/leaf.gif
	
	
### Usage : 

Create a div (or any container) and Fire folderGrid on the container
eg: 

    
$('#folders').folderGrid({}); ### Config Options : *mandatory options *colModel : [ {index : '', colName : ''}, {...},... ] *url : '' headerTitle : '' (default : '/') openFileFn : function(){ // code todo with the single file } parentID : '<value to be sent to server to fetch initial files and folders>' (default : 0) param : '<url-parameter to be sent to server for fetching data>' (default : 'id') ### Data Structure : `JSON Array` [ {"isFolder" : "<boolean>", "id" : "<unique value to fetch folder/file contents>", "<index of column1>" : "<value1>", "<index of column2>" : "<value2>", ...}, {...},... ] ### Example : <div id="listing"></div> $('#listing').folderGrid({ colModel : [ {index : 'name', colName : 'Name'}, {index : 'size', colName : 'Size'}, {index : 'type', colName : 'Type'}, {index : 'modified', colName : 'Date Modified'} ], url : 'getData', headerTitle : 'My Favorities', openFileFn : function(id){ alert('You have tried to open file with id - '+id); }, parentID : 1, param : 'pID' }); `data from url 'getData?pID=1'` [ {'id' : '2', 'isFolder' : 'true', 'name' : 'Folder1', 'size' : '', 'type' : 'folder', 'modified' : '4/6/2012'}, {'id' : '3', 'isFolder' : 'false', 'name' : 'File1', 'size' : '4KB', 'type' : 'file', 'modified' : '4/6/2012'}, {'id' : '4', 'isFolder' : 'false', 'name' : 'File2', 'size' : '5KB', 'type' : 'file', 'modified' : '4/6/2012'} ] `when double clicked on Folder1 row data from url getData?pID=2` [ {'id' : '5', 'isFolder' : 'false', 'name' : 'File3', 'size' : '7KB', 'type' : 'file', 'modified' : '4/6/2012'}, {'id' : '6', 'isFolder' : 'false', 'name' : 'File4', 'size' : '11KB', 'type' : 'file', 'modified' : '4/6/2012'} ] `when double clicked on a file custom function is triggered.` # Copyright and license Copyright 2012, Sandeep Vemula _aka_ bittu Licensed under the GNU-GPL licenses. You must have received a copy of the GNU General Public License along with this plugin as COPYING.txt If not, see http://www.gnu.org/licenses/ </pre> <br /> </div> <!-- detail content end --> <div class="ad_footer"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 728x90, 创建于 11-8-29 --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-9609188192387119" data-ad-slot="4736870470"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <!-- file list begin --> <div class="detail_file"> <div class="menu1_left"> <div class="menu1_right"> <div class="menu1_txt">部分文件列表(点击文件名可查看文件内容)</div> </div> </div> <div id="file_content"> <!--div class="ad_footer"> </div--> 本源码包内暂不包含可直接显示的源代码文件,请下载源码包。 </div> </div> <div class="clear"></div> <!-- file list end --> </div> <!-- content_right end --> <div class="clear"></div> </div> <!-- content end --> <!-- footer begin --> <div id="footer"> <div id="footer_content"> <div id="contact">联系我们:verysource_com<img src="/images/character/m_a_i_l.gif" width="51" height="12" align="absmiddle" /></div> <div id="copy_right">CopyRight © 2008-2022 verySource.Com All Rights reserved. <a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn/" style="color:#66FFFF; font-size:14px;">京ICP备17048824号-1</a> 京公网安备:11010502034788</div> </div> </div> <div style="display:none;"> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?9c89b037e07a1dbd53937515a5761041"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </div> <!-- footer end --> </body> </html>