1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Misc. cleanup

This commit is contained in:
Thomas Tanghus 2013-05-01 01:47:45 +02:00
parent 82f4b23312
commit eef100e7a0
3 changed files with 36 additions and 28 deletions

View File

@ -1,5 +1,12 @@
ownCloud Contacts Changelog
6.0
- Rewritten backend to allow for multiple address book sources.
- Abstraction layer for address books and contacts.
- Partially ported to App Framework.
- Use updated app styles.
- Experimental contacts merge. Might eat kittens!
5.0.6:
- Unescape variables in search results and generated birthday events.
- AddressbookProviders could have duplicate keys.

View File

@ -609,25 +609,6 @@ OC.Contacts = OC.Contacts || {
//console.log('scroll, unseen:', offset, self.$rightContent.height());
}
});*/
this.$settings.find('.settings').on('click keydown',function(event) {
if(wrongKey(event)) {
return;
}
var bodyListener = function(e) {
if(self.$settings.find($(e.target)).length == 0) {
self.$settings.switchClass('open', '');
}
};
if(self.$settings.hasClass('open')) {
self.$settings.switchClass('open', '');
$('body').unbind('click', bodyListener);
} else {
// FIXME: Settings needs to be refactored
self.$settings.find('h2').trigger('click');
self.$settings.switchClass('', 'open');
$('body').bind('click', bodyListener);
}
});
$('#contactphoto_fileupload').on('click', function(event, metadata) {
var form = $('#file_upload_form');
form.find('input[name="contactid"]').val(metadata.contactid);
@ -933,6 +914,25 @@ OC.Contacts = OC.Contacts || {
});
});
this.$settings.find('#app-settings-header').on('click keydown',function(event) {
if(wrongKey(event)) {
return;
}
var bodyListener = function(e) {
if(self.$settings.find($(e.target)).length == 0) {
self.$settings.switchClass('open', '');
}
};
if(self.$settings.hasClass('open')) {
self.$settings.switchClass('open', '');
$('body').unbind('click', bodyListener);
} else {
// FIXME: Settings needs to be refactored
self.$settings.find('h2').trigger('click');
self.$settings.switchClass('', 'open');
$('body').bind('click', bodyListener);
}
});
this.$settings.find('h2').on('click keydown', function(event) {
if(wrongKey(event)) {
return;

View File

@ -72,13 +72,13 @@
<div id="contactsHeader">
<input type="checkbox" class="toggle" title="<?php p($l->t('(De-)select all')); ?>" />
<span class="actions">
<a class="download svg action text permanent"><?php p($l->t('Download Contact(s)')); ?></a>
<select class="groups svg action text permanent" name="groups">
<option value="-1" disabled="disabled" selected="selected"><?php p($l->t('Groups')); ?></option>
</select>
<a class="favorite action svg inactive control permanent" title="<?php p($l->t('Favorite')); ?>"></a>
<!--a class="favorite action svg inactive control permanent" title="<?php p($l->t('Favorite')); ?>"></a -->
<a class="merge"><?php p($l->t('Merge selected')); ?></a>
<a class="delete action permanent" title="<?php p($l->t('Delete Contact')); ?>"></a>
<a class="download svg action text permanent"><?php p($l->t('Download')); ?></a>
<a class="delete action permanent" title="<?php p($l->t('Delete')); ?>"></a>
</span>
</div>
<table id="contactlist">
@ -453,11 +453,12 @@
<script id="addressbookTemplate" class="hidden" type="text/template">
<li data-id="{id}">
<label class="float">{displayname}</label>
<label>{displayname}</label>
<span class="actions">
<a title="<?php p($l->t('Share')); ?>" class="share action" data-possible-permissions="{permissions}" data-item="{id}" data-item-type="addressbook"></a>
<a title="<?php p($l->t('Export')); ?>" class="download action" href="<?php print_unescaped(OCP\Util::linkTo('contacts', 'export.php')); ?>?bookid={id}"></a>
<a title="<?php p($l->t('CardDAV link')); ?>" class="globe action"></a>
<a title="<?php p($l->t('Delete')); ?>" class="delete action"></a>
</span></li>
<a title="<?php p($l->t('Share')); ?>" class="share action" data-possible-permissions="{permissions}" data-item="{id}" data-item-type="addressbook"></a>
<a title="<?php p($l->t('Export')); ?>" class="download action" href="<?php print_unescaped(OCP\Util::linkTo('contacts', 'export.php')); ?>?bookid={id}"></a>
<a title="<?php p($l->t('CardDAV link')); ?>" class="globe action"></a>
<a title="<?php p($l->t('Delete')); ?>" class="delete action"></a>
</span>
</li>
</script>