Add document title input to the toolbar

This commit is contained in:
Aleksander Machniak 2015-11-02 14:54:05 +01:00
parent 9a0ba625aa
commit c01447347c
4 changed files with 18 additions and 4 deletions

View file

@ -115,6 +115,8 @@ window.rcmail && window.files_api && rcmail.addEventListener('init', function()
if (rcmail.env.file_data.viewer && rcmail.env.file_data.viewer.manticore)
manticore = new manticore_api({
iframe: $('#fileframe').get(0),
export_menu: rcmail.gui_objects.exportmenu ? $('ul', rcmail.gui_objects.exportmenu).get(0) : null,
title_input: $('#document-title').get(0),
ready: function(data) { manticore_init(); },
set_busy: function(state, message) { return rcmail.set_busy(state, message ? 'kolab_files.' + message : ''); },
hide_message: function(id) { return rcmail.hide_message(id); },
@ -989,9 +991,6 @@ function kolab_files_progress_str(param)
function manticore_init()
{
rcmail.enable_command('document-save', 'document-export', true);
// Populate document export menu with supported file types
manticore.export_menu($('ul', rcmail.gui_objects.exportmenu));
};
rcube_webmail.prototype.document_save = function()

View file

@ -45,6 +45,7 @@ $labels['savefile'] = 'Save file';
$labels['printfile'] = 'Print file';
$labels['fileedit'] = 'File properties';
$labels['createfile'] = 'Create a file';
$labels['documenttitle'] = 'Title:';
$labels['collection_audio'] = 'Audio';
$labels['collection_video'] = 'Video';

View file

@ -68,6 +68,17 @@
display: inline;
}
#filestoolbar > label {
line-height: 42px;
vertical-align: top;
color: #555;
text-shadow: 0 1px 1px #eee;
}
#document-title {
width: 200px;
}
#quicksearchbar #filesearchmenulink {
position: absolute;
top: 5px;

View file

@ -9,7 +9,7 @@
<roundcube:include file="/includes/header.html" />
<div id="mainscreen">
<div id="mainscreen" class="manticore">
<h1 class="voice"><roundcube:label name="kolab_files.docedit" /></h1>
@ -23,7 +23,10 @@
<!--
<roundcube:button command="document-print" type="link" class="button print disabled" classAct="button print" classSel="button print pressed" label="print" title="kolab_files.printfile" />
-->
<span class="spacer"></span>
<roundcube:button command="document-save" type="link" class="button save disabled" classAct="button save" classSel="button save pressed" label="kolab_files.save" title="kolab_files.savefile" />
<span class="spacer"></span>
<label for="document-title"><roundcube:label name="kolab_files.documenttitle" />&nbsp;<input id="document-title" type="text" value="" /></label>
</div>
<div id="filecontent" class="uibox docedit">