Skip to content

Commit

Permalink
Fixed database to folder issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fmstrat committed May 10, 2016
1 parent 6ddcacf commit 1f0a017
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function ocOwnnoteUrl(url) {
$(document).ready(function() {
$('#ownnote-folder').change(function() {
var val = $(this).val();
$.post(ocOwnnoteUrl("api/v0.2/ajaxsetval"), { field: 'folder', value: val }, function (data) {
$.post(ocOwnnoteUrl("ajax/v0.2/ajaxsetval"), { field: 'folder', value: val }, function (data) {
console.log('response', data);
});
});
Expand All @@ -15,7 +15,7 @@ $(document).ready(function() {
if (val == "") {
$('#ownnote-folder').val('');
$('#ownnote-folder-settings').css('display', 'none');
$.post(ocOwnnoteUrl("api/v0.2/ajaxsetval"), { field: 'folder', value: '' }, function (data) {
$.post(ocOwnnoteUrl("ajax/v0.2/ajaxsetval"), { field: 'folder', value: '' }, function (data) {
console.log('response', data);
});
} else
Expand All @@ -26,7 +26,7 @@ $(document).ready(function() {
var c = $(this).is(':checked');
if (c)
da = "checked";
$.post(ocOwnnoteUrl("api/v0.2/ajaxsetval"), { field: 'disableAnnouncement', val: da }, function (data) {
$.post(ocOwnnoteUrl("ajax/v0.2/ajaxsetval"), { field: 'disableAnnouncement', val: da }, function (data) {
console.log('response', data);
});
});
Expand Down

1 comment on commit 1f0a017

@ejouvin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that the fix does not work for me.

Because we can deploy extension with a custom prefix, the URL returned by OC.linkTo in this function:

function ocOwnnoteUrl(url) {
    var newurl = OC.linkTo("ownnote",url).replace("apps/ownnote","index.php/apps/ownnote");
    return newurl;
}

is something like
https://SERVER/owncloud/exapps/ownnote

I will complete the description next time.

Please sign in to comment.