Commit d1c888b1 by Don Mitchell

Put init code in a document ready event handler.

parent 7f836e77
......@@ -5,6 +5,7 @@
<%block name="title">CMS Unit</%block>
<%block name="jsextra">
<script type='text/javascript'>
$(document).ready(function() {
new CMS.Views.UnitEdit({
el: $('.main-wrapper'),
model: new CMS.Models.Module({
......@@ -13,12 +14,11 @@
})
});
(function() {
$('.new-component-template').each(function(){
$emptyEditor = $(this).find('.empty');
$(this).prepend($emptyEditor);
});
})();
$('.new-component-template').each(function(){
$emptyEditor = $(this).find('.empty');
$(this).prepend($emptyEditor);
});
});
</script>
</%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