Integrate Wymeditor with filebrowser plugin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
wymeditor_filebrowser = function(wym, wdw) {
  // the URL to the Django filebrowser, depends on your URLconf
  var fb_url = '/admin/filebrowser/';
  
  var dlg = jQuery(wdw.document.body);
  if (dlg.hasClass('wym_dialog_image')) {
    // this is an image dialog
    dlg.find('.wym_src').css('width', '200px').attr('id', 'filebrowser')
      .after('<a id="fb_link" title="Filebrowser" href="#">Filebrowser</a>');
    dlg.find('fieldset')
      .append('<a id="link_filebrowser"><img id="image_filebrowser" /></a>' +
              '<br /><span id="help_filebrowser"></span>');
    dlg.find('#fb_link')
      .click(function() {
        fb_window = wdw.open(fb_url + '?pop=1', 'filebrowser', 'height=600,width=840,resizable=yes,scrollbars=yes');
        fb_window.focus();
        return false;
      });
  }
}

More like this

  1. "Save and Continue" keyboard command for admin, with autoscroll by jcushman 3 years, 4 months ago
  2. FCKEditor replace all vLargeTextField in admin by aronchi 4 years, 6 months ago
  3. Unobtrusvie Foldable Admin Interface by whiteinge 5 years, 3 months ago
  4. Dynamically add inlines by MasonM 3 years, 10 months ago
  5. jstree integration to django admin by pawnhearts 3 years, 4 months ago

Comments

(Forgotten your password?)