bccu#1658: 'Enable editing' and 'Enable selection' buttons are not necessary.

Also some other small tweaks, like disable the Previous / Next part buttons in
spreadsheet, and better naming of them.
This commit is contained in:
Jan Holesovsky 2016-04-05 17:22:44 +02:00
parent 2cdc96c76d
commit e228817a8c

View file

@ -130,8 +130,6 @@ $(function () {
{ type: 'button', id: 'searchnext', img: 'next', hint: _("Search forward"), disabled: true }, { type: 'button', id: 'searchnext', img: 'next', hint: _("Search forward"), disabled: true },
{ type: 'button', id: 'cancelsearch', img: 'cancel', hint: _("Cancel the search"), hidden: true }, { type: 'button', id: 'cancelsearch', img: 'cancel', hint: _("Cancel the search"), hidden: true },
{ type: 'html', id: 'left' }, { type: 'html', id: 'left' },
{ type: 'button', id: 'edit', img: 'edit', hint: _("Enable editing") },
{ type: 'button', id: 'select', img: 'select', hint: _("Enable selection") },
{ type: 'button', id: 'presentation', img: 'presentation', hint: _("Fullscreen presentation") }, { type: 'button', id: 'presentation', img: 'presentation', hint: _("Fullscreen presentation") },
{ type: 'button', id: 'insertpage', img: 'insertpage', hint: _("Insert Page") }, { type: 'button', id: 'insertpage', img: 'insertpage', hint: _("Insert Page") },
{ type: 'button', id: 'duplicatepage', img: 'duplicatepage', hint: _("Duplicate Page") }, { type: 'button', id: 'duplicatepage', img: 'duplicatepage', hint: _("Duplicate Page") },
@ -141,10 +139,10 @@ $(function () {
{ type: 'button', id: 'takeedit', img: 'edit', hint: _("Take edit lock (others can only view)")}, { type: 'button', id: 'takeedit', img: 'edit', hint: _("Take edit lock (others can only view)")},
{ type: 'html', id: 'takeedit_text', html: '<div id="takeedit_text">VIEWING</div>' }, { type: 'html', id: 'takeedit_text', html: '<div id="takeedit_text">VIEWING</div>' },
{ type: 'break' }, { type: 'break' },
{ type: 'button', id: 'prev', img: 'prev', hint: _("Previous page/part") }, { type: 'button', id: 'prev', img: 'prev', hint: _("Previous page") },
{ type: 'button', id: 'next', img: 'next', hint: _("Next page/part") }, { type: 'button', id: 'next', img: 'next', hint: _("Next page") },
{ type: 'break' }, { type: 'break', id: 'prevnextbreak' },
{ type: 'button', id: 'zoomreset', img: 'zoomreset', hint: _("Reset") }, { type: 'button', id: 'zoomreset', img: 'zoomreset', hint: _("Reset zoom") },
{ type: 'button', id: 'zoomout', img: 'zoomout', hint: _("Zoom out") }, { type: 'button', id: 'zoomout', img: 'zoomout', hint: _("Zoom out") },
{ type: 'html', id: 'zoomlevel', html: '<div id="zoomlevel">100%</div>'}, { type: 'html', id: 'zoomlevel', html: '<div id="zoomlevel">100%</div>'},
{ type: 'button', id: 'zoomin', img: 'zoomin', hint: _("Zoom in") } { type: 'button', id: 'zoomin', img: 'zoomin', hint: _("Zoom in") }
@ -813,23 +811,36 @@ map.on('updateparts pagenumberchanged', function (e) {
} }
var toolbar = w2ui['toolbar-down']; var toolbar = w2ui['toolbar-down'];
if (e.docType !== 'presentation') { if (e.docType === 'presentation') {
toolbar.set('prev', {hint: _('Previous slide')});
toolbar.set('next', {hint: _('Next slide')});
}
else {
toolbar.hide('presentation'); toolbar.hide('presentation');
toolbar.hide('insertpage'); toolbar.hide('insertpage');
toolbar.hide('duplicatepage'); toolbar.hide('duplicatepage');
toolbar.hide('deletepage'); toolbar.hide('deletepage');
} }
if (current === 0) {
toolbar.disable('prev'); if (e.docType === 'spreadsheet') {
toolbar.hide('prev');
toolbar.hide('next');
toolbar.hide('prevnextbreak');
} }
else { else {
toolbar.enable('prev'); if (current === 0) {
} toolbar.disable('prev');
if (current === count - 1) { }
toolbar.disable('next'); else {
} toolbar.enable('prev');
else { }
toolbar.enable('next');
if (current === count - 1) {
toolbar.disable('next');
}
else {
toolbar.enable('next');
}
} }
toolbar = w2ui['toolbar-up']; toolbar = w2ui['toolbar-up'];