mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Fix read only notes.
This commit is contained in:
@@ -148,10 +148,9 @@ Notes.prototype = {
|
|||||||
var self = this;
|
var self = this;
|
||||||
$.get(OC.linkToOCS('apps/files_sharing/api/v1/', 1) + 'sharees', {
|
$.get(OC.linkToOCS('apps/files_sharing/api/v1/', 1) + 'sharees', {
|
||||||
format: 'json',
|
format: 'json',
|
||||||
itemType: 'principals'
|
itemType: '1'
|
||||||
}).done(function (shares) {
|
}).done(function (shares) {
|
||||||
var users = [];
|
var users = [];
|
||||||
console.log(shares);
|
|
||||||
$.each(shares.ocs.data.exact.users, function(index, user) {
|
$.each(shares.ocs.data.exact.users, function(index, user) {
|
||||||
users.push(user.value.shareWith);
|
users.push(user.value.shareWith);
|
||||||
});
|
});
|
||||||
@@ -708,15 +707,16 @@ View.prototype = {
|
|||||||
return $('#title-editable').prop('contenteditable');
|
return $('#title-editable').prop('contenteditable');
|
||||||
else {
|
else {
|
||||||
if (editable) {
|
if (editable) {
|
||||||
$('#title-editable').prop('contenteditable', true);
|
|
||||||
$('#modal-note-div .icon-header-note').show();
|
$('#modal-note-div .icon-header-note').show();
|
||||||
|
$('#title-editable').prop('contenteditable', true);
|
||||||
$('#modal-note-div .note-options').show();
|
$('#modal-note-div .note-options').show();
|
||||||
$('#modal-note-div .note-disable-options').hide();
|
$('#modal-note-div .note-disable-options').hide();
|
||||||
this._initEditor();
|
this._initEditor();
|
||||||
} else {
|
} else {
|
||||||
$('#modal-note-div .note-options').hide();
|
|
||||||
$('#modal-note-div .icon-header-note').hide();
|
$('#modal-note-div .icon-header-note').hide();
|
||||||
$('#title-editable').removeAttr("contentEditable");
|
$('#title-editable').removeAttr("contentEditable");
|
||||||
|
$('#content-editable').removeAttr("contentEditable");
|
||||||
|
$('#modal-note-div .note-options').hide();
|
||||||
$('#modal-note-div .note-disable-options').show();
|
$('#modal-note-div .note-disable-options').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user