зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1244584
- Make GCLI tooltip hide after the first run experience r=jwalker
This commit is contained in:
Родитель
ea0acf0476
Коммит
f71ab0d423
|
@ -534,7 +534,8 @@ DeveloperToolbar.prototype.show = function (focus) {
|
|||
if (!DeveloperToolbar.introShownThisSession) {
|
||||
let intro = require("gcli/ui/intro");
|
||||
intro.maybeShowIntro(this.requisition.commandOutputManager,
|
||||
this.requisition.conversionContext);
|
||||
this.requisition.conversionContext,
|
||||
this.outputPanel);
|
||||
DeveloperToolbar.introShownThisSession = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ exports.items = [
|
|||
/**
|
||||
* Called when the UI is ready to add a welcome message to the output
|
||||
*/
|
||||
exports.maybeShowIntro = function(commandOutputManager, conversionContext) {
|
||||
exports.maybeShowIntro = function (commandOutputManager, conversionContext,
|
||||
outputPanel) {
|
||||
var hideIntro = conversionContext.system.settings.get('hideIntro');
|
||||
if (hideIntro.value) {
|
||||
return;
|
||||
|
@ -46,7 +47,7 @@ exports.maybeShowIntro = function(commandOutputManager, conversionContext) {
|
|||
output.type = 'view';
|
||||
commandOutputManager.onOutput({ output: output });
|
||||
|
||||
var viewData = this.createView(null, conversionContext, true);
|
||||
var viewData = this.createView(null, conversionContext, true, outputPanel);
|
||||
|
||||
output.complete({ isTypedData: true, type: 'view', data: viewData });
|
||||
};
|
||||
|
@ -54,7 +55,8 @@ exports.maybeShowIntro = function(commandOutputManager, conversionContext) {
|
|||
/**
|
||||
* Called when the UI is ready to add a welcome message to the output
|
||||
*/
|
||||
exports.createView = function(ignoreArgs, conversionContext, showHideButton) {
|
||||
exports.createView = function (ignoreArgs, conversionContext, showHideButton,
|
||||
outputPanel) {
|
||||
return view.createView({
|
||||
html:
|
||||
'<div save="${mainDiv}">\n' +
|
||||
|
@ -81,7 +83,7 @@ exports.createView = function(ignoreArgs, conversionContext, showHideButton) {
|
|||
var settings = conversionContext.system.settings;
|
||||
var hideIntro = settings.get('hideIntro');
|
||||
hideIntro.value = true;
|
||||
this.mainDiv.style.display = 'none';
|
||||
outputPanel.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче