|
@@ -162,6 +162,15 @@ var Bll = { |
|
@@ -162,6 +162,15 @@ var Bll = { |
162
|
},
|
162
|
},
|
163
|
__render: function (selecter, templater, data) {
|
163
|
__render: function (selecter, templater, data) {
|
164
|
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
|
164
|
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
|
|
|
165
|
+ if(selecter == "#add-content") {
|
|
|
166
|
+ $(selecter).sortable({
|
|
|
167
|
+ items:".dragItem",
|
|
|
168
|
+ array:Bll.contentDatas,
|
|
|
169
|
+ callback:function(data){
|
|
|
170
|
+ Bll.contentDatas = data;
|
|
|
171
|
+ }
|
|
|
172
|
+ });
|
|
|
173
|
+ }
|
165
|
},
|
174
|
},
|
166
|
Tags: []
|
175
|
Tags: []
|
167
|
};
|
176
|
};
|
|
@@ -358,18 +367,18 @@ $(document).on("dblclick", "#add-content>li.custom-group", function () { |
|
@@ -358,18 +367,18 @@ $(document).on("dblclick", "#add-content>li.custom-group", function () { |
358
|
$(this).find(".edit").click();
|
367
|
$(this).find(".edit").click();
|
359
|
});
|
368
|
});
|
360
|
//拖拽
|
369
|
//拖拽
|
361
|
-$(document).on("mouseover", ".dragItem1", function () {
|
|
|
362
|
- var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
|
|
|
363
|
- Bll.contentDatas = data;
|
|
|
364
|
- Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
|
|
|
365
|
- });
|
|
|
366
|
- drag.Initialize();
|
|
|
367
|
-});
|
|
|
368
|
-$(document).on("mouseleave", ".dragItem1", function () {
|
|
|
369
|
- document.onmousemove = null;
|
|
|
370
|
- document.onmouseup = null;
|
|
|
371
|
- new common.drag("#add-content").destroy();
|
|
|
372
|
-});
|
370
|
+//$(document).on("mouseover", ".dragItem1", function () {
|
|
|
371
|
+// var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
|
|
|
372
|
+// Bll.contentDatas = data;
|
|
|
373
|
+// Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
|
|
|
374
|
+// });
|
|
|
375
|
+// drag.Initialize();
|
|
|
376
|
+//});
|
|
|
377
|
+//$(document).on("mouseleave", ".dragItem1", function () {
|
|
|
378
|
+// document.onmousemove = null;
|
|
|
379
|
+// document.onmouseup = null;
|
|
|
380
|
+// new common.drag("#add-content").destroy();
|
|
|
381
|
+//});
|
373
|
|
382
|
|
374
|
|
383
|
|
375
|
/******************************************标签部分**********************************/
|
384
|
/******************************************标签部分**********************************/
|