[SSE] Remove First sheet and Last sheet buttons in statusbar
This commit is contained in:
parent
936d7d4c50
commit
3e2782e12f
|
@ -513,10 +513,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setTabVisible: function(index, suppress) {
|
setTabVisible: function(index, suppress) {
|
||||||
if (index <= 0 || index == 'first') {
|
if (index <= 0) {
|
||||||
this.$bar.scrollLeft(0);
|
this.$bar.scrollLeft(0);
|
||||||
this.checkInvisible(suppress);
|
this.checkInvisible(suppress);
|
||||||
} else if ( index >= (this.tabs.length - 1) || index == 'last') {
|
} else if ( index >= (this.tabs.length - 1)) {
|
||||||
var tab = this.tabs[this.tabs.length-1].$el;
|
var tab = this.tabs[this.tabs.length-1].$el;
|
||||||
if (this.$bar.find('.separator-item').length === 0) {
|
if (this.$bar.find('.separator-item').length === 0) {
|
||||||
this.$bar.append('<li class="separator-item"><span></span></li>');
|
this.$bar.append('<li class="separator-item"><span></span></li>');
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
|
|
||||||
<div class="statusbar">
|
<div class="statusbar">
|
||||||
<div id="status-tabs-scroll" class="status-group">
|
<div id="status-tabs-scroll" class="status-group">
|
||||||
<button id="status-btn-tabfirst" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="Q"><i class="icon toolbar__icon btn-firstitem"> </i></button>
|
|
||||||
<button id="status-btn-tabback" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="G"><i class="icon toolbar__icon btn-previtem"> </i></button>
|
<button id="status-btn-tabback" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="G"><i class="icon toolbar__icon btn-previtem"> </i></button>
|
||||||
<button id="status-btn-tabnext" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="J"><i class="icon toolbar__icon btn-nextitem"> </i></button>
|
<button id="status-btn-tabnext" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="J"><i class="icon toolbar__icon btn-nextitem"> </i></button>
|
||||||
<button id="status-btn-tablast" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="K"><i class="icon toolbar__icon btn-lastitem"> </i></button>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="status-addtabs-box" class="status-group">
|
<div id="status-addtabs-box" class="status-group">
|
||||||
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="X"><i class="icon toolbar__icon btn-zoomup"> </i></button>
|
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar" data-hint="0" data-hint-direction="top" data-hint-offset="small" data-hint-title="X"><i class="icon toolbar__icon btn-zoomup"> </i></button>
|
||||||
|
|
|
@ -60,10 +60,8 @@ define([
|
||||||
|
|
||||||
events: function() {
|
events: function() {
|
||||||
return {
|
return {
|
||||||
'click #status-btn-tabfirst': _.bind(this.onBtnTabScroll, this, 'first'),
|
|
||||||
'click #status-btn-tabback': _.bind(this.onBtnTabScroll, this, 'backward'),
|
'click #status-btn-tabback': _.bind(this.onBtnTabScroll, this, 'backward'),
|
||||||
'click #status-btn-tabnext': _.bind(this.onBtnTabScroll, this, 'forward'),
|
'click #status-btn-tabnext': _.bind(this.onBtnTabScroll, this, 'forward')
|
||||||
'click #status-btn-tablast': _.bind(this.onBtnTabScroll, this, 'last')
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -100,13 +98,6 @@ define([
|
||||||
hintAnchor: 'top-right'
|
hintAnchor: 'top-right'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.btnScrollFirst = new Common.UI.Button({
|
|
||||||
el: $('#status-btn-tabfirst',this.el),
|
|
||||||
hint: this.tipFirst,
|
|
||||||
disabled: true,
|
|
||||||
hintAnchor: 'top'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.btnScrollBack = new Common.UI.Button({
|
this.btnScrollBack = new Common.UI.Button({
|
||||||
el: $('#status-btn-tabback',this.el),
|
el: $('#status-btn-tabback',this.el),
|
||||||
hint: this.tipPrev,
|
hint: this.tipPrev,
|
||||||
|
@ -121,13 +112,6 @@ define([
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.btnScrollLast = new Common.UI.Button({
|
|
||||||
el: $('#status-btn-tablast',this.el),
|
|
||||||
hint: this.tipLast,
|
|
||||||
disabled: true,
|
|
||||||
hintAnchor: 'top'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.btnAddWorksheet = new Common.UI.Button({
|
this.btnAddWorksheet = new Common.UI.Button({
|
||||||
el: $('#status-btn-addtab',this.el),
|
el: $('#status-btn-addtab',this.el),
|
||||||
hint: this.tipAddTab,
|
hint: this.tipAddTab,
|
||||||
|
@ -528,8 +512,6 @@ define([
|
||||||
this.btnAddWorksheet.setDisabled(this.mode.isDisconnected || this.api && (this.api.asc_isWorkbookLocked() || this.api.isCellEdited) || this.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None);
|
this.btnAddWorksheet.setDisabled(this.mode.isDisconnected || this.api && (this.api.asc_isWorkbookLocked() || this.api.isCellEdited) || this.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None);
|
||||||
if (this.mode.isEditOle) { // change hints order
|
if (this.mode.isEditOle) { // change hints order
|
||||||
this.btnAddWorksheet.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
this.btnAddWorksheet.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
||||||
this.btnScrollFirst.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
|
||||||
this.btnScrollLast.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
|
||||||
this.btnScrollBack.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
this.btnScrollBack.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
||||||
this.btnScrollNext.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
this.btnScrollNext.$el.find('button').addBack().filter('button').attr('data-hint', '1');
|
||||||
this.cntSheetList.$el.find('button').attr('data-hint', '1');
|
this.cntSheetList.$el.find('button').attr('data-hint', '1');
|
||||||
|
@ -825,13 +807,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabInvisible: function(obj, opts) {
|
onTabInvisible: function(obj, opts) {
|
||||||
if (this.btnScrollFirst.isDisabled() !== (!opts.first)) {
|
if (this.btnScrollBack.isDisabled() !== (!opts.first)) {
|
||||||
this.btnScrollFirst.setDisabled(!opts.first);
|
|
||||||
this.btnScrollBack.setDisabled(!opts.first);
|
this.btnScrollBack.setDisabled(!opts.first);
|
||||||
}
|
}
|
||||||
if (this.btnScrollNext.isDisabled() !== (!opts.last)) {
|
if (this.btnScrollNext.isDisabled() !== (!opts.last)) {
|
||||||
this.btnScrollNext.setDisabled(!opts.last);
|
this.btnScrollNext.setDisabled(!opts.last);
|
||||||
this.btnScrollLast.setDisabled(!opts.last);
|
|
||||||
}
|
}
|
||||||
this.hasTabInvisible = opts.first || opts.last;
|
this.hasTabInvisible = opts.first || opts.last;
|
||||||
},
|
},
|
||||||
|
@ -858,8 +838,8 @@ define([
|
||||||
if (this.boxAction.is(':visible')) {
|
if (this.boxAction.is(':visible')) {
|
||||||
var tabsWidth = this.tabbar.getWidth();
|
var tabsWidth = this.tabbar.getWidth();
|
||||||
var actionWidth = this.actionWidth || 140;
|
var actionWidth = this.actionWidth || 140;
|
||||||
if (Common.Utils.innerWidth() - right - 175 - actionWidth - tabsWidth > 0) { // docWidth - right - left - this.boxAction.width
|
if (Common.Utils.innerWidth() - right - 129 - actionWidth - tabsWidth > 0) { // docWidth - right - left - this.boxAction.width
|
||||||
var left = tabsWidth + 175;
|
var left = tabsWidth + 129;
|
||||||
this.boxAction.css({'right': right + 'px', 'left': left + 'px', 'width': 'auto'});
|
this.boxAction.css({'right': right + 'px', 'left': left + 'px', 'width': 'auto'});
|
||||||
this.boxAction.find('.separator').css('border-left-color', 'transparent');
|
this.boxAction.find('.separator').css('border-left-color', 'transparent');
|
||||||
} else {
|
} else {
|
||||||
|
@ -912,7 +892,7 @@ define([
|
||||||
changeViewMode: function (mode) {
|
changeViewMode: function (mode) {
|
||||||
var edit = mode.isEdit;
|
var edit = mode.isEdit;
|
||||||
if (edit) {
|
if (edit) {
|
||||||
this.tabBarBox.css('left', '175px');
|
this.tabBarBox.css('left', '129px');
|
||||||
} else {
|
} else {
|
||||||
this.tabBarBox.css('left', '');
|
this.tabBarBox.css('left', '');
|
||||||
}
|
}
|
||||||
|
@ -1043,8 +1023,6 @@ define([
|
||||||
tipZoomIn : 'Zoom In',
|
tipZoomIn : 'Zoom In',
|
||||||
tipZoomOut : 'Zoom Out',
|
tipZoomOut : 'Zoom Out',
|
||||||
tipZoomFactor : 'Magnification',
|
tipZoomFactor : 'Magnification',
|
||||||
tipFirst : 'First Sheet',
|
|
||||||
tipLast : 'Last Sheet',
|
|
||||||
tipPrev : 'Previous Sheet',
|
tipPrev : 'Previous Sheet',
|
||||||
tipNext : 'Next Sheet',
|
tipNext : 'Next Sheet',
|
||||||
tipAddTab : 'Add Worksheet',
|
tipAddTab : 'Add Worksheet',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
|
|
||||||
#status-tabs-scroll {
|
#status-tabs-scroll {
|
||||||
width: 112px;
|
width: 66px;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 3px 12px 0 10px;
|
padding: 3px 12px 0 10px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
left: 112px;
|
left: 66px;
|
||||||
right: 160px;
|
right: 160px;
|
||||||
//margin-right: 3px;
|
//margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue