From 70fb8a9268c6ae67448f2bd3490a467f4d1b0a04 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Tue, 27 Nov 2012 02:42:17 +0100 Subject: [PATCH] Contacts: Move sharing to settings slideup. --- css/contacts.css | 5 ++++- js/app.js | 4 +++- templates/contacts.php | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/css/contacts.css b/css/contacts.css index 7093f1e8..d9b45bb4 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -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; } diff --git a/js/app.js b/js/app.js index cfb08d93..3f19875b 100644 --- a/js/app.js +++ b/js/app.js @@ -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; } diff --git a/templates/contacts.php b/templates/contacts.php index 4b679e3a..85b6d12a 100644 --- a/templates/contacts.php +++ b/templates/contacts.php @@ -25,6 +25,21 @@