|
Overview
This is a neat way of sending a message to users when iShare GIS is first loaded in the browser. This can be useful for maintenance messages such as:
The popup can either contain plain text or text with a link to a URL e.g.
Remember you are editing the main .aspx page for the iShare GIS application front-end and any typos or incorrect syntax etc. will cause the entire application to fail. We would suggest that, if you have a test instance of iShare GIS, that you first make the change here. |
If you would like help from Astun in adding this feature then this can be done using call off time. |
Load the CSS file of the Flash library inside the <head> section of the iShareGIS.aspx by adding the following line, as shown in the following screen shot.
<link rel="stylesheet" href="custom/css/flashjs/dist/flash.css" type="text/css"> |
Inside the <style> element of the HTML code add one more CSS property as shown in the following screen shot:
.ishare-map-max > body > .not-ishare-map { display: block !important; } |
Load the JS file of the Flash library inside the <head> section of the iShareGIS.aspx by adding the following line
<script src="custom/js/flashjs/dist/flash.min.js"></script> |
<script type="text/javascript"> Event.observe(window, 'load', function() { Astun.JS.IncludeJS('gis', function() { window.astun.app = new Astun.JS.MapApp("#ishare-gis", "gis", { branding: "<h1><a href=\"https://astuntech.atlassian.net/wiki/x/14AgAQ\">iShare GIS</a></h1>" } ); }); /* Add the window.FlashMessage.info in here */ }); </script> |
window.FlashMessage.info('iShare GIS maintenance is scheduled for Fri 16 October. <a href="https://www.yourURL">More info</a>',{ appear_delay: 5000, // Delay before flash message appears progress: true, // Shows progress bar theme: 'default', //available: default, dark timeout: 20000 // Flash message timeout }); |
<script type="text/javascript"> Event.observe(window, 'load', function() { Astun.JS.IncludeJS('gis', function() { window.astun.app = new Astun.JS.MapApp("#ishare-gis", "gis", { branding: "<h1><a href=\"https://astuntech.atlassian.net/wiki/x/14AgAQ\">iShare GIS</a></h1>" } ); }); window.FlashMessage.info('iShare GIS maintenance is scheduled for Fri 16 October. <a href="https://www.yourURL">More info</a>',{ appear_delay: 5000, // Delay before flash message appears progress: true, // Shows progress bar theme: 'default', //available: default, dark timeout: 20000 // Flash message timeout }); }); </script> |
If you wish to turn off this functionality you just need to comment out the window.FlashMessage.info section you added and then it will be there if you need it again e.g.
<script type="text/javascript"> Event.observe(window, 'load', function() { Astun.JS.IncludeJS('gis', function() { window.astun.app = new Astun.JS.MapApp("#ishare-gis", "gis", { branding: "<h1><a href=\"https://astuntech.atlassian.net/wiki/x/14AgAQ\">iShare GIS</a></h1>" } ); }); /* window.FlashMessage.info('iShare GIS maintenance is scheduled for Fri 16 October. <a href="https://www.yourURL">More info</a>',{ appear_delay: 5000, // Delay before flash message appears progress: true, // Shows progress bar theme: 'default', //available: default, dark timeout: 20000 // Flash message timeout }); */ }); </script> |