/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* FileMenuPanels.js
*
* Contains views for menu 'File'
*
* Created by Maxim Kadushkin on 20 February 2014
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/view/DocumentAccessDialog',
'common/main/lib/view/AutoCorrectDialog'
], function () {
'use strict';
!DE.Views.FileMenuPanels && (DE.Views.FileMenuPanels = {});
DE.Views.FileMenuPanels.ViewSaveAs = Common.UI.BaseView.extend({
el: '#panel-saveas',
menu: undefined,
formats: [[
{name: 'DOCX', imgCls: 'docx', type: Asc.c_oAscFileType.DOCX},
{name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'ODT', imgCls: 'odt', type: Asc.c_oAscFileType.ODT},
{name: 'DOCXF', imgCls: 'docxf', type: Asc.c_oAscFileType.DOCXF},
{name: 'OFORM', imgCls: 'oform', type: Asc.c_oAscFileType.OFORM}
],[
{name: 'DOTX', imgCls: 'dotx', type: Asc.c_oAscFileType.DOTX},
{name: 'DOCM', imgCls: 'docm', type: Asc.c_oAscFileType.DOCM},
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA},
{name: 'OTT', imgCls: 'ott', type: Asc.c_oAscFileType.OTT}
],[
{name: 'RTF', imgCls: 'rtf', type: Asc.c_oAscFileType.RTF},
{name: 'TXT', imgCls: 'txt', type: Asc.c_oAscFileType.TXT},
{name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2},
{name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB},
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
], [
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]],
template: _.template([
'
" : "")+ tipText;
this.cntSignatureView.html(this.templateSignature({tipText: tipText, hasSigned: (hasValid || hasInvalid), hasRequested: hasRequested}));
var isAddedSignature = this.btnAddInvisibleSign.$el.find('button').hasClass('hidden');
this.cntAddSignature.toggleClass('hidden', isAddedSignature);
this.cntAddedSignature.toggleClass('hidden', !isAddedSignature);
},
updateEncrypt: function() {
var isProtected = this.btnAddPwd.$el.find('button').hasClass('hidden');
this.cntEncryptBlock.toggleClass('hidden', isProtected);
this.cntEncryptedBlock.toggleClass('hidden', !isProtected);
},
strProtect: 'Protect Document',
strSignature: 'With Signature',
txtView: 'View signatures',
txtEdit: 'Edit document',
txtSigned: 'Valid signatures has been added to the document. The document is protected from editing.',
txtSignedInvalid: 'Some of the digital signatures in document are invalid or could not be verified. The document is protected from editing.',
txtRequestedSignatures: 'This document needs to be signed.',
notcriticalErrorTitle: 'Warning',
txtEditWarning: 'Editing will remove the signatures from the document. Are you sure you want to continue?',
strEncrypt: 'With Password',
txtProtectDocument: 'Encrypt this document with a password',
txtEncrypted: 'A password is required to open this document',
txtAddSignature: 'Ensure the integrity of the document by adding an invisible digital signature',
txtAddedSignature: 'Valid signatures have been added to the document. The document is protected from editing.'
}, DE.Views.FileMenuPanels.ProtectDoc || {}));
DE.Views.PrintWithPreview = Common.UI.BaseView.extend(_.extend({
el: '#panel-print',
menu: undefined,
template: _.template([
'