Create button preview
This commit is contained in:
parent
5abe22fa6e
commit
8e67fbc9a5
|
@ -995,7 +995,8 @@ define([
|
|||
review: true,
|
||||
viewport: true,
|
||||
documentHolder: true,
|
||||
toolbar: true
|
||||
toolbar: true,
|
||||
transit:true
|
||||
}, temp ? 'reconnect' : 'disconnect');
|
||||
},
|
||||
|
||||
|
|
|
@ -57,37 +57,19 @@ define([
|
|||
|
||||
this.addListeners({
|
||||
/*'FileMenu': {
|
||||
'settings:apply': this.applySettings.bind(this)
|
||||
'settings:apply': this.applySettings.bind(this),
|
||||
},*/
|
||||
|
||||
'PE.Views.Transitions': {
|
||||
//'transit:accept': _.bind(this.onAcceptClick, this),
|
||||
//'transit:reject': _.bind(this.onRejectClick, this),
|
||||
//'transit:delete': _.bind(this.onDeleteClick, this),
|
||||
//'transit:preview': _.bind(this.onBtnPreviewClick, this),
|
||||
//'transit:view': _.bind(this.onReviewViewClick, this),
|
||||
//'transit:compare': _.bind(this.onCompareClick, this),
|
||||
//'lang:document': _.bind(this.onDocLanguage, this)
|
||||
/*,
|
||||
'collaboration:coauthmode': _.bind(this.onCoAuthMode, this)*/
|
||||
},
|
||||
'Common.Views.ReviewChangesDialog': {
|
||||
//'transit:accept': _.bind(this.onAcceptClick, this),
|
||||
//'transit:reject': _.bind(this.onRejectClick, this),
|
||||
//'transit:preview': _.bind(this.onBtnPreviewClick, this)
|
||||
},
|
||||
'Common.Views.ReviewPopover': {
|
||||
//'transit:accept': _.bind(this.onAcceptClick, this),
|
||||
//'transit:reject': _.bind(this.onRejectClick, this),
|
||||
//'transit:delete': _.bind(this.onDeleteClick, this),
|
||||
//'transit:goto': _.bind(this.onGotoClick, this)
|
||||
'transit:preview': _.bind(this.onPreviewClick, this)
|
||||
}
|
||||
});
|
||||
},
|
||||
onLaunch: function () {
|
||||
this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null /*new AscCommon.CComparisonPr()*/};
|
||||
this._state = {};
|
||||
//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));
|
||||
},
|
||||
setConfig: function (data, api) {
|
||||
this.setApi(api);
|
||||
|
@ -99,21 +81,13 @@ define([
|
|||
return this;
|
||||
},
|
||||
setApi: function (api) {
|
||||
this.api = api;
|
||||
if (api) {
|
||||
this.api = api;
|
||||
|
||||
/*if (this.appConfig.canReview || this.appConfig.canViewReview) {
|
||||
this.api.asc_registerCallback('asc_onShowRevisionsChange', _.bind(this.onApiShowChange, this));
|
||||
this.api.asc_registerCallback('asc_onUpdateRevisionsChangesPosition', _.bind(this.onApiUpdateChangePosition, this));
|
||||
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
if (this.api) {
|
||||
this.api.SetInterfaceDrawImagePlaceSlide('slide-texture-img');
|
||||
//this.api.asc_registerCallback('asc_onInitStandartTextures', _.bind(this.onInitStandartTextures, this));
|
||||
}
|
||||
if (this.appConfig.canReview)
|
||||
this.api.asc_registerCallback('asc_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));*/
|
||||
//this.api.asc_registerCallback('asc_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this));
|
||||
//this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
||||
|
||||
// Common.Gateway.on('setrevisedfile', _.bind(this.setRevisedFile, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -130,9 +104,9 @@ define([
|
|||
},
|
||||
|
||||
SetDisabled: function(state) {
|
||||
if (this.dlgChanges)
|
||||
/*if (this.dlgChanges)
|
||||
this.dlgChanges.close();
|
||||
this.view && this.view.SetDisabled(state, this.langs);
|
||||
this.view && this.view.SetDisabled(state, this.langs);*/
|
||||
//this.setPreviewMode(state);
|
||||
},
|
||||
|
||||
|
@ -200,7 +174,14 @@ define([
|
|||
me.view.btnCommentRemove && me.view.btnCommentRemove.setDisabled(!Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true));
|
||||
me.view.btnCommentResolve && me.view.btnCommentResolve.setDisabled(!Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true));
|
||||
}
|
||||
},
|
||||
onPreviewClick: function()
|
||||
{
|
||||
alert("hf,jnftn");
|
||||
if (this.api) {
|
||||
alert("api");
|
||||
this.api.SlideTransitionPlay();
|
||||
}
|
||||
}
|
||||
|
||||
}, PE.Controllers.Transitions || {}));
|
||||
});
|
|
@ -50,7 +50,8 @@ define([
|
|||
'common/main/lib/component/Button',
|
||||
'common/main/lib/component/DataView',
|
||||
'common/main/lib/component/Layout',
|
||||
"SlideSettings",
|
||||
'presentationeditor/main/app/view/SlideSettings',
|
||||
'common/main/lib/component/MetricSpinner',
|
||||
'common/main/lib/component/Window'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
@ -59,6 +60,9 @@ define([
|
|||
var template =
|
||||
'<section id="transitions-panel" class="panel" data-tab="transit">' +
|
||||
//'<div class="separator long sharing"></div>' +
|
||||
'<div class="group">' +
|
||||
'<span class="btn-slot text x-huge" id="transit-button-preview"></span>' +
|
||||
'</div>' +
|
||||
'<div class="group">' +
|
||||
'<span class="btn-slot text x-huge slot-comment"></span>' +
|
||||
'<span class="btn-slot text x-huge" id="slot-comment-remove"></span>' +
|
||||
|
@ -71,7 +75,18 @@ define([
|
|||
|
||||
function setEvents() {
|
||||
var me = this;
|
||||
if (this.btnCommentRemove) {
|
||||
if(this.btnPreview)
|
||||
{
|
||||
this.btnPreview.on('click', _.bind(function(btn){
|
||||
/* alert("hf,jnftn");
|
||||
if (this.api) {
|
||||
alert("api");
|
||||
this.api.SlideTransitionPlay();
|
||||
}*/
|
||||
this.fireEvent('transit:preview', [me.btnPreview]);
|
||||
}, this));
|
||||
}
|
||||
/*if (this.btnCommentRemove) {
|
||||
this.btnCommentRemove.on('click', function (e) {
|
||||
me.fireEvent('comment:removeComments', ['current']);
|
||||
});
|
||||
|
@ -88,7 +103,7 @@ define([
|
|||
this.btnCommentResolve.menu.on('item:click', function (menu, item, e) {
|
||||
me.fireEvent('comment:resolveComments', [item.value]);
|
||||
});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -102,7 +117,12 @@ define([
|
|||
this.appConfig = options.mode;
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
|
||||
this.btnPreview = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtPreview,
|
||||
split: false,
|
||||
iconCls: 'toolbar__icon btn-rem-comment'
|
||||
});
|
||||
this.btnCommentRemove = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtCommentRemove,
|
||||
|
@ -183,6 +203,7 @@ define([
|
|||
|
||||
getPanel: function () {
|
||||
this.$el = $(_.template(template)( {} ));
|
||||
this.btnPreview && this.btnPreview.render(this.$el.find('#transit-button-preview'));
|
||||
this.btnCommentRemove && this.btnCommentRemove.render(this.$el.find('#slot-comment-remove'));
|
||||
this.btnCommentResolve && this.btnCommentResolve.render(this.$el.find('#slot-comment-resolve'));
|
||||
|
||||
|
@ -202,10 +223,14 @@ define([
|
|||
|
||||
},
|
||||
SetDisabled: function (state, langs) {
|
||||
//this.btnPreview && this.btnPreview.setDisabled(state|| !Common.Utils.InternalSettings.get())
|
||||
this.btnCommentRemove && this.btnCommentRemove.setDisabled(state || !Common.Utils.InternalSettings.get(this.appPrefix + "settings-livecomment"));
|
||||
this.btnCommentResolve && this.btnCommentResolve.setDisabled(state || !Common.Utils.InternalSettings.get(this.appPrefix + "settings-livecomment"));
|
||||
},
|
||||
|
||||
txtSec:'s',
|
||||
txtPreview:'Preview',
|
||||
|
||||
txtCommentRemove: 'Remove',
|
||||
tipCommentRemCurrent: 'Remove current comments',
|
||||
tipCommentRem: 'Remove comments',
|
||||
|
|
Loading…
Reference in a new issue