[desktop] refactoring
This commit is contained in:
parent
5afb147034
commit
6fe2adf8fd
|
@ -89,7 +89,7 @@ define([
|
|||
thumbCanvas.width = thumbs[thumbIdx].width;
|
||||
|
||||
function CThumbnailLoader() {
|
||||
this.supportBinaryFormat = (window['AscDesktopEditor'] && !window['AscDesktopEditor']['isSupportBinaryFontsSprite']) ? false : true;
|
||||
this.supportBinaryFormat = !(Common.Controllers.Desktop.isActive() && !Common.Controllers.isFeatureAvailable('isSupportBinaryFontsSprite'));
|
||||
|
||||
this.image = null;
|
||||
this.binaryFormat = null;
|
||||
|
@ -132,7 +132,6 @@ define([
|
|||
};
|
||||
|
||||
this.openBinary = function(arrayBuffer) {
|
||||
|
||||
//var t1 = performance.now();
|
||||
|
||||
var binaryAlpha = new Uint8Array(arrayBuffer);
|
||||
|
|
|
@ -1201,7 +1201,7 @@ define([
|
|||
Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines());
|
||||
|
||||
function checkWarns() {
|
||||
if (!window['AscDesktopEditor']) {
|
||||
if (!Common.Controllers.Desktop.isActive()) {
|
||||
var tips = [];
|
||||
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ define([
|
|||
isVisible && (lastSeparator = this.miClose.$el.find('+.devider'));
|
||||
|
||||
this.miDownload[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||
var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false;
|
||||
var isBCSupport = Common.Controllers.Desktop.isActive() ? Common.Controllers.Desktop.call("isBlockchainSupport") : false;
|
||||
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide']();
|
||||
this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||
this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide']();
|
||||
|
|
|
@ -826,7 +826,7 @@ define([
|
|||
me.api.asc_ShowNotes(!value);
|
||||
|
||||
function checkWarns() {
|
||||
if (!window['AscDesktopEditor']) {
|
||||
if (!Common.Controllers.Desktop.isActive()) {
|
||||
var tips = [];
|
||||
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ define([
|
|||
isVisible && (lastSeparator = this.miClose.$el.find('+.devider'));
|
||||
|
||||
this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||
var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false;
|
||||
var isBCSupport = Common.Controllers.Desktop.isActive() ? Common.Controllers.Desktop.call("isBlockchainSupport") : false;
|
||||
this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide']();
|
||||
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||
this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide']();
|
||||
|
|
|
@ -833,7 +833,9 @@ define([
|
|||
});
|
||||
me.slideOnlyControls.push(me.btnInsSlideNum);
|
||||
|
||||
if (window["AscDesktopEditor"] && window["AscDesktopEditor"]["IsSupportMedia"] && window["AscDesktopEditor"]["IsSupportMedia"]()) {
|
||||
if (Common.Controllers.Desktop.isActive() &&
|
||||
Common.Controllers.Desktop.isFeatureAvailable("IsSupportMedia") && Common.Controllers.Desktop.call("IsSupportMedia"))
|
||||
{
|
||||
me.btnInsAudio = new Common.UI.Button({
|
||||
id: 'tlbtn-insaudio',
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
|
|
Loading…
Reference in a new issue