API Docs for: 2.0.0

Class SAGE2_Files

Class defined in: public/src/SAGE2_fileManager.js:12

SAGE2 File Manager

attachCallbacks( element, actions )
public/src/SAGE2_fileManager.js:1214

Setup the callbacks for a menu, using a closure (tricky one)

Parameters:
  • element <Object>

    webix menu object to attach the callbacks to

  • actions <Object>

    object containing the callback for each id

String buildAboutHTML( )
public/src/SAGE2_fileManager.js:1279

Build some HTML to show info about the SAGE2 server


Returns: <String>

HTML popup showing version and info

Array buildSubmenu( actions )
public/src/SAGE2_fileManager.js:1237

Build a submenu for a description object. Each entry with id and value fields.

Parameters:
  • actions <Object>

    object containing the callback for each id


Returns: <Array>

array of entries with id and value field

copyURLItem( elt )
public/src/SAGE2_fileManager.js:1506

Copy the URL of the item into the user's clipboard

Parameters:
  • elt <>

    The element

createFolderUI( )
public/src/SAGE2_fileManager.js:1356

Try to create a folder inside the currently selected folder

deleteFilesUI( )
public/src/SAGE2_fileManager.js:1310

Try to delete one or several selected files

Boolean downloadItem( elt )
public/src/SAGE2_fileManager.js:1472

Trigger a browser downlaod

Parameters:
  • elt <>

    The element


Returns: <Boolean>

(description_of_the_return_value)

FileManager( wsio, mydiv )
public/src/SAGE2_fileManager.js:41

FileManager object

Parameters:
  • wsio <Object>

    websocket

  • mydiv <Element>

    DOM element to place the file manager

String fileSizeIEC( a )
public/src/SAGE2_fileManager.js:27

Convert a file size (number) to pretty string

Parameters:
  • a <Number>

    file size to be converted


Returns: <String>

number with unit

openURLItem( elt )
public/src/SAGE2_fileManager.js:1526

Opens the content in a browser tab

Parameters:
  • elt <>

    The element

String showTooltip( element )
public/src/SAGE2_fileManager.js:1268

Return the tooltip field of an object or empty string

Parameters:
  • element <Object>

    object with tooltip value or not


Returns: <String>

tooltip string