Skip to content
Browse files

Merge pull request #59 from fflorent/issue6056_pull

issue6056: add message "no alias has been defined yet"
  • Loading branch information...
2 parents a3588db + 7f40e3e commit 0ab0a2a436888cc81ba790a3f04150b89a409191 @janodvarko janodvarko committed Nov 16, 2012
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;

0 comments on commit 0ab0a2a

Please sign in to comment.
Something went wrong with that request. Please try again.