Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Synced minima.js and .ts, MinimaCreateNotification parameter correcti…
Browse files Browse the repository at this point in the history
…on with bgcolor
  • Loading branch information
eliasnemr committed May 26, 2021
1 parent 5b8f917 commit 3f393f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/minima.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function httpPostAsync(theUrl, params, callback){
try {
callback(JSON.parse(xmlHttp.responseText));
} catch (err) {
Minima.notify(err);
Minima.notify(err, '#BEB25B');
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/minima.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ const Minima = {
/**
* Notify the user with a Pop up message
*/
notify : function (message: string, bgcolor: string): void {
notify : function (message: string, bgcolor?: string): void {
//Log it..
Minima.log("Notify : "+message);

Expand Down Expand Up @@ -807,7 +807,11 @@ function httpPostAsync(theUrl: string, params: string, callback: Callback): void

//Send it to the callback function..
if (callback) {
callback(JSON.parse(xmlHttp.responseText));
try {
callback(JSON.parse(xmlHttp.responseText));
} catch (err) {
Minima.notify(err, '#BEB25B');
}
}
}
}
Expand Down Expand Up @@ -849,7 +853,7 @@ function httpGetAsync(theUrl: string, callback: (jsonresp: any) => void, logenab
/**
* Notifications
*/
function MinimaCreateNotification(text: string, bgcolor: string = "#bbbbbb"): void {
function MinimaCreateNotification(text: string, bgcolor?: string): void {
//First add the total overlay div
const notifydiv = document.createElement('div');

Expand Down

0 comments on commit 3f393f0

Please sign in to comment.