mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Contacts: Changed the Add property button to not fixed and use plain button.
This commit is contained in:
parent
a8ff083317
commit
2c06c4730f
@ -9,11 +9,12 @@
|
||||
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
|
||||
#leftcontent a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; }
|
||||
#actionbar { height: 30px; width: 60px; position: fixed; right: 0px; top: 4em; margin: 0 0 0 0; padding: 0 0 0 0; z-index: 1000; }
|
||||
#contacts_deletecard {position:absolute;top:15px;right:25px; background:url('%webroot%/core/img/actions/delete.svg') no-repeat center; }
|
||||
#contacts_downloadcard {position:absolute;top:15px;right:50px; background:url('%webroot%/core/img/actions/download.svg') no-repeat center; }
|
||||
#contacts_propertymenu_button { position:absolute;top:15px;right:150px; background:url('%webroot%/core/img/actions/add.svg') no-repeat center; }
|
||||
#contacts_propertymenu { background-color: #fff; position:absolute;top:40px;right:150px; overflow:hidden; text-overflow:ellipsis; /*border: thin solid #1d2d44;*/ -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; }
|
||||
#contacts_propertymenu li { display: block; font-weight: bold; height: 20px; width: 100px; }
|
||||
#contacts_deletecard {position:relative; float:left; background:url('%webroot%/core/img/actions/delete.svg') no-repeat center; }
|
||||
#contacts_downloadcard {position:relative; float:left; background:url('%webroot%/core/img/actions/download.svg') no-repeat center; }
|
||||
#contacts_propertymenu { clear: both; max-width: 15em; margin: 2em; }
|
||||
#contacts_propertymenu_button { position:relative;top:0;left:0; margin: 0; }
|
||||
#contacts_propertymenu_dropdown { background-color: #fff; position:relative; right:0; overflow:hidden; text-overflow:ellipsis; /*border: thin solid #1d2d44;*/ -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; }
|
||||
#contacts_propertymenu li { display: block; font-weight: bold; height: 20px; }
|
||||
#contacts_propertymenu li a { padding: 3px; display: block }
|
||||
#contacts_propertymenu li:hover { background-color: #1d2d44; }
|
||||
#contacts_propertymenu li a:hover { color: #fff }
|
||||
@ -57,7 +58,7 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
|
||||
#edit_name_dialog > input { width: 15em; }
|
||||
#edit_address_dialog { /*width: 30em;*/ }
|
||||
#edit_address_dialog > input { width: 15em; }
|
||||
#edit_photo_dialog_img { display: block; width: 150; height: 200; border: thin solid black; }
|
||||
#edit_photo_dialog_img { display: block; min-width: 150; min-height: 200; }
|
||||
#fn { float: left !important; width: 18em !important; }
|
||||
#name { /*position: absolute; top: 0px; left: 0px;*/ min-width: 25em; height: 2em; clear: right; display: block; }
|
||||
#identityprops { /*position: absolute; top: 2.5em; left: 0px;*/ }
|
||||
|
@ -342,12 +342,12 @@ Contacts={
|
||||
note.val(txt);
|
||||
$('#note').show();
|
||||
note.expandingTextarea();
|
||||
$('#contacts_propertymenu a[data-type="NOTE"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="NOTE"]').parent().hide();
|
||||
} else {
|
||||
$('#note').data('checksum', '');
|
||||
$('#note').find('textarea').val('');
|
||||
$('#note').hide();
|
||||
$('#contacts_propertymenu a[data-type="NOTE"]').parent().show();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="NOTE"]').parent().show();
|
||||
}
|
||||
},
|
||||
loadSingleProperties:function() {
|
||||
@ -363,7 +363,7 @@ Contacts={
|
||||
});
|
||||
for(var prop in props) {
|
||||
if(this.data[props[prop]] != undefined) {
|
||||
$('#contacts_propertymenu a[data-type="'+props[prop]+'"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+props[prop]+'"]').parent().hide();
|
||||
var property = this.data[props[prop]][0];
|
||||
var value = property['value'], checksum = property['checksum'];
|
||||
switch(props[prop]) {
|
||||
@ -395,7 +395,7 @@ Contacts={
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$('#contacts_propertymenu a[data-type="'+props[prop]+'"]').parent().show();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+props[prop]+'"]').parent().show();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -574,12 +574,12 @@ Contacts={
|
||||
case 'PHOTO':
|
||||
this.loadPhoto(true);
|
||||
$('#file_upload_form').show();
|
||||
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+type+'"]').parent().hide();
|
||||
$('#file_upload_start').trigger('click');
|
||||
break;
|
||||
case 'NOTE':
|
||||
$('#note').show();
|
||||
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+type+'"]').parent().hide();
|
||||
$('#note').find('textarea').expandingTextarea();
|
||||
$('#note').find('textarea').focus();
|
||||
break;
|
||||
@ -610,7 +610,7 @@ Contacts={
|
||||
case 'CATEGORIES':
|
||||
$('dl dt[data-element="'+type+'"],dd[data-element="'+type+'"]').show();
|
||||
$('dd[data-element="'+type+'"]').find('input').focus();
|
||||
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+type+'"]').parent().hide();
|
||||
break;
|
||||
}
|
||||
},
|
||||
@ -641,7 +641,7 @@ Contacts={
|
||||
$('dl dd[data-element="'+proptype+'"]').data('checksum', '');
|
||||
$('dl dd[data-element="'+proptype+'"]').find('input').val('');
|
||||
}
|
||||
$('#contacts_propertymenu a[data-type="'+proptype+'"]').parent().show();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+proptype+'"]').parent().show();
|
||||
Contacts.UI.loading(obj, false);
|
||||
} else {
|
||||
OC.dialogs.alert(t('contacts', '\'deleteProperty\' called without type argument. Please report at bugs.owncloud.org'), t('contacts', 'Error'));
|
||||
@ -659,7 +659,7 @@ Contacts={
|
||||
} else if(type == 'single') {
|
||||
var proptype = Contacts.UI.propertyTypeFor(obj);
|
||||
$('dl dt[data-element="'+proptype+'"],dd[data-element="'+proptype+'"]').hide();
|
||||
$('#contacts_propertymenu a[data-type="'+proptype+'"]').parent().show();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="'+proptype+'"]').parent().show();
|
||||
Contacts.UI.loading(obj, false);
|
||||
} else {
|
||||
OC.dialogs.alert(t('contacts', '\'deleteProperty\' called without type argument. Please report at bugs.owncloud.org'), t('contacts', 'Error'));
|
||||
@ -1054,7 +1054,7 @@ Contacts={
|
||||
}
|
||||
});
|
||||
$('#file_upload_form').show();
|
||||
$('#contacts_propertymenu a[data-type="PHOTO"]').parent().hide();
|
||||
$('#contacts_propertymenu_dropdown a[data-type="PHOTO"]').parent().hide();
|
||||
},
|
||||
editCurrentPhoto:function(){
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'currentphoto.php'),{'id':this.id},function(jsondata){
|
||||
@ -1625,11 +1625,11 @@ $(document).ready(function(){
|
||||
|
||||
$('body').click(function(e){
|
||||
if(!$(e.target).is('#contacts_propertymenu_button')) {
|
||||
$('#contacts_propertymenu').hide();
|
||||
$('#contacts_propertymenu_dropdown').hide();
|
||||
}
|
||||
});
|
||||
function propertyMenu(){
|
||||
var menu = $('#contacts_propertymenu');
|
||||
var menu = $('#contacts_propertymenu_dropdown');
|
||||
if(menu.is(':hidden')) {
|
||||
menu.show();
|
||||
menu.find('li').first().focus();
|
||||
@ -1642,8 +1642,8 @@ $(document).ready(function(){
|
||||
function propertyMenuItem(){
|
||||
var type = $(this).data('type');
|
||||
Contacts.UI.Card.addProperty(type);
|
||||
$('#contacts_propertymenu').hide();
|
||||
$('#contacts_propertymenu_dropdown').hide();
|
||||
}
|
||||
$('#contacts_propertymenu a').click(propertyMenuItem);
|
||||
$('#contacts_propertymenu a').keydown(propertyMenuItem);
|
||||
$('#contacts_propertymenu_dropdown a').click(propertyMenuItem);
|
||||
$('#contacts_propertymenu_dropdown a').keydown(propertyMenuItem);
|
||||
});
|
||||
|
@ -9,22 +9,8 @@ $id = isset($_['id']) ? $_['id'] : '';
|
||||
<input id="file_upload_start" type="file" accept="image/*" name="imagefile" />
|
||||
</form>
|
||||
<div id="actionbar">
|
||||
<button title="<?php echo $l->t('Add field'); ?>" class="svg action" id="contacts_propertymenu_button"></button>
|
||||
<div id="contacts_propertymenu" class="hidden">
|
||||
<ul role="menu">
|
||||
<li><a role="menuitem" data-type="PHOTO"><?php echo $l->t('Profile picture'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="ORG"><?php echo $l->t('Organization'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="NICKNAME"><?php echo $l->t('Nickname'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="BDAY"><?php echo $l->t('Birthday'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="TEL"><?php echo $l->t('Phone'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="EMAIL"><?php echo $l->t('Email'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="ADR"><?php echo $l->t('Address'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="NOTE"><?php echo $l->t('Note'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="CATEGORIES"><?php echo $l->t('Groups'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="svg action" id="contacts_downloadcard" title="<?php echo $l->t('Download contact');?>"></button>
|
||||
<button class="svg action" id="contacts_deletecard" title="<?php echo $l->t('Delete contact');?>"></button>
|
||||
<button class="svg action" id="contacts_downloadcard" title="<?php echo $l->t('Download contact');?>"></button>
|
||||
<button class="svg action" id="contacts_deletecard" title="<?php echo $l->t('Delete contact');?>"></button>
|
||||
</div>
|
||||
|
||||
<div id="contact_photo" class="contactsection">
|
||||
@ -111,6 +97,21 @@ $id = isset($_['id']) ? $_['id'] : '';
|
||||
</form>
|
||||
</div> <!-- contact_note -->
|
||||
|
||||
<div id="contacts_propertymenu">
|
||||
<button class="button" id="contacts_propertymenu_button"><?php echo $l->t('Add field'); ?></button>
|
||||
<ul id="contacts_propertymenu_dropdown" role="menu" class="hidden">
|
||||
<li><a role="menuitem" data-type="PHOTO"><?php echo $l->t('Profile picture'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="ORG"><?php echo $l->t('Organization'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="NICKNAME"><?php echo $l->t('Nickname'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="BDAY"><?php echo $l->t('Birthday'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="TEL"><?php echo $l->t('Phone'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="EMAIL"><?php echo $l->t('Email'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="ADR"><?php echo $l->t('Address'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="NOTE"><?php echo $l->t('Note'); ?></a></li>
|
||||
<li><a role="menuitem" data-type="CATEGORIES"><?php echo $l->t('Groups'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div> <!-- card -->
|
||||
<div id="edit_photo_dialog" title="Edit photo">
|
||||
<div id="edit_photo_dialog_img"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user