first commit for sharing dialog

This commit is contained in:
Vinzenz
2016-06-01 23:35:32 +02:00
parent 65f56144c0
commit 8d2864a2c0
5 changed files with 49 additions and 2 deletions

View File

@@ -162,6 +162,13 @@ View.prototype = {
var modalnote = $("#modal-note-div .quicknote");
var note = $('.notes-grid [data-id=' + id + ']').parent();
if($('.notes-grid [data-id=' + id + ']').hasClass('shareowner')) {
$('.save-button #unshare-button').show();
$('.save-button #share-button').hide();
} else {
$('.save-button #unshare-button').hide();
$('.save-button #share-button').show();
}
var title = note.find("#title-editable").html();
var content = note.find("#content-editable").html();
@@ -336,6 +343,16 @@ View.prototype = {
modalnote.css("background-color", color);
});
// handle share editing notes.
$('#modal-note-div #share-button').click(function (event) {
$.get(OC.generateUrl('/apps/quicknotes/api/0.1/getusergroups'), function(data) {
var groups = data.groups;
var users = data.users;
alert('groups: ' + groups.toSource());
alert('users: ' + users.toSource());
});
});
// handle cancel editing notes.
$('#modal-note-div #cancel-button').click(function (event) {
self.cancelEdit();