Skip to content

Commit

Permalink
Merge pull request 'feature/for-bug-71088' (#123) from feature/for-bu…
Browse files Browse the repository at this point in the history
…g-71088 into hotfix/v8.2.2
  • Loading branch information
maxkadushkin committed Nov 18, 2024
2 parents e6e56e8 + 5c70983 commit 28c34a9
Showing 1 changed file with 2 additions and 89 deletions.
91 changes: 2 additions & 89 deletions apps/documenteditor/forms/app/controller/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ define([
return;
}
me.api.asc_SendForm();
Common.Controllers.Desktop.process('goback');
Common.Controllers.Desktop.requestClose();
});
me.view.btnDownload.on('click', function(){
if (me.appOptions.canDownload) {
Expand Down Expand Up @@ -2126,93 +2128,4 @@ define([
savingText: 'Saving'

}, DE.Controllers.ApplicationController));

/* var Desktop = function () {
var features = {
version: '{{PRODUCT_VERSION}}',
// eventloading: true,
uitype: 'fillform',
uithemes: true
};
var api, nativevars;
var native = window.desktop || window.AscDesktopEditor;
!!native && native.execCommand('webapps:features', JSON.stringify(features));
if ( !!native ) {
$('#header-logo, .brand-logo').hide();
nativevars = window.RendererProcessVariable;
window.on_native_message = function (cmd, param) {
if (/theme:changed/.test(cmd)) {
if ( Common.UI.Themes && !!Common.UI.Themes.setTheme )
Common.UI.Themes.setTheme(param);
} else
if (/window:features/.test(cmd)) {
var obj = JSON.parse(param);
if ( obj.singlewindow !== undefined ) {
native.features.singlewindow = obj.singlewindow;
$("#title-doc-name")[obj.singlewindow ? 'hide' : 'show']();
}
}
};
if ( !!window.native_message_cmd ) {
for ( var c in window.native_message_cmd ) {
window.on_native_message(c, window.native_message_cmd[c]);
}
}
Common.NotificationCenter.on({
'uitheme:changed' : function (name) {
if (Common.localStorage.getBool('ui-theme-use-system', false)) {
native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'}));
} else {
const theme = Common.UI.Themes.get(name);
if ( theme )
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
}
},
});
Common.Gateway.on('opendocument', function () {
api = DE.getController('ApplicationController').api;
$("#title-doc-name")[native.features.singlewindow ? 'hide' : 'show']();
var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp';
Common.UI.Themes.setAvailable(!is_win_xp);
});
}
return {
isActive: function () {
return !!native;
},
isOffline: function () {
return api && api.asc_isOffline();
},
process: function (opts) {
if ( !!native && !!api ) {
if ( opts == 'goback' ) {
var config = DE.getController('ApplicationController').editorConfig;
native.execCommand('go:folder',
api.asc_isOffline() ? 'offline' : config.customization.goback.url);
return true;
}
}
return false;
},
systemThemeType: function () {
return nativevars.theme && !!nativevars.theme.system ? nativevars.theme.system :
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
},
}
};
*/
// DE.Controllers.Desktop = new Desktop();
// Common.Controllers = Common.Controllers || {};
// Common.Controllers.Desktop = DE.Controllers.Desktop;
});

0 comments on commit 28c34a9

Please sign in to comment.