Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
16e4e6dc
Commit
16e4e6dc
authored
13 years ago
by
Bart Visscher
Browse files
Options
Downloads
Patches
Plain Diff
Contacts: small merge cleanups
parent
3e2e5196
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/contacts/README.tanghus
+0
-22
0 additions, 22 deletions
apps/contacts/README.tanghus
apps/contacts/css/styles.css
+1
-1
1 addition, 1 deletion
apps/contacts/css/styles.css
apps/contacts/lib/addressbook.php
+2
-4
2 additions, 4 deletions
apps/contacts/lib/addressbook.php
with
3 additions
and
27 deletions
apps/contacts/README.tanghus
deleted
100644 → 0
+
0
−
22
View file @
3e2e5196
As I like to run regular, automated backups of my PIM data I looked into an
easy way of getting the direct link to an address book, and noticed the
elegant way it was possible in the calendar, where you can click on the
'Calendars' button and download it directly.
I modified the export.php script for the contacts app and can now run backups
with wget and http authentication. Hence the name 'tanghus_remote_backup' for
this branch.
Then I implemented the nice popup window function to get an UI for it and one
thing lead to another:
As for the Calendar app there's a js popup for address book activation, CardDAV link, export,
edit, delete and add address books.
When making changes to the address books the contact list is updated to show the
contacts in the active address book(s).
When an address book is activated the setting is saved using OC_Preferences::setValue().
Most of the code is copy/paste from the Calendar and Contacts apps ;-)
Tested with fresh clone from git@gitorious.org:~tanghus/owncloud/tanghus-owncloud.git, removed
database and config.php.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
apps/contacts/css/styles.css
+
1
−
1
View file @
16e4e6dc
#chooseaddressbook
{
margin-right
:
170px
;
float
:
right
;
font-size
:
12px
;
}
#chooseaddressbook
{
margin-right
:
170px
;
float
:
right
;}
#contacts_details_name
{
font-weight
:
bold
;
font-size
:
1.1em
;
margin-left
:
25%
;}
#contacts_details_name
{
font-weight
:
bold
;
font-size
:
1.1em
;
margin-left
:
25%
;}
#contacts_details_photo
{
margin
:
.5em
0em
.5em
25%
;
}
#contacts_details_photo
{
margin
:
.5em
0em
.5em
25%
;
}
...
...
This diff is collapsed.
Click to expand it.
apps/contacts/lib/addressbook.php
+
2
−
4
View file @
16e4e6dc
...
@@ -145,7 +145,7 @@ class OC_Contacts_Addressbook{
...
@@ -145,7 +145,7 @@ class OC_Contacts_Addressbook{
* @param integer $uid User id. If null current user will be used.
* @param integer $uid User id. If null current user will be used.
* @return array
* @return array
*/
*/
public
static
function
activeIds
(
$uid
){
public
static
function
activeIds
(
$uid
=
null
){
if
(
is_null
(
$uid
)){
if
(
is_null
(
$uid
)){
$uid
=
OC_User
::
getUser
();
$uid
=
OC_User
::
getUser
();
}
}
...
@@ -221,9 +221,7 @@ class OC_Contacts_Addressbook{
...
@@ -221,9 +221,7 @@ class OC_Contacts_Addressbook{
* @return boolean
* @return boolean
*/
*/
public
static
function
isActive
(
$id
){
public
static
function
isActive
(
$id
){
//if(defined("DEBUG") && DEBUG) {
OC_Log
::
write
(
'contacts'
,
'OC_Contacts_Addressbook::isActive('
.
$id
.
'):'
.
in_array
(
$id
,
self
::
activeIds
()),
OC_Log
::
DEBUG
);
OC_Log
::
write
(
'contacts'
,
'OC_Contacts_Addressbook::isActive('
.
$id
.
'):'
.
in_array
(
$id
,
self
::
activeIds
()),
OC_Log
::
DEBUG
);
//}
return
in_array
(
$id
,
self
::
activeIds
());
return
in_array
(
$id
,
self
::
activeIds
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment