[desktop] connection hints with app
This commit is contained in:
parent
1817bb2142
commit
1f15df4fee
|
@ -137,6 +137,10 @@ define([
|
||||||
if (!!_mr[1]) $('#app-title').show();
|
if (!!_mr[1]) $('#app-title').show();
|
||||||
else if (!!_mr[2]) $('#app-title').hide();
|
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 {
|
return {
|
||||||
init: function (opts) {
|
init: function (opts) {
|
||||||
_.extend(config, opts);
|
_.extend(config, opts);
|
||||||
|
@ -256,12 +264,13 @@ define([
|
||||||
|
|
||||||
Common.NotificationCenter.on({
|
Common.NotificationCenter.on({
|
||||||
'modal:show': _onModalDialog.bind(this, 'open'),
|
'modal:show': _onModalDialog.bind(this, 'open'),
|
||||||
'modal:close': _onModalDialog.bind(this, 'close')
|
'modal:close': _onModalDialog.bind(this, 'close'),
|
||||||
, 'uitheme:changed' : function (name) {
|
'uitheme:changed' : function (name) {
|
||||||
var theme = Common.UI.Themes.get(name);
|
var theme = Common.UI.Themes.get(name);
|
||||||
if ( theme )
|
if ( theme )
|
||||||
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
||||||
}
|
},
|
||||||
|
'hints:show': _onHintsShow.bind(this),
|
||||||
});
|
});
|
||||||
|
|
||||||
webapp.addListeners({
|
webapp.addListeners({
|
||||||
|
|
|
@ -171,6 +171,8 @@ Common.UI.HintManager = new(function() {
|
||||||
} else {
|
} else {
|
||||||
_hintVisible = false;
|
_hintVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common.NotificationCenter.trigger('hints:show', _hintVisible, _currentLevel);
|
||||||
};
|
};
|
||||||
|
|
||||||
var _hideHints = function() {
|
var _hideHints = function() {
|
||||||
|
@ -179,6 +181,8 @@ Common.UI.HintManager = new(function() {
|
||||||
item.remove()
|
item.remove()
|
||||||
});
|
});
|
||||||
clearInterval(_inputTimer);
|
clearInterval(_inputTimer);
|
||||||
|
|
||||||
|
Common.NotificationCenter.trigger('hints:show', false);
|
||||||
};
|
};
|
||||||
|
|
||||||
var _nextLevel = function(level) {
|
var _nextLevel = function(level) {
|
||||||
|
|
Loading…
Reference in a new issue