From 48f5737bdf405aaaa5b24775dd64e338ba5cd9e0 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Wed, 21 Jun 2023 21:57:15 +0300 Subject: [PATCH 1/2] [all] fix bug 63125 --- apps/documenteditor/main/app/view/FileMenuPanels.js | 8 ++++++-- apps/presentationeditor/main/app/view/FileMenuPanels.js | 8 ++++++-- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 4b767123f2..1d7b835b94 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -126,7 +126,9 @@ define([ this.formats[0].splice(3, 2); // remove docxf and oform } - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase(), header: this.textDownloadAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'docx').toLowerCase(), + header: /*this.textDownloadAs*/ Common.Locale.get('btnDownloadCaption', {name:'DE.Views.FileMenu', default:this.textDownloadAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { @@ -250,7 +252,9 @@ define([ this.formats[0].splice(3, 2); // remove docxf and oform } - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase(), header: this.textSaveCopyAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'docx').toLowerCase(), + header: /*this.textSaveCopyAs*/ Common.Locale.get('btnSaveCopyAsCaption', {name:'DE.Views.FileMenu', default:this.textSaveCopyAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 0ed6d9fea7..63cf537b92 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -104,7 +104,9 @@ define([ }, render: function() { - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'pptx').toLowerCase(), header: this.textDownloadAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'pptx').toLowerCase(), + header: /*this.textDownloadAs*/ Common.Locale.get('btnDownloadCaption', {name:'PE.Views.FileMenu', default:this.textDownloadAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { @@ -203,7 +205,9 @@ define([ }, render: function() { - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'pptx').toLowerCase(), header: this.textSaveCopyAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'pptx').toLowerCase(), + header: /*this.textSaveCopyAs*/ Common.Locale.get('btnSaveCopyAsCaption', {name:'PE.Views.FileMenu', default:this.textSaveCopyAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 78b40563c1..1c32965833 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -93,7 +93,9 @@ define([ }, render: function() { - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'xlsx').toLowerCase(), header: this.textDownloadAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'xlsx').toLowerCase(), + header: /*this.textDownloadAs*/ Common.Locale.get('btnDownloadCaption', {name:'SSE.Views.FileMenu', default:this.textDownloadAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { @@ -192,7 +194,9 @@ define([ }, render: function() { - this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'xlsx').toLowerCase(), header: this.textSaveCopyAs})); + this.$el.html(this.template({rows:this.formats, + fileType: (this.fileType || 'xlsx').toLowerCase(), + header: /*this.textSaveCopyAs*/ Common.Locale.get('btnSaveCopyAsCaption', {name:'SSE.Views.FileMenu', default:this.textSaveCopyAs})})); $('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this)); if (_.isUndefined(this.scroller)) { From 52c36b9583206af7c3d59ae2fea33d6957314ee4 Mon Sep 17 00:00:00 2001 From: Iskandar Kurbonov <116521281+IskandarKurbonov@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:47:24 +0300 Subject: [PATCH 2/2] Add autobuild for online help * Add CI file for upload build on S3 * Change the name of the steps * Add paths for resources/help * Add variable PATH for export on S3 --------- Co-authored-by: papacarlo --- .github/workflows/ci-upload-help.yml | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/ci-upload-help.yml diff --git a/.github/workflows/ci-upload-help.yml b/.github/workflows/ci-upload-help.yml new file mode 100644 index 0000000000..a3c24f973a --- /dev/null +++ b/.github/workflows/ci-upload-help.yml @@ -0,0 +1,77 @@ +name: "Build and upload helps" + +on: + create: + push: + branches: + - 'release/*' + - 'hotfix/*' + paths: + - '**/resources/help/**' + + +jobs: + build-help: + name: "Build Apps and upload" + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/hotfix') + steps: + + - name: Checkout Web-Apps + uses: actions/checkout@v3 + with: + repository: onlyoffice/web-apps + ref: ${{github.ref}} + path: 'web-apps' + + - name: Checkout SDKJS + uses: actions/checkout@v3 + with: + repository: onlyoffice/sdkjs + ref: ${{github.ref}} + path: 'sdkjs' + + - name: Use Node.js 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID}} + aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY}} + aws-region: us-east-1 + + - name: Export tag and directory path + id: tag-dir + run: | + BRANCH_NAME=${GITHUB_REF#refs/heads/} + export TAG=${BRANCH_NAME#*/} + echo "PATH=/install/desktop/editors/help/$TAG/apps" >> $GITHUB_OUTPUT + + - name: Build + run: | + cd web-apps/build + ./sprites.sh + npm install + grunt + + - name: Upload + env: + PATH: ${{steps.tag-dir.outputs.PATH}} + run: | + aws s3 sync ./web-apps/deploy/web-apps/apps/ \ + ${{secrets.AWS_BUCKET_URL}}${PATH} \ + --acl public-read \ + --metadata-directive REPLACE + + + - name: Invalidate AWS CLOUDFRONT cache + env: + PATH: ${{steps.tag-dir.outputs.PATH}} + run: | + aws cloudfront create-invalidation \ + --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} \ + --paths \ + "${PATH}/*"