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

Implemented app settings in popup.

This commit is contained in:
Thomas Tanghus 2012-07-31 12:21:45 +02:00
parent b9e23c409e
commit 76ede3d16e
5 changed files with 18 additions and 12 deletions

View File

@ -14,8 +14,8 @@
#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;} #bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;}
#bottomcontrols img { margin-top: 0.35em; } #bottomcontrols img { margin-top: 0.35em; }
#uploadprogressbar { display: none; padding: 0; bottom: 3em; height:2em; width: 20em; margin:0; background:#eee; border:1px solid #ccc; position:fixed; } #uploadprogressbar { display: none; padding: 0; bottom: 3em; height:2em; width: 20em; margin:0; background:#eee; border:1px solid #ccc; position:fixed; }
#contacts_newcontact, #contacts_import, #chooseaddressbook { float: left; margin: 0.2em 0 0 1em; border: 0 none; border-radius: 0; -moz-box-shadow: none; box-shadow: none; outline: 0 none; } #contacts_newcontact, #bottomcontrols .settings { float: left; margin: 0.2em 0 0 1em; border: 0 none; border-radius: 0; -moz-box-shadow: none; box-shadow: none; outline: 0 none; }
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; } #bottomcontrols .settings { float: right; margin: 0.2em 1em 0 0; }
#actionbar { clear: both; height: 30px;} #actionbar { clear: both; height: 30px;}
#contacts_deletecard {position:relative; float:left; background:url('%webroot%/core/img/actions/delete.svg') no-repeat center; } #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_downloadcard {position:relative; float:left; background:url('%webroot%/core/img/actions/download.svg') no-repeat center; }

View File

@ -279,7 +279,7 @@ Contacts={
$('#contacts_deletecard').tipsy({gravity: 'ne'}); $('#contacts_deletecard').tipsy({gravity: 'ne'});
$('#contacts_downloadcard').tipsy({gravity: 'ne'}); $('#contacts_downloadcard').tipsy({gravity: 'ne'});
$('#contacts_propertymenu_button').tipsy(); $('#contacts_propertymenu_button').tipsy();
$('#contacts_newcontact, #contacts_import, #chooseaddressbook').tipsy({gravity: 'sw'}); $('#contacts_newcontact, #contacts_import, #bottomcontrols .settings').tipsy({gravity: 'sw'});
$('body').click(function(e){ $('body').click(function(e){
if(!$(e.target).is('#contacts_propertymenu_button')) { if(!$(e.target).is('#contacts_propertymenu_button')) {
@ -1745,7 +1745,13 @@ $(document).ready(function(){
OCCategories.changed = Contacts.UI.Card.categoriesChanged; OCCategories.changed = Contacts.UI.Card.categoriesChanged;
OCCategories.app = 'contacts'; OCCategories.app = 'contacts';
$('#chooseaddressbook').on('click keydown', Contacts.UI.Addressbooks.overview); //$('#chooseaddressbook').on('click keydown', Contacts.UI.Addressbooks.overview);
$('#bottomcontrols .settings').on('click keydown', function() {
OC.appSettings('contacts');
});
$('#bottomcontrols .import').click(function() {
$('#import_upload_start').trigger('click');
});
$('#contacts_newcontact').on('click keydown', Contacts.UI.Card.editNew); $('#contacts_newcontact').on('click keydown', Contacts.UI.Card.editNew);
var ninjahelp = $('#ninjahelp'); var ninjahelp = $('#ninjahelp');

View File

@ -3,4 +3,4 @@
$tmpl = new OCP\Template( 'contacts', 'settings'); $tmpl = new OCP\Template( 'contacts', 'settings');
$tmpl->assign('addressbooks', OC_Contacts_Addressbook::all(OCP\USER::getUser()), false); $tmpl->assign('addressbooks', OC_Contacts_Addressbook::all(OCP\USER::getUser()), false);
return $tmpl->fetchPage(); $tmpl->printPage();

View File

@ -11,19 +11,20 @@
</div> </div>
<div id="uploadprogressbar"></div> <div id="uploadprogressbar"></div>
<div id="bottomcontrols"> <div id="bottomcontrols">
<form id="import_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
<button class="svg" id="contacts_newcontact" title="<?php echo $l->t('Add Contact'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('contacts', 'contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" /></button> <button class="svg" id="contacts_newcontact" title="<?php echo $l->t('Add Contact'); ?>"><img class="svg" src="<?php echo OCP\Util::imagePath('contacts', 'contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" /></button>
<span class="svg" id="contacts_import" title="<?php echo $l->t('Import'); ?>"> <button class="svg import tip" title="<?php echo $l->t('Import'); ?>">
<input class="float" id="import_upload_start" type="file" accept="text/directory,text/vcard,text/x-vcard" name="importfile" />
<img class="svg" src="core/img/actions/upload.svg" alt="<?php echo $l->t('Import'); ?>" /> <img class="svg" src="core/img/actions/upload.svg" alt="<?php echo $l->t('Import'); ?>" />
</span> </button>
<button class="svg" id="chooseaddressbook" title="<?php echo $l->t('Addressbooks'); ?>"><img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" /></button> <button class="svg settings tip" title="<?php echo $l->t('Settings'); ?>"><img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" /></button>
<form id="import_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
<input class="float" id="import_upload_start" type="file" accept="text/directory,text/vcard,text/x-vcard" name="importfile" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
</form> </form>
<iframe name="import_upload_target" id='import_upload_target' src=""></iframe> <iframe name="import_upload_target" id='import_upload_target' src=""></iframe>
</div> </div>
</div> </div>
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>"> <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
<div id="appsettings" class="popup bottomleft hidden"></div>
<?php <?php
if($_['has_contacts']) { if($_['has_contacts']) {
echo $this->inc('part.contact'); echo $this->inc('part.contact');

View File

@ -1,6 +1,5 @@
<form id="contacts"> <form id="contacts-settings">
<fieldset class="personalblock"> <fieldset class="personalblock">
<legend><?php echo $l->t('Contacts'); ?></legend>
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>) <?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
<dl> <dl>
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> <dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>