Authored by BuddyJack

Fix

... ... @@ -15,5 +15,6 @@ import java.util.List;
public class ImageResp {
private String imageUrl;
private String imageName;
private String imageResource;
}
... ...
... ... @@ -597,6 +597,7 @@ public class ShowSer {
//图片名称
String str[] = StringUtils.split(content, "/");
obj.setImageName(str[str.length -1]);
obj.setImageResource(StringUtils.trim(content));
}
rowInfo.add(obj);
... ...
... ... @@ -1022,13 +1022,8 @@
//加载图片
function imageLoad() {
/* var getImageUrl = "/show/readAli?file=" + $("#imagePath").val();
$("#imgId").attr('src', encodeURI(getImageUrl));*/
sampleDir = $("#imagePath").val();
initSampleTable();
initSampleTable();
}
... ... @@ -1051,9 +1046,6 @@
sServerMethod: "POST",
aoColumnDefs: [
{ sWidth: "100%", aTargets: [0] ,},
/* { sWidth: "30%", aTargets: [1] },
{ sWidth: "30%", aTargets: [2] },
{ sWidth: "10%", aTargets: [3] }*/
],
aoColumns: [
... ... @@ -1061,39 +1053,18 @@
var images = mData;
var lineInfo = "";
for(var i = 0; i< images.length; i++){
/*if(i > 0 && i %4 == 0){
lineInfo += "</br>";//换行
}*/
/* if(i %4 == 0){
lineInfo += " <div class='row-fluid'> ";//换行
}*/
/* if(i >0 && i%4 == 0){
lineInfo += " </div> ";//换行
}*/
var imageUrl = "/show/readAli?file=" + encodeURIComponent(encodeURIComponent(images[i].imageUrl));
lineInfo +=" <div style='margin-top:20px;width: 20% ; height:20%;float: left ;text-align: center' ><img style='width: 90%; height: 90%; 'src='"+imageUrl+"' >" +
" </br>"+images[i].imageName+"</div>";
/*lineInfo +=" <div class='span3'><img style='width:300px;height: 300px; 'src='"+imageUrl+"' >" +
" </br>"+images[i].imageName+"</div>";*/
" </br><a style='font-size: 16px' onclick='copyValue(\""+encodeURI(images[i].imageResource)+"\")' >复制地址</a></br>"+images[i].imageName+"</div>";
}
return "<div>" + lineInfo + "</div>";
}}
],
/* fnServerParams: function (aoData) {
console.log();
aoData.iDisplayStart
// aoData = $.merge(aoData, that.getQueryParams());
},*/
fnDrawCallback: function(table) {
// /!* $(".dataTables_paginate paging_full_numbers").append("跳转");
//首次加载的时候才需要加入如下代码:
var jump_element =document.getElementById("jumpPageIndex");
if (typeof(jump_element)== "undefined" || jump_element == null){
var pageFoot = $("div[class='dataTables_paginate paging_full_numbers']");
... ... @@ -1117,6 +1088,21 @@
}
//复制内容
function copyValue(str){
var data = decodeURI(str);
var oInput = document.createElement('input');
oInput.value = data;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = 'oInput';
oInput.style.display='none';
}
</script>
... ...