Commit d1c888b1 by Don Mitchell

Put init code in a document ready event handler.

parent 7f836e77
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<%block name="title">CMS Unit</%block> <%block name="title">CMS Unit</%block>
<%block name="jsextra"> <%block name="jsextra">
<script type='text/javascript'> <script type='text/javascript'>
$(document).ready(function() {
new CMS.Views.UnitEdit({ new CMS.Views.UnitEdit({
el: $('.main-wrapper'), el: $('.main-wrapper'),
model: new CMS.Models.Module({ model: new CMS.Models.Module({
...@@ -13,12 +14,11 @@ ...@@ -13,12 +14,11 @@
}) })
}); });
(function() { $('.new-component-template').each(function(){
$('.new-component-template').each(function(){ $emptyEditor = $(this).find('.empty');
$emptyEditor = $(this).find('.empty'); $(this).prepend($emptyEditor);
$(this).prepend($emptyEditor); });
}); });
})();
</script> </script>
</%block> </%block>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment