/css/ext-all.css"/>

欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Ext.ux.UploadDialog.Dialog Ext上傳

系統 2707 0
今天做項目做了個上傳的功能,不過遇到好多問題,先在這做個筆記。。。。

先引入
Java代碼 復制代碼 ? 收藏代碼
  1. ???<link?rel= "stylesheet" ?type= "text/css" ?href= "<%=path?%>/css/ext-all.css" ?/> ??
  2. <!--?GC?--> ??
  3. <!--?LIBS?--> ??
  4. <script?type= "text/javascript" ?src= "<%=path?%>/js/ext-base.js" ></script> ??
  5. <!--?ENDLIBS?--> ??
  6. <script?type= "text/javascript" ?src= "<%=path?%>/js/ext-all.js" ></script> ??
  7. <script?type= "text/javascript" ?src= "<%=path?%>/js/ext-lang-zh_CN.js" ></script> ??
  8. ???? ??
  9. <script?type= "text/javascript" ?src= "<%=path?%>/js/UploadDialog/Ext.ux.UploadDialog.js" ></script> ??
  10. ???? ??
  11. <script?type= "text/javascript" ?src= "<%=path?%>/js/UploadDialog/Ext.ux.UploadDialog.packed.js" ></script>??
          <link rel="stylesheet" type="text/css" href="<%=path %>/css/ext-all.css" />
	<!-- GC -->
	<!-- LIBS -->
	<script type="text/javascript" src="<%=path %>/js/ext-base.js"></script>
	<!-- ENDLIBS -->
	<script type="text/javascript" src="<%=path %>/js/ext-all.js"></script>
	<script type="text/javascript" src="<%=path %>/js/ext-lang-zh_CN.js"></script>
		
	<script type="text/javascript" src="<%=path %>/js/UploadDialog/Ext.ux.UploadDialog.js"></script>
		
	<script type="text/javascript" src="<%=path %>/js/UploadDialog/Ext.ux.UploadDialog.packed.js"></script>

    


Ext代碼:
Java代碼 復制代碼 ? 收藏代碼
  1. ??? /** ?
  2. ????*? 文件上傳 ?
  3. ????*/ ??
  4. ???function?insertImages()? ??
  5. {? ??
  6. ????var?editId=Ext.getCmp( 'queId' ).getValue(); ??
  7. ???? //alert('../files.do?method=addFile&type=ntc&tmpId='+useId+'&isupdate='+isupdate+'&editId='+editId); ??
  8. ????dialog?=? new ?Ext.ux.UploadDialog.Dialog({? ??
  9. ??????????title:? ' 文件上傳 ' ,?? ??
  10. ??????????url:paths+ '/files.do?method=addFile&type=que&tmpId=' +useId+ '&isupdate=' +isupdate+ '&editId=' +editId,?? ??
  11. ??????????width?:? 450 ,? ??
  12. ??????????height?:? 300 ,? ??
  13. ??????????minWidth?:? 450 ,? ??
  14. ??????????minHeight?:? 300 ,? ??
  15. ??????????draggable?:? true ,? ??
  16. ??????????resizable?:? true ,? ??
  17. ?????????? //autoCreate:?true,???? ??
  18. ??????????constraintoviewport:? true ,?? ??
  19. ??????????permitted_extensions:[ 'ZIP' , 'zip' , 'DOC' , 'doc' , 'XLS' , 'xls' , 'TXT' , 'txt' , 'RAR' , 'rar' , 'JPG' , 'jpg' , 'GIF' , 'gif' , 'PNG' , 'png' ],???? ??
  20. ??????????modal:? true ,? ??
  21. ?????????? //post_var_name:?'mms',? ??
  22. ??????????post_var_name:? 'upload' ,? ??
  23. ??????????reset_on_hide:? false ,?? ??
  24. ??????????allow_close_on_upload:? true ,??? //關閉上傳窗口是否仍然上傳文件? ??
  25. ??????????upload_autostart:? true ??? ??
  26. ????});? ??
  27. ????dialog.show(); //'show-button'? ??
  28. ????dialog.on( 'uploadsuccess' ,?onUploadSuccess);? ??
  29. }? ??
  30. ??
  31. ??
  32. function?onUploadSuccess(dialog,?filename,?resp_data,?record){??? ??
  33. ????????????????var?queId= '' ; ??
  34. ???????????????? if (isupdate== 1 ) ??
  35. ????????????????????queId=useId; ??
  36. ???????????????? if (isupdate== 2 ) ??
  37. ????????????????????queId=Ext.getCmp( 'queId' ).getValue(); ??
  38. ????????????????fileDs.load({ ??
  39. ????????????????????params:?{ ??
  40. ????????????????????????findId:?queId, ??
  41. ????????????????????????type: 'que' , ??
  42. ????????????????????????isupdate:isupdate ??
  43. ????????????????????????????} ??
  44. ????????????????}); ??
  45. }??
          /**
     * 
      
        文件上傳
      
      
     */
    function insertImages() 
	{ 
		var editId=Ext.getCmp('queId').getValue();
		//alert('../files.do?method=addFile&type=ntc&tmpId='+useId+'&isupdate='+isupdate+'&editId='+editId);
    	dialog = new Ext.ux.UploadDialog.Dialog({ 
	          title: '
      
        文件上傳
      
      ',  
	          url:paths+'/files.do?method=addFile&type=que&tmpId='+useId+'&isupdate='+isupdate+'&editId='+editId,  
	          width : 450, 
	          height : 300, 
	          minWidth : 450, 
	          minHeight : 300, 
	          draggable : true, 
	          resizable : true, 
	          //autoCreate: true,    
	          constraintoviewport: true,  
	          permitted_extensions:['ZIP','zip','DOC','doc','XLS','xls','TXT','txt','RAR','rar','JPG','jpg','GIF','gif','PNG','png'],    
	          modal: true, 
	          //post_var_name: 'mms', 
	          post_var_name: 'upload', 
	          reset_on_hide: false,  
	          allow_close_on_upload: true,   //關閉上傳窗口是否仍然上傳文件 
	          upload_autostart: true   
	    }); 
    	dialog.show();//'show-button' 
    	dialog.on('uploadsuccess', onUploadSuccess); 
	} 


	function onUploadSuccess(dialog, filename, resp_data, record){   
	  				var queId='';
					if(isupdate==1)
						queId=useId;
					if(isupdate==2)
						queId=Ext.getCmp('queId').getValue();
					fileDs.load({
						params: {
							findId: queId,
							type:'que',
							isupdate:isupdate
								}
					});
	}

    


Ext.ux.UploadDialog中的其它事件函數[轉載自http://wayfoon.iteye.com/blog/432541]
??? * filetest - fires before file is added into the queue, parameters:
????? dialog - reference to dialog
????? filename - file name
????? If handler returns false then file will not be queued.
??? * fileadd - fires when file is added into the queue, parameters:
????? dialog - reference to dialog
????? filename - file name
??? * fileremove - fires when file is removed from the queue, parameters:
????? dialog - reference to dialog
????? filename - file name
????? record - file record
??? * resetqueue - fires when upload queue is resetted, parameters:
????? dialog - reference to dialog
??? * beforefileuploadstart - fires when file as about to start uploading:
????? dialog - reference to dialog
????? filename - uploaded file name
????? record - file record
????? If handler returns false then file upload will be canceled.
??? * fileuploadstart - fires when file has started uploading:
????? dialog - reference to dialog
????? filename - uploaded file name
????? record - file record
??? * uploadsuccess - fires when file is successfuly uploaded, parameters:
????? dialog - reference to dialog
????? filename - uploaded file name
????? data - js-object builded from json-data returned from upload handler response.
????? record - file record
??? * uploaderror - fires when file upload error occured, parameters:
????? dialog - reference to dialog
????? filename - uploaded file name
????? data - js-object builded from json-data returned from upload handler response.
????? record - file record
??? * uploadfailed - fires when file upload failed, parameters:
????? dialog - reference to dialog
????? filename - failed file name
????? record - file record
??? * uploadcanceled - fires when file upload canceled, parameters:
????? dialog - reference to dialog
????? filename - failed file name
????? record - file record
??? * uploadstart - fires when upload process starts, parameters:
????? dialog - reference to dialog
??? * uploadstop - fires when upload process stops, parameters:
????? dialog - reference to dialog
??? * uploadcomplete - fires when upload process complete (no files to upload left), parameters:
????? dialog - reference to dialog

Ext.ux.UploadDialog.Dialog Ext上傳


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!??!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 91精品国产露脸在线观看 | 久久99国产精一区二区三区 | 男人添女人下面免费网站 | 日韩视频在线播放 | 国产亚洲视频免费播放 | 久久久精品免费热线观看 | 成人网在线免费观看 | 欧美国产中文字幕 | 玖草在线播放 | 日本不卡在线一区二区三区视频 | 午夜婷婷精品午夜无码A片影院 | 成人精品久久 | 黄色激情毛片 | 精品国产乱码久久久久久久 | 97碰碰在线视视频 | 欧美第一色 | 日本香蕉一区二区三区 | 欧美激情精品久久久久久黑人 | 在线观看日本中文字幕 | 久九精品| 一级在线观看 | 久久精品亚洲精品国产欧美kt∨ | 亚洲免费观看视频 | 国产成人免费永久播放视频平台 | 久久精品国产精品亚洲综合 | 国产欧美精品一区二区三区 | 综合色播 | 欧美精品aaa久久久影院 | 欧美成人一区二区 | 国产精品久久久久久亚洲色 | 久久免费国产视频 | 亚洲精品乱码久久久久久蜜桃 | av在线免费观看播放 | 色综合天天综合网国产成人网 | 中文字幕在线视频日本 | 色视频网站在线观看 | 91精品国产高清久久久久久91 | 99精品视频在线观看 | 成人欧美一级毛片免费观看 | 狠狠狠狠狠狠狠狠狠狠 | 欧美日韩三区 |