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

来源:互联网 发布:国泰君安炒股软件 编辑:程序博客网 时间:2024/05/22 03:25
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>


原创粉丝点击