1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

More @£#¤ conflicts

Merge branch 'temp' into tanghus_contacts
This commit is contained in:
Thomas Tanghus 2012-02-08 09:36:16 +01:00
commit 1e4f4f7cfd
2 changed files with 4 additions and 19 deletions

View File

@ -17,13 +17,10 @@ function bailOut($msg) {
function debug($msg) {
OC_Log::write('contacts','ajax/editname.php: '.$msg, OC_Log::DEBUG);
}
foreach ($_GET as $key=>$element) {
debug('_GET: '.$key.'=>'.$element);
}
$tmpl = new OC_TEMPLATE("contacts", "part.edit_name_dialog");
$id = $_GET['id'];
$id = isset($_GET['id'])?$_GET['id']:'';
if($id) {
$vcard = OC_Contacts_App::getContactVCard($id);
$name = array('', '', '', '', '');

View File

@ -363,8 +363,6 @@ Contacts={
//Contacts.UI.notImplemented();
//return false;
this.id = ''; this.fn = ''; this.fullname = ''; this.givname = ''; this.famname = ''; this.addname = ''; this.honpre = ''; this.honsuf = '';
$.getJSON('ajax/newcontact.php',{},function(jsondata){
if(jsondata.status == 'success'){
id = '';
@ -379,6 +377,7 @@ Contacts={
});
},
add:function(n, fn, aid){ // add a new contact
console.log('Add contact: ' + n + ', ' + fn + ' ' + aid);
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid },
function(jsondata) {
if (jsondata.status == 'success'){
@ -554,6 +553,7 @@ Contacts={
},
editName:function(){
var isnew = (this.id == '');
/* Initialize the name edit dialog */
if($('#edit_name_dialog').dialog('isOpen') == true){
$('#edit_name_dialog').dialog('moveToTop');
}else{ // TODO: If id=='' call addcontact.php (or whatever name) instead and reload view with id.
@ -1035,18 +1035,6 @@ $(document).ready(function(){
*/
$('#contacts_newcontact').click(function(){
Contacts.UI.Card.editNew();
// $.getJSON('ajax/addcontact.php',{},function(jsondata){
// if(jsondata.status == 'success'){
// $('#rightcontent').data('id','');
// $('#rightcontent').html(jsondata.data.page)
// .find('select').chosen();
// }
// else{
// Contacts.UI.messageBox(t('contacts', 'Error'), jsondata.data.message);
// //alert(jsondata.data.message);
// }
// });
// return false;
});
/**
@ -1071,7 +1059,7 @@ $(document).ready(function(){
});
/**
* Delete currently selected contact and TODO: clear page
* Delete currently selected contact TODO: and clear page
*/
$('#contacts_deletecard').live('click',function(){
Contacts.UI.Card.delete();