...
|
...
|
@@ -162,6 +162,15 @@ var Bll = { |
|
|
},
|
|
|
__render: function (selecter, templater, data) {
|
|
|
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
|
|
|
if(selecter == "#add-content") {
|
|
|
$(selecter).sortable({
|
|
|
items:".dragItem",
|
|
|
array:Bll.contentDatas,
|
|
|
callback:function(data){
|
|
|
Bll.contentDatas = data;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
Tags: []
|
|
|
};
|
...
|
...
|
@@ -358,18 +367,18 @@ $(document).on("dblclick", "#add-content>li.custom-group", function () { |
|
|
$(this).find(".edit").click();
|
|
|
});
|
|
|
//拖拽
|
|
|
$(document).on("mouseover", ".dragItem1", function () {
|
|
|
var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
|
|
|
Bll.contentDatas = data;
|
|
|
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
|
|
|
});
|
|
|
drag.Initialize();
|
|
|
});
|
|
|
$(document).on("mouseleave", ".dragItem1", function () {
|
|
|
document.onmousemove = null;
|
|
|
document.onmouseup = null;
|
|
|
new common.drag("#add-content").destroy();
|
|
|
});
|
|
|
//$(document).on("mouseover", ".dragItem1", function () {
|
|
|
// var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
|
|
|
// Bll.contentDatas = data;
|
|
|
// Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
|
|
|
// });
|
|
|
// drag.Initialize();
|
|
|
//});
|
|
|
//$(document).on("mouseleave", ".dragItem1", function () {
|
|
|
// document.onmousemove = null;
|
|
|
// document.onmouseup = null;
|
|
|
// new common.drag("#add-content").destroy();
|
|
|
//});
|
|
|
|
|
|
|
|
|
/******************************************标签部分**********************************/
|
...
|
...
|
|