this.editfp = new Ext.Panel({ id:'tciPhotoFp', region:"east", width:300, height:240, html:'<div id="tcigrid"></div>' });
showPhoto:function(tableId){ Ext.Ajax.request({url:appConfig.contPath + '/attachment/attachment!listPhoto.action',//訪問路徑method:'post',params:{tableId:tableId},disableCaching : true,callback:function(options, success, response){//回呼函數 var data = JSON.parse(response.responseText);//將字串類型轉換成json類型 //alert(data); Galleria.run('#tcigrid', { dataSource:data, width: 300, height:210, imageCrop: true, thumbCrop: true,transition:'slide',keepSource: true,autoplay:3000,_locale: {show_thumbnails: "顯示 縮圖",hide_thumbnails: "隱藏 縮圖",play: "暫停播放",pause: "開始播放",enter_fullscreen: "進入全屏",exit_fullscreen: "退出全屏",popout_image: "大圖顯示",showing_image: "顯示映像 %s / %s" }});}}); Galleria.loadTheme('/szcj/scripts/photography/js/galleria.twelve.min.js'); }
頁面需匯入:
<script src="${ctx}/scripts/photography/js/jquery-1.5.1.min.js"></script><script src="${ctx}/scripts/photography/js/galleria-1.2.7.min.js"></script><script src="${ctx}/scripts/photography/js/galleria.twelve.min.js"></script>