2 commits - plugins/kolab_files
Aleksander Machniak
machniak at kolabsys.com
Wed Aug 7 13:15:32 CEST 2013
plugins/kolab_files/kolab_files.js | 13 +++++++++++++
plugins/kolab_files/lib/kolab_files_engine.php | 9 +++++----
2 files changed, 18 insertions(+), 4 deletions(-)
New commits:
commit 0fb30e3cfb5bd154fcae0ebea8ff13e9a750fd50
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Wed Aug 7 13:14:56 2013 +0200
Register some more localization labels to the client-side
diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php
index 07a7de7..b8adfcb 100644
--- a/plugins/kolab_files/lib/kolab_files_engine.php
+++ b/plugins/kolab_files/lib/kolab_files_engine.php
@@ -176,7 +176,7 @@ class kolab_files_engine
$out = $this->rc->output->form_tag($attrib, $out);
}
- $this->plugin->add_label('foldercreating', 'create', 'foldercreate', 'cancel');
+ $this->plugin->add_label('foldercreating', 'foldercreatenotice', 'create', 'foldercreate', 'cancel');
$this->rc->output->add_gui_object('folder-create-form', $attrib['id']);
return $out;
@@ -631,11 +631,12 @@ class kolab_files_engine
protected function action_index()
{
$this->plugin->add_label(
- 'folderdeleting', 'folderdeleteconfirm', 'foldercreating', 'uploading', 'attaching',
+ 'folderdeleting', 'folderdeleteconfirm', 'folderdeletenotice',
+ 'uploading', 'attaching',
'filedeleting', 'filedeletenotice', 'filedeleteconfirm',
- 'filemoving', 'filemovenotice', 'filecopying', 'filecopynotice',
+ 'filemoving', 'filemovenotice', 'filemoveconfirm', 'filecopying', 'filecopynotice',
'collection_audio', 'collection_video', 'collection_image', 'collection_document',
- 'fileskip', 'fileskipall', 'fileoverwrite', 'fileoverwriteall', 'filemoveconfirm'
+ 'fileskip', 'fileskipall', 'fileoverwrite', 'fileoverwriteall'
);
$this->rc->output->set_pagetitle($this->plugin->gettext('files'));
commit 7a783f11e60058bcd1c4a29fd7d2a77428b02ddb
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Wed Aug 7 13:14:23 2013 +0200
Fix form submitting with Enter key (Bug #2088)
diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js
index 71e2780..dba947f 100644
--- a/plugins/kolab_files/kolab_files.js
+++ b/plugins/kolab_files/kolab_files.js
@@ -302,6 +302,9 @@ function kolab_files_folder_create_dialog()
height: 400
});
+ // Fix submitting form with Enter
+ $('form', dialog).submit(kolab_dialog_submit_handler);
+
// build parent selector
select.append($('<option>').val('').text('---'));
$.each(file_api.env.folders, function(i, f) {
@@ -341,6 +344,9 @@ function kolab_files_file_edit_dialog(file)
dialog.dialog('destroy').hide();
};
+ // Fix submitting form with Enter
+ $('form', dialog).submit(kolab_dialog_submit_handler);
+
// show dialog window
kolab_dialog_show(dialog, {
title: rcmail.gettext('kolab_files.fileedit'),
@@ -363,6 +369,13 @@ function kolab_dialog_show(dialog, params)
dialog.dialog(params).show();
};
+// Handle form submit with Enter key, click first dialog button instead
+function kolab_dialog_submit_handler()
+{
+ $(this).parents('.ui-dialog').find('.ui-button').first().click();
+ return false;
+};
+
// smart upload button
function kolab_files_upload_input(button)
{
More information about the commits
mailing list