Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

issue6056: add message "no alias has been defined yet" #59

Merged
merged 1 commit into from

2 participants

@fflorent
Owner

See http://code.google.com/p/fbug/issues/detail?id=6056#c17 (point 1).

The message format is similar to "(nothing to ouput)" as suggested Simon: https://github.com/fflorent/firebug/compare/issue6056#commitcomment-2131672

@janodvarko janodvarko merged commit 0ab0a2a into firebug:master
@janodvarko
Owner

Tested and works for me, thanks!
Honza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 14, 2012
  1. @fflorent
This page is out of date. Refresh to see the latest.
View
11 extension/content/firebug/chrome/reps.js
@@ -103,6 +103,17 @@ FirebugReps.Null = domplate(Firebug.Rep,
// ********************************************************************************************* //
+FirebugReps.Hint = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX("$object"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ className: "hint",
+});
+
+// ********************************************************************************************* //
+
FirebugReps.Nada = domplate(Firebug.Rep,
{
tag: SPAN(""),
View
10 extension/content/firebug/console/commandLineInclude.js
@@ -96,6 +96,14 @@ var CommandLineIncludeRep = domplate(FirebugReps.Table,
var store = CommandLineInclude.getStore();
var keys = store.getKeys();
var arrayToDisplay = [];
+ var returnValue = Firebug.Console.getDefaultReturnValue(context.window);
+
+ if (keys.length === 0)
+ {
+ var msg = Locale.$STR("commandline.include.noDefinedAlias");
+ Firebug.Console.log(msg, context, null, FirebugReps.Hint);
+ return returnValue;
+ }
for (var i=0; i<keys.length; i++)
{
@@ -108,7 +116,7 @@ var CommandLineIncludeRep = domplate(FirebugReps.Table,
var input = new CommandLineIncludeObject();
this.log(arrayToDisplay, ["alias", "URL"], context, input);
- return Firebug.Console.getDefaultReturnValue(context.window);
+ return returnValue;
},
deleteAlias: function(aliasName, ev)
View
9 extension/content/firebug/console/console.js
@@ -41,17 +41,20 @@ Firebug.ConsoleBase =
logFormatted: function(objects, context, className, noThrottle, sourceLink)
{
Events.dispatch(this.fbListeners,"logFormatted",[context, objects, className, sourceLink]);
- return this.logRow(appendFormatted, objects, context, className, null, sourceLink, noThrottle);
+ return this.logRow(appendFormatted, objects, context, className, null, sourceLink,
+ noThrottle);
},
openGroup: function(objects, context, className, rep, noThrottle, sourceLink, noPush)
{
- return this.logRow(appendOpenGroup, objects, context, className, rep, sourceLink, noThrottle);
+ return this.logRow(appendOpenGroup, objects, context, className, rep, sourceLink,
+ noThrottle);
},
openCollapsedGroup: function(objects, context, className, rep, noThrottle, sourceLink, noPush)
{
- return this.logRow(appendCollapsedGroup, objects, context, className, rep, sourceLink, noThrottle);
+ return this.logRow(appendCollapsedGroup, objects, context, className, rep, sourceLink,
+ noThrottle);
},
closeGroup: function(context, noThrottle)
View
3  extension/locale/en-US/firebug.properties
@@ -815,6 +815,9 @@ commandline.include.wrongUrlArgument=Wrong url argument; expected string or null
# %S = the name of the alias to delete
commandline.include.confirmDelete=Do you really want to delete this alias : "%S" ?
+# LOCALIZATION NOTE (commandline.include.noDefinedAlias): For the include() function. This message is displayed
+# when the user wants to display the aliases table but there no alias is defined.
+commandline.include.noDefinedAlias=(no alias has been defined yet)
commandline.tip.Delete_Alias=Delete the alias
commandline.tip.Edit_Alias_Name=Edit the name of the alias
View
1  extension/skin/classic/console.css
@@ -160,6 +160,7 @@
.objectBox-null,
.objectBox-undefined,
+.objectBox-hint,
.logRowHint {
font-style: italic;
color: #787878;
Something went wrong with that request. Please try again.