|
@ -9,6 +9,8 @@
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<link href="lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
|
|
|
<link href="css/jquery.filer.css" rel="stylesheet" type="text/css" />
|
|
|
<link href="css/jquery-filer.css" rel="stylesheet" type="text/css" />
|
|
|
<script src="js/jquery/jquery-2.1.1.min.js"></script>
|
|
|
<script src="lib/ligerUI/js/core/base.js" type="text/javascript"></script>
|
|
|
<script src="lib/ligerUI/js/plugins/ligerComboBox.js"></script>
|
|
@ -46,58 +48,59 @@
|
|
|
<div class="content">
|
|
|
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
|
|
|
<tr>
|
|
|
<td width="30%" class="td-left"><label>标  题:</label></td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<td width="20%" class="td-left"><label>标  题:</label></td>
|
|
|
<td width="80%" class="td-right">
|
|
|
<input class="liger-textbox width350" name="title" data-label="标题" required="required" value="${article.title}" />
|
|
|
<input type="hidden" value="${article.id}" name="id" id="id">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td width="30%" class="td-left"><label>文章类型:</label></td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<td width="20%" class="td-left"><label>文章类型:</label></td>
|
|
|
<td width="80%" class="td-right">
|
|
|
<input id="typeSelect"/>
|
|
|
<input type="hidden" name="type" id="type" value="${article.type}"/>
|
|
|
<input type="hidden" name="typeName" id="typeName" value="${article.typeName}"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td width="30%" class="td-left"><label>文章来源:</label></td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<td width="20%" class="td-left"><label>文章来源:</label></td>
|
|
|
<td width="80%" class="td-right">
|
|
|
<input id="articleFrom" required="required" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="fromUrl hidden">
|
|
|
<td width="30%" class="td-left">
|
|
|
<td width="20%" class="td-left">
|
|
|
URL:
|
|
|
</td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<td width="80%" class="td-right">
|
|
|
<input type="url" id="url" name="url" class="liger-textbox" class="width350" value="${article.url}"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="bySelf hidden">
|
|
|
<td width="30%" class="td-left">
|
|
|
<td width="20%" class="td-left">
|
|
|
关 键 字:
|
|
|
</td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<td width="80%" class="td-right">
|
|
|
<input name="keyword" class="liger-textbox" class="width350"value="${article.keyword}"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="bySelf hidden">
|
|
|
<td width="30%" class="td-left"><label class="bySelf hidden">简  介:</label></td>
|
|
|
<td width="70%" class="td-right">
|
|
|
<div class="width350"><textarea class="ad-padd" name="contentFirst" placeholder="简介" ></textarea></div>
|
|
|
<td width="20%" class="td-left"><label class="bySelf hidden">简  介:</label></td>
|
|
|
<td width="80%" class="td-right">
|
|
|
<div class="width350"><textarea class="ad-padd" name="contentFirst" placeholder="简介" >${article.contentFirst}</textarea></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="bySelf hidden">
|
|
|
<td colspan="2">
|
|
|
<div style="width: 80%;margin:0 auto;"><textarea id="TextArea1" cols="20" rows="2" name="ckeditor" class="ckeditor"></textarea></div>
|
|
|
<td width="20%" class="td-left"><label class="bySelf hidden">内  容:</label></td>
|
|
|
<td width: 80%;>
|
|
|
<div style="width: 80%;"><textarea id="TextArea1" cols="20" rows="2" name="ckeditor" class="ckeditor">${article.content}</textarea></div>
|
|
|
<input type="hidden" name="content" id="content" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">
|
|
|
<td width="20%" class="td-left"><label>上传图片:</label></td>
|
|
|
<td width="80%" class="td-right">
|
|
|
<input type="file" id="imgFile" name="file" multiple="multiple" class="mui-pull-right">
|
|
|
<input type="button" id="uploadFile" value="上传" style="width: 80px;"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@ -115,40 +118,40 @@
|
|
|
</form>
|
|
|
</body>
|
|
|
<script>
|
|
|
$(document).ready(function(){
|
|
|
var urlVal = $("#url").val();
|
|
|
if(urlVal != ''){
|
|
|
$(".fromUrl").each(function(){
|
|
|
$(this).removeClass("hidden");
|
|
|
$(".bySelf").each(function(){
|
|
|
$(this).addClass("hidden");
|
|
|
})
|
|
|
})
|
|
|
$("#url").attr("required",true);//设置url必输
|
|
|
}else{
|
|
|
$(".bySelf").each(function(){
|
|
|
$(this).removeClass("hidden");
|
|
|
$(".fromUrl").each(function(){
|
|
|
$(this).addClass("hidden");
|
|
|
})
|
|
|
})
|
|
|
if(typeof($("#url").attr("required"))!=="undefined"){
|
|
|
$("#url").attr("required",false);//取消设置url必输
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
var url = $("#url").val();
|
|
|
function call(data){
|
|
|
debugger
|
|
|
alert(data.city);
|
|
|
}
|
|
|
$("#uploadFile").click(function(){
|
|
|
//jFiler-item-thumb-image
|
|
|
$.ajax({
|
|
|
type: "JSONP", //必须用post
|
|
|
url: "http://172.19.103.31:10001/ydf17-6-10/upload/image?callback=call",
|
|
|
crossDomain: true,
|
|
|
data: files,
|
|
|
contentType: false, //必须
|
|
|
processData: false,
|
|
|
//不能用success,否则不执行
|
|
|
complete: function (data) {
|
|
|
debugger
|
|
|
var data = eval(data.responseText);
|
|
|
console.log(data.Data);
|
|
|
},
|
|
|
success: function(data){
|
|
|
debugger
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
$("#typeSelect").ligerComboBox(
|
|
|
var typeSelect = $("#typeSelect").ligerComboBox(
|
|
|
{
|
|
|
url:"getArticleType",
|
|
|
valueField: 'code',
|
|
|
textField: 'name',
|
|
|
selectBoxWidth: 400,
|
|
|
value:'${article.type}',
|
|
|
onSelected:function(value,text){
|
|
|
$("#type").val(value);
|
|
|
$("#typeName").val(text);
|
|
@ -165,6 +168,10 @@
|
|
|
valueField: 'id',
|
|
|
textField: 'name',
|
|
|
selectBoxWidth: 400,
|
|
|
value:function(){
|
|
|
var urlVal = $("#url").val();
|
|
|
return urlVal? 1:2;
|
|
|
},
|
|
|
onSelected:function(value,text){
|
|
|
if(value==1){
|
|
|
$(".fromUrl").each(function(){
|
|
@ -245,7 +252,7 @@
|
|
|
$(obj).filer({
|
|
|
changeInput: '<div class="mui-table-view-cell my-table-col-2 img-row">\
|
|
|
<span>'+titleName+'</span>\
|
|
|
<span><img style="width:75px;height:50px;" class="head-img mui-action-preview" src="img/add_img.png"/></span></div>',
|
|
|
<span><img style="width:75px;height:50px;margin-top: 10px;" class="head-img mui-action-preview" src="img/add_img.png"/></span></div>',
|
|
|
showThumbs: true,
|
|
|
addMore: true,
|
|
|
limit: maxfiles,
|
|
@ -253,19 +260,21 @@
|
|
|
extensions: ['jpg', 'jpeg', 'png', 'gif'],
|
|
|
templates: {
|
|
|
box: '<ul class="jFiler-items-list jFiler-items-grid"></ul>',
|
|
|
item: '<li class="jFiler-item" style="width:50%;float:left;">\
|
|
|
item: '<li class="jFiler-item" style="width:200px;float:left;">\
|
|
|
<div class="jFiler-item-container">\
|
|
|
<div class="jFiler-item-inner">\
|
|
|
<div class="jFiler-item-thumb">\
|
|
|
<div class="jFiler-item-status"></div>\
|
|
|
<a href="#" class="'+obj.slice(1)+'">{{fi-image}}</a>\
|
|
|
</div>\
|
|
|
<div class="jFiler-item-assets jFiler-row jFiler-item-trash-action">\
|
|
|
<ul class="list-inline pull-left"></ul>\
|
|
|
<ul class="list-inline pull-right">\
|
|
|
<li><a class="icon-jfi-trash"></a></li>\
|
|
|
</ul>\
|
|
|
</div>\
|
|
|
<div class="jFiler-item-assets jFiler-row">\
|
|
|
<ul class="list-inline pull-left">\
|
|
|
<li>{{fi-progressBar}}</li>\
|
|
|
</ul>\
|
|
|
<ul class="list-inline pull-right">\
|
|
|
<li><a class="icon-jfi-trash jFiler-item-trash-action"></a></li>\
|
|
|
</ul>\
|
|
|
</div>\
|
|
|
</div>\
|
|
|
</div>\
|
|
|
</li>',
|
|
@ -276,12 +285,14 @@
|
|
|
<div class="jFiler-item-status"></div>\
|
|
|
<a href="" data-rel="colorbox" class="cboxElement">{{fi-image}}</a>\
|
|
|
</div>\
|
|
|
<div class="jFiler-item-assets jFiler-row jFiler-item-trash-action">\
|
|
|
<ul class="list-inline pull-left"></ul>\
|
|
|
<ul class="list-inline pull-right">\
|
|
|
<li><a class="icon-jfi-trash"></a></li>\
|
|
|
</ul>\
|
|
|
</div>\
|
|
|
<div class="jFiler-item-assets jFiler-row">\
|
|
|
<ul class="list-inline pull-left">\
|
|
|
<li><span class="jFiler-item-others">{{fi-icon}}</span></li>\
|
|
|
</ul>\
|
|
|
<ul class="list-inline pull-right">\
|
|
|
<li><a class="icon-jfi-trash jFiler-item-trash-action"></a></li>\
|
|
|
</ul>\
|
|
|
</div>\
|
|
|
</div>\
|
|
|
</div>\
|
|
|
</li>',
|
|
@ -322,6 +333,6 @@
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
uploadDropzone("#imgFile", '上传图片', 5, "file", bx_files);
|
|
|
uploadDropzone("#imgFile", '', 5, "file", bx_files);
|
|
|
</script>
|
|
|
</html>
|