+ $('#id_master_file,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').before(function() {
+ var target = this;
+ return $('<button/>', {
+ 'type': 'button',
+ 'class': 'btn btn-default pull-right',
+ 'text': 'Wybierz',
+ 'data-toggle': 'modal',
+ 'data-target': '#gridftp'
+ }).click(function() {
+ filex.once('selected:file', function(file) {
+ target.selectize.addOption({value: file, text: file});
+ target.selectize.addItem(file);
+ target.selectize.refreshItems();
+ $('#gridftp').modal('hide');
+ });
+ });
+ }).wrap('<div style="margin-right: 80px"></div>');
+
+ $('#id_application').selectize();