fix: bug修复
This commit is contained in:
@@ -37,8 +37,6 @@
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navseventh" data-toggle="tab">相关信息及下载</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content" style="background: #f3f3f3;">
|
||||
|
||||
@@ -357,7 +355,6 @@
|
||||
foreach ($selectColorObj as $c=>$v) {
|
||||
$sltclrOption .= $c==$product_image['image_color']?'<option value="'.$c .'" selected="">' .$v.'</option>':'<option value="'.$c .'">' .$v.'</option>';
|
||||
}
|
||||
echo $product_row;
|
||||
?>
|
||||
<tr id="product_row<?php echo $product_row; ?>">
|
||||
<td class="text-left"><a href="" id="thumb-two-image<?php echo $product_row; ?>" data-toggle="image" data-folder="<?php echo $filepath;?>" class="img-thumbnail"><img class="img-responsive" src="<?php echo $product_image['image_url'];?>"></a><input name="product_product[<?php echo $product_row; ?>][image_url]" value="<?php echo $product_image['image_url'];?>" id="input-two-image<?php echo $product_row; ?>" type="hidden"></td>
|
||||
@@ -367,18 +364,14 @@
|
||||
if(strlen($product_image["image_color"]) ==2 || $product_image["image_color"] == ''){
|
||||
echo '<select class="form-control" name="product_product['.$product_row.'][image_color]"><option value="">请选择</option>';
|
||||
foreach($productColor as $clroption => $proColor) {
|
||||
|
||||
echo '<option value="'.$clroption .'"'.($clroption==$product_image['image_color'] ? "selected": "").'>'.$proColor . '</option>';
|
||||
echo '<option value="'.$clroption.'"'.($clroption==$product_image['image_color'] ? "selected": "").'>'.$proColor.'</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</select>';
|
||||
}
|
||||
else{
|
||||
echo '<input name="product_product['.$product_row.'][image_color]" value="'. $product_image["image_color"].'" placeholder="背景颜色" class="form-control" size="2" type="text">';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</td>
|
||||
<!--td class="text-center"><input name="product_product[<?php echo $product_row; ?>][image_bk_color]" value="<?php echo $product_image['image_bk_color'];?>" class="form-control" id="input-two-color-image<?php echo $product_row; ?>" type="text"></td-->
|
||||
|
||||
@@ -1272,22 +1265,21 @@ function changeAlbumImagesSort(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*二级列表主图*/
|
||||
var product_row = "<?php echo '0';?>";
|
||||
function addProduct() {
|
||||
var sltclrOption = '<select class="form-control" name="product_image[' + product_row + '][image_color]"><option value="">请选择</option>';
|
||||
for (clroption in selectColorObj) {
|
||||
var sltclrOption = '<select class="form-control" name="product_product[' + product_row + '][image_color]"><option value="">请选择</option>';
|
||||
for (clroption in selectColorObj) {
|
||||
sltclrOption += '<option value="' + clroption + '">' + selectColorObj[clroption] + '</option>';
|
||||
}
|
||||
sltclrOption += '</select>';
|
||||
|
||||
var html = '<tr id="product_row' + product_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-two-image' + product_row + '"data-toggle="image" data-folder="' + filePath + '" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a><input type="hidden" name="product_product[' + product_row + '][image_url]" value="" id="input-two-image' + product_row + '"/></td>';
|
||||
html += ' <td class="text-right">' + sltclrOption + '</td>';
|
||||
html += ' <td class="text-right">' + sltclrOption + '</td>';
|
||||
//html += ' <td class="text-right"><input type="hidden" name="product_product[' + product_row + '][image_color]" value="" id="input-two-color-image' + product_row + '"/></td>';
|
||||
//html += ' <td class="text-right"><input type="text" name="product_product[' + product_row + '][image_bkcolor]" value="" placeholder="颜色" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_product[' + product_row + '][image_desc]" value="" placeholder="描述" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_product[' + product_row + '][image_desc]" value="" placeholder="描述" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#product_row' + product_row + '\').remove();" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#product tbody').append(html);
|
||||
@@ -1795,16 +1787,16 @@ function delAlbumAttributeColumn (object){
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.business-button,.busniess-joinus-btn').click(function() {
|
||||
$(".marsk-container").show();
|
||||
});
|
||||
});
|
||||
/*弹出框关闭*/
|
||||
$(function() {
|
||||
$('.business-close').click(function() {
|
||||
$(".marsk-container").hide();
|
||||
});
|
||||
});
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.business-button,.busniess-joinus-btn').click(function() {
|
||||
$(".marsk-container").show();
|
||||
});
|
||||
});
|
||||
// 弹出框关闭
|
||||
$(function() {
|
||||
$('.business-close').click(function() {
|
||||
$(".marsk-container").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -15,7 +15,7 @@
|
||||
<h3 class="box-title">链接列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
@@ -37,43 +37,43 @@
|
||||
<tbody>
|
||||
{if condition="!empty($list)"}
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">{$vo.name}</td>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">{$vo.spu}</td>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">
|
||||
{if condition="$vo['is_show'] == -1"}
|
||||
<span class="label label-warning">未上架</span>
|
||||
{else/}
|
||||
<span class="label label-success">已上架</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<select name="platform" data-id="{$vo.id}" data-value="{$vo.platform_id}">
|
||||
{volist name="platforms" id="p"}
|
||||
<option value="{$p.id}" {if condition="$vo.platform_id == $p.id"}selected="selected"{/if}>{$p.platform}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="link" value="{$vo.link}" data-id="{$vo.id}" data-value="{$vo.link}"/>
|
||||
</td>
|
||||
</tr>
|
||||
{if condition="!empty($vo.children)"}
|
||||
{volist name="vo.children" id="voc"}
|
||||
<tr>
|
||||
<td>
|
||||
<select name="platform" data-id="{$voc.id}" data-value="{$voc.platform_id}">
|
||||
{volist name="platforms" id="p"}
|
||||
<option value="{$p.id}" {if condition="$voc.platform_id == $p.id" }selected="selected" {/if}>{$p.platform}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="link" value="{$voc.link}" data-id="{$voc.id}" data-value="{$voc.link}" />
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{/if}
|
||||
<tr>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">{$vo.name}</td>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">{$vo.spu}</td>
|
||||
<td rowspan="{$vo.rowspan}" style="vertical-align: middle;">
|
||||
{if condition="$vo['is_show'] == -1"}
|
||||
<span class="label label-warning">未上架</span>
|
||||
{else/}
|
||||
<span class="label label-success">已上架</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<select name="platform" data-id="{$vo.id}" data-value="{$vo.platform_id}">
|
||||
{volist name="platforms" id="p"}
|
||||
<option value="{$p.id}" {if condition="$vo.platform_id == $p.id"}selected="selected" {/if}>{$p.platform}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="link" value="{$vo.link}" data-id="{$vo.id}" data-value="{$vo.link}" />
|
||||
</td>
|
||||
</tr>
|
||||
{if condition="!empty($vo.children)"}
|
||||
{volist name="vo.children" id="voc"}
|
||||
<tr>
|
||||
<td>
|
||||
<select name="platform" data-id="{$voc.id}" data-value="{$voc.platform_id}">
|
||||
{volist name="platforms" id="p"}
|
||||
<option value="{$p.id}" {if condition="$voc.platform_id == $p.id"}selected="selected" {/if}>{$p.platform}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="link" value="{$voc.link}" data-id="{$voc.id}" data-value="{$voc.link}" />
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{/if}
|
||||
{/volist}
|
||||
{/if}
|
||||
</tbody>
|
||||
@@ -96,9 +96,9 @@
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(function () {
|
||||
// 导入
|
||||
$('#import').change(function(event) {
|
||||
$('#import').change(function (event) {
|
||||
var input = $(this)[0]
|
||||
if (input.files.length > 0) {
|
||||
var _load
|
||||
@@ -111,7 +111,7 @@
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
_load = layer.load()
|
||||
},
|
||||
success: function (r) {
|
||||
@@ -125,12 +125,12 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
layer.alert('导入失败', { icon: 2 }, function() {
|
||||
error: function (e) {
|
||||
layer.alert('导入失败', { icon: 2 }, function () {
|
||||
location.reload()
|
||||
});
|
||||
},
|
||||
complete: function() {
|
||||
complete: function () {
|
||||
$('#import').val(null)
|
||||
layer.close(_load)
|
||||
}
|
||||
@@ -139,19 +139,19 @@
|
||||
})
|
||||
|
||||
// 更新数据
|
||||
var __update = function(data, success) {
|
||||
var __update = function (data, success) {
|
||||
var _load
|
||||
return $.ajax({
|
||||
type: 'POST',
|
||||
url: '/admin/product_purchase_links/update',
|
||||
data: data,
|
||||
dataType: 'JSON',
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
_load = layer.load()
|
||||
},
|
||||
success: function(r) {
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.alert(r.msg, { icon: 2 }, function() {
|
||||
layer.alert(r.msg, { icon: 2 }, function () {
|
||||
location.reload()
|
||||
})
|
||||
} else {
|
||||
@@ -159,7 +159,7 @@
|
||||
layer.msg(r.msg)
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
complete: function () {
|
||||
layer.close(_load)
|
||||
}
|
||||
})
|
||||
@@ -167,11 +167,11 @@
|
||||
$('[name="platform"]').change(function () {
|
||||
var value = $(this).get(0).dataset.value
|
||||
if (value == $(this).val()) return false;
|
||||
__update({ id: $(this).data('id'), platform_id: $(this).val() }, function() {
|
||||
__update({ id: $(this).data('id'), platform_id: $(this).val() }, function () {
|
||||
$(this).get(0).dataset.value = $(this).val()
|
||||
}.bind(this))
|
||||
})
|
||||
$('[name="link"]').change(function(){
|
||||
$('[name="link"]').change(function () {
|
||||
var value = $(this).get(0).dataset.value
|
||||
if (value == $(this).val()) return false;
|
||||
__update({ id: $(this).data('id'), link: $(this).val() }, function () {
|
||||
|
||||
0
app/admin/view/product_series/add.html
Normal file → Executable file
0
app/admin/view/product_series/add.html
Normal file → Executable file
0
app/admin/view/product_series/edit.html
Normal file → Executable file
0
app/admin/view/product_series/edit.html
Normal file → Executable file
0
app/admin/view/product_series/lists.html
Normal file → Executable file
0
app/admin/view/product_series/lists.html
Normal file → Executable file
@@ -28,7 +28,7 @@
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
<script type="text/javascript">
|
||||
$('#modal-image a.thumbnail').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var target = "<?php echo $target; ?>";
|
||||
@@ -81,9 +81,9 @@
|
||||
}
|
||||
$('#modal-image').load(url);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-upload').on('click', function() {
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$('#button-upload').on('click', function(e) {
|
||||
$('#form-upload').remove();
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file[]" value="" multiple="multiple"/></form>');
|
||||
$('#form-upload input[name=\'file[]\']').trigger('click');
|
||||
@@ -97,7 +97,7 @@
|
||||
url: '<?php echo url("/admin/webuploader/upload",["directory"=>$directory,"type"=>$type]); ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: $('#form-upload').serialize(),
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
@@ -197,4 +197,4 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
</script>
|
||||
|
||||
@@ -225,8 +225,8 @@
|
||||
}
|
||||
$('#modal-image').load(url);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$('#button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file[]" value="" multiple="multiple"/></form>');
|
||||
@@ -389,4 +389,4 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
</script>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"compress": false, //不启用压缩
|
||||
"resize": false, //尺寸不改变
|
||||
"formData": {},
|
||||
"pick": {id: '#filePicker', label: '点击选择文件', "name": "file"},
|
||||
"pick": {id: '#filePicker', label: '点击选择文件', "name": "file", "multiple": false},
|
||||
"thumb": {"width": 110, "height": 110, "quality": 70, "allowMagnify": true, "crop": true, "preserveHeaders": false, "type": "image\/jpeg"}
|
||||
};
|
||||
$(function() {
|
||||
|
||||
Reference in New Issue
Block a user