Merge branch 'develop' into refactor
This commit is contained in:
		
						commit
						2a0ef264a5
					
				| 
						 | 
				
			
			@ -211,8 +211,17 @@ define([
 | 
			
		|||
            openMenu: function(delay) {
 | 
			
		||||
                var me = this;
 | 
			
		||||
 | 
			
		||||
                if ( !this.scroller ) {
 | 
			
		||||
                    this.scroller = new Common.UI.Scroller(_.extend({
 | 
			
		||||
                        el: $('.dropdown-menu', this.cmpEl),
 | 
			
		||||
                        minScrollbarLength: 40,
 | 
			
		||||
                        scrollYMarginOffset: 30,
 | 
			
		||||
                        includePadding: true
 | 
			
		||||
                    }, this.options.scroller));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                _.delay(function(){
 | 
			
		||||
                    me.cmpEl.addClass('open')
 | 
			
		||||
                    me.cmpEl.addClass('open');
 | 
			
		||||
                }, delay || 0);
 | 
			
		||||
            },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -400,7 +400,7 @@ define([
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
            options.dontshow = options.dontshow || false;
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            if (!options.width) options.width = 'auto';
 | 
			
		||||
            
 | 
			
		||||
            var template =  '<div class="info-box">' +
 | 
			
		||||
| 
						 | 
				
			
			@ -410,24 +410,22 @@ define([
 | 
			
		|||
                                '</div>' +
 | 
			
		||||
                            '</div>' +
 | 
			
		||||
                            '<% if (dontshow) { %><div class="separator horizontal" style="width: 100%;"/><% } %>' +
 | 
			
		||||
                            '<div class="footer <% if (dontshow) { %> dontshow <% } %>">' +
 | 
			
		||||
                                '<% if (_.size(buttons) > 0) { %>' +
 | 
			
		||||
                            '<% if (_.size(buttons) > 0) { %>' +
 | 
			
		||||
                                '<div class="footer <% if (dontshow) { %> dontshow <% } %>">' +
 | 
			
		||||
                                    '<% for(var bt in buttons) { %>' +
 | 
			
		||||
                                        '<button class="btn normal dlg-btn <%= buttons[bt].cls %>" result="<%= bt %>"><%= buttons[bt].text %></button>'+
 | 
			
		||||
                                    '<% } %>' +
 | 
			
		||||
                                '<% } else { %>' +
 | 
			
		||||
                                    '<button class="btn normal dlg-btn primary" result="ok">OK</button>'+
 | 
			
		||||
                                '<% } %>' +
 | 
			
		||||
                            '</div>';
 | 
			
		||||
                                '</div>' +
 | 
			
		||||
                            '<% } %>';
 | 
			
		||||
 | 
			
		||||
           var win = new Common.UI.Window({
 | 
			
		||||
            _.extend(options, {
 | 
			
		||||
                cls: 'alert',
 | 
			
		||||
                title: options.title,
 | 
			
		||||
                width: options.width,
 | 
			
		||||
                onprimary: onKeyDown,
 | 
			
		||||
                tpl: _.template(template, options)
 | 
			
		||||
            }),
 | 
			
		||||
            chDontShow = null;
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            var win = new Common.UI.Window(options),
 | 
			
		||||
               chDontShow = null;
 | 
			
		||||
 | 
			
		||||
            function autoSize(window) {
 | 
			
		||||
                var text_cnt    = window.getChild('.info-box');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,11 +58,14 @@
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        .plugin-caret {
 | 
			
		||||
            float: right;
 | 
			
		||||
            //float: right;
 | 
			
		||||
            width: 16px;
 | 
			
		||||
            height: 16px;
 | 
			
		||||
            background-position: -1px -274px;
 | 
			
		||||
            margin: 7px;
 | 
			
		||||
            display: inline-block;
 | 
			
		||||
            position: absolute;
 | 
			
		||||
            right: 0;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -921,9 +921,20 @@ define([
 | 
			
		|||
            },
 | 
			
		||||
 | 
			
		||||
            onEditorPermissions: function(params) {
 | 
			
		||||
                var licType = params.asc_getLicenseType();
 | 
			
		||||
                if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType || Asc.c_oLicenseResult.ExpiredTrial === licType) {
 | 
			
		||||
                    Common.UI.warning({
 | 
			
		||||
                        title: this.titleLicenseExp,
 | 
			
		||||
                        msg: this.warnLicenseExp,
 | 
			
		||||
                        buttons: [],
 | 
			
		||||
                        closable: false
 | 
			
		||||
                    });
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
 | 
			
		||||
                this.appOptions.canAnalytics   = params.asc_getIsAnalyticsEnable();
 | 
			
		||||
                this.appOptions.canLicense     = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
 | 
			
		||||
                this.appOptions.canLicense     = (licType === Asc.c_oLicenseResult.Success);
 | 
			
		||||
                this.appOptions.isLightVersion = params.asc_getIsLight();
 | 
			
		||||
                /** coauthoring begin **/
 | 
			
		||||
                this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
 | 
			
		||||
| 
						 | 
				
			
			@ -949,7 +960,7 @@ define([
 | 
			
		|||
                this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');
 | 
			
		||||
                this.appOptions.canDownload       = !this.appOptions.nativeApp && this.permissions.download !== false && (!type || typeof type[1] !== 'string');
 | 
			
		||||
 | 
			
		||||
                this._state.licenseWarning = !this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
                this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
 | 
			
		||||
                this.appOptions.canBranding  = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
 | 
			
		||||
                if (this.appOptions.canBranding) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1863,7 +1874,9 @@ define([
 | 
			
		|||
            textNoLicenseTitle: 'ONLYOFFICE open source version',
 | 
			
		||||
            warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
 | 
			
		||||
            textContactUs: 'Contact sales',
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.'
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
 | 
			
		||||
            warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
 | 
			
		||||
            titleLicenseExp: 'License expired'
 | 
			
		||||
        }
 | 
			
		||||
    })(), DE.Controllers.Main || {}))
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -577,7 +577,7 @@ define([
 | 
			
		|||
        textBar:            'Bar Chart',
 | 
			
		||||
        textArea:           'Area Chart',
 | 
			
		||||
        textPie:            'Pie Chart',
 | 
			
		||||
        textPoint:          'Point Chart',
 | 
			
		||||
        textPoint:          'XY (Scatter) Chart',
 | 
			
		||||
        textStock:          'Stock Chart',
 | 
			
		||||
        textStyle:          'Style'
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -242,10 +242,10 @@ define([
 | 
			
		|||
 | 
			
		||||
                if (this._state.isOleObject) {
 | 
			
		||||
                    var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined);
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined || this._locked);
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1455,23 +1455,25 @@ define([
 | 
			
		|||
        onInitStandartTextures: function(texture) {
 | 
			
		||||
            var me = this;
 | 
			
		||||
            if (texture && texture.length>0){
 | 
			
		||||
                this.btnTexture = new Common.UI.ComboBox({
 | 
			
		||||
                    el: $('#shape-combo-fill-texture'),
 | 
			
		||||
                    template: _.template([
 | 
			
		||||
                        '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">',
 | 
			
		||||
                            '<div class="form-control text" style="width: 90px;">' + this.textSelectTexture + '</div>',
 | 
			
		||||
                            '<div style="display: table-cell;"></div>',
 | 
			
		||||
                            '<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>',
 | 
			
		||||
                        '</div>'
 | 
			
		||||
                    ].join(''))
 | 
			
		||||
                });
 | 
			
		||||
                this.textureMenu = new Common.UI.Menu({
 | 
			
		||||
                    items: [
 | 
			
		||||
                        { template: _.template('<div id="id-shape-menu-texture" style="width: 233px; margin: 0 5px;"></div>') }
 | 
			
		||||
                    ]
 | 
			
		||||
                });
 | 
			
		||||
                this.textureMenu.render($('#shape-combo-fill-texture'));
 | 
			
		||||
                this.fillControls.push(this.btnTexture);
 | 
			
		||||
                if (!this.btnTexture) {
 | 
			
		||||
                    this.btnTexture = new Common.UI.ComboBox({
 | 
			
		||||
                        el: $('#shape-combo-fill-texture'),
 | 
			
		||||
                        template: _.template([
 | 
			
		||||
                            '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">',
 | 
			
		||||
                                '<div class="form-control text" style="width: 90px;">' + this.textSelectTexture + '</div>',
 | 
			
		||||
                                '<div style="display: table-cell;"></div>',
 | 
			
		||||
                                '<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>',
 | 
			
		||||
                            '</div>'
 | 
			
		||||
                        ].join(''))
 | 
			
		||||
                    });
 | 
			
		||||
                    this.textureMenu = new Common.UI.Menu({
 | 
			
		||||
                        items: [
 | 
			
		||||
                            { template: _.template('<div id="id-shape-menu-texture" style="width: 233px; margin: 0 5px;"></div>') }
 | 
			
		||||
                        ]
 | 
			
		||||
                    });
 | 
			
		||||
                    this.textureMenu.render($('#shape-combo-fill-texture'));
 | 
			
		||||
                    this.fillControls.push(this.btnTexture);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                var texturearray = [];
 | 
			
		||||
                _.each(texture, function(item){
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1815,7 +1815,7 @@ define([
 | 
			
		|||
        textBar:            'Bar Chart',
 | 
			
		||||
        textArea:           'Area Chart',
 | 
			
		||||
        textPie:            'Pie Chart',
 | 
			
		||||
        textPoint:          'Point Chart',
 | 
			
		||||
        textPoint:          'XY (Scatter) Chart',
 | 
			
		||||
        textStock:          'Stock Chart',
 | 
			
		||||
        tipColorSchemas:    'Change Color Scheme',
 | 
			
		||||
        tipInsertText: 'Insert Text',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -277,6 +277,8 @@
 | 
			
		|||
  "DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
 | 
			
		||||
  "DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
 | 
			
		||||
  "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
 | 
			
		||||
  "DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
 | 
			
		||||
  "DE.Controllers.Main.titleLicenseExp": "License expired",
 | 
			
		||||
  "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
 | 
			
		||||
  "DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled",
 | 
			
		||||
  "DE.Controllers.Statusbar.zoomText": "Zoom {0}%",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@ body {
 | 
			
		|||
    height: 100%;
 | 
			
		||||
    .user-select(none);
 | 
			
		||||
    color: @gray-deep;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
 | 
			
		||||
    &.safari {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,16 +53,6 @@
 | 
			
		|||
                margin-bottom: 5px;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            .loader-page-text {
 | 
			
		||||
                display: inline-block;
 | 
			
		||||
                font-size: 14px;
 | 
			
		||||
                margin-left: 80px;
 | 
			
		||||
                margin-top: 125px;
 | 
			
		||||
                color: #888;
 | 
			
		||||
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
 | 
			
		||||
                line-height: 20px;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            .romb {
 | 
			
		||||
                width: 40px;
 | 
			
		||||
                height: 40px;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -712,8 +712,19 @@ define([
 | 
			
		|||
            },
 | 
			
		||||
 | 
			
		||||
            onEditorPermissions: function(params) {
 | 
			
		||||
                var licType = params.asc_getLicenseType();
 | 
			
		||||
                if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType || Asc.c_oLicenseResult.ExpiredTrial === licType) {
 | 
			
		||||
                    Common.UI.warning({
 | 
			
		||||
                        title: this.titleLicenseExp,
 | 
			
		||||
                        msg: this.warnLicenseExp,
 | 
			
		||||
                        buttons: [],
 | 
			
		||||
                        closable: false
 | 
			
		||||
                    });
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                this.appOptions.isOffline      = this.api.asc_isOffline();
 | 
			
		||||
                this.appOptions.canLicense     = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
 | 
			
		||||
                this.appOptions.canLicense     = (licType === Asc.c_oLicenseResult.Success);
 | 
			
		||||
                this.appOptions.isLightVersion = params.asc_getIsLight();
 | 
			
		||||
                /** coauthoring begin **/
 | 
			
		||||
                this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
 | 
			
		||||
| 
						 | 
				
			
			@ -728,7 +739,7 @@ define([
 | 
			
		|||
                this.appOptions.canChat        = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
 | 
			
		||||
                this.appOptions.canPrint       = (this.permissions.print !== false);
 | 
			
		||||
 | 
			
		||||
                this._state.licenseWarning = !this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
                this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
 | 
			
		||||
                this.appOptions.canBranding  = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
 | 
			
		||||
                if (this.appOptions.canBranding) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1666,7 +1677,9 @@ define([
 | 
			
		|||
            textNoLicenseTitle: 'ONLYOFFICE open source version',
 | 
			
		||||
            warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
 | 
			
		||||
            textContactUs: 'Contact sales',
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.'
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
 | 
			
		||||
            warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
 | 
			
		||||
            titleLicenseExp: 'License expired'
 | 
			
		||||
        }
 | 
			
		||||
    })(), PE.Controllers.Main || {}))
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -512,7 +512,7 @@ define([
 | 
			
		|||
        textBar:            'Bar Chart',
 | 
			
		||||
        textArea:           'Area Chart',
 | 
			
		||||
        textPie:            'Pie Chart',
 | 
			
		||||
        textPoint:          'Point Chart',
 | 
			
		||||
        textPoint:          'XY (Scatter) Chart',
 | 
			
		||||
        textStock:          'Stock Chart',
 | 
			
		||||
        textStyle:          'Style'
 | 
			
		||||
    }, PE.Views.ChartSettings || {}));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -188,12 +188,19 @@ define([
 | 
			
		|||
 | 
			
		||||
            var onFocusObject = function(selectedElements) {
 | 
			
		||||
                if (me.mode.isEdit && me.currentMenu && me.currentMenu.isVisible()){
 | 
			
		||||
                    var obj = fillMenuProps(selectedElements);
 | 
			
		||||
                    if (obj) {
 | 
			
		||||
                        if (obj.menu_to_show===me.currentMenu) {
 | 
			
		||||
                            me.currentMenu.options.initMenu(obj.menu_props);
 | 
			
		||||
                    if (me.api.asc_getCurrentFocusObject() === 0 ){ // thumbnails
 | 
			
		||||
                        if (me.slideMenu===me.currentMenu) {
 | 
			
		||||
                            me.currentMenu.options.initMenu({isSlideSelect: me.slideMenu.items[2].isVisible(), fromThumbs: true});
 | 
			
		||||
                            me.currentMenu.alignPosition();
 | 
			
		||||
                        }
 | 
			
		||||
                    } else {
 | 
			
		||||
                        var obj = fillMenuProps(selectedElements);
 | 
			
		||||
                        if (obj) {
 | 
			
		||||
                            if (obj.menu_to_show===me.currentMenu) {
 | 
			
		||||
                                me.currentMenu.options.initMenu(obj.menu_props);
 | 
			
		||||
                                me.currentMenu.alignPosition();
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
| 
						 | 
				
			
			@ -686,8 +693,11 @@ define([
 | 
			
		|||
            };
 | 
			
		||||
 | 
			
		||||
            var onApiCurrentPages = function(number) {
 | 
			
		||||
                if (me.currentMenu && me.currentMenu.isVisible())
 | 
			
		||||
                    me.currentMenu.hide();
 | 
			
		||||
                if (me.currentMenu && me.currentMenu.isVisible()) {
 | 
			
		||||
                    if (me._isFromSlideMenu !== true && me._isFromSlideMenu !== number)
 | 
			
		||||
                        me.currentMenu.hide();
 | 
			
		||||
                    me._isFromSlideMenu = number;
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            this.setApi = function(o) {
 | 
			
		||||
| 
						 | 
				
			
			@ -903,6 +913,7 @@ define([
 | 
			
		|||
                caption     : me.txtDeleteSlide
 | 
			
		||||
            }).on('click', _.bind(function(item) {
 | 
			
		||||
                if (me.api){
 | 
			
		||||
                    me._isFromSlideMenu = true;
 | 
			
		||||
                    me.api.DeleteSlide();
 | 
			
		||||
 | 
			
		||||
                    me.fireEvent('editcomplete', this);
 | 
			
		||||
| 
						 | 
				
			
			@ -1010,6 +1021,7 @@ define([
 | 
			
		|||
                        caption : me.txtNewSlide
 | 
			
		||||
                    }).on('click', function(item) {
 | 
			
		||||
                        if (me.api) {
 | 
			
		||||
                            me._isFromSlideMenu = true;
 | 
			
		||||
                            me.api.AddSlide();
 | 
			
		||||
 | 
			
		||||
                            me.fireEvent('editcomplete', this);
 | 
			
		||||
| 
						 | 
				
			
			@ -1020,6 +1032,7 @@ define([
 | 
			
		|||
                        caption : me.txtDuplicateSlide
 | 
			
		||||
                    }).on('click', function(item){
 | 
			
		||||
                        if (me.api) {
 | 
			
		||||
                            me._isFromSlideMenu = true;
 | 
			
		||||
                            me.api.DublicateSlide();
 | 
			
		||||
 | 
			
		||||
                            me.fireEvent('editcomplete', this);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,10 +181,10 @@ define([
 | 
			
		|||
 | 
			
		||||
                if (this._state.isOleObject) {
 | 
			
		||||
                    var plugin = PE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined);
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined || this._locked);
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1595,7 +1595,7 @@ define([
 | 
			
		|||
        textBar:                'Bar Chart',
 | 
			
		||||
        textArea:               'Area Chart',
 | 
			
		||||
        textPie:                'Pie Chart',
 | 
			
		||||
        textPoint:              'Point Chart',
 | 
			
		||||
        textPoint:              'XY (Scatter) Chart',
 | 
			
		||||
        textStock:              'Stock Chart',
 | 
			
		||||
        tipSynchronize:         'The document has been changed by another user. Please click to save your changes and reload the updates.',
 | 
			
		||||
        txtScheme1:             'Office',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -223,6 +223,8 @@
 | 
			
		|||
  "PE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
 | 
			
		||||
  "PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
 | 
			
		||||
  "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
 | 
			
		||||
  "PE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
 | 
			
		||||
  "PE.Controllers.Main.titleLicenseExp": "License expired",
 | 
			
		||||
  "PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
 | 
			
		||||
  "PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
 | 
			
		||||
  "PE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@ body {
 | 
			
		|||
    height: 100%;
 | 
			
		||||
    .user-select(none);
 | 
			
		||||
    color: @gray-deep;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
 | 
			
		||||
    &.safari {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -733,12 +733,24 @@ define([
 | 
			
		|||
            },
 | 
			
		||||
 | 
			
		||||
            onEditorPermissions: function(params) {
 | 
			
		||||
                if ( params  && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge)) {
 | 
			
		||||
                var licType = params ? params.asc_getLicenseType() : Asc.c_oLicenseResult.Error;
 | 
			
		||||
 | 
			
		||||
                if ( params && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge)) {
 | 
			
		||||
                    if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType || Asc.c_oLicenseResult.ExpiredTrial === licType) {
 | 
			
		||||
                        Common.UI.warning({
 | 
			
		||||
                            title: this.titleLicenseExp,
 | 
			
		||||
                            msg: this.warnLicenseExp,
 | 
			
		||||
                            buttons: [],
 | 
			
		||||
                            closable: false
 | 
			
		||||
                        });
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    this.appOptions.canAutosave = true;
 | 
			
		||||
                    this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
 | 
			
		||||
 | 
			
		||||
                    this.appOptions.isOffline      = this.api.asc_isOffline();
 | 
			
		||||
                    this.appOptions.canLicense     = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
 | 
			
		||||
                    this.appOptions.canLicense     = (licType === Asc.c_oLicenseResult.Success);
 | 
			
		||||
                    this.appOptions.isLightVersion = params.asc_getIsLight();
 | 
			
		||||
                    /** coauthoring begin **/
 | 
			
		||||
                    this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
 | 
			
		||||
| 
						 | 
				
			
			@ -759,7 +771,7 @@ define([
 | 
			
		|||
                this.appOptions.canDownload    = !this.appOptions.nativeApp && (this.permissions.download !== false);
 | 
			
		||||
                this.appOptions.canPrint       = (this.permissions.print !== false);
 | 
			
		||||
 | 
			
		||||
                this._state.licenseWarning = !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) && !this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
                this._state.licenseWarning = !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) && (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
 | 
			
		||||
 | 
			
		||||
                this.applyModeCommonElements();
 | 
			
		||||
                this.applyModeEditorElements();
 | 
			
		||||
| 
						 | 
				
			
			@ -1882,7 +1894,9 @@ define([
 | 
			
		|||
            warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
 | 
			
		||||
            textContactUs: 'Contact sales',
 | 
			
		||||
            confirmPutMergeRange: 'The source data contains merged cells.<br>They will be unmerged before they are pasted into the table.',
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.'
 | 
			
		||||
            errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
 | 
			
		||||
            warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
 | 
			
		||||
            titleLicenseExp: 'License expired'
 | 
			
		||||
        }
 | 
			
		||||
    })(), SSE.Controllers.Main || {}))
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -530,7 +530,7 @@ define([
 | 
			
		|||
        onHorizontalAlign: function(type, btn, e) {
 | 
			
		||||
            this._state.pralign = undefined;
 | 
			
		||||
            if (this.api) {
 | 
			
		||||
                this.api.asc_setCellAlign(!btn.pressed ? 'left' : type);
 | 
			
		||||
                this.api.asc_setCellAlign(!btn.pressed ? 'none' : type);
 | 
			
		||||
                this.toolbar.btnWrap.allowDepress = !(type == 'justify');
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -550,7 +550,7 @@ define([
 | 
			
		|||
 | 
			
		||||
            this._state.pralign = undefined;
 | 
			
		||||
            if (this.api)
 | 
			
		||||
                this.api.asc_setCellAlign(!item.checked ? 'left' : item.value);
 | 
			
		||||
                this.api.asc_setCellAlign(!item.checked ? 'none' : item.value);
 | 
			
		||||
 | 
			
		||||
            this.toolbar.btnWrap.allowDepress = !(item.value == 'justify');
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -534,7 +534,7 @@ define([
 | 
			
		|||
        textBar:            'Bar Chart',
 | 
			
		||||
        textArea:           'Area Chart',
 | 
			
		||||
        textPie:            'Pie Chart',
 | 
			
		||||
        textPoint:          'Point Chart',
 | 
			
		||||
        textPoint:          'XY (Scatter) Chart',
 | 
			
		||||
        textStock:          'Stock Chart',
 | 
			
		||||
        textStyle:          'Style',
 | 
			
		||||
        textAdvanced:       'Show advanced settings'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,6 +79,7 @@ define([
 | 
			
		|||
            this._locked = false;
 | 
			
		||||
 | 
			
		||||
            this._noApply = false;
 | 
			
		||||
            this._originalProps = null;
 | 
			
		||||
 | 
			
		||||
            this.render();
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			@ -203,6 +204,8 @@ define([
 | 
			
		|||
            this.disableControls(this._locked);
 | 
			
		||||
 | 
			
		||||
            if (props ){
 | 
			
		||||
                this._originalProps = new Asc.asc_CImgProperty(props);
 | 
			
		||||
                
 | 
			
		||||
                var value = props.asc_getWidth();
 | 
			
		||||
                if ( Math.abs(this._state.Width-value)>0.001 ||
 | 
			
		||||
                    (this._state.Width===null || value===null)&&(this._state.Width!==value)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -240,10 +243,10 @@ define([
 | 
			
		|||
 | 
			
		||||
                if (this._state.isOleObject) {
 | 
			
		||||
                    var plugin = SSE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined);
 | 
			
		||||
                    this.btnEditObject.setDisabled(plugin===null || plugin ===undefined || this._locked);
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null);
 | 
			
		||||
                    this.btnInsertFromUrl.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                    this.btnInsertFromFile.setDisabled(pluginGuid===null || this._locked);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -233,6 +233,8 @@
 | 
			
		|||
  "SSE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
 | 
			
		||||
  "SSE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
 | 
			
		||||
  "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
 | 
			
		||||
  "SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
 | 
			
		||||
  "SSE.Controllers.Main.titleLicenseExp": "License expired",
 | 
			
		||||
  "SSE.Controllers.Print.strAllSheets": "All Sheets",
 | 
			
		||||
  "SSE.Controllers.Print.textWarning": "Warning",
 | 
			
		||||
  "SSE.Controllers.Print.warnCheckMargings": "Margins are incorrect",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@ body {
 | 
			
		|||
    height: 100%;
 | 
			
		||||
    .user-select(none);
 | 
			
		||||
    color: @gray-deep;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
 | 
			
		||||
    &.safari {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue