summaryrefslogtreecommitdiffstats
path: root/apps/contacts/js
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-08-03 04:20:14 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-08-03 21:32:27 +0200
commitbef63527cef4c642e141793eea1a1e9eab39cd30 (patch)
treedf5164e24a678ad2218a673dc521fa6958bcc8f9 /apps/contacts/js
parent3610975bc10f93caa5f6fde517e5988756246cf9 (diff)
downloadnextcloud-server-bef63527cef4c642e141793eea1a1e9eab39cd30.tar.gz
nextcloud-server-bef63527cef4c642e141793eea1a1e9eab39cd30.zip
Reorganize ajax scripts.
Diffstat (limited to 'apps/contacts/js')
-rw-r--r--apps/contacts/js/contacts.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index d9fff25bc9a..0b4a3c0a540 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -410,13 +410,13 @@ OC.Contacts={
console.log('Adding ' + fn);
aid = aid?aid:$('#contacts h3.active').first().data('id');
var localAddcontact = function(n, fn, aid, isnew) {
- $.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
+ $.post(OC.filePath('contacts', 'ajax', 'contact/add.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
function(jsondata) {
if (jsondata.status == 'success'){
$('#rightcontent').data('id',jsondata.data.id);
var id = jsondata.data.id;
var aid = jsondata.data.aid;
- $.getJSON(OC.filePath('contacts', 'ajax', 'contactdetails.php'),{'id':id},function(jsondata){
+ $.getJSON(OC.filePath('contacts', 'ajax', 'contact/details.php'),{'id':id},function(jsondata){
if(jsondata.status == 'success'){
OC.Contacts.Card.loadContact(jsondata.data, aid);
var item = OC.Contacts.Contacts.insertContact({data:jsondata.data});
@@ -512,7 +512,7 @@ OC.Contacts={
if(OC.Contacts.Contacts.deletionQueue.indexOf(id) == -1 && removeFromQueue) {
return;
}
- $.post(OC.filePath('contacts', 'ajax', 'deletecard.php'),{'id':id},function(jsondata) {
+ $.post(OC.filePath('contacts', 'ajax', 'contact/delete.php'),{'id':id},function(jsondata) {
if(jsondata.status == 'error'){
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
}
@@ -747,7 +747,7 @@ OC.Contacts={
q = q + '&checksum=' + checksum;
console.log('Saving: ' + q);
$(obj).attr('disabled', 'disabled');
- $.post(OC.filePath('contacts', 'ajax', 'saveproperty.php'),q,function(jsondata){
+ $.post(OC.filePath('contacts', 'ajax', 'contact/saveproperty.php'),q,function(jsondata){
if(jsondata.status == 'success'){
container.data('checksum', jsondata.data.checksum);
OC.Contacts.Card.savePropertyInternal(name, fields, checksum, jsondata.data.checksum);
@@ -765,7 +765,7 @@ OC.Contacts={
} else { // add
console.log('Adding: ' + q);
$(obj).attr('disabled', 'disabled');
- $.post(OC.filePath('contacts', 'ajax', 'addproperty.php'),q,function(jsondata){
+ $.post(OC.filePath('contacts', 'ajax', 'contact/addproperty.php'),q,function(jsondata){
if(jsondata.status == 'success'){
container.data('checksum', jsondata.data.checksum);
// TODO: savePropertyInternal doesn't know about new fields
@@ -823,7 +823,7 @@ OC.Contacts={
OC.Contacts.loading(obj, true);
var checksum = OC.Contacts.checksumFor(obj);
if(checksum) {
- $.post(OC.filePath('contacts', 'ajax', 'deleteproperty.php'),{'id': this.id, 'checksum': checksum },function(jsondata){
+ $.post(OC.filePath('contacts', 'ajax', 'contact/deleteproperty.php'),{'id': this.id, 'checksum': checksum },function(jsondata){
if(jsondata.status == 'success'){
if(type == 'list') {
OC.Contacts.propertyContainerFor(obj).remove();
@@ -1438,7 +1438,7 @@ OC.Contacts={
return false;
}
var droplist = (droptarget.is('ul'))?droptarget:droptarget.next();
- $.post(OC.filePath('contacts', 'ajax', 'movetoaddressbook.php'), { ids: dragitem.data('id'), aid: droptarget.data('id') },
+ $.post(OC.filePath('contacts', 'ajax', 'contact/move.php'), { ids: dragitem.data('id'), aid: droptarget.data('id') },
function(jsondata){
if(jsondata.status == 'success'){
dragitem.attr('data-bookid', droptarget.data('id'))
@@ -1577,7 +1577,7 @@ OC.Contacts={
if(params.aid) {
opts['aid'] = params.aid;
}
- $.getJSON(OC.filePath('contacts', 'ajax', 'contacts.php'),opts,function(jsondata){
+ $.getJSON(OC.filePath('contacts', 'ajax', 'contact/list.php'),opts,function(jsondata){
if(jsondata.status == 'success'){
var books = jsondata.data.entries;
$.each(books, function(b, book) {