Skip to main content

Adding links to the menu

Applies to Web File Share version (291210)

The menus are defined inside the file "/path-to-WebFileShare/js/fileman/toolbars_and_menus.js".

tbar.push('-');

tbar.push({

 text: FR.T('Your button'), scale: 'medium',

 icon: FR.iconsURL+'/the_icon.gif',

 handler: function() {

   document.location.href = 'http://www.google.com';

 }

});
  • The button's text can be set by replacing the text "Your button".
  • To change the target URL, replace in the above code "http://www.google.com" with your own address.
  • To set the icon, place a file named "the_icon.gif" inside "/path-to-WebFileShare/images/fileman/interface/icons/". If you don't want an icon for the button, simply delete the line that starts with "icon:".

If you want the button to open the page into a window, replace the line

document.location.href = 'http://www.google.com';

with the following code:

  FR.UI.popup({

      src: 'http://www.google.com/?',

      width: 680, height: 540, constrain: true, maximizable: true, autoDestroy: true

  });

Please note that this function automatically adds some variables to the specified URL. To avoid troubles, try ending your URL with a question mark (?) character.