diff options
Diffstat (limited to 'plugins/archive')
-rw-r--r-- | plugins/archive/archive.js | 18 | ||||
-rw-r--r-- | plugins/archive/localization/lv_LV.inc | 22 |
2 files changed, 18 insertions, 22 deletions
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js index eee41d336..3500b9fe4 100644 --- a/plugins/archive/archive.js +++ b/plugins/archive/archive.js @@ -7,18 +7,16 @@ function rcmail_archive(prop) { if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length)) return; - + if (rcmail.env.mailbox.indexOf(rcmail.env.archive_folder) != 0) { if (!rcmail.env.archive_type) { // simply move to archive folder (if no partition type is set) - rcmail.command('moveto', rcmail.env.archive_folder); + rcmail.command('move', rcmail.env.archive_folder); } else { // let the server sort the messages to the according subfolders - rcmail.http_post( - 'plugin.move2archive', - { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox } - ); + var post_data = { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox }; + rcmail.http_post('plugin.move2archive', post_data); } } } @@ -26,16 +24,15 @@ function rcmail_archive(prop) // callback for app-onload event if (window.rcmail) { rcmail.addEventListener('init', function(evt) { - // register command (directly enable in message view mode) rcmail.register_command('plugin.archive', rcmail_archive, (rcmail.env.uid && rcmail.env.mailbox != rcmail.env.archive_folder)); - + // add event-listener to message list if (rcmail.message_list) - rcmail.message_list.addEventListener('select', function(list){ + rcmail.message_list.addEventListener('select', function(list) { rcmail.enable_command('plugin.archive', (list.get_selection().length > 0 && rcmail.env.mailbox != rcmail.env.archive_folder)); }); - + // set css style for archive folder var li; if (rcmail.env.archive_folder && (li = rcmail.get_folder_li(rcmail.env.archive_folder, '', true))) @@ -48,4 +45,3 @@ if (window.rcmail) { }); }) } - diff --git a/plugins/archive/localization/lv_LV.inc b/plugins/archive/localization/lv_LV.inc index ad2812fba..d4c892705 100644 --- a/plugins/archive/localization/lv_LV.inc +++ b/plugins/archive/localization/lv_LV.inc @@ -18,17 +18,17 @@ $labels = array(); $labels['buttontext'] = 'Arhīvs'; -$labels['buttontitle'] = 'Arhivēt vēstuli'; -$labels['archived'] = 'Vēstule sekmīgi arhivēta'; -$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.'; -$labels['archiveerror'] = 'Some messages could not be archived'; +$labels['buttontitle'] = 'Arhivēt šo vēstuli'; +$labels['archived'] = 'Vēstule veiksmīgi arhivēta'; +$labels['archivedreload'] = 'Arhīvs veiksmīgi izveidots. Lai redzētu jaunās arhīva mapes, pārlādējiet lapu.'; +$labels['archiveerror'] = 'Dažas vēstules nebija iespējams arhivēt'; $labels['archivefolder'] = 'Arhīvs'; -$labels['settingstitle'] = 'Archive'; -$labels['archivetype'] = 'Divide archive by'; -$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)'; -$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)'; -$labels['archivetypefolder'] = 'Original folder'; -$labels['archivetypesender'] = 'Sender email'; -$labels['unkownsender'] = 'unknown'; +$labels['settingstitle'] = 'Arhīvs'; +$labels['archivetype'] = 'Sadalīt arhīvu pa'; +$labels['archivetypeyear'] = 'Gadiem (piem. Arhīvs/2012)'; +$labels['archivetypemonth'] = 'Mēnešiem (piem. Arhīvs/2012/06)'; +$labels['archivetypefolder'] = 'Sākotnējā mape'; +$labels['archivetypesender'] = 'Sūtītāja e-pasts'; +$labels['unkownsender'] = 'nezināms'; ?> |