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. A dict template tag by Batiste 5 years, 12 months ago
  2. FCKEditor replace all vLargeTextField in admin by aronchi 5 years, 5 months ago
  3. Middleware to move tags <script> to the bottom by marinho 3 years, 9 months ago
  4. Simple "html email with images" sender by andres_torres_marroquin 3 years, 1 month ago
  5. Unobtrusvie Foldable Admin Interface by whiteinge 6 years, 2 months ago

Comments

(Forgotten your password?)