diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-08-02 04:15:40 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-08-02 04:18:44 +0200 |
commit | 20f8971222200646cda29c4a2f3983bfdbaeac09 (patch) | |
tree | 2c69c02fd2b02757483fa5d3aa600c0545461d41 | |
parent | f84e92e6e3934f84f2ecee88af6a19ec16a0dab9 (diff) | |
download | nextcloud-server-20f8971222200646cda29c4a2f3983bfdbaeac09.tar.gz nextcloud-server-20f8971222200646cda29c4a2f3983bfdbaeac09.zip |
Use popup class style for ninja-mode help.
-rw-r--r-- | apps/contacts/css/contacts.css | 2 | ||||
-rw-r--r-- | apps/contacts/js/contacts.js | 8 | ||||
-rw-r--r-- | apps/contacts/templates/index.php | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css index 1a7935aa79a..0961550c7a6 100644 --- a/apps/contacts/css/contacts.css +++ b/apps/contacts/css/contacts.css @@ -125,7 +125,7 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; } .typelist[type="button"] { float: left; max-width: 10em; border: 0; background-color: #fff; color: #bbb} /* for multiselect */ .typelist[type="button"]:hover { color: #777; } /* for multiselect */ .addresslist { clear: both; font-weight: bold; } -#ninjahelp { position: absolute; bottom: 0; left: 0; right: 0; padding: 1em; margin: 1em; border: thin solid #eee; border-radius: 5px; background-color: #DBDBDB; opacity: 0.9; } +#ninjahelp { position: absolute; bottom: 0; left: 0; right: 0; padding: 1em; margin: 1em; opacity: 0.9; } #ninjahelp .close { position: absolute; top: 5px; right: 5px; height: 20px; width: 20px; } #ninjahelp h2, .help-section h3 { width: 100%; font-weight: bold; text-align: center; } #ninjahelp h2 { font-size: 1.4em; } diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 8108bb25904..d84ce0a5bd6 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1635,9 +1635,11 @@ $(document).ready(function(){ OCCategories.changed = OC.Contacts.Card.categoriesChanged; OCCategories.app = 'contacts'; - //$('#chooseaddressbook').on('click keydown', OC.Contacts.Addressbooks.overview); + var ninjahelp = $('#ninjahelp'); + $('#bottomcontrols .settings').on('click keydown', function() { try { + ninjahelp.hide(); OC.appSettings({appid:'contacts', loadJS:true, cache:false}); } catch(e) { console.log('error:', e.message); @@ -1648,19 +1650,17 @@ $(document).ready(function(){ }); $('#contacts_newcontact').on('click keydown', OC.Contacts.Card.editNew); - var ninjahelp = $('#ninjahelp'); - ninjahelp.find('.close').on('click keydown',function() { ninjahelp.hide(); }); $(document).on('keyup', function(event) { - console.log(event.which + ' ' + event.target.nodeName); if(event.target.nodeName.toUpperCase() != 'BODY' || $('#contacts li').length == 0 || !OC.Contacts.Card.id) { return; } + console.log(event.which + ' ' + event.target.nodeName); /** * To add: * (Shift)n/p: next/prev addressbook diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index 4c2a19e8d96..270d5c203cf 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -32,10 +32,8 @@ echo $this->inc('part.no_contacts'); } ?> - <div class="hidden" id="ninjahelp"> - <a class="close" tabindex="0" role="button"> - <img class="svg" src="core/img/actions/delete.svg" alt="<?php echo $l->t('Close'); ?>" /> - </a> + <div class="hidden popup" id="ninjahelp"> + <a class="close" tabindex="0" role="button" title="<?php echo $l->t('Close'); ?>"></a> <h2><?php echo $l->t('Keyboard shortcuts'); ?></h2> <div class="help-section"> <h3><?php echo $l->t('Navigation'); ?></h3> |