Authored by xuhongyun

资讯拖拽bug

... ... @@ -2,7 +2,7 @@ var jQuery = require('jquery');
(function($) {
var dragging, placeholders = $();
$.fn.sortable = function(options) {
$.fn.mysortable = function(options) {
options = options || {};
return this.each(function() {
if (/^enable|disable|destroy$/.test(options)) {
... ...
... ... @@ -306,7 +306,7 @@ function renderGoodList() {
});
// 排序
$(".cover-image-list").each(function(index){
$(this).sortable({
$(this).mysortable({
items:".cover-image-item",
array:goodsList[index].goodsImagesList,
callback:function(data){
... ...
... ... @@ -172,7 +172,7 @@ var Bll = {
__render: function (selecter, templater, data) {
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
if(selecter == "#add-content") {
$(selecter).sortable({
$(selecter).mysortable({
items:".dragItem",
array:Bll.contentDatas,
callback:function(data){
... ... @@ -608,7 +608,7 @@ var Bll2 = {
__data__ = Bll.module.contentData.data;
}
console.log($(this));
$(this).sortable({
$(this).mysortable({
items: ".dragItem2",
array: __data__,
callback: function (data) {
... ...
... ... @@ -44,7 +44,7 @@ var Bll = {
__render: function (selecter, templater, data) {
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
if(selecter == "#add-content") {
$(selecter).sortable({
$(selecter).mysortable({
items: ".dragItem",
array: Bll.contentDatas[currIndex],
callback: function (data) {
... ... @@ -113,7 +113,7 @@ var Bll = {
edit.init();
$('.draggable').each(function () {
if ($(this).children().length) {
$(this).sortable().bind('sortupdate', function () {
$(this).mysortable().bind('sortupdate', function () {
var fn = new Function("Bll", "return Bll.module.contentData." + $(this).data("array"));
var arr = fn(Bll);
var arr2 = [];//拖拽后顺序
... ... @@ -695,7 +695,7 @@ var Bll2 = {
__data__ = Bll.module.contentData.data;
}
console.log($(this));
$(this).sortable({
$(this).mysortable({
items: ".dragItem2",
array: __data__,
callback: function (data) {
... ... @@ -1247,4 +1247,4 @@ $(document).on("click", "#batchAddImage", function () {
components1.init();
});
});
\ No newline at end of file
});
... ...