Namespace: dialogs

OC.dialogs

Dialog helper for jquery dialogs.
Source:

Methods

(private, static) _changeButtonsText(type, dir)

Handle
Parameters:
Name Type Description
type of action
dir on which to change buttons text
Source:

(static) _fillFilePicker()

fills the filepicker with files
Source:

(static) _fillSlug()

fills the tree list with directories
Source:

(static) _handlePickerClick()

handle clicks made in the filepicker
Source:

(static) _handleTreeListSelect()

handle selection made in the tree list
Source:

(static) alert(text, title, callback, modal)

displays alert dialog
Parameters:
Name Type Description
text content of dialog
title dialog title
callback which will be triggered when user presses OK
modal make the dialog modal
Source:

(static) confirm(text, title, callback, modal)

displays confirmation dialog
Parameters:
Name Type Description
text content of dialog
title dialog title
callback which will be triggered when user presses YES or NO (true or false would be passed to callback respectively)
modal make the dialog modal
Source:

(static) confirmHtml(text, title, callback, modal)

displays confirmation dialog
Parameters:
Name Type Description
text content of dialog
title dialog title
callback which will be triggered when user presses YES or NO (true or false would be passed to callback respectively)
modal make the dialog modal
Source:

(static) fileexists(data, original, replacement, controller) → {Promise}

Displays file exists dialog
Parameters:
Name Type Description
data object upload object
original object file with name, size and mtime
replacement object file with name, size and mtime
controller object with onCancel, onSkip, onReplace and onRename methods
Source:
Returns:
jquery promise that resolves after the dialog template was loaded
Type
Promise

(static) filepicker(title, callback, multiselect, mimetypeFilter, modal, type)

show a file picker to pick a file from In order to pick several types of mime types they need to be passed as an array of strings. When no mime type filter is given only files can be selected. In order to be able to select both files and folders "['*', 'httpd/unix-directory']" should be used instead.
Parameters:
Name Type Description
title dialog title
callback which will be triggered when user presses Choose
multiselect whether it should be possible to select multiple files
mimetypeFilter mimetype to filter by - directories will always be included
modal make the dialog modal
type Type of file picker : Choose, copy, move, copy and move
Source:

(static) info(text, title, callback, modal)

displays info dialog
Parameters:
Name Type Description
text content of dialog
title dialog title
callback which will be triggered when user presses OK
modal make the dialog modal
Source:

(static) message()

Displays raw dialog You better use a wrapper instead ...
Source:

(static) prompt(text, title, callback, modal, name, password)

displays prompt dialog
Parameters:
Name Type Description
text content of dialog
title dialog title
callback which will be triggered when user presses YES or NO (true or false would be passed to callback respectively)
modal make the dialog modal
name name of the input field
password whether the input should be a password input
Source: