Skip to content

Commit

Permalink
Alerts now work.
Browse files Browse the repository at this point in the history
git-svn-id: https://foxtrick.googlecode.com/svn/trunk@194 1e3807c3-0949-0410-b78e-337b627472c1
  • Loading branch information
pav committed Dec 16, 2008
1 parent 225ab66 commit 8ce8825
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion content/forum/forumtemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var FoxtrickForumTemplates = {
if ( FoxtrickPrefs.addPrefToList( FoxtrickForumTemplates._TEMPLATES_PREFLIST, text ) )
FoxtrickForumTemplates._appendTemplate( doc, text );
else
alert( Foxtrickl10n.getString( 'template_exists' ) );
Foxtrick.alert( Foxtrickl10n.getString( 'template_exists' ) );
},

_removeTemplate : function( ev ) {
Expand Down
6 changes: 6 additions & 0 deletions content/foxtrick.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ Foxtrick.confirmDialog = function(msg) {
return promptService.confirm(null, null, msg);
}

Foxtrick.alert = function( msg ) {
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
return promptService.alert(null, null, msg);
}

Foxtrick.trim = function (text) {
return text.replace(/^\s+/, "").replace(/\s+$/, '');
}
Expand Down
2 changes: 1 addition & 1 deletion content/preferences-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var FoxtrickPreferencesDialog = {
document.getElementById('htLanguage').selectedIndex=itemToSelect;

} catch (e) {
alert(e);
Foxtrick.alert(e);
}
},

Expand Down
3 changes: 2 additions & 1 deletion content/resources/css/preferences-dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@

#shortcuts_list .description, #forum_list .description, #links_list .description {
font-style: italic;
}
font-size: 0.7em;
}
4 changes: 2 additions & 2 deletions content/resources/js/matchorders.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FoxtrickMatchOrders = {
this.switchPlayers("LeftWing", "RightWing");
this.switchPlayers("Forward1", "Forward2");
} catch (e) {
alert(e);
Foxtrick.alert(e);
}
},

Expand Down Expand Up @@ -116,4 +116,4 @@ FoxtrickMatchOrders = {
}
}

};
};
2 changes: 1 addition & 1 deletion content/resources/js/transferform.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ FoxtrickTransferListSearchFormFiller = {
}
}
} catch (e) {
alert (e);
Foxtrick.alert (e);
}
},

Expand Down
13 changes: 11 additions & 2 deletions locale/en-US/foxtrick.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ foxtrick.AddLeaveConfButton.desc=Adds a 'Leave Conference' button to each forum
foxtrick.StarsCounter.desc=Adds the total number of stars to the match lineup page
foxtrick.MoveLinks.desc=Moves the manager's league and flag links to the message header. Note: the 'Show avatar' function in Hattrick must be switched on for this to work!
foxtrick.Matches.desc=Adds attack/defense and ratings (hatstats and others) to the match page
foxtrick.BookmarkAdjust.desc=Change the icon associated to a bookmark inserting in the bookmark comment the correspondent code in square bracket: es [cyan] will show the cyan icon. Possible values: aqua, B, black, blue, brown, cyan, darkpurple, green, idea, lightblue, lightgreen, orange, pink, purple, red, white, yellow
foxtrick.FoxtrickAlert.desc=Gives you a growl notification on hattrick news
foxtrick.BookmarkAdjust.desc=Change the icon associated to a bookmark inserting in the bookmark comment the correspondent code in square bracket: e.g. [cyan] will show the cyan icon. Possible values: aqua, B, black, blue, brown, cyan, darkpurple, green, idea, lightblue, lightgreen, orange, pink, purple, red, white, yellow
foxtrick.FoxtrickAlert.desc=Displays a pop-up notification with hattrick news ticker events, even when you are doing something else at the moment
foxtrick.MedianTransferPrice.desc=Shows a median transfer price in transfer compare
foxtrick.YouthSkillNotes.desc=Allows editing youth players' skills and have them displayed just as it is for senior team members
foxtrick.FlipSidesInMatchOrders.desc=Allows quick flipping of pitch sides on match orders page
foxtrick.FormationBoxInMatchOrders.desc=Displays a box with current formation on match orders page
foxtrick.FlagCollectionToMap.desc=Shows a world map with all the countries which flags you have collected in each category
foxtrick.TransferListSearchFilters.desc=Allows for transfer list search filter templates
foxtrick.TeamPopupLinks.desc=Displays a small pop-up window with quick links when you hover over a teamid link
foxtrick.ForumStaffMarker.desc=Marks staff members' nicks on the forums


# menu
foxtrick.menu.configurefoxtrick=Configure Foxtrick
Expand Down

0 comments on commit 8ce8825

Please sign in to comment.