diff options
author | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-08-10 17:29:26 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <JanCBorchardt@fsfe.org> | 2011-08-10 17:31:01 +0200 |
commit | fbf86c6683da91c8cadad128e5ac7c0742aaffed (patch) | |
tree | 2dc9a047b5b0dcea724f6dfffbf76c32103671f4 | |
parent | 613ab41eb3a5aedb872a18b231f26fd60f1b4356 (diff) | |
download | nextcloud-server-fbf86c6683da91c8cadad128e5ac7c0742aaffed.tar.gz nextcloud-server-fbf86c6683da91c8cadad128e5ac7c0742aaffed.zip |
made sliding settings more awesome
-rw-r--r-- | core/css/styles.css | 5 | ||||
-rw-r--r-- | core/js/js.js | 12 | ||||
-rw-r--r-- | core/templates/layout.user.php | 3 |
3 files changed, 10 insertions, 10 deletions
diff --git a/core/css/styles.css b/core/css/styles.css index 70179b050b4..9da216a80d2 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -2,7 +2,6 @@ This file is licensed under the Affero General Public License version 3 or later. See the COPYING-README file. */ - html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; cursor:default; } article, aside, dialog, figure, footer, header, hgroup, nav, section { display:block; } body { line-height:1.5; } @@ -97,8 +96,8 @@ legend { padding:.2em; font-size:1.2em; } #navigation a { display:block; padding:.6em .5em .4em 2.5em; background:1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; } #navigation a.active, #navigation a:hover, #navigation a:focus, #navigation a.selected { background-color:#ccc; border-top:1px solid #c8c8c8; border-bottom:1px solid #ccc; color:#000; } #navigation #settings { position:absolute; bottom:3.5em; width:100%; } -#navigation #expand { margin:0 0 .2em 1.2em; cursor:pointer; } -#navigation #settings>span { position:relative; bottom:.4em; left:.2em; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; } +#expand { margin:0 0 .2em 1.2em; cursor:pointer; } +#expand+span { position:relative; bottom:.4em; left:.2em; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; } /* USER SETTINGS ------------------------------------------------------------ */ #quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ccc; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; } diff --git a/core/js/js.js b/core/js/js.js index aef3ad1acca..f4756d97b25 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -266,14 +266,12 @@ $(document).ready(function(){ } }); - if($('body').attr("id")=="body-user") { $('#settings li').hide(); } - $('#expand').click(function() { - $('#settings li').slideToggle(); + if($('body').attr("id")=="body-user") { $('#settings #expanddiv').hide(); } + $('#settings #expand').click(function() { + $('#settings #expanddiv').slideToggle(); }); - $('#expand').hover(function(){ - $('#navigation #settings>span').fadeIn(); - },function(){ - $('#navigation #settings>span').fadeOut(); + $('#settings #expand').hover(function(){ + $('#settings #expand+span').fadeToggle(); }) }); diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 3b065ef6ede..f172e894e76 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -50,9 +50,11 @@ </li> <?php endforeach; ?> </ul> + <ul id="settings"> <img id="expand" class='svg' src="<?php echo image_path('', 'actions/settings.svg'); ?>" /> <span style="display:none"><?php echo $l->t('Settings');?></span> + <div id="expanddiv"> <?php foreach($_['settingsnavigation'] as $entry):?> <li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li> <?php if( sizeof( $entry["subnavigation"] )): ?> @@ -61,6 +63,7 @@ <?php endforeach; ?> <?php endif; ?> <?php endforeach; ?> + </div> </ul> </div></nav> |