mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 09:22:26 +08:00
[desktop] connection hints with app
This commit is contained in:
@ -137,6 +137,10 @@ define([
|
||||
if (!!_mr[1]) $('#app-title').show();
|
||||
else if (!!_mr[2]) $('#app-title').hide();
|
||||
}
|
||||
} else
|
||||
if (/althints:show/.test(cmd)) {
|
||||
if ( param == /false|hide/.test(param) )
|
||||
Common.NotificationCenter.trigger('hints:clear');
|
||||
}
|
||||
};
|
||||
|
||||
@ -187,6 +191,10 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
var _onHintsShow = function (visible, level) {
|
||||
native.execCommand('althints:show', JSON.stringify(visible && !(level > 0)));
|
||||
}
|
||||
|
||||
return {
|
||||
init: function (opts) {
|
||||
_.extend(config, opts);
|
||||
@ -256,12 +264,13 @@ define([
|
||||
|
||||
Common.NotificationCenter.on({
|
||||
'modal:show': _onModalDialog.bind(this, 'open'),
|
||||
'modal:close': _onModalDialog.bind(this, 'close')
|
||||
, 'uitheme:changed' : function (name) {
|
||||
'modal:close': _onModalDialog.bind(this, 'close'),
|
||||
'uitheme:changed' : function (name) {
|
||||
var theme = Common.UI.Themes.get(name);
|
||||
if ( theme )
|
||||
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
||||
}
|
||||
},
|
||||
'hints:show': _onHintsShow.bind(this),
|
||||
});
|
||||
|
||||
webapp.addListeners({
|
||||
|
||||
@ -171,6 +171,8 @@ Common.UI.HintManager = new(function() {
|
||||
} else {
|
||||
_hintVisible = false;
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('hints:show', _hintVisible, _currentLevel);
|
||||
};
|
||||
|
||||
var _hideHints = function() {
|
||||
@ -179,6 +181,8 @@ Common.UI.HintManager = new(function() {
|
||||
item.remove()
|
||||
});
|
||||
clearInterval(_inputTimer);
|
||||
|
||||
Common.NotificationCenter.trigger('hints:show', false);
|
||||
};
|
||||
|
||||
var _nextLevel = function(level) {
|
||||
|
||||
Reference in New Issue
Block a user