mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Move add-contact and add-group buttons back to menu.
This commit is contained in:
parent
90afc480d3
commit
425c8b0c49
@ -106,20 +106,21 @@
|
||||
z-index: 100;
|
||||
}
|
||||
#grouplist .oc-addnew-init {
|
||||
padding: 0 12px;
|
||||
padding: 0 31px;
|
||||
}
|
||||
#grouplist .add-contact:before {
|
||||
position: absolute;
|
||||
content: '+';
|
||||
font-weight: bold;
|
||||
font-size: 180%;
|
||||
padding-right: 2px;
|
||||
font-size: 160%;
|
||||
left: 12px;
|
||||
}
|
||||
#grouplist .add-contact {
|
||||
padding: 0 31px;
|
||||
}
|
||||
#grouplist > li {
|
||||
height: 44px;
|
||||
}
|
||||
#grouplist .open {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.hidden-on-load {
|
||||
display: none;
|
||||
|
@ -1,37 +1,86 @@
|
||||
/**
|
||||
* ownCloud - Add new jQuery plugin
|
||||
*
|
||||
* @author Bernhard Posselt, Thomas Tanghus
|
||||
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
.oc-addnew {
|
||||
display: block !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.oc-addnew li:first-child {
|
||||
display: block;
|
||||
}
|
||||
.oc-addnew li:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
.oc-addnew.open li:first-child {
|
||||
display: none;
|
||||
}
|
||||
.oc-addnew.open li:not(:first-child) {
|
||||
display: block;
|
||||
}
|
||||
.oc-addnew > li {
|
||||
}
|
||||
.oc-addnew > li > a.oc-addnew-init {
|
||||
}
|
||||
.oc-addnew > li > a.oc-addnew-init:before {
|
||||
position: absolute;
|
||||
content: '+';
|
||||
font-weight: bold;
|
||||
font-size: 160%;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.oc-addnew input[type=text] {
|
||||
width: 200px;
|
||||
margin: 0;
|
||||
border-width: 0;
|
||||
height: 34px;
|
||||
width: 198px !important;
|
||||
margin-top: 5px;
|
||||
margin-left: 6px;
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.oc-addnew select {
|
||||
width: 133px;
|
||||
margin-top: 1px !important;
|
||||
height: 30px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.oc-addnew input,
|
||||
.oc-addnew select {
|
||||
margin: 0 0 5px 0;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.oc-addnew button {
|
||||
height: 34px;
|
||||
margin: 0;
|
||||
border-width: 0;
|
||||
margin: 5px 0;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
height: 34px !important;
|
||||
}
|
||||
.oc-addnew button:hover {
|
||||
height: 34px;
|
||||
margin: 0;
|
||||
border-width: 0;
|
||||
|
||||
.oc-addnew .action-button {
|
||||
width: 30px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.oc-addnew .back-button {
|
||||
border-radius: 0;
|
||||
background-image: url('%webroot%/core/img/actions/delete.svg');
|
||||
}
|
||||
|
||||
.oc-addnew .new-button {
|
||||
border-radius: 0;
|
||||
background-image: url('%webroot%/core/img/add.svg');
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
|
||||
.oc-addnew .create-button {
|
||||
border-radius: 0;
|
||||
background-image: url('%appswebroot%/contacts/img/checkmark-gray.svg');
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
@ -287,12 +287,11 @@ OC.Contacts = OC.Contacts || {
|
||||
this.$navigation = $('#app-navigation');
|
||||
//this.$header = $('#contactsheader');
|
||||
this.$groupList = $('#grouplist');
|
||||
this.$controls = $('#controls');
|
||||
this.$contactList = $('#contactlist');
|
||||
this.$contactListHeader = $('#contactsHeader');
|
||||
this.$sortOrder = this.$contactListHeader.find('.action.sort');
|
||||
this.$sortOrder.val(contacts_sortby||'fn');
|
||||
this.$headeractions = this.$controls.find('.contact-actions');
|
||||
this.$headeractions = this.$groupList.find('.contact-actions');
|
||||
this.$toggleAll = this.$contactListHeader.find('.toggle');
|
||||
this.$groups = this.$contactListHeader.find('.groups');
|
||||
this.$ninjahelp = $('#ninjahelp');
|
||||
@ -1003,7 +1002,6 @@ OC.Contacts = OC.Contacts || {
|
||||
|
||||
var addContact = function() {
|
||||
console.log('add');
|
||||
self.$toggleAll.hide();
|
||||
if(self.currentid) {
|
||||
if(self.currentid === 'new') {
|
||||
return;
|
||||
@ -1043,7 +1041,7 @@ OC.Contacts = OC.Contacts || {
|
||||
addContact();
|
||||
});
|
||||
|
||||
this.$controls.on('click keydown', '.add-contact', function(event) {
|
||||
this.$groupList.on('click keydown', '.add-contact', function(event) {
|
||||
if(wrongKey(event)) {
|
||||
return;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ OC.Contacts = OC.Contacts || {};
|
||||
}
|
||||
}
|
||||
});
|
||||
var $addInput = $('#controls').find('.add-group');
|
||||
var $addInput = this.$groupList.find('.add-group');
|
||||
$addInput.addnew({
|
||||
addText: t('core', 'Add'),
|
||||
ok: function(event, name) {
|
||||
|
@ -2,12 +2,6 @@
|
||||
<!--
|
||||
<div id="controls">
|
||||
<div class="actions creatable hidden-on-load">
|
||||
<div class="button new">
|
||||
<a class="add-contact"><?php p($l->t('New Contact')); ?></a>
|
||||
</div>
|
||||
<div class="button new">
|
||||
<input class="add-group hidden" type="text" tabindex="0" autofocus placeholder="<?php p($l->t('Group name')); ?>" title="<?php p($l->t('New Group')); ?>" />
|
||||
</div>
|
||||
<div class="button contact-actions">
|
||||
<a class="delete svg action text permanent"><?php p($l->t('Delete')); ?></a>
|
||||
</div>
|
||||
@ -27,7 +21,15 @@
|
||||
-->
|
||||
|
||||
<div id="app-navigation" class="loading">
|
||||
<ul id="grouplist">
|
||||
<ul id="grouplist" class="hidden-on-load">
|
||||
<li class="special">
|
||||
<a role="button" class="add-contact">
|
||||
<?php p($l->t('New contact')); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="special">
|
||||
<input class="add-group hidden" type="text" tabindex="0" autofocus placeholder="<?php p($l->t('Group name')); ?>" title="<?php p($l->t('New group')); ?>" />
|
||||
</li>
|
||||
</ul>
|
||||
<div id="app-settings">
|
||||
<div id="app-settings-header">
|
||||
|
Loading…
Reference in New Issue
Block a user