1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-03-02 02:29:25 +01:00

[Bookmark] Fix empty bm message style and hidding. fix #531

This commit is contained in:
Brice Maron 2013-02-06 22:10:24 +01:00
parent 799deea4d4
commit 74f7076cad
3 changed files with 26 additions and 4 deletions

View File

@ -1,8 +1,25 @@
#content { overflow: auto; height: 100%; } #content { overflow: auto; height: 100%; }
#firstrun, #firstrun_setting{ width: 80%; margin: 5em auto auto auto; text-align: center; font-weight:bold; font-size:1.5em; color:#777; position: relative;}
#firstrun small { display: block; font-weight: normal; font-size: 0.5em; } #firstrun small { display: block; font-weight: normal; font-size: 0.5em; }
#firstrun .button { font-size: 0.7em; } #firstrun .button { font-size: 0.7em; }
#firstrun #selections { font-size:0.8em; font-weight: normal; width: 100%; margin: 2em auto auto auto; clear: both; }
#distance {
width:1px;
height:50%;
background-color:#fc6;
margin-bottom:-13.75em; /* half of container's height */
float:left;
}
#firstrun_message {
margin:0 auto;
position:relative; /* puts container in front of distance */
text-align:left;
height:27.5em;
width:45em;
clear:left;
}
#firstrun_setting { font-size: 100%; text-decoration: underline} #firstrun_setting { font-size: 100%; text-decoration: underline}
input.disabled, input.disabled:hover, input.disabled:focus { input.disabled, input.disabled:hover, input.disabled:focus {
@ -29,7 +46,7 @@ input.disabled, input.disabled:hover, input.disabled:focus {
padding: 0.5ex; padding: 0.5ex;
} }
.bookmarks_list { .bookmarks_list, #firstrun {
overflow: auto; overflow: auto;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;

View File

@ -208,10 +208,12 @@ function delBookmark(event) {
} }
function checkEmpty() { function checkEmpty() {
if($('.bookmarks_list').is(':empty')) { if($('.bookmarks_list').children().length == 0) {
$("#firstrun").show(); $("#firstrun").show();
$('.bookmarks_list').hide();
} else { } else {
$("#firstrun").hide(); $("#firstrun").hide();
$('.bookmarks_list').show();
} }
} }
function editBookmark(event) { function editBookmark(event) {

View File

@ -49,6 +49,8 @@ function bookmarklet(){
</div> </div>
<div id="rightcontent" class="rightcontent"> <div id="rightcontent" class="rightcontent">
<div id="firstrun" style="display: none;"> <div id="firstrun" style="display: none;">
<div id="distance"></div>
<div id="firstrun_message">
<?php <?php
echo $l->t('You have no bookmarks'); echo $l->t('You have no bookmarks');
$embedded = true; $embedded = true;
@ -56,6 +58,7 @@ function bookmarklet(){
echo bookmarklet();?><br/><br /> echo bookmarklet();?><br/><br />
<small><a href="#" id="firstrun_setting"><?php echo $l->t('You can also try to import a bookmark file');?></a></small> <small><a href="#" id="firstrun_setting"><?php echo $l->t('You can also try to import a bookmark file');?></a></small>
</div>
</div> </div>
<div class="bookmarks_list"></div> <div class="bookmarks_list"></div>
</div> </div>