aboutsummaryrefslogtreecommitdiffstats
path: root/apps/contacts/js
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-04-24 01:43:21 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-04-24 01:44:07 +0200
commit22f4acadc05c16c19c312517ba494752fe385ccc (patch)
tree0467fd0b858d1948154a665de6817b90f60c2e07 /apps/contacts/js
parentb8da5c526219fae28434ede6cd53e0010d83c8ee (diff)
downloadnextcloud-server-22f4acadc05c16c19c312517ba494752fe385ccc.tar.gz
nextcloud-server-22f4acadc05c16c19c312517ba494752fe385ccc.zip
Contacts: In app import (for Chrome and Firefox only)
Diffstat (limited to 'apps/contacts/js')
-rw-r--r--apps/contacts/js/contacts.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index f471a7f25aa..a3e1a1361df 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -1348,16 +1348,12 @@ Contacts={
this.droptarget = $('#import_drop_target');
console.log($('#import_drop_target').html());
$(this.droptarget).bind('dragover',function(event){
- //console.log('dragover');
$(event.target).addClass('droppable');
event.stopPropagation();
event.preventDefault();
});
$(this.droptarget).bind('dragleave',function(event){
- //console.log('dragleave');
$(event.target).removeClass('droppable');
- //event.stopPropagation();
- //event.preventDefault();
});
$(this.droptarget).bind('drop',function(event){
event.stopPropagation();
@@ -1421,12 +1417,11 @@ Contacts={
var tr = $(document.createElement('tr'))
.load(OC.filePath('contacts', 'ajax', 'importaddressbook.php'));
$(object).closest('tr').after(tr).hide();
- //this.loadImportHandlers();
},
doImport:function(path, file){
var id = $('#importaddressbook_dialog').find('#book').val();
console.log('Selected book: ' + id);
- $.post(OC.filePath('contacts', '', 'import.php'), { id: id, path: path, file: file, istmpfile: true },
+ $.post(OC.filePath('contacts', '', 'import.php'), { id: id, path: path, file: file, fstype: 'OC_FilesystemView' },
function(jsondata){
if(jsondata.status == 'success'){
Contacts.UI.Addressbooks.droptarget.html(t('contacts', 'Import done. Success/Failure: ')+jsondata.data.imported+'/'+jsondata.data.failed);
@@ -1478,7 +1473,6 @@ Contacts={
}
else{
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
- //alert(jsondata.data.message);
}
});
setTimeout(Contacts.UI.Contacts.lazyupdate, 500);