Authored by 陶雨

Merge branch 'release/1.6' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into release/1.6

... ... @@ -21,23 +21,36 @@ var jQuery = require('jquery');
console.log(dataArray);
for(var i=0; i<items.length; i++){
$(items[i]).attr("drag-index", i);
items[i]._index = i;
}
var placeholder = $('<' + items[0].tagName + ' class="sortable-placeholder">');
placeholder.css("border","2px dashed red");
var handle = options.handle, isHandle;
items.find(handle).mousedown(function() {
isHandle = true;
}).mouseup(function() {
isHandle = false;
});
var isInput = false;
items.find("input").mousedown(function(){
isInput = true
}).mouseup(function() {
isInput = false;
});
$(this).data('items', options.items)
placeholders = placeholders.add(placeholder);
if (connectWith) {
$(connectWith).add(this).data('connectWith', connectWith);
}
items.attr('draggable', 'true').bind('dragstart.h5s', function(e) {
if (handle && !isHandle) {
if(handle && !isHandle) {
return false;
}
if(isInput){
return false;
}
isHandle = false;
... ... @@ -56,7 +69,7 @@ var jQuery = require('jquery');
var Array = [], sortArray = [];
var itemsUpdate = _self.children(options.items);
for(var i=0; i<itemsUpdate.length; i++){
Array.push($(itemsUpdate[i]).attr("drag-index"));
Array.push(itemsUpdate[i]._index);
}
for(var i=0; i<Array.length; i++){
sortArray.push(dataArray[Array[i]]);
... ...
... ... @@ -106,7 +106,7 @@ var Bll = {
} else {
data = datacall && datacall(Bll.getNewPics(Bll.clonePics), Bll.selectedBoId);
}
console.log("最终提交数据data", data);
//console.log("最终提交数据data", data);
common.util.__ajax({
url: url,
data: data
... ... @@ -143,10 +143,10 @@ var Bll = {
if (response.status && response.code == 200) {
for (var i = 0; i < response.datas.length; i++) {
var name=response.names[i];
if((/[\u4e00-\u9fa5]/).test(name)){
common.util.__tip("图片应以sku命名","warning");
}
else{
var index=name.indexOf('.');
var name1=name.substr(0,index);
//判断图片名称是否符合标准
if((/^[0-9]+[_][0-9]+$/).test(name1)||(/^[1-9]\d*$/).test(name1)){
Bll.pictureBoList.push({
"fileName": response.datas[i],
"originalName": response.names[i]
... ... @@ -156,7 +156,9 @@ var Bll = {
"originalName": response.names[i]
})
}
else{
common.util.__tip("图片应以sku命名","warning");
}
}
Bll.rendBoList(Bll.clonePics);
}
... ...
... ... @@ -97,7 +97,7 @@ var g = new common.grid({
if(+item.checkStatus == 200){
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/view/'+item.id+'/" class="btn btn-info btn-xs">装修查看</a>');
}else {
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-success btn-xs">装修编辑</a>');
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-primary btn-xs">装修编辑</a>');
}
if(item.passStatus && +item.passStatus == 1){
... ...