Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/comments/js/commentstabview.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
this.$container.append($comment);
}
this._postRenderItem($comment);
$('#commentsTabView').find('.newCommentForm div.message').text('').prop('disabled', false);
$('#commentsTabView').find('.newCommentForm div.message').text('').prop('contenteditable', true);

// we need to update the model, because it consists of client data
// only, but the server might add meta data, e.g. about mentions
Expand Down Expand Up @@ -620,7 +620,7 @@
return;
}

$commentField.prop('disabled', true);
$commentField.prop('contenteditable', false);
$submit.addClass('hidden');
$loading.removeClass('hidden');

Expand Down Expand Up @@ -673,7 +673,7 @@
_onSubmitError: function($form, commentId) {
$form.find('.submit').removeClass('hidden');
$form.find('.submitLoading').addClass('hidden');
$form.find('.message').prop('disabled', false);
$form.find('.message').prop('contenteditable', true);

if(!_.isUndefined(commentId)) {
OC.Notification.show(t('comments', 'Error occurred while updating comment with id {id}', {id: commentId}), {type: 'error'});
Expand Down
29 changes: 27 additions & 2 deletions core/css/inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

/* Specifically override browser styles */
input, textarea, select, button, div[contenteditable=true] {
input, textarea, select, button, div[contenteditable=true], div[contenteditable=false] {
font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
}
.select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget {
Expand All @@ -25,7 +25,8 @@ select,
button,
input,
textarea,
div[contenteditable=true] {
div[contenteditable=true],
div[contenteditable=false] {
width: 130px;
min-height: 32px;
box-sizing: border-box;
Expand Down Expand Up @@ -88,6 +89,23 @@ div[contenteditable=true],
}
}

div[contenteditable=false] {
margin: 3px 3px 3px 0;
padding: 7px 6px;
font-size: 13px;
background-color: $color-main-background;
color: nc-lighten($color-main-text, 33%);
border: 1px solid nc-darken($color-main-background, 14%);
outline: none;
border-radius: $border-radius;
cursor: text;

background-color: nc-darken($color-main-background, 8%);
color: rgba($color-main-text, 0.4);
cursor: default;
opacity: 0.5;
}

/* Specific override */
input {
&:not([type='radio']):not([type='checkbox']):not([type='range']):not([type='submit']):not([type='button']):not([type='reset']):not([type='color']):not([type='file']):not([type='image']) {
Expand Down Expand Up @@ -171,6 +189,13 @@ textarea, div[contenteditable=true] {
}
}

div[contenteditable=false] {
color: nc-lighten($color-main-text, 33%);
cursor: text;
font-family: inherit;
height: auto;
}

/* Override the ugly select arrow */
select {
-webkit-appearance: none;
Expand Down