diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-31 12:21:45 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-31 12:23:22 +0200 |
commit | 19c55e2d4470ff37cf14a20ccfdab0fa6ae14ed9 (patch) | |
tree | 1df1964a5cac16daea81a37402f2a79748c79f2a | |
parent | 553773f2e1d2b8af7da757b7551a436ffc27a129 (diff) | |
download | nextcloud-server-19c55e2d4470ff37cf14a20ccfdab0fa6ae14ed9.tar.gz nextcloud-server-19c55e2d4470ff37cf14a20ccfdab0fa6ae14ed9.zip |
Implemented app settings in popup.
-rw-r--r-- | apps/contacts/css/contacts.css | 4 | ||||
-rw-r--r-- | apps/contacts/js/contacts.js | 10 | ||||
-rw-r--r-- | apps/contacts/settings.php | 2 | ||||
-rw-r--r-- | apps/contacts/templates/index.php | 11 | ||||
-rw-r--r-- | apps/contacts/templates/settings.php | 3 |
5 files changed, 18 insertions, 12 deletions
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css index ddae27da211..5350fdd5d34 100644 --- a/apps/contacts/css/contacts.css +++ b/apps/contacts/css/contacts.css @@ -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 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; } -#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; } -#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; } +#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; } +#bottomcontrols .settings { float: right; margin: 0.2em 1em 0 0; } #actionbar { clear: both; height: 30px;} #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; } diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 34961360eea..b79608a8e6a 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -279,7 +279,7 @@ Contacts={ $('#contacts_deletecard').tipsy({gravity: 'ne'}); $('#contacts_downloadcard').tipsy({gravity: 'ne'}); $('#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){ if(!$(e.target).is('#contacts_propertymenu_button')) { @@ -1745,7 +1745,13 @@ $(document).ready(function(){ OCCategories.changed = Contacts.UI.Card.categoriesChanged; 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); var ninjahelp = $('#ninjahelp'); diff --git a/apps/contacts/settings.php b/apps/contacts/settings.php index a079499381b..5f639399c95 100644 --- a/apps/contacts/settings.php +++ b/apps/contacts/settings.php @@ -3,4 +3,4 @@ $tmpl = new OCP\Template( 'contacts', 'settings'); $tmpl->assign('addressbooks', OC_Contacts_Addressbook::all(OCP\USER::getUser()), false); -return $tmpl->fetchPage(); +$tmpl->printPage(); diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index b2dde12684c..7ff139e31c5 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -11,19 +11,20 @@ </div> <div id="uploadprogressbar"></div> <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> - <span class="svg" id="contacts_import" 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" /> + <button class="svg import tip" title="<?php echo $l->t('Import'); ?>"> <img class="svg" src="core/img/actions/upload.svg" alt="<?php echo $l->t('Import'); ?>" /> - </span> - <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> + <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"> </form> <iframe name="import_upload_target" id='import_upload_target' src=""></iframe> </div> </div> <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>"> + <div id="appsettings" class="popup bottomleft hidden"></div> <?php if($_['has_contacts']) { echo $this->inc('part.contact'); diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php index f520559d143..c42de12fa74 100644 --- a/apps/contacts/templates/settings.php +++ b/apps/contacts/templates/settings.php @@ -1,6 +1,5 @@ -<form id="contacts"> +<form id="contacts-settings"> <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>) <dl> <dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> |