1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Contacts: Move sharing to settings slideup.

This commit is contained in:
Thomas Tanghus 2012-11-27 02:42:17 +01:00
parent 4e772fa405
commit 70fb8a9268
3 changed files with 22 additions and 2 deletions

View File

@ -94,6 +94,9 @@ dl.form { display: inline-block; width: auto; margin: 0; padding: 0; cursor: nor
.form dt { display: table-cell; clear: left; float: left; width: 7em; margin: 0; padding: 0.8em 0.5em 0 0; text-align:right; text-overflow:ellipsis; o-text-overflow: ellipsis; vertical-align: text-bottom; color: #bbb;/* white-space: pre-wrap; white-space: -moz-pre-wrap !important; white-space: -pre-wrap; white-space: -o-pre-wrap;*/ }
.form dd { display: table-cell; clear: right; float: left; margin: 0; padding: 0; white-space: nowrap; vertical-align: text-bottom; }
.action { display: inline-block; width: 20px; height: 20px; }
.action.share { height: 20px !important; width: 20px; float: right !important; clear: right; }
/* override the default margin on share dropdown */
#dropdown { margin: 1.5em 0; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; }
.add { background:url('%webroot%/core/img/actions/add.svg') no-repeat center; clear: both; }
.delete { background:url('%webroot%/core/img/actions/delete.png') no-repeat center; }
.edit { background:url('%webroot%/core/img/actions/rename.svg') no-repeat center; }
@ -206,7 +209,7 @@ dl.form { display: inline-block; width: auto; margin: 0; padding: 0; cursor: nor
width: 20em;
z-index: 2;
}
#contacts-settings li,#contacts-settings li:hover { background-color: transparent; }
#contacts-settings li,#contacts-settings li:hover { background-color: transparent; white-space: nowrap; }
/* Single elements */
#file_upload_target, #import_upload_target, #crop_target { display:none; }

View File

@ -636,6 +636,8 @@ OC.Contacts = OC.Contacts || {
this.bindEvents();
this.$toggleAll.show();
this.showActions(['addcontact']);
OC.Share.loadIcons('addressbook');
// Wait 2 mins then check if contacts are indexed.
setTimeout(function() {
if(!is_indexed) {
@ -1172,7 +1174,7 @@ OC.Contacts = OC.Contacts || {
self.hideActions();
});
$('.export,.import').on('click keydown', function(event) {
$('h3.export,h3.import,h3.share').on('click keydown', function(event) {
if(wrongKey(event)) {
return;
}

View File

@ -25,6 +25,21 @@
<div id="contacts-settings">
<ul>
<li><button class="settings" title="<?php echo $l->t('Settings'); ?>"></button></li>
<li><h3 class="share"><?php echo $l->t('Share'); ?></h3>
<ul class="hidden">
<?php foreach($_['addressbooks'] as $addressbook) {
if($addressbook['permissions'] & OCP\PERMISSION_SHARE) {
?>
<li value="<?php echo $addressbook['id'] ?>">
<span class="float"><?php echo $addressbook['displayname'] ?></span>
<span><a class="share action" data-item-type="addressbook"
data-item="<?php echo $addressbook['id'] ?>"
data-possible-permissions="<?php echo $addressbook['permissions'] ?>">
</a></span> <!-- To place the share dropdown correctly -->
</li>
<?php }} ?>
</ul>
</li>
<li><h3 class="import" role="button"><?php echo $l->t('Import'); ?></h3>
<ul class="hidden">
<li>