photography图片资源支持json格式,Ajax请求

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>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值