Commit 7fa6e412 authored by agping's avatar agping

轮播图 弹窗 bug

parent 83f858e8
...@@ -26,9 +26,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -26,9 +26,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
_spFile = _this.data('spfile'), _spFile = _this.data('spfile'),
_limitTop = _this.data('limittop'), _limitTop = _this.data('limittop'),
_fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数 _fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数
console.log("123123")
if(_limitTop && (_fileNum < _limitTop)) { if(_limitTop && (_fileNum < _limitTop)) {
console.log("啊发撒")
banner.uploadImg(_this); banner.uploadImg(_this);
} else { } else {
alert('上传上限为 ' + _limitTop); alert('上传上限为 ' + _limitTop);
...@@ -42,12 +40,8 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -42,12 +40,8 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
$(this).parent().parent().remove(); $(this).parent().parent().remove();
/*if(confirm('确定删除该图片吗?')) { banner.imageName = '';
var _imgId = _this.parent().attr('data-imgid');
var file_id = $(this).parent('li').attr('id') - 0 ;
_this.parent().remove();
user.addDeleteNewsEvent(file_id);
};*/
}); });
...@@ -117,6 +111,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -117,6 +111,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
}); });
$ (document).delegate (".editor_banner", "click", function () { $ (document).delegate (".editor_banner", "click", function () {
$('.img_area').html('');
$ ("#editor_modal_title").html ("编辑广告"); $ ("#editor_modal_title").html ("编辑广告");
var item = $ (this).parents ("tr").find ("td"); var item = $ (this).parents ("tr").find ("td");
$ ("#id").val ($ (this).attr ("data-id")); $ ("#id").val ($ (this).attr ("data-id"));
...@@ -129,7 +124,19 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -129,7 +124,19 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
} }
$ ("#title").val (item.eq (0).html ()); $ ("#title").val (item.eq (0).html ());
$ ("#url").val (item.eq (3).html ()); $ ("#url").val (item.eq (3).html ());
$ ("#cover_image").val (item.eq (1).find ("input").val ()); // $ ("#cover_image").val (item.eq (1).find ("input").val ());
var pic_path = $ (this).attr ("data-pic");
var tagLiu = '' ;
tagLiu += '<div class="col-xs-3 pictures" id='+ pic_path +'>';
tagLiu += ' <img src="' + ServerHostImageLiu + '/resource/lib/Attachments/images/'+pic_path+'" class="" id="" width="90%">';
tagLiu += ' <div style="text-align:center" id="'+ pic_path +'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>';
tagLiu += '</div>';
$('.img_area').append(tagLiu);
banner.imageName = pic_path;
console.log($.trim(item.eq (2).html ())); console.log($.trim(item.eq (2).html ()));
if($.trim(item.eq (2).html ())=="用户app"){ if($.trim(item.eq (2).html ())=="用户app"){
// $ ("#client").attr ("checked",true);/prop能够反复改变 attr不能反复改变属性 // $ ("#client").attr ("checked",true);/prop能够反复改变 attr不能反复改变属性
...@@ -139,7 +146,6 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -139,7 +146,6 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
if($.trim(item.eq (2).html ())=="经纪人app"){ if($.trim(item.eq (2).html ())=="经纪人app"){
// $ ("#agent_side").attr ("checked",true) // $ ("#agent_side").attr ("checked",true)
$ ("#agent_side").prop("checked", true); $ ("#agent_side").prop("checked", true);
console.log(66)
} }
$ ("#sort").val (item.eq (4).html ()); $ ("#sort").val (item.eq (4).html ());
}); });
...@@ -245,7 +251,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart ...@@ -245,7 +251,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
var _url = _data.data.internet_img_name; var _url = _data.data.internet_img_name;
var tag = '' ; var tag = '' ;
tag += '<div class="col-xs-3 pictures" id='+_data.data.img_path+'>'; tag += '<div class="col-xs-3 pictures" id='+_data.data.img_path+'>';
tag += ' <img src="https://images.tonglianjituan.com/resource/lib/Attachments/images/'+_url+'" class="" id="" width="90%">'; tag += ' <img src=" ' + ServerHostImageLiu + '/resource/lib/Attachments/images/'+_url+'" class="" id="" width="90%">';
tag += ' <div style="text-align:center" id="'+_data.data.img_path+'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>'; tag += ' <div style="text-align:center" id="'+_data.data.img_path+'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>';
tag += '</div>'; tag += '</div>';
$('.img_area').append(tag) ; $('.img_area').append(tag) ;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<td>[%= it[item]["title"] %]</td> <td>[%= it[item]["title"] %]</td>
<td> <td>
<input type="hidden" value='[%= it[item]["pic_path"] %]'> <input type="hidden" value='[%= it[item]["pic_path"] %]'>
<img src='https://images.tonglianjituan.com/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]' class="diagram-image J_preview" <img src='[%= ServerHostImageLiu %]/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]' class="diagram-image J_preview no-scroll-page-img"
data-bimg='https://images.tonglianjituan.com/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'> data-bimg='[%= ServerHostImageLiu %]/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'>
</td> </td>
<td> <td>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<td> <td>
[% if(check_auth('index/addOrSave')) { %] [% if(check_auth('index/addOrSave')) { %]
<a class="btn1 btn-success editor_banner " href="#modal-add-do" data-toggle="modal" <a class="btn1 btn-success editor_banner " href="#modal-add-do" data-toggle="modal"
data-id="[%= it[item]['id'] %]"> data-id="[%= it[item]['id'] %]" data-pic="[%= it[item]['pic_path'] %]">
编辑 编辑
</a> </a>
[% } %] [% } %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment