]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/debian/missing-sources/framework/Web/Javascripts/source/tinymce-405/classes/ui/FilePicker.js
baculum: Add missing-sources directory in debian metadata structure
[bacula/bacula] / gui / baculum / debian / missing-sources / framework / Web / Javascripts / source / tinymce-405 / classes / ui / FilePicker.js
1 /**
2  * FilePicker.js
3  *
4  * Copyright, Moxiecode Systems AB
5  * Released under LGPL License.
6  *
7  * License: http://www.tinymce.com/license
8  * Contributing: http://www.tinymce.com/contributing
9  */
10
11 /*global tinymce:true */
12
13 /**
14  * This class creates a file picker control.
15  *
16  * @class tinymce.ui.FilePicker
17  * @extends tinymce.ui.ComboBox
18  */
19 define("tinymce/ui/FilePicker", [
20         "tinymce/ui/ComboBox"
21 ], function(ComboBox) {
22         "use strict";
23
24         return ComboBox.extend({
25                 /**
26                  * Constructs a new control instance with the specified settings.
27                  *
28                  * @constructor
29                  * @param {Object} settings Name/value object with settings.
30                  */
31                 init: function(settings) {
32                         var self = this, editor = tinymce.activeEditor, fileBrowserCallback;
33
34                         settings.spellcheck = false;
35
36                         fileBrowserCallback = editor.settings.file_browser_callback;
37                         if (fileBrowserCallback) {
38                                 settings.icon = 'browse';
39
40                                 settings.onaction = function() {
41                                         fileBrowserCallback(
42                                                 self.getEl('inp').id,
43                                                 self.getEl('inp').value,
44                                                 settings.filetype,
45                                                 window
46                                         );
47                                 };
48                         }
49
50                         self._super(settings);
51                 }
52         });
53 });