Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 9, 2014
1 parent 3309c49 commit 8577a01
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion public/assets/templates.js

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions public/javascripts/DV/helpers/construction.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ DV._.extend(DV.Schema.helpers, {
var showSearch = (this.viewer.options.search !== false) &&
(this.viewer.options.text !== false) &&
(!this.viewer.options.width || this.viewer.options.width >= 540);
var noFooter = (!showAnnotations && !showPages && !showSearch && !this.viewer.options.sidebarVisible);


// Hide annotations, if there are none:
var $annotationsView = this.viewer.$('.DV-annotationView');
Expand Down Expand Up @@ -254,20 +252,16 @@ DV._.extend(DV.Schema.helpers, {
this.viewer.$('.DV-navControlsContainer').html(navControls);
}

this.viewer.$('.DV-fullscreenControl').remove();
if (this.viewer.schema.document.canonicalURL) {
var fullscreenControl = JST.fullscreenControl({});
if (noFooter) {
this.viewer.$('.DV-collapsibleControls').prepend(fullscreenControl);
this.elements.viewer.addClass('DV-hideFooter');
} else {
this.viewer.$('.DV-fullscreenContainer').html(fullscreenControl);
}
this.viewer.$('.DV-fullscreenContainer').html(fullscreenControl);
}

this.viewer.elements.viewer.toggleClass('DV-hideSidebar', !this.viewer.options.sidebarVisible);
this.viewer.elements.viewer.toggleClass('DV-mini', !this.viewer.options.sidebarVisible);
this.viewer.elements.viewer.toggleClass('DV-supermini', this.viewer.elements.viewer.width() < 500);
var v = this.viewer.elements.viewer;
v.toggleClass('DV-hideSidebar', !this.viewer.options.sidebarVisible);
v.toggleClass('DV-mini', !this.viewer.options.sidebarVisible);
v.toggleClass('DV-supermini', this.viewer.elements.viewer.width() < 500);
v.toggleClass('DV-hideFooter', this.viewer.options.sidebarVisible);

// Set the currentPage element reference.
this.elements.currentPage = this.viewer.$('span.DV-currentPage');
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/DV/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ DV.Schema.helpers = {


var states = context.states;
viewer.$('.DV-navControls').delegate('span.DV-next','click', compiled.next);
viewer.$('.DV-navControls').delegate('span.DV-previous','click', compiled.previous);
viewer.elements.viewer.delegate('.DV-next','click', compiled.next);
viewer.elements.viewer.delegate('.DV-previous','click', compiled.previous);

viewer.$('.DV-annotationView').delegate('.DV-trigger','click',function(e){
e.preventDefault();
Expand Down
10 changes: 4 additions & 6 deletions public/javascripts/DV/views/footer.jst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<% if (!options.sidebarVisible) { %>
<div class="DV-footer">
<div class="DV-fullscreenContainer"></div>
<div class="DV-navControlsContainer"></div>
</div>
<% } %>
<div class="DV-footer">
<div class="DV-fullscreenContainer"></div>
<div class="DV-navControlsContainer"></div>
</div>
4 changes: 4 additions & 0 deletions public/stylesheets/DV/components/minimode.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
width: 80px;
}

.DV-mini .DV-searchDocument .DV-searchInput-cancel {
top: 7px;
}

/* ================== */
/* = Page Container = */
/* ================== */
Expand Down
5 changes: 1 addition & 4 deletions public/stylesheets/DV/components/ui-search.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,13 @@
visibility: hidden;
position: absolute;
right: 17px;
top: 10px;
top: 8px;
background: transparent url(../../../images/DV/embed/close.png) no-repeat 0 0;
width: 11px;
height: 11px;
cursor: pointer;
z-index: 5;
}
.DV-ie .DV-searchDocument .DV-searchInput-cancel {
top: 7px;
}

.DV-searchDocument .DV-searchInputWrap.DV-searchInput-show-search-cancel .DV-searchInput-cancel {
visibility: visible;
Expand Down

0 comments on commit 8577a01

Please sign in to comment.