Make note input fields look as regular input fields (#3241)

This commit is contained in:
Thomas Bruederli 2014-08-19 12:34:52 +02:00
parent f9d152525e
commit da430777b1
2 changed files with 39 additions and 18 deletions

View file

@ -777,7 +777,7 @@ function rcube_kolab_notes_ui(settings)
content = $('#notecontent').val(data.description),
readonly = data.readonly || !list.editable,
attachmentslist = $(rcmail.gui_objects.notesattachmentslist).html('');
$('.notetitle', rcmail.gui_objects.noteviewtitle).val(data.title).prop('disabled', readonly);
$('.notetitle', rcmail.gui_objects.noteviewtitle).val(data.title).prop('disabled', readonly).show();
$('.dates .notecreated', rcmail.gui_objects.noteviewtitle).html(Q(data.created || ''));
$('.dates .notechanged', rcmail.gui_objects.noteviewtitle).html(Q(data.changed || ''));
$(rcmail.gui_objects.notebooks).filter('select').val(list.id);
@ -786,7 +786,7 @@ function rcube_kolab_notes_ui(settings)
}
// tag-edit line
var tagline = $('.tagline', rcmail.gui_objects.noteviewtitle).empty().show();
var tagline = $('.tagline', rcmail.gui_objects.noteviewtitle).empty()[readonly?'addClass':'removeClass']('disabled').show();
$.each(typeof data.categories == 'object' && data.categories.length ? data.categories : [''], function(i,val){
$('<input>')
.attr('name', 'tags[]')
@ -797,7 +797,10 @@ function rcube_kolab_notes_ui(settings)
});
if (!data.categories || !data.categories.length) {
$('<span>').addClass('placeholder').html(rcmail.gettext('notags', 'kolab_notes')).appendTo(tagline);
$('<span>').addClass('placeholder')
.html(rcmail.gettext('notags', 'kolab_notes'))
.appendTo(tagline)
.click(function(e) { $(this).parent().find('.tagedit-list').trigger('click'); });
}
$('.tagline input.tag', rcmail.gui_objects.noteviewtitle).tagedit({
@ -1093,7 +1096,7 @@ function rcube_kolab_notes_ui(settings)
function reset_view()
{
me.selected_note = null;
$('.notetitle', rcmail.gui_objects.noteviewtitle).val('');
$('.notetitle', rcmail.gui_objects.noteviewtitle).val('').hide();
$('.tagline, .dates', rcmail.gui_objects.noteviewtitle).hide();
$(rcmail.gui_objects.noteseditform).hide();
$(rcmail.gui_objects.notesdetailview).hide();

View file

@ -213,14 +213,13 @@
.notesview #notedetailstitle {
height: auto;
min-height: 20px;
}
.notesview #notedetailstitle .tagedit-list,
.notesview #notedetailstitle input.inline-edit,
.notesview #notedetailstitle input.inline-edit:focus {
.notesview #notedetailstitle .disabled .tagedit-list,
.notesview #notedetailstitle input.inline-edit:disabled {
outline: none;
padding: 0;
margin: 0;
padding-left: 0;
border: 0;
background: rgba(255,255,255,0.01);
-webkit-box-shadow: none;
@ -235,6 +234,10 @@
font-size: 14px;
font-weight: bold;
color: #333;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.notesview #notedetailstitle .dates,
@ -246,29 +249,40 @@
margin-top: 6px;
}
.notesview #notedetailstitle .dates,
.notesview #notedetailstitle .notebookselect {
.notesview .notebookselect {
margin-top: 4px;
margin-bottom: 4px;
}
.notesview #notedetailstitle .tagline {
position: relative;
cursor: text;
margin: 6px -2px -2px -2px;
margin: 4px 0 0 0;
}
.notesview #notedetailstitle .tagline.disabled {
margin-top: 0;
}
.notesview #notedetailstitle .tagline .placeholder {
position: absolute;
top: 4px;
left: 0;
z-index: 1;
top: 6px;
left: 6px;
z-index: 2;
}
.notesview #notedetailstitle .tagedit-list {
position: relative;
z-index: 2;
padding: 2px;
z-index: 1;
min-height: 32px;
/* padding: 2px; */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.notesview #notedetailstitle .disabled .tagedit-list {
min-height: 26px;
}
.notesview #notedetailstitle #tagedit-input {
@ -456,6 +470,10 @@
.notesdialog #notesdialogheader {
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
#kolabnotesinlinegui {