Commits

Roman Vorushin committed d4bdc24

$ changed to (function($) {})(jQuery) to work around http://code.djangoproject.com/ticket/12882 bug in django.contrib.admin. Author of changes is my colleague Mikhael Korneev

  • Participants
  • Parent commits 4287fb4

Comments (0)

Files changed (2)

File markitup/templates/markitup/editor.html

 <script type="text/javascript">
+(function($) {
 $(document).ready(function() {
   $("#{{ textarea_id }}").markItUp(mySettings);
   {% if AUTO_PREVIEW %}$('a[title="Preview"]').trigger('mouseup');{% endif %}
 });
+})(jQuery);
 </script>

File markitup/widgets.py

         else: auto_preview = ''
 
         html += ('<script type="text/javascript">'
+                '(function($) { '
                  '$(document).ready(function() {'
                  '  $("#%(id)s").markItUp(mySettings);'
                  '  %(auto_preview)s '
                  '});'
+                 '})(jQuery);'
                  '</script>' % {'id': attrs['id'],
                                 'auto_preview': auto_preview })
         return mark_safe(html)