Skip to content

Commit 3309c49

Browse files
committed
more stuff
1 parent 44b6553 commit 3309c49

5 files changed

Lines changed: 19 additions & 14 deletions

File tree

public/javascripts/DV/helpers/construction.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,8 @@ DV._.extend(DV.Schema.helpers, {
266266
}
267267

268268
this.viewer.elements.viewer.toggleClass('DV-hideSidebar', !this.viewer.options.sidebarVisible);
269-
270-
// Check if the zoom is showing, and if not, shorten the width of search
271-
DV._.defer(DV._.bind(function() {
272-
if ((this.elements.viewer.width() <= 700) && (showAnnotations || showPages || showSearch)) {
273-
this.viewer.$('.DV-controls').addClass('DV-narrowControls');
274-
}
275-
}, this));
269+
this.viewer.elements.viewer.toggleClass('DV-mini', !this.viewer.options.sidebarVisible);
270+
this.viewer.elements.viewer.toggleClass('DV-supermini', this.viewer.elements.viewer.width() < 500);
276271

277272
// Set the currentPage element reference.
278273
this.elements.currentPage = this.viewer.$('span.DV-currentPage');

public/javascripts/DV/models/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ DV.model.Pages.prototype = {
5757

5858
// Return the appropriate padding for the size of the viewer.
5959
getPadding: function() {
60-
if (this.viewer.options.mini) {
60+
if (this.viewer.elements.viewer.hasClass('DV-mini')) {
6161
return this.MINI_PADDING;
6262
} else if (this.viewer.options.zoom == 'auto') {
6363
return this.REDUCED_PADDING;

public/stylesheets/DV/components/minimode.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
/* = Header = */
33
/* ========== */
44

5-
.DV-docViewer .DV-narrowControls .DV-searchBar {
5+
.DV-mini .DV-searchBox {
6+
margin-top: 2px;
7+
}
8+
.DV-mini .DV-searchInput {
9+
padding: 3px 20px 2px;
10+
}
11+
12+
.DV-mini .DV-searchBar {
613
right: 16px;
714
}
815

9-
.DV-docViewer .DV-narrowControls .DV-searchInput {
16+
.DV-mini .DV-searchInput {
1017
width: 80px;
1118
}
1219

public/stylesheets/DV/components/ui-search.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
.DV-docViewer.DV-searchable .DV-searchBox {
2727
display:inline;
2828
}
29+
.DV-docViewer.DV-supermini .DV-searchBox {
30+
display: none;
31+
}
2932

3033
.DV-docViewer .DV-searchInput {
3134
display: block;
@@ -34,15 +37,15 @@
3437
margin: 2px 5px 0 0;
3538
padding: 4px 20px 3px;
3639
height: auto;
37-
width:210px;
40+
width:215px;
3841
font-size: 11px;
3942
line-height: 14px;
4043
background: #FFF url(../../../images/DV/embed/search_icon.png) no-repeat 5px 5px;
4144
outline: none;
4245
}
4346

4447
.DV-docViewer .DV-searchInput[type=text] {
45-
margin: 4px 10px 0 0;
48+
margin: 2px 5px 0 0;
4649
}
4750
.DV-searchInput.placeholder {
4851
color: #A0A0A0;

public/stylesheets/DV/components/ui-zoom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
margin: 7px 20px 0 0;
66
position: relative;
77
}
8-
.DV-narrowControls .DV-zoomControls {
8+
.DV-mini .DV-zoomControls {
99
margin-right: 15px;
1010
}
1111

@@ -28,7 +28,7 @@
2828
position:relative;
2929
cursor: pointer;
3030
}
31-
.DV-narrowControls .DV-zoomBox {
31+
.DV-mini .DV-zoomBox {
3232
background: url(../../../images/DV/embed/bar_small.png) repeat-x 0 88%;
3333
width:49px;
3434
}

0 commit comments

Comments
 (0)