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".

To add a link on the main toolbar (next to the "Upload" and "File" options), you open the file in a text editor and add the following code after the line #185:

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';

 }

});

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.

 

 



Article ID: 599
Created On: Thu, Mar 6, 2014 at 7:49 AM
Last Updated On: Wed, Nov 22, 2017 at 9:22 AM
Authored by: KB Admin01 [[email protected]]

Online URL: https://kb.quikbox.com/article.php?id=599