Skip to content

Commit 651bc05

Browse files
committed
Fixed some style bug
1 parent 1b3d7e9 commit 651bc05

File tree

10 files changed

+60
-15
lines changed

10 files changed

+60
-15
lines changed

content/css/restclient.css

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ issue: https://github.com/twitter/bootstrap/issues/6344
370370
bottom: 0;
371371
left: 0;
372372
opacity: 1;
373-
overflow-y: scroll;
373+
overflow: none;
374374
}
375375
#bm-sidebar-inner {
376376
position: absolute;
@@ -385,3 +385,44 @@ issue: https://github.com/twitter/bootstrap/issues/6344
385385
box-shadow: 0px 0 20px 0 rgba(0, 0, 0, 0.1);
386386
overflow: scroll;
387387
}
388+
389+
.bookmark-sidebar-scrollbar {
390+
position: absolute;
391+
height: 100%;
392+
width: 15px;
393+
right: 0;
394+
top: 0;
395+
z-index: 1039;
396+
overflow: none;
397+
}
398+
.bookmark-sidebar-scrollbar .scrollbg {
399+
position: absolute;
400+
top: 0;
401+
right: 0;
402+
height: 100%;
403+
width: 15px;
404+
z-index: 1;
405+
background: url(chrome://restclient/content/images/scrollbarbg.gif) repeat-y
406+
}
407+
.bookmark-sidebar-scrollbar .scrollbar-slider {
408+
position: absolute;
409+
display: block;
410+
padding-bottom: 4px;
411+
height: 4px;
412+
width: 8px;
413+
right: 3px;
414+
top: 0;
415+
cursor: move;
416+
z-index: 2;
417+
background: url(chrome://restclient/content/images/scrollbarbottom.gif) 50% bottom no-repeat #c2c2c2
418+
}
419+
.bookmark-sidebar-scrollbar .scrollbar-slider .ss-top {
420+
height: 4px;
421+
background: url(chrome://restclient/content/images/scrollbartop.gif) 50% top no-repeat #c2c2c2
422+
}
423+
.bookmark-sidebar-scrollbar .scrollbar-slider:hover {
424+
background: url(chrome://restclient/content/images/scrollbarbottomh.gif) 50% bottom no-repeat #aeaeae
425+
}
426+
.bookmark-sidebar-scrollbar .scrollbar-slider:hover .ss-top {
427+
background: url(chrome://restclient/content/images/scrollbartoph.gif) 50% top no-repeat #aeaeae
428+
}

content/css/themes/cosmo/bootstrap.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6667,8 +6667,6 @@ legend {
66676667
}
66686668

66696669
.label {
6670-
min-width: 80px;
6671-
min-height: 80px;
66726670
font-weight: 300;
66736671
text-shadow: none;
66746672
-webkit-border-radius: 0;

content/images/scrollbarbg.gif

1.12 KB
Loading

content/images/scrollbarbottom.gif

1.18 KB
Loading

content/images/scrollbarbottomh.gif

1.91 KB
Loading

content/images/scrollbartop.gif

1.18 KB
Loading

content/images/scrollbartoph.gif

1.91 KB
Loading

content/js/restclient.bookmark.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ restclient.bookmark = {
3535
init: function(){
3636
restclient.bookmark.initLabels();
3737
restclient.bookmark.updateRequests(0);
38+
$('#bookmark-sidebar').show();
39+
var bgColor = $('body').css('background-color');
40+
$('#bm-sidebar-inner').css('background-color', bgColor);
3841
},
3942
unload: function(){
4043
if(!$('#bookmark-sidebar').is(':visible'))
@@ -61,7 +64,17 @@ restclient.bookmark = {
6164
$('.labels-panel').append(div);
6265
});
6366
},
67+
initScrollbarSize: function(){
68+
var scrollbarHeight = $('.bookmark-sidebar-scrollbar').outerHeight(),
69+
sidebarHeight = $('#bm-sidebar-inner').outerHeight(),
70+
sidebarContentHeight = $('#bm-requests').outerHeight() + $('#bm-labels').outerHeight() + $('#bm-footer').outerHeight();
71+
var ratio = Math.floor(sidebarContentHeight /sidebarHeight);
72+
var sliderHeight = Math.floor(scrollbarHeight / ratio);
73+
var sliderTop = Math.floor($('#bm-sidebar-inner').scrollTop() / ratio);
74+
$('.bookmark-sidebar-scrollbar .scrollbar-slider').css('height', sliderHeight).css('top', sliderTop);
75+
},
6476
scrollWindow: function(event){
77+
//restclient.bookmark.initScrollbarSize();
6578
if( restclient.bookmark.scrollProcessing )
6679
return false;
6780
restclient.bookmark.scrollProcessing = true;

content/js/restclient.main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,6 @@ restclient.main = {
14371437
},
14381438
manageFavoriteRequests: function () {
14391439
//$('#bookmark-sidebar').load("chrome://restclient/content/bookmarks.html", function(){
1440-
$('#bookmark-sidebar').show();
14411440
restclient.bookmark.init();
14421441
//});
14431442
},

content/restclient.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -662,17 +662,11 @@ <h4 class="backtotop"><a href="#" class="bm-top"> ↑ Back to top</a></h4>
662662
</div>
663663
</div>
664664

665-
666-
<div id="window-manage-bookmark" class="window-overlay" style="display:none">
667-
<div class="window">
668-
<div class="window-wrapper clearfix">
669-
<a class="close btnClose">&times;</a>
670-
<h4>Favorite Requests</h4>
671-
<div class="accordion" id="favorite-request-list">
672-
673-
</div>
674-
</div><!--end window-wrapper//-->
675-
</div>
665+
<div class="bookmark-sidebar-scrollbar hide">
666+
<a class="scrollbar-slider ui-draggable" style="height: 676px; top: 0px;">
667+
<div class="ss-top"></div>
668+
</a>
669+
<div class="scrollbg"></div>
676670
</div>
677671

678672
<div class="messages-overlay" style="display: none">

0 commit comments

Comments
 (0)