[PE] Fix Bug 35700

This commit is contained in:
Julia Radzhabova 2018-02-27 17:02:33 +03:00
parent 35542d4ee5
commit dd0aa73f51
2 changed files with 5 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<div class="statusbar" style="display:table;"> <div class="statusbar" style="display:table;">
<div class="status-group dropup"> <div class="status-group dropup">
<button id="status-btn-preview" type="button" class="btn small btn-toolbar" style="margin-left: 9px;"><i class="icon"></i></button> <button id="status-btn-preview" type="button" class="btn small btn-toolbar" style="margin-left: 9px;"><i class="icon"></i></button>
<label id="status-label-pages" class="status-label dropdown-toggle" style="margin-left: 7px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label> <label id="status-label-pages" class="status-label dropdown-toggle" style="margin-left: 7px; display: none;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
<div id="status-goto-box" class="dropdown-menu"> <div id="status-goto-box" class="dropdown-menu">
<label style="float:left;line-height:22px;"><%= scope.goToPageText %></label> <label style="float:left;line-height:22px;"><%= scope.goToPageText %></label>
<div id="status-goto-page" style="display:inline-block;"></div> <div id="status-goto-page" style="display:inline-block;"></div>

View file

@ -49,6 +49,9 @@ define([
'use strict'; 'use strict';
function _onCountPages(count){ function _onCountPages(count){
if (this.pages.get('count')<0)
$('#status-label-pages').css('display', 'inline-block');
this.pages.set('count', count); this.pages.set('count', count);
var isDisabled = (count<=0); var isDisabled = (count<=0);
if (this.btnPreview.isDisabled() !== isDisabled) if (this.btnPreview.isDisabled() !== isDisabled)
@ -90,7 +93,7 @@ define([
initialize: function (options) { initialize: function (options) {
_.extend(this, options); _.extend(this, options);
this.pages = new PE.Models.Pages({current:1, count:1}); this.pages = new PE.Models.Pages({current:1, count:-1});
this.pages.on('change', _.bind(_updatePagesCaption,this)); this.pages.on('change', _.bind(_updatePagesCaption,this));
this._state = {no_paragraph: true}; this._state = {no_paragraph: true};
}, },