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
2eac79b7
Commit
2eac79b7
authored
12 years ago
by
Thomas Tanghus
Browse files
Options
Downloads
Patches
Plain Diff
Some UI improvements on the addressbooks settings.
parent
de7f48b0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/contacts/css/contacts.css
+3
-0
3 additions, 0 deletions
apps/contacts/css/contacts.css
apps/contacts/js/settings.js
+15
-6
15 additions, 6 deletions
apps/contacts/js/settings.js
apps/contacts/templates/settings.php
+1
-3
1 addition, 3 deletions
apps/contacts/templates/settings.php
with
19 additions
and
9 deletions
apps/contacts/css/contacts.css
+
3
−
0
View file @
2eac79b7
...
...
@@ -140,4 +140,7 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; }
.addressbooks-settings
.actions
*
{
float
:
left
;
}
.addressbooks-settings
.actions
input
.name
{
width
:
5em
;
}
.addressbooks-settings
.actions
input
.name
{
width
:
7em
;
}
.addressbooks-settings
a
.action
{
opacity
:
0.2
;
}
.addressbooks-settings
a
.action
:hover
{
opacity
:
1
;
}
.addressbooks-settings
td
.active
,
.addressbooks-settings
td
.action
{
width
:
20px
;
}
This diff is collapsed.
Click to expand it.
apps/contacts/js/settings.js
+
15
−
6
View file @
2eac79b7
...
...
@@ -89,8 +89,7 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
+
'
<td class="action"><a class="svg action globe" title="
'
+
t
(
'
contacts
'
,
'
Show CardDav link
'
)
+
'
"></a></td>
'
+
'
<td class="action"><a class="svg action cloud" title="
'
+
t
(
'
contacts
'
,
'
Show read-only VCF link
'
)
+
'
"></a></td>
'
+
'
<td class="action"><a class="svg action download" title="
'
+
t
(
'
contacts
'
,
'
Download
'
)
+
'
"
'
+
'
href="
'
+
totalurl
+
'
/
'
+
encodeURIComponent
(
oc_current_user
)
+
'
/
'
+
encodeURIComponent
(
jsondata
.
data
.
addressbook
.
uri
)
+
'
?export"></a></td>
'
+
'
href="
'
+
OC
.
linkTo
(
'
contacts
'
,
'
export.php
'
)
+
'
?bookid=
'
+
jsondata
.
data
.
addressbook
.
id
+
'
"></a></td>
'
+
'
<td class="action"><a class="svg action edit" title="
'
+
t
(
'
contacts
'
,
'
Edit
'
)
+
'
"></a></td>
'
+
'
<td class="action"><a class="svg action delete" title="
'
+
t
(
'
contacts
'
,
'
Delete
'
)
+
'
"></a></td>
'
+
'
</tr>
'
);
...
...
@@ -106,17 +105,27 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
}
});
},
showLink
:
function
(
id
,
row
,
link
)
{
console
.
log
(
'
row:
'
,
row
.
length
);
row
.
next
(
'
tr.link
'
).
remove
();
var
linkrow
=
$
(
'
<tr class="link"><td colspan="5"><input style="width: 95%;" type="text" value="
'
+
link
+
'
" /></td>
'
+
'
<td colspan="3"><button>
'
+
t
(
'
contacts
'
,
'
Cancel
'
)
+
'
</button></td></tr>
'
).
insertAfter
(
row
);
linkrow
.
find
(
'
input
'
).
focus
().
select
();
linkrow
.
find
(
'
button
'
).
click
(
function
()
{
$
(
this
).
parents
(
'
tr
'
).
first
().
remove
();
});
},
showCardDAV
:
function
(
id
)
{
console
.
log
(
'
showCardDAV:
'
,
id
);
var
row
=
this
.
adrsettings
.
find
(
'
tr[data-id="
'
+
id
+
'
"]
'
);
this
.
adractions
.
find
(
'
.link
'
).
val
(
totalurl
+
'
/
'
+
encodeURIComponent
(
oc_current_user
)
+
'
/
'
);
this
.
showActions
([
'
link
'
,
'
cancel
'
]);
this
.
showLink
(
id
,
row
,
totalurl
+
'
/
'
+
encodeURIComponent
(
oc_current_user
));
},
showVCF
:
function
(
id
)
{
console
.
log
(
'
showVCF:
'
,
id
);
var
row
=
this
.
adrsettings
.
find
(
'
tr[data-id="
'
+
id
+
'
"]
'
);
this
.
adractions
.
find
(
'
.link
'
).
val
(
totalurl
+
'
/
'
+
encodeURIComponent
(
oc_current_user
)
+
'
/
'
+
encodeURIComponent
(
row
.
data
(
'
uri
'
))
+
'
?export
'
);
this
.
showActions
([
'
link
'
,
'
cancel
'
]);
var
link
=
totalurl
+
'
/
'
+
encodeURIComponent
(
oc_current_user
)
+
'
/
'
+
encodeURIComponent
(
row
.
data
(
'
uri
'
))
+
'
?export
'
;
console
.
log
(
link
);
this
.
showLink
(
id
,
row
,
link
);
}
}
};
...
...
This diff is collapsed.
Click to expand it.
apps/contacts/templates/settings.php
+
1
−
3
View file @
2eac79b7
...
...
@@ -24,8 +24,7 @@
</td>
<td
class=
"action"
>
<a
class=
"svg action download"
title=
"
<?php
echo
$l
->
t
(
'Download'
);
?>
"
href=
"
<?php
echo
OCP\Util
::
linkToRemote
(
'carddav'
)
.
'addressbooks/'
.
OCP\USER
::
getUser
()
.
'/'
.
rawurlencode
(
$addressbook
[
'uri'
])
?>
?export"
></a>
href=
"
<?php
echo
OCP\Util
::
linkToAbsolute
(
'contacts'
,
'export.php'
);
?>
?bookid=
<?php
echo
$addressbook
[
'id'
]
?>
"
></a>
</td>
<td
class=
"action"
>
<a
class=
"svg action edit"
title=
"
<?php
echo
$l
->
t
(
"Edit"
);
?>
"
></a>
...
...
@@ -41,7 +40,6 @@
<button
class=
"new"
>
<?php
echo
$l
->
t
(
'New Address Book'
)
?>
</button>
<input
class=
"name hidden"
type=
"text"
autofocus=
"autofocus"
placeholder=
"
<?php
echo
$l
->
t
(
'Name'
);
?>
"
/>
<input
class=
"description hidden"
type=
"text"
placeholder=
"
<?php
echo
$l
->
t
(
'Description'
);
?>
"
/>
<input
class=
"link hidden"
style=
"width: 80%"
type=
"text"
autofocus=
"autofocus"
/>
<button
class=
"save hidden"
>
<?php
echo
$l
->
t
(
'Save'
)
?>
</button>
<button
class=
"cancel hidden"
>
<?php
echo
$l
->
t
(
'Cancel'
)
?>
</button>
</div>
...
...
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