Hi all,
Here is a sample BSV implementing custom notifications in an Aware IM app (using the new AWESOME EXEC_SCRIPT action).
The sample shows 2 types or notifications, 1 notification bar and 1 notification shown in the middle of the screen and this is only a sample and you can basically customize it however you want and the sample will be a good starting point. PS: I haven´t looked at the quality of the code i.e. the CSS and JS and not looked to see if it interferes with other Aware IM CSS/JS so test it thoroughly before implementing it in a live app.
Just import the BSV, place in testing mode and log on. Press buttons "Notification bar" and "Notification" in top bar (these execute processes that execute the scripts).
Notification bar:
Notification:
Enjoy .
Sample BSV: Notifications
Sample BSV: Notifications
- Attachments
-
- Notifications.bsv.zip
- (35.82 KiB) Downloaded 946 times
Henrik (V8 Developer Ed. - Windows)
Re: Sample BSV: Notifications
Henrik,
great job
thx for sharing this....
great job
thx for sharing this....
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Sample BSV: Notifications
This will be helpful .. thanks Henrik!
Tom - V8.8 build 3137 - MySql / PostGres
Re: Sample BSV: Notifications
Update: Another notificaiton added, this time "inpage" i.e a notification shown inpage (above all else on page) for 5 seconds and then the notification is removed. With this solution you also have 4 different alertboxes with different icons and colors (see the "NotificationInPage" content panel for more info):
You need to place the "alertboxes" folder in the AwareIM folder for the icons to show.
You need to place the "alertboxes" folder in the AwareIM folder for the icons to show.
- Attachments
-
- Notifications2.zip
- (40.03 KiB) Downloaded 918 times
Henrik (V8 Developer Ed. - Windows)
Re: Sample BSV: Notifications
If the code in the SystemSettings.NotificationInpage (initial value) is empty, here is the code you should use and you can change this code to change alertbox type (see NotificationInPage content panel):hpl123 wrote:Update: Another notificaiton added, this time "inpage" i.e a notification shown inpage (above all else on page) for 5 seconds and then the notification is removed. With this solution you also have 4 different alertboxes with different icons and colors (see the "NotificationInPage" content panel for more info):
You need to place the "alertboxes" folder in the AwareIM folder for the icons to show.
Code: Select all
$( ".append" ).append( '<div id="append" class="alert-box2 success2"><span>success: </span>Write your success message here.</div>' );setTimeout(function(){$("#append").remove();},5000);
Henrik (V8 Developer Ed. - Windows)
Re: Sample BSV: Notifications
This is super helpful !! amazing work.
Looking into custom notifications and EXEC_SCRIPT
Would it be hard to implement something like this ? http://alertifyjs.com/notifier/success.html
Looking into custom notifications and EXEC_SCRIPT
Would it be hard to implement something like this ? http://alertifyjs.com/notifier/success.html
Connor
Re: Sample BSV: Notifications
Yeah, the EXEC_SCRIPT is a gamechanger . and a lot of new, cool things can now be done.
Regarding alertify, yes, this should be fairly easy to implement as well. Just follow the instructions on the "Get started" page (to include the alertify source files) and then call the function (s) via EXEC_SCRIPT:
Regarding alertify, yes, this should be fairly easy to implement as well. Just follow the instructions on the "Get started" page (to include the alertify source files) and then call the function (s) via EXEC_SCRIPT:
Code: Select all
alertify.success('Success notification message.');
Henrik (V8 Developer Ed. - Windows)
Re: Sample BSV: Notifications
Thats what i was missing !! trying to include the source files ! thankyou
Connor
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Sample BSV: Notifications
Was wondering if you ever got this to work?
I've included the JS and the CSS to the startup.html but I can't get it to call properly
I've included the JS and the CSS to the startup.html but I can't get it to call properly
Re: Sample BSV: Notifications
Hi,PointsWell wrote:Was wondering if you ever got this to work?
I've included the JS and the CSS to the startup.html but I can't get it to call properly
Have you tried to copy the JS&CSS files in the following folders?
c:\AwareIM\Tomcat\webapps\AwareIM\Custom\CSS\your_bsv_name
c:\AwareIM\Tomcat\webapps\AwareIM\Custom\JS\your_bsv_name
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Sample BSV: Notifications
it would appear that sctipt and script look very similar on a terminal screen - doh!weblike wrote:Have you tried to copy the JS&CSS files in the following folders?