moove to PE

This commit is contained in:
OVSharova 2021-07-18 02:15:10 +03:00
parent 3a8bebbaf7
commit 5abe22fa6e
7 changed files with 18 additions and 104 deletions

View file

@ -162,7 +162,7 @@ require([
,'Common.Controllers.ExternalDiagramEditor' ,'Common.Controllers.ExternalDiagramEditor'
,'Common.Controllers.ReviewChanges' ,'Common.Controllers.ReviewChanges'
,'Common.Controllers.Protection' ,'Common.Controllers.Protection'
,'Common.Controllers.Transitions' ,'Transitions'
] ]
}); });
@ -198,7 +198,7 @@ require([
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Themes' ,'common/main/lib/controller/Themes'
,'common/main/lib/controller/Desktop' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/Transitions' ,'presentationeditor/main/app/controller/Transitions'
], function() { ], function() {
app.start(); app.start();
}); });

View file

@ -97,7 +97,7 @@ define([
'Common.Views.ReviewChanges': { 'Common.Views.ReviewChanges': {
'settings:apply': _.bind(this.applySettings, this) 'settings:apply': _.bind(this.applySettings, this)
}/*, }/*,
'Common.Views.Transitions': { 'Transitions': {
'settings:apply': _.bind(this.applySettings, this) 'settings:apply': _.bind(this.applySettings, this)
}*/ }*/
}); });
@ -1019,7 +1019,7 @@ define([
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable); app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
} }
if (options.transit) { if (options.transit) {
app.getController('Common.Controllers.Transitions').SetDisabled(disable); app.getController('Transitions').SetDisabled(disable);
} }
if (options.viewport) { if (options.viewport) {
app.getController('Viewport').SetDisabled(disable); app.getController('Viewport').SetDisabled(disable);
@ -1234,7 +1234,7 @@ define([
reviewController = application.getController('Common.Controllers.ReviewChanges'); reviewController = application.getController('Common.Controllers.ReviewChanges');
reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api).loadDocument({doc:me.document}); reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api).loadDocument({doc:me.document});
var transitController = application.getController('Common.Controllers.Transitions'); var transitController = application.getController('Transitions');
transitController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api).loadDocument({doc:me.document}); transitController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api).loadDocument({doc:me.document});
if (this.appOptions.isEdit || this.appOptions.isRestrictedEdit) { // set api events for toolbar in the Restricted Editing mode) if (this.appOptions.isEdit || this.appOptions.isRestrictedEdit) { // set api events for toolbar in the Restricted Editing mode)

View file

@ -107,13 +107,6 @@ define([
me.btnDocLang = review.getButton('doclang', 'statusbar'); me.btnDocLang = review.getButton('doclang', 'statusbar');
me.btnDocLang.render( me.statusbar.$el.find('#btn-doc-lang') ); me.btnDocLang.render( me.statusbar.$el.find('#btn-doc-lang') );
var transit = me.getApplication().getController('Common.Controllers.Transitions').getView();
me.btnSpelling = transit.getButton('spelling', 'statusbar');
me.btnSpelling.render( me.statusbar.$el.find('#btn-doc-spell') );
me.btnDocLang = transit.getButton('doclang', 'statusbar');
me.btnDocLang.render( me.statusbar.$el.find('#btn-doc-lang') );
} else { } else {
me.statusbar.$el.find('.el-edit, .el-review').hide(); me.statusbar.$el.find('.el-edit, .el-review').hide();
} }

View file

@ -2407,10 +2407,10 @@ define([
me.toolbar.setVisible('review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments); me.toolbar.setVisible('review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments);
}*/ }*/
var tab = {action: 'transit', caption: me.toolbar.textTabTransitions}; var tab = {action: 'transit', caption: me.toolbar.textTabTransitions};
var $panel = me.getApplication().getController('Common.Controllers.Transitions').createToolbarPanel(); var $panel = me.getApplication().getController('Transitions').createToolbarPanel();
if ( $panel ) { if ( $panel ) {
me.toolbar.addTab(tab, $panel, 3); me.toolbar.addTab(tab, $panel, 3);
me.toolbar.setVisible('transit', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments); me.toolbar.setVisible('transit', true);
} }
if ( config.isEdit ) { if ( config.isEdit ) {
me.toolbar.setMode(config); me.toolbar.setMode(config);

View file

@ -38,22 +38,18 @@
* *
*/ */
if (Common === undefined)
var Common = {};
Common.Controllers = Common.Controllers || {};
define([ define([
'core', 'core',
'common/main/lib/view/Transitions', 'presentationeditor/main/app/view/Transitions'
], function () { ], function () {
'use strict'; 'use strict';
Common.Controllers.Transitions = Backbone.Controller.extend(_.extend({ PE.Controllers.Transitions = Backbone.Controller.extend(_.extend({
models : [], models : [],
collections : [ collections : [
], ],
views : [ views : [
'Common.Views.Transitions' 'PE.Views.Transitions'
], ],
sdkViewName : '#id_main', sdkViewName : '#id_main',
@ -64,7 +60,7 @@ define([
'settings:apply': this.applySettings.bind(this) 'settings:apply': this.applySettings.bind(this)
},*/ },*/
'Common.Views.Transitions': { 'PE.Views.Transitions': {
//'transit:accept': _.bind(this.onAcceptClick, this), //'transit:accept': _.bind(this.onAcceptClick, this),
//'transit:reject': _.bind(this.onRejectClick, this), //'transit:reject': _.bind(this.onRejectClick, this),
//'transit:delete': _.bind(this.onDeleteClick, this), //'transit:delete': _.bind(this.onDeleteClick, this),
@ -89,7 +85,6 @@ define([
}); });
}, },
onLaunch: function () { onLaunch: function () {
//this.collection = this.getApplication().getCollection('Common.Collections.ReviewChanges');
this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null /*new AscCommon.CComparisonPr()*/}; this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null /*new AscCommon.CComparisonPr()*/};
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
@ -125,7 +120,7 @@ define([
setMode: function(mode) { setMode: function(mode) {
this.appConfig = mode; this.appConfig = mode;
this.popoverChanges = new Common.Collections.ReviewChanges(); this.popoverChanges = new Common.Collections.ReviewChanges();
this.view = this.createView('Common.Views.Transitions', { mode: mode }); this.view = this.createView('PE.Views.Transitions', { mode: mode });
return this; return this;
}, },
@ -207,7 +202,5 @@ define([
} }
} }
}, PE.Controllers.Transitions || {}));
}, Common.Controllers.Transitions || {}));
}); });

View file

@ -50,11 +50,12 @@ define([
'common/main/lib/component/Button', 'common/main/lib/component/Button',
'common/main/lib/component/DataView', 'common/main/lib/component/DataView',
'common/main/lib/component/Layout', 'common/main/lib/component/Layout',
"SlideSettings",
'common/main/lib/component/Window' 'common/main/lib/component/Window'
], function () { ], function () {
'use strict'; 'use strict';
Common.Views.Transitions = Common.UI.BaseView.extend(_.extend((function(){ PE.Views.Transitions = Common.UI.BaseView.extend(_.extend((function(){
var template = var template =
'<section id="transitions-panel" class="panel" data-tab="transit">' + '<section id="transitions-panel" class="panel" data-tab="transit">' +
//'<div class="separator long sharing"></div>' + //'<div class="separator long sharing"></div>' +
@ -193,83 +194,10 @@ define([
this.fireEvent('show', this); this.fireEvent('show', this);
}, },
getButton: function(type, parent) {
if ( type == 'turn' && parent == 'statusbar' ) {
var button = new Common.UI.Button({
cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-ic-review',
hintAnchor : 'top',
hint : this.tipReview,
split : !this.appConfig.isReviewOnly,
enableToggle: true/*,
menu: this.appConfig.isReviewOnly ? false : new Common.UI.Menu({
menuAlign: 'bl-tl',
style: 'margin-top:-5px;',
items: [
{
caption: this.txtOn,
value: 0,
checkable: true,
toggleGroup: 'menuTurnReviewStb'
},
{
caption: this.txtOff,
value: 1,
checkable: true,
toggleGroup: 'menuTurnReviewStb'
},
{
caption: this.txtOnGlobal,
value: 2,
checkable: true,
toggleGroup: 'menuTurnReviewStb'
},
{
caption: this.txtOffGlobal,
value: 3,
checkable: true,
toggleGroup: 'menuTurnReviewStb'
}
]})*/
});
// this.btnsTurnReview.push(button);
return button;
} else
if ( type == 'spelling' ) {
button = new Common.UI.Button({
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-docspell',
hintAnchor : 'top',
hint: this.tipSetSpelling,
enableToggle: true
});
//this.btnsSpelling.push(button);
return button;
} else if (type == 'doclang' && parent == 'statusbar' ) {
button = new Common.UI.Button({
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-doclang',
hintAnchor : 'top',
hint: this.tipSetDocLang,
disabled: true
});
//this.btnsDocLang.push(button);
return button;
}
},
getUserName: function (username) { getUserName: function (username) {
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username)); return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
}, },
markChanges: function(status) {
},
turnSpelling: function (state) { turnSpelling: function (state) {
}, },
@ -293,6 +221,6 @@ define([
txtCommentResolveMy: 'Resolve My Comments', txtCommentResolveMy: 'Resolve My Comments',
txtCommentResolveAll: 'Resolve All Comments' txtCommentResolveAll: 'Resolve All Comments'
} }
}()), Common.Views.Transitions || {})); }()), PE.Views.Transitions || {}));
}); });

View file

@ -153,7 +153,7 @@ require([
,'Common.Controllers.ExternalDiagramEditor' ,'Common.Controllers.ExternalDiagramEditor'
,'Common.Controllers.ReviewChanges' ,'Common.Controllers.ReviewChanges'
,'Common.Controllers.Protection' ,'Common.Controllers.Protection'
,'Common.Controllers.Transitions' ,'Transitions'
] ]
}); });
@ -189,7 +189,7 @@ require([
,'common/main/lib/controller/Protection' ,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Themes' ,'common/main/lib/controller/Themes'
,'common/main/lib/controller/Desktop' ,'common/main/lib/controller/Desktop'
,'common/main/lib/controller/transitions' ,'presentationeditor/main/app/controller/Transitions'
], function() { ], function() {
window.compareVersions = true; window.compareVersions = true;
app.start(); app.start();