diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index 18aaf35da..983d6ed69 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -112,6 +112,9 @@ font-size: @toolbarFontSize; overflow: hidden; + + color: @text-normal-ie; + color: @text-normal; } // Document Viewer @@ -578,6 +581,18 @@ } } +.btn { + &.active, &:active { + &:not(:disabled):not(.disabled) { + .icon { + @btn-active-icon-offset: -20px; + background-position-y: @btn-active-icon-offset; + background-position-y: var(--button-small-active-icon-offset-x, 0); + } + } + } +} + .mi-icon { width: @icon-width; height: @icon-height; @@ -591,14 +606,6 @@ vertical-align: middle; } -//.btn, button { -// &:focus, &:active:focus { -// outline: 0 none; -// } -// -// background-color: @btnColor; -//} - .modal-dialog { margin-top: 100px; .share-buttons { @@ -653,37 +660,6 @@ } } -//.dropdown-menu { -// > li > a { -// padding: 8px 20px 8px 28px; -// &:hover, &:focus { -// background-color: @btnColor; -// outline: 0 none; -// } -// font-size: @buttonFontSize; -// } -// -// .divider { -// margin: 4px 0; -// } -//} -// -//.dropdown { -// &.open { -// > button { -// background-color: @btnActiveColor !important; -// background-position: -@icon-width*14 -@icon-height; -// } -// } -//} -// -//#box-tools { -// display: inline-block; -// a { -// cursor: pointer; -// } -//} - .masked { background-color: transparent; border-color: transparent; diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index c8165345f..b1eb11ff9 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -326,7 +326,6 @@ define([ if (this.embedConfig.toolbarDocked === 'bottom') { $('#toolbar').addClass('bottom'); this.boxSdk.addClass('bottom'); - // $('#box-tools').removeClass('dropdown').addClass('dropup'); ttOffset[1] = -40; } else { $('#toolbar').addClass('top'); @@ -509,24 +508,20 @@ define([ btnSubmit = $('#id-btn-submit'); + var me = this; if (!this.appOptions.canFillForms) { - $('#id-btn-prev-field').hide(); - $('#id-btn-next-field').hide(); - $('#id-btn-clear-fields').hide(); + me.view.btnPrev.setVisible(false); + me.view.btnNext.setVisible(false); + me.view.btnClear.setVisible(false); btnSubmit.hide(); } else { - $('#id-pages').hide(); - $('#id-btn-next-field .caption').text(this.textNext); - $('#id-btn-clear-fields .caption').text(this.textClear); - - var me = this; - $('#id-btn-prev-field').on('click', function(){ + me.view.btnPrev.on('click', function(){ me.api.asc_MoveToFillingForm(false); }); - $('#id-btn-next-field').on('click', function(){ + me.view.btnNext.on('click', function(){ me.api.asc_MoveToFillingForm(true); }); - $('#id-btn-clear-fields').on('click', function(){ + me.view.btnClear.on('click', function(){ me.api.asc_ClearAllSpecialForms(); }); @@ -906,9 +901,6 @@ define([ var zf = (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom) : -2); (zf == -1) ? this.api.zoomFitToPage() : ((zf == -2) ? this.api.zoomFitToWidth() : this.api.zoom(zf>0 ? zf : 100)); - // var dividers = $('#box-tools .divider'); - // var itemsCount = $('#box-tools a').length; - // var menuItems = this.view.btnOptions.menu.items; var itemsCount = menuItems.length-3; diff --git a/apps/documenteditor/forms/app/view/ApplicationView.js b/apps/documenteditor/forms/app/view/ApplicationView.js index 7375cd5fe..cc0d8d5ce 100644 --- a/apps/documenteditor/forms/app/view/ApplicationView.js +++ b/apps/documenteditor/forms/app/view/ApplicationView.js @@ -36,22 +36,25 @@ define([ }); this.btnOptions.render($('#box-tools')); - // $btnTools = $('#box-tools button'); - // $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); - // $btnTools.parent().append( - // '
'); + this.btnClear = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'svg-icon clear-style', + caption: this.textClear + }); + this.btnClear.render($('#id-btn-clear-fields')); + + this.btnNext = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'svg-icon arrow-down', + caption: this.textNext + }); + this.btnNext.render($('#id-btn-next-field')); + + this.btnPrev = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'svg-icon arrow-up' + }); + this.btnPrev.render($('#id-btn-prev-field')); return this; }, @@ -77,6 +80,8 @@ define([ txtFullScreen: 'Full Screen', txtFileLocation: 'Open file location', txtDownloadDocx: 'Download as docx', - txtDownloadPdf: 'Download as pdf' + txtDownloadPdf: 'Download as pdf', + textNext: 'Next Field', + textClear: 'Clear All Fields' }); }); \ No newline at end of file diff --git a/apps/documenteditor/forms/index.html b/apps/documenteditor/forms/index.html index f48095ca7..aa4d60cdd 100644 --- a/apps/documenteditor/forms/index.html +++ b/apps/documenteditor/forms/index.html @@ -115,7 +115,7 @@ - +