Showing
1 changed file
with
9 additions
and
17 deletions
@@ -143,12 +143,7 @@ var Bll = { | @@ -143,12 +143,7 @@ var Bll = { | ||
143 | __render: function(selecter, templater, data) { | 143 | __render: function(selecter, templater, data) { |
144 | $(selecter).html(common.util.__template2($("#" + templater).html(), data)); | 144 | $(selecter).html(common.util.__template2($("#" + templater).html(), data)); |
145 | 145 | ||
146 | - var contentDrag = new common.drag("#add-content", Bll.contentDatas, function(data){ | ||
147 | - console.log(data); | ||
148 | - Bll.contentDatas = data; | ||
149 | - Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | ||
150 | - }); | ||
151 | - contentDrag.Initialize(); | 146 | + |
152 | }, | 147 | }, |
153 | Tags: [] | 148 | Tags: [] |
154 | } | 149 | } |
@@ -169,17 +164,7 @@ Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[]; | @@ -169,17 +164,7 @@ Bll.Tags=ViewModel.tag?ViewModel.tag.split(','):[]; | ||
169 | Bll.__render("#taglist","template4",{tags:Bll.Tags}); | 164 | Bll.__render("#taglist","template4",{tags:Bll.Tags}); |
170 | /*内容渲染->对象转数组*/ | 165 | /*内容渲染->对象转数组*/ |
171 | // Bll.contentDatas=ENUM.articleContent; | 166 | // Bll.contentDatas=ENUM.articleContent; |
172 | -function parseSrc(obj){ | ||
173 | - for(var key in obj){ | ||
174 | - if (key=="src") { | ||
175 | - obj[key]=obj[key].replace(/\?.*/g,''); | ||
176 | - }else{ | ||
177 | - if({}.toString.call(obj[key])=="object Object"){ | ||
178 | - parseSrc(obj[key]) | ||
179 | - } | ||
180 | - } | ||
181 | - } | ||
182 | -} | 167 | + |
183 | if(ViewModel.articleContent){ | 168 | if(ViewModel.articleContent){ |
184 | ViewModel.articleContent.forEach(function(item,index){ | 169 | ViewModel.articleContent.forEach(function(item,index){ |
185 | item.contentData=item.contentData.replace(/(jpg|png)\?[^"]*/g,'$1'); | 170 | item.contentData=item.contentData.replace(/(jpg|png)\?[^"]*/g,'$1'); |
@@ -652,3 +637,10 @@ $(document).on("click","#brandAutoBtn",function(){ | @@ -652,3 +637,10 @@ $(document).on("click","#brandAutoBtn",function(){ | ||
652 | }); | 637 | }); |
653 | 638 | ||
654 | 639 | ||
640 | + | ||
641 | +// var contentDrag = new common.drag("#add-content", Bll.contentDatas, function(data){ | ||
642 | +// console.log(data); | ||
643 | +// Bll.contentDatas = data; | ||
644 | +// Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | ||
645 | +// }); | ||
646 | +// contentDrag.Initialize(); |
-
Please register or login to post a comment