├── .gitignore ├── LICENSE ├── README.md ├── apexplugin.json ├── dist ├── js │ ├── apex-session-timeout.js │ ├── apex-session-timeout.min.js │ └── maps │ │ └── apex-session-timeout.min.js.map └── plsql │ └── pl-sql-code.sql ├── dynamic_action_plugin_com_skllbuilders_session_timeout.sql ├── gulpfile.js ├── lib └── idle-timer │ └── js │ └── idle-timer.min.js ├── package-lock.json ├── package.json ├── preview.png └── src ├── js └── apex-session-timeout.js └── plsql └── pl-sql-code.sql /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 SkillBuilders 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SkillBuilders Session Timeout Plugin For APEX 2 | For a while now APEX has had a `Maximum Session Idle Time in Seconds` attribute in the Security Settings of an application. As one might imagine, this setting allows developers to kill a user’s session if the user has been idle for a certain amount of time. The problem, however, is that the implementation of this feature is purely server side (which is good from a security perspective). 3 | 4 | 5 | Usually when this type of functionality is added to a site, say a bank’s web site, there’s some client side behavior added in addition to the server side behavior. This client side functionality may let a user know that their session has expired or even warn a user before it does. The SkillBuilders Session Timeout plug-in adds this type of client side behavior to APEX applications quickly and easily. 6 | 7 | ## Features at a Glance 8 | 9 | - Configurable [timeout actions](#session-timeout-action) including alert, redirect, and logout 10 | 11 | 12 | - Optional and configurable warning message 13 | - Option to keep session alive if user isn’t truly idle. Special thanks to Martin D’Souza for a great idea on how to implement this feature. 14 | 15 | ## Version History 16 | 17 | - **1.0.0 - 02/21/2012:** Initial release 18 | - **1.0.1 - 03/17/2012:** Fixed bug that raised “ORA-01008: not all variables bound” exception on some systems 19 | - **1.3.0 - 08/11/2017:** Added 5.1 compatability 20 | - **1.4.0 - 07/19/2019:** Fixed min version file references 21 | 22 | ## Installation and Configuration 23 | 24 | #### Installation 25 | 26 | Install the plugin file: `dynamic_action_type_plugin_com_skillbuilders_session_timeout.sql` 27 | 28 | Navigate to **Shared Components > Plugins** and click **Import >**. From there you can follow the menu to upload and install the plugin using the file above. After the plugin has been installed successfully you will be redirected to the plugin edit screen. There is a Settings region on the page that allows you to change how the plugin works (see Settings below). 29 | 30 | #### Configuration 31 | 32 | Configuration of the session idle time is done via the security settings of the application. Navigate to **Shared Components > Security Attributes** and look for `Maximum Session Idle Time in Seconds` and `Session Idle Timeout URL`. Set those settings as you would like before configuring the plugin. 33 | 34 | Add a `Global Page` to your application if it doesn’t already exist. `A Global Page` is unique in that anything added to it is added to all pages in an application – including Dynamic Actions. Navigate to the `Global Page` and follow the steps below: 35 | 36 | 1. Create a new Dynamic Action 37 | 1. Enter any name you would like to use e.g. Idle Session Handler 38 | 1. Set Event to `Page Load` 39 | 1. Add a true action `SkillBuilders Session Timeout[Plug-in]` 40 | 1. Add the server side condition PL/SQL Expression: `apex_page.get_page_mode(:APP_ID,:APP_PAGE_ID) = 'NORMAL'`. This prevents the dynamic action from being added to modal or popup pages. 41 | 42 | 43 | ## Settings 44 | 45 | ##### Application Settings 46 | Application settings are used to configure all instances of a plugin within an application. These settings are accessed by editing the plugin within the Shared Components. This plug in has the following application settings: 47 | 48 | ##### Session Timeout Action 49 | 50 | Use this setting to control what action the plugin should perform when the user’s idle time expires. 51 | 52 | * **Alert (default)** - will display an alert message on the screen when the user’s session expires. After dismissing the alert message, the user will be redirected to the URL specified in the `Session Idle Timeout URL` attribute in the security settings of the application. 53 | If no value has been specified for that attribute then the user will be redirected to the URL defined in the `Home Link` attribute. 54 | 55 | * **Redirect** - will redirect the user to the URL specified in the `Session Idle Timeout URL` attribute in the security settings of the application. If no value has been specified for that attribute then the user will be redirected to the URL defined in the `Home Link` attribute. 56 | 57 | * **Logout** - will redirect the user to the `Logout URL` defined in the applications authentication scheme. If no Logout URL is defined then the following value will be used: `apex_authentication.logout?p_app_id=&APP_ID.&p_session_id=&SESSION.` 58 | 59 | ##### Session Timeout Message 60 | 61 | Use this setting to configure the messaged displayed to the user when their session expires. This setting will only be available if the Session Timeout Action is set to Alert. 62 | 63 | ##### Mask Browser Screen on Timeout 64 | 65 | Use this setting to spec if whether or not the contents of the screen should be hidden when the user’s session expires. This setting will only be available if the Session Timeout Action is set to Alert. 66 | 67 | ##### Session Idle Warning 68 | 69 | Use this setting to choose whether or not the user should receive a warning message prior to their session expiring. 70 | 71 | ##### Session Idle Title 72 | 73 | Use this setting to specify what title should be used for the modal dialog displayed to the user prior to their session expiring. This setting will only be available if the Session Idle Warning is set to Yes. 74 | 75 | ##### Session Idle Message 76 | 77 | Use this setting to specify what message should be displayed to the user prior to their session expiring. This setting will only be available if the Session Idle Warning is set to Yes. 78 | 79 | ##### Show Warning Seconds Before 80 | 81 | Use this setting to specify the number of seconds before the user’s session expires that the warning message should be displayed. This setting will only be available if the Session Idle Warning is set to Yes. 82 | 83 | ##### Keep Session Alive 84 | 85 | If there is any client side activity then the server will be notified and the current timeout duration will be reset. Use this if you would like to periodically refresh the users session without needing to submit the page 86 | 87 | ## License 88 | MIT © [SkillBuilders](http://skillbuilders.com) 89 | -------------------------------------------------------------------------------- /apexplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "SkillBuilders Session Timeout", 3 | "version" : "1.4.0", 4 | "description" : "For a while now APEX has had a “Maximum Session Idle Time in Seconds” attribute in the Security Settings of an application. . The SkillBuilders Session Timeout plug-in adds this type of client side behavior to APEX applications quickly and easily.", 5 | "keywords" : ["oracle","apex","Timeout", "Session", "Idle", "Time", "Security"], 6 | "homepage" : "https://github.com/SkillBuilders/session-timeout", 7 | "bugs" : { 8 | "url" : "https://github.com/SkillBuilders/session-timeout/issues", 9 | "email" : "plugins@skillbuilders.com" 10 | }, 11 | "license" : "MIT", 12 | "author" : { 13 | "name" : "SkillBuilders", 14 | "email" : "plugins@skillbuilders.com", 15 | "url" : "http://www.skillbuilders.com" 16 | }, 17 | "repository" : { 18 | "type" : "git", 19 | "url" : "https://github.com/SkillBuilders/session-timeout" 20 | }, 21 | "oracle" : { 22 | "versions" : ["11.2.0.1", "12.1.0.1","12.1.0.2.0"], 23 | "apex" : { 24 | "versions" : ["5.1.0"], 25 | "plugin" : { 26 | "internalName" : "COM.SKILLBUILDERS.SESSION.TIMEOUT", 27 | "type" : "dynamic action", 28 | "demo" : "https://apex.oracle.com/pls/apex/f?p=44923", 29 | "previewImage" : "https://raw.githubusercontent.com/SkillBuilders/session-timeout/master/preview.png" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /dist/js/apex-session-timeout.js: -------------------------------------------------------------------------------- 1 | (function($, plugin){ 2 | "use strict"; 3 | $.widget('apex.apex_session_timeout', { 4 | options:{ 5 | timeoutAction: null, 6 | timeoutMessage: null, 7 | timeoutURL: null, 8 | logoutURL: null, 9 | showWarning: null, 10 | showWarningMiliBefore: null, 11 | showWarningTitle: null, 12 | showWarningMessage: null, 13 | hideHistory:false, 14 | sessionIdleDuration: null, 15 | maskBrowser: null, 16 | ajaxIdentifier: null, 17 | keepSessionAlive : null, 18 | debug: true //$('#pdebug').length !== 0 //true boolean for === 19 | }, 20 | _create: function(){ 21 | var uiw = this; 22 | 23 | apex.debug('Session Timeout: _create (start)'); 24 | 25 | apex.debug('...Options'); 26 | if (uiw.options.debug){ 27 | for (name in uiw.options) { 28 | apex.debug('......' + name + ': "' + uiw.options[name] + '"'); 29 | } 30 | } 31 | 32 | uiw._createPrivateStorage(); 33 | 34 | uiw._startTimers(); 35 | 36 | if(uiw.options.keepSessionAlive){ 37 | uiw._startIdleMonitor(); 38 | uiw._startPingTimer(); 39 | } 40 | 41 | apex.debug('Session Timeout: _create (end)'); 42 | }, 43 | _startPingTimer: function(){ 44 | var uiw = this; 45 | 46 | apex.debug('Session Timeout: _startSessionPingTimer (start)'); 47 | 48 | uiw._values.pingID = setTimeout(function(){ 49 | uiw._handlePing(); 50 | }, uiw._values.pingFrequency); 51 | 52 | apex.debug('Session Timeout: _startSessionPingTimer (end)'); 53 | }, 54 | _startIdleMonitor: function(){ 55 | var uiw = this; 56 | 57 | apex.debug('Session Timeout: _startIdleMonitor (start)'); 58 | 59 | $.idleTimer(uiw._values.checkIdleFrequency); 60 | 61 | $(document).bind("idle.idleTimer", function(){ 62 | apex.debug('Session Timeout: session inactive!'); 63 | }); 64 | 65 | $(document).bind("active.idleTimer", function(){ 66 | apex.debug('Session Timeout: session active!)'); 67 | uiw._pingSession(); 68 | }); 69 | 70 | apex.debug('Session Timeout: _startIdleMonitor (end)'); 71 | }, 72 | _createPrivateStorage: function() { 73 | var uiw = this; 74 | 75 | apex.debug('Session Timeout: _createPrivateStorage (start)'); 76 | 77 | uiw._values = { 78 | docTitle : document.title, 79 | titleBlinkIntervalID: null, 80 | titleBlinkInterval: 8000, 81 | warningID: null, 82 | timeoutID: null, 83 | pingID: null, 84 | checkIdleFrequency: 60000, 85 | pingFrequency: 60000, 86 | isWarned:false, 87 | timeoutActionEnum : { 88 | ALERT : 'ALERT', 89 | REDIRECT : 'REDIRECT', 90 | LOGOUT : 'LOGOUT' 91 | } 92 | }; 93 | 94 | uiw._elements = { 95 | $dialog: {} 96 | }; 97 | 98 | apex.debug('Session Timeout: _createPrivateStorage (end)'); 99 | }, 100 | _startTimers: function(){ 101 | var uiw = this; 102 | 103 | apex.debug('Session Timeout: startTimer (start)'); 104 | 105 | if (uiw.options.showWarning){ 106 | uiw._values.warningID = setTimeout(function(){ 107 | uiw._warn(); 108 | }, uiw.options.sessionIdleDuration - uiw.options.showWarningMiliBefore); 109 | apex.debug('...initializing warning timeout('+ uiw._values.warningID +')'); 110 | } 111 | 112 | uiw._values.timeoutID = setTimeout(function(){ uiw._handleExpiredSession(); },uiw.options.sessionIdleDuration); 113 | apex.debug('...initializing idle timeout('+ uiw._values.timeoutID +')'); 114 | 115 | apex.debug('Session Timeout: startTimer (end)'); 116 | }, 117 | _stopTimers: function(){ 118 | var uiw = this; 119 | 120 | apex.debug('Session Timeout: _stopTimers (start)'); 121 | 122 | if(uiw.options.keepSessionAlive && uiw._values.timeoutID && uiw._values.timeoutID !== null){ 123 | apex.debug('...clearng idle timeout('+ uiw._values.timeoutID +')'); 124 | clearTimeout(uiw._values.timeoutID); 125 | uiw._values.timeoutID = null; 126 | } 127 | 128 | if (uiw.options.showWarning && uiw._values.warningID && uiw._values.warningID !== null){ 129 | apex.debug('...clearng warning timeout('+ uiw._values.warningID +')'); 130 | clearTimeout(uiw._values.warningID); 131 | uiw._values.warningID = null; 132 | } 133 | 134 | apex.debug('Session Timeout: _stopTimers (end)'); 135 | }, 136 | _handleExpiredSession: function(){ 137 | var uiw = this; 138 | 139 | apex.debug('Session Timeout: _handleExpiredSession (start)'); 140 | 141 | if(uiw.options.maskBrowser){ 142 | uiw._showMask(); 143 | } 144 | 145 | setTimeout(function(){ 146 | uiw._expireAction(); 147 | }, 100); 148 | 149 | apex.debug('Session Timeout: _handleExpiredSession (end)'); 150 | }, 151 | _expireAction: function(){ 152 | var uiw = this; 153 | 154 | apex.debug('Session Timeout: _expireAction (start)'); 155 | 156 | if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.ALERT) { 157 | alert(uiw.options.timeoutMessage); 158 | uiw._redirect(uiw.options.timeoutURL); 159 | } else if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.REDIRECT) { 160 | uiw._redirect(uiw.options.timeoutURL); 161 | } else if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.LOGOUT) { 162 | uiw._redirect(uiw.options.logoutURL); 163 | } 164 | 165 | apex.debug('Session Timeout: _expireAction (end)'); 166 | }, 167 | _warn: function(){ 168 | var uiw = this; 169 | 170 | apex.debug('Session Timeout: _warn (start)'); 171 | 172 | var dialogHtml = 173 | '
' + 174 | '

'+ uiw.options.showWarningMessage +'

' + 175 | '
'; 176 | 177 | $('body').append( dialogHtml ); 178 | uiw._elements.$dialog = $('.session-timeout-container'); 179 | 180 | uiw._elements.$dialog.dialog({ 181 | disabled: false, 182 | autoOpen: true, 183 | buttons: { "Ok": function() { $(this).dialog("close"); } }, 184 | closeOnEscape: true, 185 | closeText: 'Close', 186 | dialogClass: 'session-timeout-dialog', 187 | draggable: true, 188 | height: 'auto', 189 | hide: null, 190 | maxhHeight: false, 191 | maxWidth: false, 192 | minHeight: 100, 193 | minWidth: 200, 194 | modal: true, 195 | resizable: false, 196 | show: null, 197 | stack: true, 198 | title: uiw.options.showWarningTitle, 199 | close: function() { 200 | uiw._closeWarning(); 201 | } 202 | }); 203 | 204 | uiw._startTitleBlink(); 205 | uiw._values.isWarned = true; 206 | 207 | if(uiw.options.keepSessionAlive){ 208 | $.idleTimer('destroy'); 209 | } 210 | 211 | apex.debug('Session Timeout: _warn (end)'); 212 | }, 213 | _closeWarning: function(){ 214 | var uiw = this; 215 | 216 | apex.debug('Session Timeout: _closeWarning (start)'); 217 | 218 | uiw._elements.$dialog.dialog('destroy'); 219 | uiw._elements.$dialog.remove(); 220 | uiw._stopBlink(); 221 | uiw._stopTimers(); 222 | uiw._values.isWarned = false; 223 | 224 | if(uiw.options.keepSessionAlive){ 225 | uiw._pingSession(); 226 | uiw._startIdleMonitor(); 227 | } 228 | 229 | apex.debug('Session Timeout: _closeWarning (end)'); 230 | }, 231 | _startTitleBlink: function(){ 232 | var uiw = this; 233 | 234 | apex.debug('Session Timeout: _startTitleBlink (start)'); 235 | 236 | uiw._titleBlink(); 237 | uiw._values.titleBlinkIntervalID = setInterval(function(){ 238 | uiw._titleBlink(); 239 | }, uiw._values.titleBlinkInterval); 240 | 241 | apex.debug('Session Timeout: _startTitleBlink (end)'); 242 | }, 243 | _titleBlink: function(){ 244 | var uiw = this; 245 | 246 | apex.debug('Session Timeout: _titleBlink (start)'); 247 | 248 | document.title = uiw.options.showWarningTitle; 249 | setTimeout(function(){ 250 | document.title = uiw._values.docTitle; 251 | }, 500); 252 | 253 | apex.debug('Session Timeout: _titleBlink (end)'); 254 | }, 255 | _stopBlink: function(){ 256 | var uiw = this; 257 | 258 | apex.debug('Session Timeout: _stopBlink (start)'); 259 | 260 | document.title = uiw._values.docTitle; 261 | clearInterval(uiw._values.titleBlinkIntervalID); 262 | 263 | apex.debug('Session Timeout: _stopBlink (end)'); 264 | }, 265 | _redirect: function(url){ 266 | var uiw = this; 267 | 268 | apex.debug('Session Timeout: _redirect (start)'); 269 | 270 | if (uiw.options.hideHistory) { 271 | window.location.replace(url); 272 | } else { 273 | window.location.href = url; 274 | } 275 | 276 | apex.debug('Session Timeout: _redirect (end)'); 277 | }, 278 | _showMask: function(){ 279 | var uiw = this; 280 | var maskHeight = $(document).height(); 281 | var maskWidth = $(window).width(); 282 | var $mask = $(document.createElement('div')).attr('id','session-timeout-mask').css({ 283 | 'width' : maskWidth, 284 | 'height' : maskHeight 285 | }); 286 | 287 | apex.debug('Session Timeout: _showMask (start)'); 288 | apex.debug('...maskHeight:' + maskHeight); 289 | apex.debug('...maskWidth:' + maskWidth); 290 | 291 | $('body').append($mask); 292 | 293 | $(window).resize(function(){ 294 | var maskHeight = $(document).height(); 295 | var maskWidth = $(window).width(); 296 | 297 | $('#session-timeout-mask').css({'width':maskWidth,'height':maskHeight}); 298 | }); 299 | 300 | apex.debug('Session Timeout: _showMask (end)'); 301 | }, 302 | _handlePing: function(){ 303 | var uiw = this; 304 | 305 | apex.debug('Session Timeout: _handlePing (start)'); 306 | 307 | if($.data(document,'idleTimer') === 'active'){ 308 | apex.debug('session is active. Refreshing server session'); 309 | uiw._pingSession(); 310 | }else{ 311 | apex.debug('session is inactive. Do not refresh server session.'); 312 | } 313 | apex.debug('Session Timeout: _handlePing (end)'); 314 | }, 315 | _pingSession: function(){ 316 | var uiw = this; 317 | 318 | apex.debug('Session Timeout: _pingSession (start)'); 319 | 320 | plugin( 321 | uiw.options.ajaxIdentifier, 322 | {}, 323 | { 324 | dataType: 'text', 325 | success: function(data){ 326 | apex.debug('Ajax request successful'); 327 | clearTimeout(uiw._values.pingID); 328 | uiw._startPingTimer(); 329 | uiw._stopTimers(); 330 | uiw._startTimers(); 331 | } 332 | } 333 | ); 334 | 335 | apex.debug('Session Timeout: _pingSession (end)'); 336 | } 337 | }); 338 | })( apex.jQuery, apex.server.plugin ); -------------------------------------------------------------------------------- /dist/js/apex-session-timeout.min.js: -------------------------------------------------------------------------------- 1 | !function(n,e){"use strict";n.widget("apex.apex_session_timeout",{options:{timeoutAction:null,timeoutMessage:null,timeoutURL:null,logoutURL:null,showWarning:null,showWarningMiliBefore:null,showWarningTitle:null,showWarningMessage:null,hideHistory:!1,sessionIdleDuration:null,maskBrowser:null,ajaxIdentifier:null,keepSessionAlive:null,debug:!0},_create:function(){var e=this;if(apex.debug("Session Timeout: _create (start)"),apex.debug("...Options"),e.options.debug)for(name in e.options)apex.debug("......"+name+': "'+e.options[name]+'"');e._createPrivateStorage(),e._startTimers(),e.options.keepSessionAlive&&(e._startIdleMonitor(),e._startPingTimer()),apex.debug("Session Timeout: _create (end)")},_startPingTimer:function(){var e=this;apex.debug("Session Timeout: _startSessionPingTimer (start)"),e._values.pingID=setTimeout(function(){e._handlePing()},e._values.pingFrequency),apex.debug("Session Timeout: _startSessionPingTimer (end)")},_startIdleMonitor:function(){var e=this;apex.debug("Session Timeout: _startIdleMonitor (start)"),n.idleTimer(e._values.checkIdleFrequency),n(document).bind("idle.idleTimer",function(){apex.debug("Session Timeout: session inactive!")}),n(document).bind("active.idleTimer",function(){apex.debug("Session Timeout: session active!)"),e._pingSession()}),apex.debug("Session Timeout: _startIdleMonitor (end)")},_createPrivateStorage:function(){apex.debug("Session Timeout: _createPrivateStorage (start)"),this._values={docTitle:document.title,titleBlinkIntervalID:null,titleBlinkInterval:8e3,warningID:null,timeoutID:null,pingID:null,checkIdleFrequency:6e4,pingFrequency:6e4,isWarned:!1,timeoutActionEnum:{ALERT:"ALERT",REDIRECT:"REDIRECT",LOGOUT:"LOGOUT"}},this._elements={$dialog:{}},apex.debug("Session Timeout: _createPrivateStorage (end)")},_startTimers:function(){var e=this;apex.debug("Session Timeout: startTimer (start)"),e.options.showWarning&&(e._values.warningID=setTimeout(function(){e._warn()},e.options.sessionIdleDuration-e.options.showWarningMiliBefore),apex.debug("...initializing warning timeout("+e._values.warningID+")")),e._values.timeoutID=setTimeout(function(){e._handleExpiredSession()},e.options.sessionIdleDuration),apex.debug("...initializing idle timeout("+e._values.timeoutID+")"),apex.debug("Session Timeout: startTimer (end)")},_stopTimers:function(){var e=this;apex.debug("Session Timeout: _stopTimers (start)"),e.options.keepSessionAlive&&e._values.timeoutID&&null!==e._values.timeoutID&&(apex.debug("...clearng idle timeout("+e._values.timeoutID+")"),clearTimeout(e._values.timeoutID),e._values.timeoutID=null),e.options.showWarning&&e._values.warningID&&null!==e._values.warningID&&(apex.debug("...clearng warning timeout("+e._values.warningID+")"),clearTimeout(e._values.warningID),e._values.warningID=null),apex.debug("Session Timeout: _stopTimers (end)")},_handleExpiredSession:function(){var e=this;apex.debug("Session Timeout: _handleExpiredSession (start)"),e.options.maskBrowser&&e._showMask(),setTimeout(function(){e._expireAction()},100),apex.debug("Session Timeout: _handleExpiredSession (end)")},_expireAction:function(){var e=this;apex.debug("Session Timeout: _expireAction (start)"),e.options.timeoutAction===e._values.timeoutActionEnum.ALERT?(alert(e.options.timeoutMessage),e._redirect(e.options.timeoutURL)):e.options.timeoutAction===e._values.timeoutActionEnum.REDIRECT?e._redirect(e.options.timeoutURL):e.options.timeoutAction===e._values.timeoutActionEnum.LOGOUT&&e._redirect(e.options.logoutURL),apex.debug("Session Timeout: _expireAction (end)")},_warn:function(){var e=this;apex.debug("Session Timeout: _warn (start)");var i='

'+e.options.showWarningMessage+"

";n("body").append(i),e._elements.$dialog=n(".session-timeout-container"),e._elements.$dialog.dialog({disabled:!1,autoOpen:!0,buttons:{Ok:function(){n(this).dialog("close")}},closeOnEscape:!0,closeText:"Close",dialogClass:"session-timeout-dialog",draggable:!0,height:"auto",hide:null,maxhHeight:!1,maxWidth:!1,minHeight:100,minWidth:200,modal:!0,resizable:!1,show:null,stack:!0,title:e.options.showWarningTitle,close:function(){e._closeWarning()}}),e._startTitleBlink(),e._values.isWarned=!0,e.options.keepSessionAlive&&n.idleTimer("destroy"),apex.debug("Session Timeout: _warn (end)")},_closeWarning:function(){var e=this;apex.debug("Session Timeout: _closeWarning (start)"),e._elements.$dialog.dialog("destroy"),e._elements.$dialog.remove(),e._stopBlink(),e._stopTimers(),e._values.isWarned=!1,e.options.keepSessionAlive&&(e._pingSession(),e._startIdleMonitor()),apex.debug("Session Timeout: _closeWarning (end)")},_startTitleBlink:function(){var e=this;apex.debug("Session Timeout: _startTitleBlink (start)"),e._titleBlink(),e._values.titleBlinkIntervalID=setInterval(function(){e._titleBlink()},e._values.titleBlinkInterval),apex.debug("Session Timeout: _startTitleBlink (end)")},_titleBlink:function(){var e=this;apex.debug("Session Timeout: _titleBlink (start)"),document.title=e.options.showWarningTitle,setTimeout(function(){document.title=e._values.docTitle},500),apex.debug("Session Timeout: _titleBlink (end)")},_stopBlink:function(){apex.debug("Session Timeout: _stopBlink (start)"),document.title=this._values.docTitle,clearInterval(this._values.titleBlinkIntervalID),apex.debug("Session Timeout: _stopBlink (end)")},_redirect:function(e){apex.debug("Session Timeout: _redirect (start)"),this.options.hideHistory?window.location.replace(e):window.location.href=e,apex.debug("Session Timeout: _redirect (end)")},_showMask:function(){var e=n(document).height(),i=n(window).width(),t=n(document.createElement("div")).attr("id","session-timeout-mask").css({width:i,height:e});apex.debug("Session Timeout: _showMask (start)"),apex.debug("...maskHeight:"+e),apex.debug("...maskWidth:"+i),n("body").append(t),n(window).resize(function(){var e=n(document).height(),i=n(window).width();n("#session-timeout-mask").css({width:i,height:e})}),apex.debug("Session Timeout: _showMask (end)")},_handlePing:function(){apex.debug("Session Timeout: _handlePing (start)"),"active"===n.data(document,"idleTimer")?(apex.debug("session is active. Refreshing server session"),this._pingSession()):apex.debug("session is inactive. Do not refresh server session."),apex.debug("Session Timeout: _handlePing (end)")},_pingSession:function(){var i=this;apex.debug("Session Timeout: _pingSession (start)"),e(i.options.ajaxIdentifier,{},{dataType:"text",success:function(e){apex.debug("Ajax request successful"),clearTimeout(i._values.pingID),i._startPingTimer(),i._stopTimers(),i._startTimers()}}),apex.debug("Session Timeout: _pingSession (end)")}})}(apex.jQuery,apex.server.plugin); 2 | //# sourceMappingURL=maps/apex-session-timeout.min.js.map 3 | -------------------------------------------------------------------------------- /dist/js/maps/apex-session-timeout.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["apex-session-timeout.js"],"names":["$","plugin","widget","options","timeoutAction","timeoutMessage","timeoutURL","logoutURL","showWarning","showWarningMiliBefore","showWarningTitle","showWarningMessage","hideHistory","sessionIdleDuration","maskBrowser","ajaxIdentifier","keepSessionAlive","debug","_create","uiw","this","apex","name","_createPrivateStorage","_startTimers","_startIdleMonitor","_startPingTimer","_values","pingID","setTimeout","_handlePing","pingFrequency","idleTimer","checkIdleFrequency","document","bind","_pingSession","docTitle","title","titleBlinkIntervalID","titleBlinkInterval","warningID","timeoutID","isWarned","timeoutActionEnum","ALERT","REDIRECT","LOGOUT","_elements","$dialog","_warn","_handleExpiredSession","_stopTimers","clearTimeout","_showMask","_expireAction","alert","_redirect","dialogHtml","append","dialog","disabled","autoOpen","buttons","Ok","closeOnEscape","closeText","dialogClass","draggable","height","hide","maxhHeight","maxWidth","minHeight","minWidth","modal","resizable","show","stack","close","_closeWarning","_startTitleBlink","remove","_stopBlink","_titleBlink","setInterval","clearInterval","url","window","location","replace","href","maskHeight","maskWidth","width","$mask","createElement","attr","css","resize","data","dataType","success","jQuery","server"],"mappings":"CAAA,SAAUA,EAAGC,GACV,aACAD,EAAEE,OAAO,4BAA6B,CACnCC,QAAQ,CACLC,cAAe,KACfC,eAAgB,KAChBC,WAAY,KACZC,UAAW,KACXC,YAAa,KACbC,sBAAuB,KACvBC,iBAAkB,KAClBC,mBAAoB,KACpBC,aAAY,EACZC,oBAAqB,KACrBC,YAAa,KACbC,eAAgB,KAChBC,iBAAmB,KACnBC,OAAO,GAEVC,QAAS,WACN,IAAIC,EAAMC,KAKV,GAHAC,KAAKJ,MAAM,oCAEXI,KAAKJ,MAAM,cACPE,EAAIhB,QAAQc,MACb,IAAKK,QAAQH,EAAIhB,QACdkB,KAAKJ,MAAM,SAAWK,KAAO,MAAQH,EAAIhB,QAAQmB,MAAQ,KAI/DH,EAAII,wBAEJJ,EAAIK,eAEDL,EAAIhB,QAAQa,mBACZG,EAAIM,oBACJN,EAAIO,mBAGPL,KAAKJ,MAAM,mCAEdS,gBAAiB,WACd,IAAIP,EAAMC,KAEVC,KAAKJ,MAAM,mDAEXE,EAAIQ,QAAQC,OAASC,WAAW,WAC7BV,EAAIW,eACJX,EAAIQ,QAAQI,eAEfV,KAAKJ,MAAM,kDAEdQ,kBAAmB,WAChB,IAAIN,EAAMC,KAEVC,KAAKJ,MAAM,8CAEXjB,EAAEgC,UAAUb,EAAIQ,QAAQM,oBAExBjC,EAAEkC,UAAUC,KAAK,iBAAkB,WAChCd,KAAKJ,MAAM,wCAGdjB,EAAEkC,UAAUC,KAAK,mBAAoB,WACjCd,KAAKJ,MAAM,qCACXE,EAAIiB,iBAGRf,KAAKJ,MAAM,6CAEdM,sBAAuB,WAGpBF,KAAKJ,MAAM,kDAFDG,KAINO,QAAU,CACXU,SAAWH,SAASI,MACpBC,qBAAsB,KACtBC,mBAAoB,IACpBC,UAAW,KACXC,UAAW,KACXd,OAAQ,KACRK,mBAAoB,IACpBF,cAAe,IACfY,UAAS,EACTC,kBAAoB,CACjBC,MAAQ,QACRC,SAAW,WACXC,OAAS,WAjBL3B,KAqBN4B,UAAY,CACbC,QAAS,IAGZ5B,KAAKJ,MAAM,iDAEdO,aAAc,WACX,IAAIL,EAAMC,KAEVC,KAAKJ,MAAM,uCAEPE,EAAIhB,QAAQK,cACbW,EAAIQ,QAAQc,UAAYZ,WAAW,WAChCV,EAAI+B,SACJ/B,EAAIhB,QAAQU,oBAAsBM,EAAIhB,QAAQM,uBACjDY,KAAKJ,MAAM,mCAAoCE,EAAIQ,QAAQc,UAAW,MAGzEtB,EAAIQ,QAAQe,UAAYb,WAAW,WAAYV,EAAIgC,yBAA2BhC,EAAIhB,QAAQU,qBAC1FQ,KAAKJ,MAAM,gCAAiCE,EAAIQ,QAAQe,UAAW,KAEnErB,KAAKJ,MAAM,sCAEdmC,YAAa,WACV,IAAIjC,EAAMC,KAEVC,KAAKJ,MAAM,wCAERE,EAAIhB,QAAQa,kBAAoBG,EAAIQ,QAAQe,WAAuC,OAA1BvB,EAAIQ,QAAQe,YACxErB,KAAKJ,MAAM,2BAA4BE,EAAIQ,QAAQe,UAAW,KAC3DW,aAAalC,EAAIQ,QAAQe,WACzBvB,EAAIQ,QAAQe,UAAY,MAGvBvB,EAAIhB,QAAQK,aAAeW,EAAIQ,QAAQc,WAAuC,OAA1BtB,EAAIQ,QAAQc,YACjEpB,KAAKJ,MAAM,8BAA+BE,EAAIQ,QAAQc,UAAW,KACjEY,aAAalC,EAAIQ,QAAQc,WACzBtB,EAAIQ,QAAQc,UAAY,MAG3BpB,KAAKJ,MAAM,uCAEdkC,sBAAuB,WACpB,IAAIhC,EAAMC,KAEVC,KAAKJ,MAAM,kDAERE,EAAIhB,QAAQW,aACZK,EAAImC,YAGPzB,WAAW,WACRV,EAAIoC,iBACJ,KAEHlC,KAAKJ,MAAM,iDAEdsC,cAAe,WACZ,IAAIpC,EAAMC,KAEVC,KAAKJ,MAAM,0CAEPE,EAAIhB,QAAQC,gBAAkBe,EAAIQ,QAAQiB,kBAAkBC,OAC7DW,MAAMrC,EAAIhB,QAAQE,gBAClBc,EAAIsC,UAAUtC,EAAIhB,QAAQG,aAClBa,EAAIhB,QAAQC,gBAAkBe,EAAIQ,QAAQiB,kBAAkBE,SACpE3B,EAAIsC,UAAUtC,EAAIhB,QAAQG,YAClBa,EAAIhB,QAAQC,gBAAkBe,EAAIQ,QAAQiB,kBAAkBG,QACpE5B,EAAIsC,UAAUtC,EAAIhB,QAAQI,WAG7Bc,KAAKJ,MAAM,yCAEdiC,MAAO,WACJ,IAAI/B,EAAMC,KAEVC,KAAKJ,MAAM,kCAEX,IAAIyC,EACD,0DACUvC,EAAIhB,QAAQQ,mBAAqB,aAG9CX,EAAE,QAAQ2D,OAAQD,GAClBvC,EAAI6B,UAAUC,QAAUjD,EAAE,8BAE1BmB,EAAI6B,UAAUC,QAAQW,OAAO,CAC1BC,UAAU,EACVC,UAAU,EACVC,QAAS,CAAEC,GAAM,WAAahE,EAAEoB,MAAMwC,OAAO,WAC7CK,eAAe,EACfC,UAAW,QACXC,YAAa,yBACbC,WAAW,EACXC,OAAQ,OACRC,KAAM,KACNC,YAAY,EACZC,UAAU,EACVC,UAAW,IACXC,SAAU,IACVC,OAAO,EACPC,WAAW,EACXC,KAAM,KACNC,OAAO,EACPxC,MAAOnB,EAAIhB,QAAQO,iBACnBqE,MAAO,WACJ5D,EAAI6D,mBAIV7D,EAAI8D,mBACJ9D,EAAIQ,QAAQgB,UAAW,EAEpBxB,EAAIhB,QAAQa,kBACZhB,EAAEgC,UAAU,WAGfX,KAAKJ,MAAM,iCAEd+D,cAAe,WACZ,IAAI7D,EAAMC,KAEVC,KAAKJ,MAAM,0CAEXE,EAAI6B,UAAUC,QAAQW,OAAO,WAC7BzC,EAAI6B,UAAUC,QAAQiC,SACtB/D,EAAIgE,aACJhE,EAAIiC,cACJjC,EAAIQ,QAAQgB,UAAW,EAEpBxB,EAAIhB,QAAQa,mBACZG,EAAIiB,eACJjB,EAAIM,qBAGPJ,KAAKJ,MAAM,yCAEdgE,iBAAkB,WACf,IAAI9D,EAAMC,KAEVC,KAAKJ,MAAM,6CAEXE,EAAIiE,cACJjE,EAAIQ,QAAQY,qBAAuB8C,YAAY,WAC5ClE,EAAIiE,eACJjE,EAAIQ,QAAQa,oBAEfnB,KAAKJ,MAAM,4CAEdmE,YAAa,WACV,IAAIjE,EAAMC,KAEVC,KAAKJ,MAAM,wCAEXiB,SAASI,MAAQnB,EAAIhB,QAAQO,iBAC7BmB,WAAW,WACRK,SAASI,MAAQnB,EAAIQ,QAAQU,UAC7B,KAEHhB,KAAKJ,MAAM,uCAEdkE,WAAY,WAGT9D,KAAKJ,MAAM,uCAEXiB,SAASI,MAJClB,KAIWO,QAAQU,SAC7BiD,cALUlE,KAKQO,QAAQY,sBAE1BlB,KAAKJ,MAAM,sCAEdwC,UAAW,SAAS8B,GAGjBlE,KAAKJ,MAAM,sCAFDG,KAIFjB,QAAQS,YACb4E,OAAOC,SAASC,QAAQH,GAExBC,OAAOC,SAASE,KAAOJ,EAG1BlE,KAAKJ,MAAM,qCAEdqC,UAAW,WACR,IACIsC,EAAa5F,EAAEkC,UAAUmC,SACzBwB,EAAY7F,EAAEwF,QAAQM,QACtBC,EAAQ/F,EAAEkC,SAAS8D,cAAc,QAAQC,KAAK,KAAK,wBAAwBC,IAAI,CAChFJ,MAAUD,EACVxB,OAAWuB,IAGdvE,KAAKJ,MAAM,sCACXI,KAAKJ,MAAM,iBAAmB2E,GAC9BvE,KAAKJ,MAAM,gBAAkB4E,GAE7B7F,EAAE,QAAQ2D,OAAOoC,GAEjB/F,EAAEwF,QAAQW,OAAO,WACd,IAAIP,EAAa5F,EAAEkC,UAAUmC,SACzBwB,EAAY7F,EAAEwF,QAAQM,QAE1B9F,EAAE,yBAAyBkG,IAAI,CAACJ,MAAQD,EAAUxB,OAASuB,MAG9DvE,KAAKJ,MAAM,qCAEda,YAAa,WAGVT,KAAKJ,MAAM,wCAEyB,WAAjCjB,EAAEoG,KAAKlE,SAAS,cAChBb,KAAKJ,MAAM,gDALJG,KAMHgB,gBAEJf,KAAKJ,MAAM,uDAEdI,KAAKJ,MAAM,uCAEdmB,aAAc,WACX,IAAIjB,EAAMC,KAEVC,KAAKJ,MAAM,yCAEXhB,EACGkB,EAAIhB,QAAQY,eACZ,GACA,CACGsF,SAAU,OACVC,QAAS,SAASF,GACf/E,KAAKJ,MAAM,2BACXoC,aAAalC,EAAIQ,QAAQC,QACzBT,EAAIO,kBACJP,EAAIiC,cACJjC,EAAIK,kBAKbH,KAAKJ,MAAM,0CA9UpB,CAiVII,KAAKkF,OAAQlF,KAAKmF,OAAOvG","file":"../apex-session-timeout.min.js","sourcesContent":["(function($, plugin){\r\n \"use strict\";\r\n $.widget('apex.apex_session_timeout', {\r\n options:{\r\n timeoutAction: null,\r\n timeoutMessage: null,\r\n timeoutURL: null,\r\n logoutURL: null,\r\n showWarning: null,\r\n showWarningMiliBefore: null,\r\n showWarningTitle: null,\r\n showWarningMessage: null,\r\n hideHistory:false,\r\n sessionIdleDuration: null,\r\n maskBrowser: null,\r\n ajaxIdentifier: null,\r\n keepSessionAlive : null,\r\n debug: true //$('#pdebug').length !== 0 //true boolean for ===\r\n },\r\n _create: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _create (start)');\r\n\r\n apex.debug('...Options');\r\n if (uiw.options.debug){\r\n for (name in uiw.options) {\r\n apex.debug('......' + name + ': \"' + uiw.options[name] + '\"');\r\n }\r\n }\r\n \r\n uiw._createPrivateStorage();\r\n \r\n uiw._startTimers();\r\n \r\n if(uiw.options.keepSessionAlive){\r\n uiw._startIdleMonitor();\r\n uiw._startPingTimer();\r\n }\r\n\r\n apex.debug('Session Timeout: _create (end)');\r\n },\r\n _startPingTimer: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _startSessionPingTimer (start)');\r\n \t\t\r\n uiw._values.pingID = setTimeout(function(){ \r\n uiw._handlePing(); \r\n }, uiw._values.pingFrequency);\r\n \t\t\r\n apex.debug('Session Timeout: _startSessionPingTimer (end)');\r\n },\r\n _startIdleMonitor: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _startIdleMonitor (start)');\r\n\r\n $.idleTimer(uiw._values.checkIdleFrequency);\r\n\r\n $(document).bind(\"idle.idleTimer\", function(){\r\n apex.debug('Session Timeout: session inactive!');\r\n });\r\n \r\n $(document).bind(\"active.idleTimer\", function(){\r\n apex.debug('Session Timeout: session active!)');\r\n uiw._pingSession();\r\n });\t\r\n \r\n apex.debug('Session Timeout: _startIdleMonitor (end)');\t\r\n },\r\n _createPrivateStorage: function() {\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _createPrivateStorage (start)');\r\n \t\t\r\n uiw._values = {\r\n docTitle : document.title,\r\n titleBlinkIntervalID: null,\r\n titleBlinkInterval: 8000,\r\n warningID: null,\r\n timeoutID: null,\r\n pingID: null,\r\n checkIdleFrequency: 60000,\r\n pingFrequency: 60000,\r\n isWarned:false,\r\n timeoutActionEnum : {\r\n ALERT : 'ALERT',\r\n REDIRECT : 'REDIRECT',\r\n LOGOUT : 'LOGOUT'\r\n }\r\n };\r\n \r\n uiw._elements = {\r\n $dialog: {}\r\n };\r\n \r\n apex.debug('Session Timeout: _createPrivateStorage (end)');\r\n },\r\n _startTimers: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: startTimer (start)');\r\n \r\n if (uiw.options.showWarning){\r\n uiw._values.warningID = setTimeout(function(){\r\n uiw._warn();\r\n }, uiw.options.sessionIdleDuration - uiw.options.showWarningMiliBefore);\r\n apex.debug('...initializing warning timeout('+ uiw._values.warningID +')');\r\n }\r\n \r\n uiw._values.timeoutID = setTimeout(function(){ uiw._handleExpiredSession(); },uiw.options.sessionIdleDuration);\r\n apex.debug('...initializing idle timeout('+ uiw._values.timeoutID +')');\r\n \t\t\r\n apex.debug('Session Timeout: startTimer (end)');\r\n },\r\n _stopTimers: function(){\r\n var uiw = this;\r\n \t\r\n apex.debug('Session Timeout: _stopTimers (start)');\r\n \r\n if(uiw.options.keepSessionAlive && uiw._values.timeoutID && uiw._values.timeoutID !== null){\r\n apex.debug('...clearng idle timeout('+ uiw._values.timeoutID +')');\r\n clearTimeout(uiw._values.timeoutID);\r\n uiw._values.timeoutID = null;\r\n }\r\n \r\n if (uiw.options.showWarning && uiw._values.warningID && uiw._values.warningID !== null){\r\n apex.debug('...clearng warning timeout('+ uiw._values.warningID +')');\r\n clearTimeout(uiw._values.warningID);\r\n uiw._values.warningID = null;\r\n }\r\n \r\n apex.debug('Session Timeout: _stopTimers (end)');\r\n },\r\n _handleExpiredSession: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _handleExpiredSession (start)');\r\n\r\n if(uiw.options.maskBrowser){\r\n uiw._showMask();\r\n }\r\n \r\n setTimeout(function(){ \r\n uiw._expireAction();\r\n }, 100); \r\n \r\n apex.debug('Session Timeout: _handleExpiredSession (end)');\r\n },\r\n _expireAction: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _expireAction (start)');\r\n\r\n if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.ALERT) {\r\n alert(uiw.options.timeoutMessage);\r\n uiw._redirect(uiw.options.timeoutURL);\r\n } else if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.REDIRECT) {\r\n uiw._redirect(uiw.options.timeoutURL);\r\n } else if (uiw.options.timeoutAction === uiw._values.timeoutActionEnum.LOGOUT) {\r\n uiw._redirect(uiw.options.logoutURL);\r\n }\r\n \r\n apex.debug('Session Timeout: _expireAction (end)');\r\n },\r\n _warn: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _warn (start)');\r\n \t\t\r\n var dialogHtml = \r\n '
' + \r\n '

'+ uiw.options.showWarningMessage +'

' + \r\n '
';\t\t\r\n \t\t\t\r\n $('body').append( dialogHtml );\r\n uiw._elements.$dialog = $('.session-timeout-container'); \r\n \r\n uiw._elements.$dialog.dialog({\r\n disabled: false,\r\n autoOpen: true,\r\n buttons: { \"Ok\": function() { $(this).dialog(\"close\"); } },\r\n closeOnEscape: true,\r\n closeText: 'Close',\r\n dialogClass: 'session-timeout-dialog',\r\n draggable: true,\r\n height: 'auto',\r\n hide: null,\r\n maxhHeight: false,\r\n maxWidth: false,\r\n minHeight: 100,\r\n minWidth: 200,\r\n modal: true,\r\n resizable: false,\r\n show: null,\r\n stack: true,\r\n title: uiw.options.showWarningTitle,\r\n close: function() {\r\n uiw._closeWarning();\r\n }\r\n });\r\n\r\n uiw._startTitleBlink();\r\n uiw._values.isWarned = true;\r\n \r\n if(uiw.options.keepSessionAlive){\r\n $.idleTimer('destroy');\r\n }\r\n \r\n apex.debug('Session Timeout: _warn (end)');\r\n },\r\n _closeWarning: function(){\r\n var uiw = this;\r\n \t\t\r\n apex.debug('Session Timeout: _closeWarning (start)');\r\n \r\n uiw._elements.$dialog.dialog('destroy');\r\n uiw._elements.$dialog.remove();\r\n uiw._stopBlink();\r\n uiw._stopTimers();\r\n uiw._values.isWarned = false;\r\n \t\t\r\n if(uiw.options.keepSessionAlive){\r\n uiw._pingSession();\r\n uiw._startIdleMonitor();\r\n }\r\n \r\n apex.debug('Session Timeout: _closeWarning (end)');\r\n },\r\n _startTitleBlink: function(){\r\n var uiw = this;\r\n\r\n apex.debug('Session Timeout: _startTitleBlink (start)');\r\n\r\n uiw._titleBlink();\r\n uiw._values.titleBlinkIntervalID = setInterval(function(){ \r\n uiw._titleBlink(); \r\n }, uiw._values.titleBlinkInterval);\r\n \r\n apex.debug('Session Timeout: _startTitleBlink (end)');\r\n },\r\n _titleBlink: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _titleBlink (start)'); \r\n \r\n document.title = uiw.options.showWarningTitle;\r\n setTimeout(function(){ \r\n document.title = uiw._values.docTitle; \r\n }, 500);\r\n \r\n apex.debug('Session Timeout: _titleBlink (end)');\r\n },\r\n _stopBlink: function(){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _stopBlink (start)');\r\n \r\n document.title = uiw._values.docTitle;\r\n clearInterval(uiw._values.titleBlinkIntervalID);\r\n\r\n apex.debug('Session Timeout: _stopBlink (end)');\r\n },\r\n _redirect: function(url){\r\n var uiw = this;\r\n \r\n apex.debug('Session Timeout: _redirect (start)');\r\n \r\n if (uiw.options.hideHistory) {\r\n window.location.replace(url);\r\n } else {\r\n window.location.href = url;\r\n } \r\n \r\n apex.debug('Session Timeout: _redirect (end)');\r\n },\r\n _showMask: function(){\r\n var uiw = this;\r\n var maskHeight = $(document).height();\r\n var maskWidth = $(window).width();\r\n var $mask = $(document.createElement('div')).attr('id','session-timeout-mask').css({\r\n 'width' : maskWidth,\r\n 'height' : maskHeight\r\n });\r\n\r\n apex.debug('Session Timeout: _showMask (start)');\r\n apex.debug('...maskHeight:' + maskHeight);\r\n apex.debug('...maskWidth:' + maskWidth);\r\n\r\n $('body').append($mask);\r\n\r\n $(window).resize(function(){ \r\n var maskHeight = $(document).height();\r\n var maskWidth = $(window).width();\r\n\r\n $('#session-timeout-mask').css({'width':maskWidth,'height':maskHeight});\r\n });\r\n \r\n apex.debug('Session Timeout: _showMask (end)');\r\n },\r\n _handlePing: function(){\r\n var uiw = this;\r\n\r\n apex.debug('Session Timeout: _handlePing (start)'); \r\n \r\n if($.data(document,'idleTimer') === 'active'){\r\n apex.debug('session is active. Refreshing server session');\r\n uiw._pingSession();\r\n }else{\r\n apex.debug('session is inactive. Do not refresh server session.');\r\n }\r\n apex.debug('Session Timeout: _handlePing (end)'); \r\n },\r\n _pingSession: function(){\r\n var uiw = this;\r\n\r\n apex.debug('Session Timeout: _pingSession (start)');\r\n \r\n plugin(\r\n uiw.options.ajaxIdentifier,\r\n {},\r\n {\r\n dataType: 'text',\r\n success: function(data){\r\n apex.debug('Ajax request successful');\r\n clearTimeout(uiw._values.pingID);\r\n uiw._startPingTimer();\r\n uiw._stopTimers();\r\n uiw._startTimers();\r\n }\r\n }\r\n ); \r\n \r\n apex.debug('Session Timeout: _pingSession (end)');\r\n }\r\n });\r\n})( apex.jQuery, apex.server.plugin );"]} -------------------------------------------------------------------------------- /dist/plsql/pl-sql-code.sql: -------------------------------------------------------------------------------- 1 | FUNCTION render_session_timeout ( 2 | p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION, 3 | p_plugin IN APEX_PLUGIN.T_PLUGIN 4 | ) 5 | 6 | RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT 7 | 8 | IS 9 | 10 | l_result APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT; 11 | l_timeoutAction VARCHAR2(4000); 12 | l_timeoutMessage VARCHAR2(500); 13 | l_timeoutURL VARCHAR2(4000); 14 | l_logoutURL VARCHAR2(4000); 15 | l_showWarning BOOLEAN; 16 | l_showWarningMiliBefore NUMBER; 17 | l_showWarningTitle VARCHAR2(50); 18 | l_showWarningMessage VARCHAR2(500); 19 | l_hideHistory BOOLEAN; 20 | l_sessionIdleDuration NUMBER; 21 | l_maskBrowser BOOLEAN; 22 | l_keepSessionAlive BOOLEAN; 23 | l_crlf CHAR(2) := CHR(13)||CHR(10); 24 | 25 | BEGIN 26 | 27 | IF apex_application.g_debug 28 | THEN 29 | apex_plugin_util.debug_dynamic_action( 30 | p_plugin => p_plugin, 31 | p_dynamic_action => p_dynamic_action 32 | ); 33 | END IF; 34 | 35 | l_timeoutAction := NVL(p_plugin.attribute_01,'ALERT'); 36 | l_timeoutMessage := NVL(p_plugin.attribute_02,'Session has been idle for too long!'); 37 | l_showWarning := CASE p_plugin.attribute_03 38 | WHEN 'Y' THEN TRUE 39 | ELSE FALSE 40 | END; 41 | l_showWarningMiliBefore := p_plugin.attribute_06 * 1000; 42 | l_showWarningTitle := NVL(p_plugin.attribute_08,'Idle Session Warning'); 43 | l_showWarningMessage := NVL(p_plugin.attribute_04,'This session will expire shortly!'); 44 | l_hideHistory := FALSE; 45 | l_maskBrowser := CASE p_plugin.attribute_05 46 | WHEN 'N' THEN FALSE 47 | ELSE TRUE 48 | END; 49 | l_keepSessionAlive := CASE p_plugin.attribute_07 50 | WHEN 'Y' THEN TRUE 51 | ELSE FALSE 52 | END; 53 | 54 | SELECT 55 | NVL(MAXIMUM_SESSION_IDLE_SECONDS, 3600) * 1000, 56 | NVL(SESSION_IDLE_TIME_EXCEEDED_URL, HOME_LINK), 57 | NVL(LOGOUT_URL,'apex_authentication.logout?p_app_id=&APP_ID.&p_session_id=&SESSION.') 58 | INTO 59 | l_sessionIdleDuration, 60 | l_timeoutURL, 61 | l_logoutURL 62 | FROM 63 | apex_applications 64 | WHERE 65 | application_id = apex_application.g_flow_id; 66 | 67 | l_timeoutURL := apex_plugin_util.replace_substitutions (l_timeoutURL); 68 | 69 | l_logoutURL := apex_plugin_util.replace_substitutions (l_logoutURL); 70 | 71 | apex_css.add( 72 | p_css => 73 | '#session-timeout-mask{position: absolute;z-index: 9000;background-color : #343434;top: 0;left: 0;}' || l_crlf || 74 | '.session-timeout-dialog .ui-dialog-titlebar-close{display: none !important;}' 75 | ); 76 | 77 | 78 | IF l_keepSessionAlive THEN 79 | apex_javascript.add_library( 80 | p_name => 'idle-timer.min', 81 | p_directory => p_plugin.file_prefix||'lib/idle-timer/js/', 82 | p_version => NULL 83 | ); 84 | END IF; 85 | 86 | l_result.javascript_function := 87 | 'function(){apex.jQuery(document).apex_session_timeout({' || l_crlf 88 | || ' ' || apex_javascript.add_attribute('timeoutAction', l_timeoutAction) || l_crlf 89 | || ' ' || apex_javascript.add_attribute('timeoutMessage', l_timeoutMessage) || l_crlf 90 | || ' ' || apex_javascript.add_attribute('timeoutURL', l_timeoutURL) || l_crlf 91 | || ' ' || apex_javascript.add_attribute('logoutURL', l_logoutURL) || l_crlf 92 | || ' ' || apex_javascript.add_attribute('showWarning', l_showWarning) || l_crlf 93 | || ' ' || apex_javascript.add_attribute('showWarningMiliBefore',l_showWarningMiliBefore) || l_crlf 94 | || ' ' || apex_javascript.add_attribute('showWarningTitle', l_showWarningTitle) || l_crlf 95 | || ' ' || apex_javascript.add_attribute('showWarningMessage', l_showWarningMessage) || l_crlf 96 | || ' ' || apex_javascript.add_attribute('hideHistory', l_hideHistory) || l_crlf 97 | || ' ' || apex_javascript.add_attribute('sessionIdleDuration', l_sessionIdleDuration) || l_crlf 98 | || ' ' || apex_javascript.add_attribute('maskBrowser', l_maskBrowser) || l_crlf 99 | || ' ' || apex_javascript.add_attribute('keepSessionAlive', l_keepSessionAlive) || l_crlf 100 | || ' ' || apex_javascript.add_attribute('ajaxIdentifier', apex_plugin.get_ajax_identifier(), FALSE, FALSE) || l_crlf 101 | || '});}'; 102 | 103 | RETURN l_result; 104 | 105 | END render_session_timeout; 106 | 107 | FUNCTION ajax_session_timeout( 108 | p_dynamic_action IN apex_plugin.t_dynamic_action, 109 | p_plugin IN apex_plugin.t_plugin 110 | ) 111 | RETURN apex_plugin.t_dynamic_action_ajax_result 112 | IS 113 | l_result apex_plugin.t_dynamic_action_ajax_result; 114 | BEGIN 115 | RETURN l_result; 116 | END ajax_session_timeout; -------------------------------------------------------------------------------- /dynamic_action_plugin_com_skllbuilders_session_timeout.sql: -------------------------------------------------------------------------------- 1 | prompt --application/set_environment 2 | set define off verify off feedback off 3 | whenever sqlerror exit sql.sqlcode rollback 4 | -------------------------------------------------------------------------------- 5 | -- 6 | -- ORACLE Application Express (APEX) export file 7 | -- 8 | -- You should run the script connected to SQL*Plus as the Oracle user 9 | -- APEX_180100 or as the owner (parsing schema) of the application. 10 | -- 11 | -- NOTE: Calls to apex_application_install override the defaults below. 12 | -- 13 | -------------------------------------------------------------------------------- 14 | begin 15 | wwv_flow_api.import_begin ( 16 | p_version_yyyy_mm_dd=>'2018.04.04' 17 | ,p_release=>'18.1.0.00.45' 18 | ,p_default_workspace_id=>4440448216874198 19 | ,p_default_application_id=>562 20 | ,p_default_owner=>'TYSON_JOUGLET' 21 | ); 22 | end; 23 | / 24 | prompt --application/shared_components/plugins/dynamic_action/com_skllbuilders_session_timeout 25 | begin 26 | wwv_flow_api.create_plugin( 27 | p_id=>wwv_flow_api.id(89844768134533014906) 28 | ,p_plugin_type=>'DYNAMIC ACTION' 29 | ,p_name=>'COM_SKLLBUILDERS_SESSION_TIMEOUT' 30 | ,p_display_name=>'SkillBuilders Session Timeout' 31 | ,p_category=>'INIT' 32 | ,p_supported_ui_types=>'DESKTOP' 33 | ,p_javascript_file_urls=>'#PLUGIN_FILES#js/#MIN_DIRECTORY#apex-session-timeout#MIN#.js' 34 | ,p_plsql_code=>wwv_flow_string.join(wwv_flow_t_varchar2( 35 | 'FUNCTION render_session_timeout (', 36 | ' p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION,', 37 | ' p_plugin IN APEX_PLUGIN.T_PLUGIN ', 38 | ')', 39 | '', 40 | ' RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT', 41 | ' ', 42 | 'IS', 43 | '', 44 | ' l_result APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT;', 45 | ' l_timeoutAction VARCHAR2(4000);', 46 | ' l_timeoutMessage VARCHAR2(500);', 47 | ' l_timeoutURL VARCHAR2(4000);', 48 | ' l_logoutURL VARCHAR2(4000);', 49 | ' l_showWarning BOOLEAN;', 50 | ' l_showWarningMiliBefore NUMBER;', 51 | ' l_showWarningTitle VARCHAR2(50);', 52 | ' l_showWarningMessage VARCHAR2(500);', 53 | ' l_hideHistory BOOLEAN;', 54 | ' l_sessionIdleDuration NUMBER;', 55 | ' l_maskBrowser BOOLEAN;', 56 | ' l_keepSessionAlive BOOLEAN;', 57 | ' l_crlf CHAR(2) := CHR(13)||CHR(10); ', 58 | '', 59 | 'BEGIN', 60 | '', 61 | ' IF apex_application.g_debug', 62 | ' THEN', 63 | ' apex_plugin_util.debug_dynamic_action(', 64 | ' p_plugin => p_plugin,', 65 | ' p_dynamic_action => p_dynamic_action ', 66 | ' );', 67 | ' END IF;', 68 | ' ', 69 | ' l_timeoutAction := NVL(p_plugin.attribute_01,''ALERT'');', 70 | ' l_timeoutMessage := NVL(p_plugin.attribute_02,''Session has been idle for too long!'');', 71 | ' l_showWarning := CASE p_plugin.attribute_03', 72 | ' WHEN ''Y'' THEN TRUE', 73 | ' ELSE FALSE', 74 | ' END; ', 75 | ' l_showWarningMiliBefore := p_plugin.attribute_06 * 1000;', 76 | ' l_showWarningTitle := NVL(p_plugin.attribute_08,''Idle Session Warning'');', 77 | ' l_showWarningMessage := NVL(p_plugin.attribute_04,''This session will expire shortly!'');', 78 | ' l_hideHistory := FALSE;', 79 | ' l_maskBrowser := CASE p_plugin.attribute_05', 80 | ' WHEN ''N'' THEN FALSE', 81 | ' ELSE TRUE', 82 | ' END;', 83 | ' l_keepSessionAlive := CASE p_plugin.attribute_07', 84 | ' WHEN ''Y'' THEN TRUE', 85 | ' ELSE FALSE', 86 | ' END;', 87 | ' ', 88 | ' SELECT ', 89 | ' NVL(MAXIMUM_SESSION_IDLE_SECONDS, 3600) * 1000, ', 90 | ' NVL(SESSION_IDLE_TIME_EXCEEDED_URL, HOME_LINK), ', 91 | ' NVL(LOGOUT_URL,''apex_authentication.logout?p_app_id=&APP_ID.&p_session_id=&SESSION.'')', 92 | ' INTO ', 93 | ' l_sessionIdleDuration, ', 94 | ' l_timeoutURL, ', 95 | ' l_logoutURL', 96 | ' FROM ', 97 | ' apex_applications', 98 | ' WHERE ', 99 | ' application_id = apex_application.g_flow_id;', 100 | ' ', 101 | ' l_timeoutURL := apex_plugin_util.replace_substitutions (l_timeoutURL);', 102 | ' ', 103 | ' l_logoutURL := apex_plugin_util.replace_substitutions (l_logoutURL);', 104 | '', 105 | ' apex_css.add(', 106 | ' p_css => ', 107 | ' ''#session-timeout-mask{position: absolute;z-index: 9000;background-color : #343434;top: 0;left: 0;}'' || l_crlf ||', 108 | ' ''.session-timeout-dialog .ui-dialog-titlebar-close{display: none !important;}''', 109 | ' );', 110 | '', 111 | ' IF l_keepSessionAlive THEN', 112 | ' apex_javascript.add_library(', 113 | ' p_name => ''idle-timer.min'',', 114 | ' p_directory => p_plugin.file_prefix||''lib/idle-timer/js/'',', 115 | ' p_version => NULL ', 116 | ' ); ', 117 | ' END IF;', 118 | ' ', 119 | ' l_result.javascript_function := ', 120 | ' ''function(){apex.jQuery(document).apex_session_timeout({'' || l_crlf', 121 | ' || '' '' || apex_javascript.add_attribute(''timeoutAction'', l_timeoutAction) || l_crlf ', 122 | ' || '' '' || apex_javascript.add_attribute(''timeoutMessage'', l_timeoutMessage) || l_crlf ', 123 | ' || '' '' || apex_javascript.add_attribute(''timeoutURL'', l_timeoutURL) || l_crlf ', 124 | ' || '' '' || apex_javascript.add_attribute(''logoutURL'', l_logoutURL) || l_crlf ', 125 | ' || '' '' || apex_javascript.add_attribute(''showWarning'', l_showWarning) || l_crlf ', 126 | ' || '' '' || apex_javascript.add_attribute(''showWarningMiliBefore'',l_showWarningMiliBefore) || l_crlf ', 127 | ' || '' '' || apex_javascript.add_attribute(''showWarningTitle'', l_showWarningTitle) || l_crlf ', 128 | ' || '' '' || apex_javascript.add_attribute(''showWarningMessage'', l_showWarningMessage) || l_crlf ', 129 | ' || '' '' || apex_javascript.add_attribute(''hideHistory'', l_hideHistory) || l_crlf ', 130 | ' || '' '' || apex_javascript.add_attribute(''sessionIdleDuration'', l_sessionIdleDuration) || l_crlf ', 131 | ' || '' '' || apex_javascript.add_attribute(''maskBrowser'', l_maskBrowser) || l_crlf ', 132 | ' || '' '' || apex_javascript.add_attribute(''keepSessionAlive'', l_keepSessionAlive) || l_crlf', 133 | ' || '' '' || apex_javascript.add_attribute(''ajaxIdentifier'', apex_plugin.get_ajax_identifier(), FALSE, FALSE) || l_crlf', 134 | ' || ''});}'';', 135 | '', 136 | ' RETURN l_result;', 137 | ' ', 138 | 'END render_session_timeout;', 139 | '', 140 | 'FUNCTION ajax_session_timeout(', 141 | ' p_dynamic_action IN apex_plugin.t_dynamic_action,', 142 | ' p_plugin IN apex_plugin.t_plugin ', 143 | ')', 144 | ' RETURN apex_plugin.t_dynamic_action_ajax_result', 145 | 'IS', 146 | ' l_result apex_plugin.t_dynamic_action_ajax_result;', 147 | 'BEGIN ', 148 | ' RETURN l_result;', 149 | 'END ajax_session_timeout;')) 150 | ,p_api_version=>1 151 | ,p_render_function=>'render_session_timeout' 152 | ,p_ajax_function=>'ajax_session_timeout' 153 | ,p_substitute_attributes=>true 154 | ,p_subscribe_plugin_settings=>true 155 | ,p_help_text=>'Help:' 156 | ,p_version_identifier=>'1.4' 157 | ,p_about_url=>'https://github.com/SkillBuilders/session-timeout' 158 | ,p_files_version=>10 159 | ); 160 | wwv_flow_api.create_plugin_attribute( 161 | p_id=>wwv_flow_api.id(89844768429863051494) 162 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 163 | ,p_attribute_scope=>'APPLICATION' 164 | ,p_attribute_sequence=>1 165 | ,p_display_sequence=>10 166 | ,p_prompt=>'Session Timeout Action' 167 | ,p_attribute_type=>'SELECT LIST' 168 | ,p_is_required=>true 169 | ,p_default_value=>'ALERT' 170 | ,p_is_translatable=>false 171 | ,p_lov_type=>'STATIC' 172 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2( 173 | '

Alert - Will display an alert message on the screen when the session expires

', 174 | '

Redirect - Will redirect the user to the URL defined in Application Properties » Security » On session idle time timeout direct to this URL. If one is not defined, the HOME_URL is used

', 175 | '

Logout - Calls the application LOGOUT_URL, if one is not defined the default logout procedure will be called.

')) 176 | ); 177 | wwv_flow_api.create_plugin_attr_value( 178 | p_id=>wwv_flow_api.id(89844768934711052820) 179 | ,p_plugin_attribute_id=>wwv_flow_api.id(89844768429863051494) 180 | ,p_display_sequence=>10 181 | ,p_display_value=>'Alert' 182 | ,p_return_value=>'ALERT' 183 | ); 184 | wwv_flow_api.create_plugin_attr_value( 185 | p_id=>wwv_flow_api.id(89844769336789053405) 186 | ,p_plugin_attribute_id=>wwv_flow_api.id(89844768429863051494) 187 | ,p_display_sequence=>20 188 | ,p_display_value=>'Redirect' 189 | ,p_return_value=>'REDIRECT' 190 | ); 191 | wwv_flow_api.create_plugin_attr_value( 192 | p_id=>wwv_flow_api.id(89844769739213054102) 193 | ,p_plugin_attribute_id=>wwv_flow_api.id(89844768429863051494) 194 | ,p_display_sequence=>30 195 | ,p_display_value=>'Logout' 196 | ,p_return_value=>'LOGOUT' 197 | ); 198 | wwv_flow_api.create_plugin_attribute( 199 | p_id=>wwv_flow_api.id(89844770133457061901) 200 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 201 | ,p_attribute_scope=>'APPLICATION' 202 | ,p_attribute_sequence=>2 203 | ,p_display_sequence=>20 204 | ,p_prompt=>'Session Timeout Message' 205 | ,p_attribute_type=>'TEXTAREA' 206 | ,p_is_required=>false 207 | ,p_default_value=>'This session has been idle for too long!' 208 | ,p_display_length=>50 209 | ,p_max_length=>500 210 | ,p_is_translatable=>false 211 | ,p_depending_on_attribute_id=>wwv_flow_api.id(89844768429863051494) 212 | ,p_depending_on_has_to_exist=>true 213 | ,p_depending_on_condition_type=>'EQUALS' 214 | ,p_depending_on_expression=>'ALERT' 215 | ,p_help_text=>'Message to be displayed when a session expires and the "Alert" timeout action is picked.' 216 | ); 217 | wwv_flow_api.create_plugin_attribute( 218 | p_id=>wwv_flow_api.id(89844771141899073819) 219 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 220 | ,p_attribute_scope=>'APPLICATION' 221 | ,p_attribute_sequence=>3 222 | ,p_display_sequence=>30 223 | ,p_prompt=>'Session Idle Warning' 224 | ,p_attribute_type=>'CHECKBOX' 225 | ,p_is_required=>false 226 | ,p_default_value=>'N' 227 | ,p_is_translatable=>false 228 | ,p_help_text=>'If yes, a warning message will be displayed before the session expires.' 229 | ); 230 | wwv_flow_api.create_plugin_attribute( 231 | p_id=>wwv_flow_api.id(89844771627832079250) 232 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 233 | ,p_attribute_scope=>'APPLICATION' 234 | ,p_attribute_sequence=>4 235 | ,p_display_sequence=>40 236 | ,p_prompt=>'Session Idle Message' 237 | ,p_attribute_type=>'TEXTAREA' 238 | ,p_is_required=>false 239 | ,p_default_value=>'This session will expire shortly!' 240 | ,p_display_length=>50 241 | ,p_max_length=>500 242 | ,p_is_translatable=>false 243 | ,p_depending_on_attribute_id=>wwv_flow_api.id(89844771141899073819) 244 | ,p_depending_on_has_to_exist=>true 245 | ,p_depending_on_condition_type=>'EQUALS' 246 | ,p_depending_on_expression=>'Y' 247 | ,p_help_text=>'Message to display when warning a user their session is going to expire soon.' 248 | ); 249 | wwv_flow_api.create_plugin_attribute( 250 | p_id=>wwv_flow_api.id(89844770620775067709) 251 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 252 | ,p_attribute_scope=>'APPLICATION' 253 | ,p_attribute_sequence=>5 254 | ,p_display_sequence=>25 255 | ,p_prompt=>'Mask Browser Screen on Timeout' 256 | ,p_attribute_type=>'CHECKBOX' 257 | ,p_is_required=>false 258 | ,p_default_value=>'N' 259 | ,p_is_translatable=>false 260 | ,p_depending_on_attribute_id=>wwv_flow_api.id(89844768429863051494) 261 | ,p_depending_on_has_to_exist=>true 262 | ,p_depending_on_condition_type=>'EQUALS' 263 | ,p_depending_on_expression=>'ALERT' 264 | ,p_help_text=>'Hide the contents of the browser before performing the timeout action.' 265 | ); 266 | wwv_flow_api.create_plugin_attribute( 267 | p_id=>wwv_flow_api.id(89844772236274091154) 268 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 269 | ,p_attribute_scope=>'APPLICATION' 270 | ,p_attribute_sequence=>6 271 | ,p_display_sequence=>45 272 | ,p_prompt=>'Show Warning Seconds Before' 273 | ,p_attribute_type=>'NUMBER' 274 | ,p_is_required=>false 275 | ,p_default_value=>'300' 276 | ,p_display_length=>30 277 | ,p_max_length=>30 278 | ,p_is_translatable=>false 279 | ,p_depending_on_attribute_id=>wwv_flow_api.id(89844771141899073819) 280 | ,p_depending_on_has_to_exist=>true 281 | ,p_depending_on_condition_type=>'EQUALS' 282 | ,p_depending_on_expression=>'Y' 283 | ,p_help_text=>'The number of seconds before the session expires to display the session timeout warning message.' 284 | ); 285 | wwv_flow_api.create_plugin_attribute( 286 | p_id=>wwv_flow_api.id(89844772719436095738) 287 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 288 | ,p_attribute_scope=>'APPLICATION' 289 | ,p_attribute_sequence=>7 290 | ,p_display_sequence=>70 291 | ,p_prompt=>'Keep Session Alive' 292 | ,p_attribute_type=>'CHECKBOX' 293 | ,p_is_required=>false 294 | ,p_default_value=>'N' 295 | ,p_is_translatable=>false 296 | ,p_help_text=>'When enabled, this feature will use Ajax requests to keep a users session active on the server.' 297 | ); 298 | wwv_flow_api.create_plugin_attribute( 299 | p_id=>wwv_flow_api.id(89844773230087117783) 300 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 301 | ,p_attribute_scope=>'APPLICATION' 302 | ,p_attribute_sequence=>8 303 | ,p_display_sequence=>35 304 | ,p_prompt=>'Session Idle Title' 305 | ,p_attribute_type=>'TEXT' 306 | ,p_is_required=>false 307 | ,p_default_value=>'Idle Session Warning' 308 | ,p_display_length=>50 309 | ,p_max_length=>50 310 | ,p_is_translatable=>false 311 | ,p_depending_on_attribute_id=>wwv_flow_api.id(89844771141899073819) 312 | ,p_depending_on_has_to_exist=>true 313 | ,p_depending_on_condition_type=>'EQUALS' 314 | ,p_depending_on_expression=>'Y' 315 | ,p_help_text=>'Title of modal dialog to display when warning a user their session is going to expire soon.' 316 | ); 317 | end; 318 | / 319 | begin 320 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table; 321 | wwv_flow_api.g_varchar2_table(1) := '2166756E6374696F6E286E2C65297B2275736520737472696374223B6E2E7769646765742822617065782E617065785F73657373696F6E5F74696D656F7574222C7B6F7074696F6E733A7B74696D656F7574416374696F6E3A6E756C6C2C74696D656F75'; 322 | wwv_flow_api.g_varchar2_table(2) := '744D6573736167653A6E756C6C2C74696D656F757455524C3A6E756C6C2C6C6F676F757455524C3A6E756C6C2C73686F775761726E696E673A6E756C6C2C73686F775761726E696E674D696C694265666F72653A6E756C6C2C73686F775761726E696E67'; 323 | wwv_flow_api.g_varchar2_table(3) := '5469746C653A6E756C6C2C73686F775761726E696E674D6573736167653A6E756C6C2C68696465486973746F72793A21312C73657373696F6E49646C654475726174696F6E3A6E756C6C2C6D61736B42726F777365723A6E756C6C2C616A61784964656E'; 324 | wwv_flow_api.g_varchar2_table(4) := '7469666965723A6E756C6C2C6B65657053657373696F6E416C6976653A6E756C6C2C64656275673A21307D2C5F6372656174653A66756E6374696F6E28297B76617220653D746869733B696628617065782E6465627567282253657373696F6E2054696D'; 325 | wwv_flow_api.g_varchar2_table(5) := '656F75743A205F637265617465202873746172742922292C617065782E646562756728222E2E2E4F7074696F6E7322292C652E6F7074696F6E732E646562756729666F72286E616D6520696E20652E6F7074696F6E7329617065782E646562756728222E'; 326 | wwv_flow_api.g_varchar2_table(6) := '2E2E2E2E2E222B6E616D652B273A2022272B652E6F7074696F6E735B6E616D655D2B272227293B652E5F6372656174655072697661746553746F7261676528292C652E5F737461727454696D65727328292C652E6F7074696F6E732E6B65657053657373'; 327 | wwv_flow_api.g_varchar2_table(7) := '696F6E416C697665262628652E5F737461727449646C654D6F6E69746F7228292C652E5F737461727450696E6754696D65722829292C617065782E6465627567282253657373696F6E2054696D656F75743A205F6372656174652028656E642922297D2C'; 328 | wwv_flow_api.g_varchar2_table(8) := '5F737461727450696E6754696D65723A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F737461727453657373696F6E50696E6754696D6572202873746172742922292C'; 329 | wwv_flow_api.g_varchar2_table(9) := '652E5F76616C7565732E70696E6749443D73657454696D656F75742866756E6374696F6E28297B652E5F68616E646C6550696E6728297D2C652E5F76616C7565732E70696E674672657175656E6379292C617065782E6465627567282253657373696F6E'; 330 | wwv_flow_api.g_varchar2_table(10) := '2054696D656F75743A205F737461727453657373696F6E50696E6754696D65722028656E642922297D2C5F737461727449646C654D6F6E69746F723A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F'; 331 | wwv_flow_api.g_varchar2_table(11) := '6E2054696D656F75743A205F737461727449646C654D6F6E69746F72202873746172742922292C6E2E69646C6554696D657228652E5F76616C7565732E636865636B49646C654672657175656E6379292C6E28646F63756D656E74292E62696E64282269'; 332 | wwv_flow_api.g_varchar2_table(12) := '646C652E69646C6554696D6572222C66756E6374696F6E28297B617065782E6465627567282253657373696F6E2054696D656F75743A2073657373696F6E20696E6163746976652122297D292C6E28646F63756D656E74292E62696E6428226163746976'; 333 | wwv_flow_api.g_varchar2_table(13) := '652E69646C6554696D6572222C66756E6374696F6E28297B617065782E6465627567282253657373696F6E2054696D656F75743A2073657373696F6E20616374697665212922292C652E5F70696E6753657373696F6E28297D292C617065782E64656275'; 334 | wwv_flow_api.g_varchar2_table(14) := '67282253657373696F6E2054696D656F75743A205F737461727449646C654D6F6E69746F722028656E642922297D2C5F6372656174655072697661746553746F726167653A66756E6374696F6E28297B617065782E6465627567282253657373696F6E20'; 335 | wwv_flow_api.g_varchar2_table(15) := '54696D656F75743A205F6372656174655072697661746553746F72616765202873746172742922292C746869732E5F76616C7565733D7B646F635469746C653A646F63756D656E742E7469746C652C7469746C65426C696E6B496E74657276616C49443A'; 336 | wwv_flow_api.g_varchar2_table(16) := '6E756C6C2C7469746C65426C696E6B496E74657276616C3A3865332C7761726E696E6749443A6E756C6C2C74696D656F757449443A6E756C6C2C70696E6749443A6E756C6C2C636865636B49646C654672657175656E63793A3665342C70696E67467265'; 337 | wwv_flow_api.g_varchar2_table(17) := '7175656E63793A3665342C69735761726E65643A21312C74696D656F7574416374696F6E456E756D3A7B414C4552543A22414C455254222C52454449524543543A225245444952454354222C4C4F474F55543A224C4F474F5554227D7D2C746869732E5F'; 338 | wwv_flow_api.g_varchar2_table(18) := '656C656D656E74733D7B246469616C6F673A7B7D7D2C617065782E6465627567282253657373696F6E2054696D656F75743A205F6372656174655072697661746553746F726167652028656E642922297D2C5F737461727454696D6572733A66756E6374'; 339 | wwv_flow_api.g_varchar2_table(19) := '696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A20737461727454696D6572202873746172742922292C652E6F7074696F6E732E73686F775761726E696E67262628652E5F76616C756573'; 340 | wwv_flow_api.g_varchar2_table(20) := '2E7761726E696E6749443D73657454696D656F75742866756E6374696F6E28297B652E5F7761726E28297D2C652E6F7074696F6E732E73657373696F6E49646C654475726174696F6E2D652E6F7074696F6E732E73686F775761726E696E674D696C6942'; 341 | wwv_flow_api.g_varchar2_table(21) := '65666F7265292C617065782E646562756728222E2E2E696E697469616C697A696E67207761726E696E672074696D656F757428222B652E5F76616C7565732E7761726E696E6749442B22292229292C652E5F76616C7565732E74696D656F757449443D73'; 342 | wwv_flow_api.g_varchar2_table(22) := '657454696D656F75742866756E6374696F6E28297B652E5F68616E646C654578706972656453657373696F6E28297D2C652E6F7074696F6E732E73657373696F6E49646C654475726174696F6E292C617065782E646562756728222E2E2E696E69746961'; 343 | wwv_flow_api.g_varchar2_table(23) := '6C697A696E672069646C652074696D656F757428222B652E5F76616C7565732E74696D656F757449442B222922292C617065782E6465627567282253657373696F6E2054696D656F75743A20737461727454696D65722028656E642922297D2C5F73746F'; 344 | wwv_flow_api.g_varchar2_table(24) := '7054696D6572733A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F73746F7054696D657273202873746172742922292C652E6F7074696F6E732E6B6565705365737369'; 345 | wwv_flow_api.g_varchar2_table(25) := '6F6E416C6976652626652E5F76616C7565732E74696D656F7574494426266E756C6C213D3D652E5F76616C7565732E74696D656F75744944262628617065782E646562756728222E2E2E636C6561726E672069646C652074696D656F757428222B652E5F'; 346 | wwv_flow_api.g_varchar2_table(26) := '76616C7565732E74696D656F757449442B222922292C636C65617254696D656F757428652E5F76616C7565732E74696D656F75744944292C652E5F76616C7565732E74696D656F757449443D6E756C6C292C652E6F7074696F6E732E73686F775761726E'; 347 | wwv_flow_api.g_varchar2_table(27) := '696E672626652E5F76616C7565732E7761726E696E67494426266E756C6C213D3D652E5F76616C7565732E7761726E696E674944262628617065782E646562756728222E2E2E636C6561726E67207761726E696E672074696D656F757428222B652E5F76'; 348 | wwv_flow_api.g_varchar2_table(28) := '616C7565732E7761726E696E6749442B222922292C636C65617254696D656F757428652E5F76616C7565732E7761726E696E674944292C652E5F76616C7565732E7761726E696E6749443D6E756C6C292C617065782E6465627567282253657373696F6E'; 349 | wwv_flow_api.g_varchar2_table(29) := '2054696D656F75743A205F73746F7054696D6572732028656E642922297D2C5F68616E646C654578706972656453657373696F6E3A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F'; 350 | wwv_flow_api.g_varchar2_table(30) := '75743A205F68616E646C654578706972656453657373696F6E202873746172742922292C652E6F7074696F6E732E6D61736B42726F777365722626652E5F73686F774D61736B28292C73657454696D656F75742866756E6374696F6E28297B652E5F6578'; 351 | wwv_flow_api.g_varchar2_table(31) := '70697265416374696F6E28297D2C313030292C617065782E6465627567282253657373696F6E2054696D656F75743A205F68616E646C654578706972656453657373696F6E2028656E642922297D2C5F657870697265416374696F6E3A66756E6374696F'; 352 | wwv_flow_api.g_varchar2_table(32) := '6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F657870697265416374696F6E202873746172742922292C652E6F7074696F6E732E74696D656F7574416374696F6E3D3D3D652E5F76616C'; 353 | wwv_flow_api.g_varchar2_table(33) := '7565732E74696D656F7574416374696F6E456E756D2E414C4552543F28616C65727428652E6F7074696F6E732E74696D656F75744D657373616765292C652E5F726564697265637428652E6F7074696F6E732E74696D656F757455524C29293A652E6F70'; 354 | wwv_flow_api.g_varchar2_table(34) := '74696F6E732E74696D656F7574416374696F6E3D3D3D652E5F76616C7565732E74696D656F7574416374696F6E456E756D2E52454449524543543F652E5F726564697265637428652E6F7074696F6E732E74696D656F757455524C293A652E6F7074696F'; 355 | wwv_flow_api.g_varchar2_table(35) := '6E732E74696D656F7574416374696F6E3D3D3D652E5F76616C7565732E74696D656F7574416374696F6E456E756D2E4C4F474F55542626652E5F726564697265637428652E6F7074696F6E732E6C6F676F757455524C292C617065782E64656275672822'; 356 | wwv_flow_api.g_varchar2_table(36) := '53657373696F6E2054696D656F75743A205F657870697265416374696F6E2028656E642922297D2C5F7761726E3A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F7761'; 357 | wwv_flow_api.g_varchar2_table(37) := '726E202873746172742922293B76617220693D273C64697620636C6173733D2273657373696F6E2D74696D656F75742D636F6E7461696E65722075692D776964676574223E2020203C703E272B652E6F7074696F6E732E73686F775761726E696E674D65'; 358 | wwv_flow_api.g_varchar2_table(38) := '73736167652B223C2F703E3C2F6469763E223B6E2822626F647922292E617070656E642869292C652E5F656C656D656E74732E246469616C6F673D6E28222E73657373696F6E2D74696D656F75742D636F6E7461696E657222292C652E5F656C656D656E'; 359 | wwv_flow_api.g_varchar2_table(39) := '74732E246469616C6F672E6469616C6F67287B64697361626C65643A21312C6175746F4F70656E3A21302C627574746F6E733A7B4F6B3A66756E6374696F6E28297B6E2874686973292E6469616C6F672822636C6F736522297D7D2C636C6F73654F6E45'; 360 | wwv_flow_api.g_varchar2_table(40) := '73636170653A21302C636C6F7365546578743A22436C6F7365222C6469616C6F67436C6173733A2273657373696F6E2D74696D656F75742D6469616C6F67222C647261676761626C653A21302C6865696768743A226175746F222C686964653A6E756C6C'; 361 | wwv_flow_api.g_varchar2_table(41) := '2C6D6178684865696768743A21312C6D617857696474683A21312C6D696E4865696768743A3130302C6D696E57696474683A3230302C6D6F64616C3A21302C726573697A61626C653A21312C73686F773A6E756C6C2C737461636B3A21302C7469746C65'; 362 | wwv_flow_api.g_varchar2_table(42) := '3A652E6F7074696F6E732E73686F775761726E696E675469746C652C636C6F73653A66756E6374696F6E28297B652E5F636C6F73655761726E696E6728297D7D292C652E5F73746172745469746C65426C696E6B28292C652E5F76616C7565732E697357'; 363 | wwv_flow_api.g_varchar2_table(43) := '61726E65643D21302C652E6F7074696F6E732E6B65657053657373696F6E416C69766526266E2E69646C6554696D6572282264657374726F7922292C617065782E6465627567282253657373696F6E2054696D656F75743A205F7761726E2028656E6429'; 364 | wwv_flow_api.g_varchar2_table(44) := '22297D2C5F636C6F73655761726E696E673A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F636C6F73655761726E696E67202873746172742922292C652E5F656C656D'; 365 | wwv_flow_api.g_varchar2_table(45) := '656E74732E246469616C6F672E6469616C6F67282264657374726F7922292C652E5F656C656D656E74732E246469616C6F672E72656D6F766528292C652E5F73746F70426C696E6B28292C652E5F73746F7054696D65727328292C652E5F76616C756573'; 366 | wwv_flow_api.g_varchar2_table(46) := '2E69735761726E65643D21312C652E6F7074696F6E732E6B65657053657373696F6E416C697665262628652E5F70696E6753657373696F6E28292C652E5F737461727449646C654D6F6E69746F722829292C617065782E6465627567282253657373696F'; 367 | wwv_flow_api.g_varchar2_table(47) := '6E2054696D656F75743A205F636C6F73655761726E696E672028656E642922297D2C5F73746172745469746C65426C696E6B3A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F7574'; 368 | wwv_flow_api.g_varchar2_table(48) := '3A205F73746172745469746C65426C696E6B202873746172742922292C652E5F7469746C65426C696E6B28292C652E5F76616C7565732E7469746C65426C696E6B496E74657276616C49443D736574496E74657276616C2866756E6374696F6E28297B65'; 369 | wwv_flow_api.g_varchar2_table(49) := '2E5F7469746C65426C696E6B28297D2C652E5F76616C7565732E7469746C65426C696E6B496E74657276616C292C617065782E6465627567282253657373696F6E2054696D656F75743A205F73746172745469746C65426C696E6B2028656E642922297D'; 370 | wwv_flow_api.g_varchar2_table(50) := '2C5F7469746C65426C696E6B3A66756E6374696F6E28297B76617220653D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F7469746C65426C696E6B202873746172742922292C646F63756D656E742E7469746C65'; 371 | wwv_flow_api.g_varchar2_table(51) := '3D652E6F7074696F6E732E73686F775761726E696E675469746C652C73657454696D656F75742866756E6374696F6E28297B646F63756D656E742E7469746C653D652E5F76616C7565732E646F635469746C657D2C353030292C617065782E6465627567'; 372 | wwv_flow_api.g_varchar2_table(52) := '282253657373696F6E2054696D656F75743A205F7469746C65426C696E6B2028656E642922297D2C5F73746F70426C696E6B3A66756E6374696F6E28297B617065782E6465627567282253657373696F6E2054696D656F75743A205F73746F70426C696E'; 373 | wwv_flow_api.g_varchar2_table(53) := '6B202873746172742922292C646F63756D656E742E7469746C653D746869732E5F76616C7565732E646F635469746C652C636C656172496E74657276616C28746869732E5F76616C7565732E7469746C65426C696E6B496E74657276616C4944292C6170'; 374 | wwv_flow_api.g_varchar2_table(54) := '65782E6465627567282253657373696F6E2054696D656F75743A205F73746F70426C696E6B2028656E642922297D2C5F72656469726563743A66756E6374696F6E2865297B617065782E6465627567282253657373696F6E2054696D656F75743A205F72'; 375 | wwv_flow_api.g_varchar2_table(55) := '65646972656374202873746172742922292C746869732E6F7074696F6E732E68696465486973746F72793F77696E646F772E6C6F636174696F6E2E7265706C6163652865293A77696E646F772E6C6F636174696F6E2E687265663D652C617065782E6465'; 376 | wwv_flow_api.g_varchar2_table(56) := '627567282253657373696F6E2054696D656F75743A205F72656469726563742028656E642922297D2C5F73686F774D61736B3A66756E6374696F6E28297B76617220653D6E28646F63756D656E74292E68656967687428292C693D6E2877696E646F7729'; 377 | wwv_flow_api.g_varchar2_table(57) := '2E776964746828292C743D6E28646F63756D656E742E637265617465456C656D656E7428226469762229292E6174747228226964222C2273657373696F6E2D74696D656F75742D6D61736B22292E637373287B77696474683A692C6865696768743A657D'; 378 | wwv_flow_api.g_varchar2_table(58) := '293B617065782E6465627567282253657373696F6E2054696D656F75743A205F73686F774D61736B202873746172742922292C617065782E646562756728222E2E2E6D61736B4865696768743A222B65292C617065782E646562756728222E2E2E6D6173'; 379 | wwv_flow_api.g_varchar2_table(59) := '6B57696474683A222B69292C6E2822626F647922292E617070656E642874292C6E2877696E646F77292E726573697A652866756E6374696F6E28297B76617220653D6E28646F63756D656E74292E68656967687428292C693D6E2877696E646F77292E77'; 380 | wwv_flow_api.g_varchar2_table(60) := '6964746828293B6E28222373657373696F6E2D74696D656F75742D6D61736B22292E637373287B77696474683A692C6865696768743A657D297D292C617065782E6465627567282253657373696F6E2054696D656F75743A205F73686F774D61736B2028'; 381 | wwv_flow_api.g_varchar2_table(61) := '656E642922297D2C5F68616E646C6550696E673A66756E6374696F6E28297B617065782E6465627567282253657373696F6E2054696D656F75743A205F68616E646C6550696E67202873746172742922292C22616374697665223D3D3D6E2E6461746128'; 382 | wwv_flow_api.g_varchar2_table(62) := '646F63756D656E742C2269646C6554696D657222293F28617065782E6465627567282273657373696F6E206973206163746976652E2052656672657368696E67207365727665722073657373696F6E22292C746869732E5F70696E6753657373696F6E28'; 383 | wwv_flow_api.g_varchar2_table(63) := '29293A617065782E6465627567282273657373696F6E20697320696E6163746976652E20446F206E6F742072656672657368207365727665722073657373696F6E2E22292C617065782E6465627567282253657373696F6E2054696D656F75743A205F68'; 384 | wwv_flow_api.g_varchar2_table(64) := '616E646C6550696E672028656E642922297D2C5F70696E6753657373696F6E3A66756E6374696F6E28297B76617220693D746869733B617065782E6465627567282253657373696F6E2054696D656F75743A205F70696E6753657373696F6E2028737461'; 385 | wwv_flow_api.g_varchar2_table(65) := '72742922292C6528692E6F7074696F6E732E616A61784964656E7469666965722C7B7D2C7B64617461547970653A2274657874222C737563636573733A66756E6374696F6E2865297B617065782E64656275672822416A61782072657175657374207375'; 386 | wwv_flow_api.g_varchar2_table(66) := '636365737366756C22292C636C65617254696D656F757428692E5F76616C7565732E70696E674944292C692E5F737461727450696E6754696D657228292C692E5F73746F7054696D65727328292C692E5F737461727454696D65727328297D7D292C6170'; 387 | wwv_flow_api.g_varchar2_table(67) := '65782E6465627567282253657373696F6E2054696D656F75743A205F70696E6753657373696F6E2028656E642922297D7D297D28617065782E6A51756572792C617065782E7365727665722E706C7567696E293B0A2F2F2320736F757263654D61707069'; 388 | wwv_flow_api.g_varchar2_table(68) := '6E6755524C3D6D6170732F617065782D73657373696F6E2D74696D656F75742E6D696E2E6A732E6D61700A'; 389 | null; 390 | end; 391 | / 392 | begin 393 | wwv_flow_api.create_plugin_file( 394 | p_id=>wwv_flow_api.id(469023464697989480) 395 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 396 | ,p_file_name=>'js/minified/apex-session-timeout.min.js' 397 | ,p_mime_type=>'text/javascript' 398 | ,p_file_charset=>'utf-8' 399 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table) 400 | ); 401 | end; 402 | / 403 | begin 404 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table; 405 | wwv_flow_api.g_varchar2_table(1) := '2866756E6374696F6E28242C20706C7567696E297B0D0A2020202275736520737472696374223B0D0A202020242E7769646765742827617065782E617065785F73657373696F6E5F74696D656F7574272C207B0D0A2020202020206F7074696F6E733A7B'; 406 | wwv_flow_api.g_varchar2_table(2) := '0D0A20202020202020202074696D656F7574416374696F6E3A206E756C6C2C0D0A20202020202020202074696D656F75744D6573736167653A206E756C6C2C0D0A20202020202020202074696D656F757455524C3A206E756C6C2C0D0A20202020202020'; 407 | wwv_flow_api.g_varchar2_table(3) := '20206C6F676F757455524C3A206E756C6C2C0D0A20202020202020202073686F775761726E696E673A206E756C6C2C0D0A20202020202020202073686F775761726E696E674D696C694265666F72653A206E756C6C2C0D0A20202020202020202073686F'; 408 | wwv_flow_api.g_varchar2_table(4) := '775761726E696E675469746C653A206E756C6C2C0D0A20202020202020202073686F775761726E696E674D6573736167653A206E756C6C2C0D0A20202020202020202068696465486973746F72793A66616C73652C0D0A20202020202020202073657373'; 409 | wwv_flow_api.g_varchar2_table(5) := '696F6E49646C654475726174696F6E3A206E756C6C2C0D0A2020202020202020206D61736B42726F777365723A206E756C6C2C0D0A202020202020202020616A61784964656E7469666965723A206E756C6C2C0D0A2020202020202020206B6565705365'; 410 | wwv_flow_api.g_varchar2_table(6) := '7373696F6E416C697665203A206E756C6C2C0D0A20202020202020202064656275673A2074727565202F2F2428272370646562756727292E6C656E67746820213D3D2030202F2F7472756520626F6F6C65616E20666F72203D3D3D0D0A2020202020207D'; 411 | wwv_flow_api.g_varchar2_table(7) := '2C0D0A2020202020205F6372656174653A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D'; 412 | wwv_flow_api.g_varchar2_table(8) := '656F75743A205F637265617465202873746172742927293B0D0A0D0A202020202020202020617065782E646562756728272E2E2E4F7074696F6E7327293B0D0A202020202020202020696620287569772E6F7074696F6E732E6465627567297B0D0A2020'; 413 | wwv_flow_api.g_varchar2_table(9) := '20202020202020202020666F7220286E616D6520696E207569772E6F7074696F6E7329207B0D0A202020202020202020202020202020617065782E646562756728272E2E2E2E2E2E27202B206E616D65202B20273A202227202B207569772E6F7074696F'; 414 | wwv_flow_api.g_varchar2_table(10) := '6E735B6E616D655D202B20272227293B0D0A2020202020202020202020207D0D0A2020202020202020207D0D0A2020202020202020200D0A2020202020202020207569772E5F6372656174655072697661746553746F7261676528293B0D0A2020202020'; 415 | wwv_flow_api.g_varchar2_table(11) := '202020200D0A2020202020202020207569772E5F737461727454696D65727328293B0D0A2020202020202020200D0A2020202020202020206966287569772E6F7074696F6E732E6B65657053657373696F6E416C697665297B0D0A202020202020202020'; 416 | wwv_flow_api.g_varchar2_table(12) := '2020207569772E5F737461727449646C654D6F6E69746F7228293B0D0A2020202020202020202020207569772E5F737461727450696E6754696D657228293B0D0A2020202020202020207D0D0A0D0A202020202020202020617065782E64656275672827'; 417 | wwv_flow_api.g_varchar2_table(13) := '53657373696F6E2054696D656F75743A205F6372656174652028656E642927293B0D0A2020202020207D2C0D0A2020202020205F737461727450696E6754696D65723A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20'; 418 | wwv_flow_api.g_varchar2_table(14) := '746869733B0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F737461727453657373696F6E50696E6754696D6572202873746172742927293B0D0A20202009090D0A2020'; 419 | wwv_flow_api.g_varchar2_table(15) := '202020202020207569772E5F76616C7565732E70696E674944203D2073657454696D656F75742866756E6374696F6E28297B200D0A2020202020202020202020207569772E5F68616E646C6550696E6728293B200D0A2020202020202020207D2C207569'; 420 | wwv_flow_api.g_varchar2_table(16) := '772E5F76616C7565732E70696E674672657175656E6379293B0D0A20202009090D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F737461727453657373696F6E50696E6754696D65722028656E6429'; 421 | wwv_flow_api.g_varchar2_table(17) := '27293B0D0A2020202020207D2C0D0A2020202020205F737461727449646C654D6F6E69746F723A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D0A20202020202020202061'; 422 | wwv_flow_api.g_varchar2_table(18) := '7065782E6465627567282753657373696F6E2054696D656F75743A205F737461727449646C654D6F6E69746F72202873746172742927293B0D0A0D0A202020202020202020242E69646C6554696D6572287569772E5F76616C7565732E636865636B4964'; 423 | wwv_flow_api.g_varchar2_table(19) := '6C654672657175656E6379293B0D0A0D0A2020202020202020202428646F63756D656E74292E62696E64282269646C652E69646C6554696D6572222C2066756E6374696F6E28297B0D0A202020202020202020202020617065782E646562756728275365'; 424 | wwv_flow_api.g_varchar2_table(20) := '7373696F6E2054696D656F75743A2073657373696F6E20696E6163746976652127293B0D0A2020202020202020207D293B0D0A2020202020202020200D0A2020202020202020202428646F63756D656E74292E62696E6428226163746976652E69646C65'; 425 | wwv_flow_api.g_varchar2_table(21) := '54696D6572222C2066756E6374696F6E28297B0D0A20202020202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A2073657373696F6E20616374697665212927293B0D0A20202020202020202020202020756977'; 426 | wwv_flow_api.g_varchar2_table(22) := '2E5F70696E6753657373696F6E28293B0D0A2020202020202020207D293B090D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F737461727449646C654D6F6E69746F7220'; 427 | wwv_flow_api.g_varchar2_table(23) := '28656E642927293B090D0A2020202020207D2C0D0A2020202020205F6372656174655072697661746553746F726167653A2066756E6374696F6E2829207B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D'; 428 | wwv_flow_api.g_varchar2_table(24) := '0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F6372656174655072697661746553746F72616765202873746172742927293B0D0A20202009090D0A2020202020202020207569772E5F76616C756573'; 429 | wwv_flow_api.g_varchar2_table(25) := '203D207B0D0A202020202020202020202020646F635469746C65203A20646F63756D656E742E7469746C652C0D0A2020202020202020202020207469746C65426C696E6B496E74657276616C49443A206E756C6C2C0D0A20202020202020202020202074'; 430 | wwv_flow_api.g_varchar2_table(26) := '69746C65426C696E6B496E74657276616C3A20383030302C0D0A2020202020202020202020207761726E696E6749443A206E756C6C2C0D0A20202020202020202020202074696D656F757449443A206E756C6C2C0D0A2020202020202020202020207069'; 431 | wwv_flow_api.g_varchar2_table(27) := '6E6749443A206E756C6C2C0D0A202020202020202020202020636865636B49646C654672657175656E63793A2036303030302C0D0A20202020202020202020202070696E674672657175656E63793A2036303030302C0D0A202020202020202020202020'; 432 | wwv_flow_api.g_varchar2_table(28) := '69735761726E65643A66616C73652C0D0A20202020202020202020202074696D656F7574416374696F6E456E756D203A207B0D0A202020202020202020202020202020414C455254203A2027414C455254272C0D0A202020202020202020202020202020'; 433 | wwv_flow_api.g_varchar2_table(29) := '5245444952454354203A20275245444952454354272C0D0A2020202020202020202020202020204C4F474F5554203A20274C4F474F5554270D0A2020202020202020202020207D0D0A2020202020202020207D3B0D0A2020202020202020200D0A202020'; 434 | wwv_flow_api.g_varchar2_table(30) := '2020202020207569772E5F656C656D656E7473203D207B0D0A202020202020202020202020246469616C6F673A207B7D0D0A2020202020202020207D3B0D0A2020202020202020200D0A202020202020202020617065782E646562756728275365737369'; 435 | wwv_flow_api.g_varchar2_table(31) := '6F6E2054696D656F75743A205F6372656174655072697661746553746F726167652028656E642927293B0D0A2020202020207D2C0D0A2020202020205F737461727454696D6572733A2066756E6374696F6E28297B0D0A20202020202020202076617220'; 436 | wwv_flow_api.g_varchar2_table(32) := '756977203D20746869733B0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A20737461727454696D6572202873746172742927293B0D0A2020202020202020200D0A20202020'; 437 | wwv_flow_api.g_varchar2_table(33) := '2020202020696620287569772E6F7074696F6E732E73686F775761726E696E67297B0D0A2020202020202020202020207569772E5F76616C7565732E7761726E696E674944203D2073657454696D656F75742866756E6374696F6E28297B0D0A20202020'; 438 | wwv_flow_api.g_varchar2_table(34) := '20202020202020202020207569772E5F7761726E28293B0D0A2020202020202020202020207D2C207569772E6F7074696F6E732E73657373696F6E49646C654475726174696F6E202D207569772E6F7074696F6E732E73686F775761726E696E674D696C'; 439 | wwv_flow_api.g_varchar2_table(35) := '694265666F7265293B0D0A202020202020202020202020617065782E646562756728272E2E2E696E697469616C697A696E67207761726E696E672074696D656F757428272B207569772E5F76616C7565732E7761726E696E674944202B272927293B0D0A'; 440 | wwv_flow_api.g_varchar2_table(36) := '2020202020202020207D0D0A2020202020202020200D0A2020202020202020207569772E5F76616C7565732E74696D656F75744944203D2073657454696D656F75742866756E6374696F6E28297B207569772E5F68616E646C6545787069726564536573'; 441 | wwv_flow_api.g_varchar2_table(37) := '73696F6E28293B207D2C7569772E6F7074696F6E732E73657373696F6E49646C654475726174696F6E293B0D0A202020202020202020617065782E646562756728272E2E2E696E697469616C697A696E672069646C652074696D656F757428272B207569'; 442 | wwv_flow_api.g_varchar2_table(38) := '772E5F76616C7565732E74696D656F75744944202B272927293B0D0A20202009090D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A20737461727454696D65722028656E642927293B0D0A202020202020'; 443 | wwv_flow_api.g_varchar2_table(39) := '7D2C0D0A2020202020205F73746F7054696D6572733A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A202020090D0A202020202020202020617065782E6465627567282753657373696F6E2054696D'; 444 | wwv_flow_api.g_varchar2_table(40) := '656F75743A205F73746F7054696D657273202873746172742927293B0D0A2020202020202020200D0A2020202020202020206966287569772E6F7074696F6E732E6B65657053657373696F6E416C697665202626207569772E5F76616C7565732E74696D'; 445 | wwv_flow_api.g_varchar2_table(41) := '656F75744944202626207569772E5F76616C7565732E74696D656F7574494420213D3D206E756C6C297B0D0A202020202020202020617065782E646562756728272E2E2E636C6561726E672069646C652074696D656F757428272B207569772E5F76616C'; 446 | wwv_flow_api.g_varchar2_table(42) := '7565732E74696D656F75744944202B272927293B0D0A202020202020202020202020636C65617254696D656F7574287569772E5F76616C7565732E74696D656F75744944293B0D0A2020202020202020202020207569772E5F76616C7565732E74696D65'; 447 | wwv_flow_api.g_varchar2_table(43) := '6F75744944203D206E756C6C3B0D0A2020202020202020207D0D0A2020202020202020200D0A202020202020202020696620287569772E6F7074696F6E732E73686F775761726E696E67202626207569772E5F76616C7565732E7761726E696E67494420'; 448 | wwv_flow_api.g_varchar2_table(44) := '2626207569772E5F76616C7565732E7761726E696E67494420213D3D206E756C6C297B0D0A202020202020202020202020617065782E646562756728272E2E2E636C6561726E67207761726E696E672074696D656F757428272B207569772E5F76616C75'; 449 | wwv_flow_api.g_varchar2_table(45) := '65732E7761726E696E674944202B272927293B0D0A202020202020202020202020636C65617254696D656F7574287569772E5F76616C7565732E7761726E696E674944293B0D0A2020202020202020202020207569772E5F76616C7565732E7761726E69'; 450 | wwv_flow_api.g_varchar2_table(46) := '6E674944203D206E756C6C3B0D0A2020202020202020207D0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F73746F7054696D6572732028656E642927293B0D0A202020'; 451 | wwv_flow_api.g_varchar2_table(47) := '2020207D2C0D0A2020202020205F68616E646C654578706972656453657373696F6E3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D0A202020202020202020617065782E'; 452 | wwv_flow_api.g_varchar2_table(48) := '6465627567282753657373696F6E2054696D656F75743A205F68616E646C654578706972656453657373696F6E202873746172742927293B0D0A0D0A2020202020202020206966287569772E6F7074696F6E732E6D61736B42726F77736572297B0D0A20'; 453 | wwv_flow_api.g_varchar2_table(49) := '20202020202020202020207569772E5F73686F774D61736B28293B0D0A2020202020202020207D0D0A2020202020202020200D0A20202020202020202073657454696D656F75742866756E6374696F6E28297B200D0A2020202020202020202020207569'; 454 | wwv_flow_api.g_varchar2_table(50) := '772E5F657870697265416374696F6E28293B0D0A2020202020202020207D2C20313030293B2020202020200D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F68616E646C'; 455 | wwv_flow_api.g_varchar2_table(51) := '654578706972656453657373696F6E2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F657870697265416374696F6E3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A20202020'; 456 | wwv_flow_api.g_varchar2_table(52) := '20202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F657870697265416374696F6E202873746172742927293B0D0A0D0A202020202020202020696620287569772E6F7074696F6E732E7469'; 457 | wwv_flow_api.g_varchar2_table(53) := '6D656F7574416374696F6E203D3D3D207569772E5F76616C7565732E74696D656F7574416374696F6E456E756D2E414C45525429207B0D0A202020202020202020202020616C657274287569772E6F7074696F6E732E74696D656F75744D657373616765'; 458 | wwv_flow_api.g_varchar2_table(54) := '293B0D0A2020202020202020202020207569772E5F7265646972656374287569772E6F7074696F6E732E74696D656F757455524C293B0D0A2020202020202020207D20656C736520696620287569772E6F7074696F6E732E74696D656F7574416374696F'; 459 | wwv_flow_api.g_varchar2_table(55) := '6E203D3D3D207569772E5F76616C7565732E74696D656F7574416374696F6E456E756D2E524544495245435429207B0D0A2020202020202020202020207569772E5F7265646972656374287569772E6F7074696F6E732E74696D656F757455524C293B0D'; 460 | wwv_flow_api.g_varchar2_table(56) := '0A2020202020202020207D20656C736520696620287569772E6F7074696F6E732E74696D656F7574416374696F6E203D3D3D207569772E5F76616C7565732E74696D656F7574416374696F6E456E756D2E4C4F474F555429207B0D0A2020202020202020'; 461 | wwv_flow_api.g_varchar2_table(57) := '202020207569772E5F7265646972656374287569772E6F7074696F6E732E6C6F676F757455524C293B0D0A2020202020202020207D0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F'; 462 | wwv_flow_api.g_varchar2_table(58) := '75743A205F657870697265416374696F6E2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F7761726E3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D'; 463 | wwv_flow_api.g_varchar2_table(59) := '0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7761726E202873746172742927293B0D0A20202009090D0A202020202020202020766172206469616C6F6748746D6C203D200D0A2020202020202020'; 464 | wwv_flow_api.g_varchar2_table(60) := '20202020273C64697620636C6173733D2273657373696F6E2D74696D656F75742D636F6E7461696E65722075692D776964676574223E27202B200D0A202020202020202020202020272020203C703E272B207569772E6F7074696F6E732E73686F775761'; 465 | wwv_flow_api.g_varchar2_table(61) := '726E696E674D65737361676520202B273C2F703E27202B200D0A202020202020202020202020273C2F6469763E273B09090D0A2020200909090D0A202020202020202020242827626F647927292E617070656E6428206469616C6F6748746D6C20293B0D'; 466 | wwv_flow_api.g_varchar2_table(62) := '0A2020202020202020207569772E5F656C656D656E74732E246469616C6F67203D202428272E73657373696F6E2D74696D656F75742D636F6E7461696E657227293B200D0A2020202020202020200D0A2020202020202020207569772E5F656C656D656E'; 467 | wwv_flow_api.g_varchar2_table(63) := '74732E246469616C6F672E6469616C6F67287B0D0A20202020202020202020202064697361626C65643A2066616C73652C0D0A2020202020202020202020206175746F4F70656E3A20747275652C0D0A202020202020202020202020627574746F6E733A'; 468 | wwv_flow_api.g_varchar2_table(64) := '207B20224F6B223A2066756E6374696F6E2829207B20242874686973292E6469616C6F672822636C6F736522293B207D207D2C0D0A202020202020202020202020636C6F73654F6E4573636170653A20747275652C0D0A20202020202020202020202063'; 469 | wwv_flow_api.g_varchar2_table(65) := '6C6F7365546578743A2027436C6F7365272C0D0A2020202020202020202020206469616C6F67436C6173733A202773657373696F6E2D74696D656F75742D6469616C6F67272C0D0A202020202020202020202020647261676761626C653A20747275652C'; 470 | wwv_flow_api.g_varchar2_table(66) := '0D0A2020202020202020202020206865696768743A20276175746F272C0D0A202020202020202020202020686964653A206E756C6C2C0D0A2020202020202020202020206D6178684865696768743A2066616C73652C0D0A202020202020202020202020'; 471 | wwv_flow_api.g_varchar2_table(67) := '6D617857696474683A2066616C73652C0D0A2020202020202020202020206D696E4865696768743A203130302C0D0A2020202020202020202020206D696E57696474683A203230302C0D0A2020202020202020202020206D6F64616C3A20747275652C0D'; 472 | wwv_flow_api.g_varchar2_table(68) := '0A202020202020202020202020726573697A61626C653A2066616C73652C0D0A20202020202020202020202073686F773A206E756C6C2C0D0A202020202020202020202020737461636B3A20747275652C0D0A2020202020202020202020207469746C65'; 473 | wwv_flow_api.g_varchar2_table(69) := '3A207569772E6F7074696F6E732E73686F775761726E696E675469746C652C0D0A202020202020202020202020636C6F73653A2066756E6374696F6E2829207B0D0A2020202020202020202020202020207569772E5F636C6F73655761726E696E672829'; 474 | wwv_flow_api.g_varchar2_table(70) := '3B0D0A2020202020202020202020207D0D0A2020202020202020207D293B0D0A0D0A2020202020202020207569772E5F73746172745469746C65426C696E6B28293B0D0A2020202020202020207569772E5F76616C7565732E69735761726E6564203D20'; 475 | wwv_flow_api.g_varchar2_table(71) := '747275653B0D0A2020202020202020200D0A2020202020202020206966287569772E6F7074696F6E732E6B65657053657373696F6E416C697665297B0D0A202020202020202020202020242E69646C6554696D6572282764657374726F7927293B0D0A20'; 476 | wwv_flow_api.g_varchar2_table(72) := '20202020202020207D0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7761726E2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F636C6F73655761'; 477 | wwv_flow_api.g_varchar2_table(73) := '726E696E673A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A20202009090D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F636C6F7365576172'; 478 | wwv_flow_api.g_varchar2_table(74) := '6E696E67202873746172742927293B0D0A2020202020202020200D0A2020202020202020207569772E5F656C656D656E74732E246469616C6F672E6469616C6F67282764657374726F7927293B0D0A2020202020202020207569772E5F656C656D656E74'; 479 | wwv_flow_api.g_varchar2_table(75) := '732E246469616C6F672E72656D6F766528293B0D0A2020202020202020207569772E5F73746F70426C696E6B28293B0D0A2020202020202020207569772E5F73746F7054696D65727328293B0D0A2020202020202020207569772E5F76616C7565732E69'; 480 | wwv_flow_api.g_varchar2_table(76) := '735761726E6564203D2066616C73653B0D0A20202009090D0A2020202020202020206966287569772E6F7074696F6E732E6B65657053657373696F6E416C697665297B0D0A2020202020202020202020207569772E5F70696E6753657373696F6E28293B'; 481 | wwv_flow_api.g_varchar2_table(77) := '0D0A2020202020202020202020207569772E5F737461727449646C654D6F6E69746F7228293B0D0A2020202020202020207D0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A'; 482 | wwv_flow_api.g_varchar2_table(78) := '205F636C6F73655761726E696E672028656E642927293B0D0A2020202020207D2C0D0A2020202020205F73746172745469746C65426C696E6B3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A0D0A'; 483 | wwv_flow_api.g_varchar2_table(79) := '202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F73746172745469746C65426C696E6B202873746172742927293B0D0A0D0A2020202020202020207569772E5F7469746C65426C696E6B28293B0D0A2020'; 484 | wwv_flow_api.g_varchar2_table(80) := '202020202020207569772E5F76616C7565732E7469746C65426C696E6B496E74657276616C4944203D20736574496E74657276616C2866756E6374696F6E28297B200D0A2020202020202020202020207569772E5F7469746C65426C696E6B28293B200D'; 485 | wwv_flow_api.g_varchar2_table(81) := '0A2020202020202020207D2C207569772E5F76616C7565732E7469746C65426C696E6B496E74657276616C293B0D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F737461'; 486 | wwv_flow_api.g_varchar2_table(82) := '72745469746C65426C696E6B2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F7469746C65426C696E6B3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A202020202020202020'; 487 | wwv_flow_api.g_varchar2_table(83) := '0D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7469746C65426C696E6B202873746172742927293B2020200D0A2020202020200D0A202020202020202020646F63756D656E742E7469746C65203D'; 488 | wwv_flow_api.g_varchar2_table(84) := '207569772E6F7074696F6E732E73686F775761726E696E675469746C653B0D0A20202020202020202073657454696D656F75742866756E6374696F6E28297B200D0A202020202020202020202020646F63756D656E742E7469746C65203D207569772E5F'; 489 | wwv_flow_api.g_varchar2_table(85) := '76616C7565732E646F635469746C653B20200D0A2020202020202020207D2C20353030293B0D0A202020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7469746C65426C696E6B'; 490 | wwv_flow_api.g_varchar2_table(86) := '2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F73746F70426C696E6B3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A2020202020202020200D0A2020202020202020206170'; 491 | wwv_flow_api.g_varchar2_table(87) := '65782E6465627567282753657373696F6E2054696D656F75743A205F73746F70426C696E6B202873746172742927293B0D0A2020202020202020200D0A202020202020202020646F63756D656E742E7469746C65203D207569772E5F76616C7565732E64'; 492 | wwv_flow_api.g_varchar2_table(88) := '6F635469746C653B0D0A202020202020202020636C656172496E74657276616C287569772E5F76616C7565732E7469746C65426C696E6B496E74657276616C4944293B0D0A0D0A202020202020202020617065782E6465627567282753657373696F6E20'; 493 | wwv_flow_api.g_varchar2_table(89) := '54696D656F75743A205F73746F70426C696E6B2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F72656469726563743A2066756E6374696F6E2875726C297B0D0A20202020202020202076617220756977203D20746869733B0D0A20'; 494 | wwv_flow_api.g_varchar2_table(90) := '20202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7265646972656374202873746172742927293B0D0A2020202020202020200D0A202020202020202020696620287569772E6F70'; 495 | wwv_flow_api.g_varchar2_table(91) := '74696F6E732E68696465486973746F727929207B0D0A20202020202020202020202077696E646F772E6C6F636174696F6E2E7265706C6163652875726C293B0D0A2020202020202020207D20656C7365207B0D0A20202020202020202020202077696E64'; 496 | wwv_flow_api.g_varchar2_table(92) := '6F772E6C6F636174696F6E2E68726566203D2075726C3B0D0A2020202020202020207D20200D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F7265646972656374202865'; 497 | wwv_flow_api.g_varchar2_table(93) := '6E642927293B0D0A2020202020207D2C0D0A2020202020205F73686F774D61736B3A2066756E6374696F6E28297B0D0A20202020202020202076617220756977203D20746869733B0D0A202020202020202020766172206D61736B486569676874203D20'; 498 | wwv_flow_api.g_varchar2_table(94) := '2428646F63756D656E74292E68656967687428293B0D0A202020202020202020766172206D61736B5769647468203D20242877696E646F77292E776964746828293B0D0A20202020202020202076617220246D61736B203D202428646F63756D656E742E'; 499 | wwv_flow_api.g_varchar2_table(95) := '637265617465456C656D656E7428276469762729292E6174747228276964272C2773657373696F6E2D74696D656F75742D6D61736B27292E637373287B0D0A20202020202020202020202027776964746827203A206D61736B57696474682C0D0A202020'; 500 | wwv_flow_api.g_varchar2_table(96) := '2020202020202020202768656967687427203A206D61736B4865696768740D0A2020202020202020207D293B0D0A0D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F73686F774D61736B2028737461'; 501 | wwv_flow_api.g_varchar2_table(97) := '72742927293B0D0A202020202020202020617065782E646562756728272E2E2E6D61736B4865696768743A27202B206D61736B486569676874293B0D0A202020202020202020617065782E646562756728272E2E2E6D61736B57696474683A27202B206D'; 502 | wwv_flow_api.g_varchar2_table(98) := '61736B5769647468293B0D0A0D0A202020202020202020242827626F647927292E617070656E6428246D61736B293B0D0A0D0A202020202020202020242877696E646F77292E726573697A652866756E6374696F6E28297B200D0A202020202020202020'; 503 | wwv_flow_api.g_varchar2_table(99) := '202020766172206D61736B486569676874203D202428646F63756D656E74292E68656967687428293B0D0A202020202020202020202020766172206D61736B5769647468203D20242877696E646F77292E776964746828293B0D0A0D0A20202020202020'; 504 | wwv_flow_api.g_varchar2_table(100) := '20202020202428272373657373696F6E2D74696D656F75742D6D61736B27292E637373287B277769647468273A6D61736B57696474682C27686569676874273A6D61736B4865696768747D293B0D0A2020202020202020207D293B0D0A20202020202020'; 505 | wwv_flow_api.g_varchar2_table(101) := '20200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F73686F774D61736B2028656E642927293B0D0A2020202020207D2C0D0A2020202020205F68616E646C6550696E673A2066756E6374696F6E28'; 506 | wwv_flow_api.g_varchar2_table(102) := '297B0D0A20202020202020202076617220756977203D20746869733B0D0A0D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F68616E646C6550696E67202873746172742927293B2020200D0A202020'; 507 | wwv_flow_api.g_varchar2_table(103) := '2020202020200D0A202020202020202020696628242E6461746128646F63756D656E742C2769646C6554696D65722729203D3D3D202761637469766527297B0D0A202020202020202020202020617065782E6465627567282773657373696F6E20697320'; 508 | wwv_flow_api.g_varchar2_table(104) := '6163746976652E2052656672657368696E67207365727665722073657373696F6E27293B0D0A2020202020202020202020207569772E5F70696E6753657373696F6E28293B0D0A2020202020202020207D656C73657B0D0A202020202020202020202020'; 509 | wwv_flow_api.g_varchar2_table(105) := '617065782E6465627567282773657373696F6E20697320696E6163746976652E20446F206E6F742072656672657368207365727665722073657373696F6E2E27293B0D0A2020202020202020207D0D0A202020202020202020617065782E646562756728'; 510 | wwv_flow_api.g_varchar2_table(106) := '2753657373696F6E2054696D656F75743A205F68616E646C6550696E672028656E642927293B2020202020202020200D0A2020202020207D2C0D0A2020202020205F70696E6753657373696F6E3A2066756E6374696F6E28297B0D0A2020202020202020'; 511 | wwv_flow_api.g_varchar2_table(107) := '2076617220756977203D20746869733B0D0A0D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F70696E6753657373696F6E202873746172742927293B0D0A2020202020202020200D0A202020202020'; 512 | wwv_flow_api.g_varchar2_table(108) := '202020706C7567696E280D0A2020202020202020202020207569772E6F7074696F6E732E616A61784964656E7469666965722C0D0A2020202020202020202020207B7D2C0D0A2020202020202020202020207B0D0A202020202020202020202020202020'; 513 | wwv_flow_api.g_varchar2_table(109) := '64617461547970653A202774657874272C0D0A202020202020202020202020202020737563636573733A2066756E6374696F6E2864617461297B0D0A202020202020202020202020202020202020617065782E64656275672827416A6178207265717565'; 514 | wwv_flow_api.g_varchar2_table(110) := '7374207375636365737366756C27293B0D0A202020202020202020202020202020202020636C65617254696D656F7574287569772E5F76616C7565732E70696E674944293B0D0A2020202020202020202020202020202020207569772E5F737461727450'; 515 | wwv_flow_api.g_varchar2_table(111) := '696E6754696D657228293B0D0A2020202020202020202020202020202020207569772E5F73746F7054696D65727328293B0D0A2020202020202020202020202020202020207569772E5F737461727454696D65727328293B0D0A20202020202020202020'; 516 | wwv_flow_api.g_varchar2_table(112) := '20202020207D0D0A2020202020202020202020207D0D0A202020202020202020293B200D0A2020202020202020200D0A202020202020202020617065782E6465627567282753657373696F6E2054696D656F75743A205F70696E6753657373696F6E2028'; 517 | wwv_flow_api.g_varchar2_table(113) := '656E642927293B0D0A2020202020207D0D0A2020207D293B0D0A7D292820617065782E6A51756572792C20617065782E7365727665722E706C7567696E20293B'; 518 | null; 519 | end; 520 | / 521 | begin 522 | wwv_flow_api.create_plugin_file( 523 | p_id=>wwv_flow_api.id(36863526736935015915) 524 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 525 | ,p_file_name=>'js/apex-session-timeout.js' 526 | ,p_mime_type=>'text/javascript' 527 | ,p_file_charset=>'utf-8' 528 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table) 529 | ); 530 | end; 531 | / 532 | begin 533 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table; 534 | wwv_flow_api.g_varchar2_table(1) := '2F2A0D0A202A206A51756572792069646C6554696D657220706C7567696E0D0A202A2076657273696F6E20302E392E3130303531310D0A202A206279205061756C2049726973682E0D0A202A202020687474703A2F2F6769746875622E636F6D2F706175'; 535 | wwv_flow_api.g_varchar2_table(2) := '6C69726973682F7975692D6D6973632F747265652F0D0A202A204D4954206C6963656E73650D0A0D0A202A20616461707465642066726F6D205955492069646C652074696D6572206279206E7A616B61733A0D0A202A202020687474703A2F2F67697468'; 536 | wwv_flow_api.g_varchar2_table(3) := '75622E636F6D2F6E7A616B61732F7975692D6D6973632F0D0A2A2F0D0A2866756E6374696F6E2861297B612E69646C6554696D65723D66756E6374696F6E286A2C63297B76617220643D66616C73652C673D747275652C683D33303030302C6B3D226D6F'; 537 | wwv_flow_api.g_varchar2_table(4) := '7573656D6F7665206B6579646F776E20444F4D4D6F7573655363726F6C6C206D6F757365776865656C206D6F757365646F776E20746F756368737461727420746F7563686D6F7665223B633D637C7C646F63756D656E743B76617220663D66756E637469'; 538 | wwv_flow_api.g_varchar2_table(5) := '6F6E286F297B696628747970656F66206F3D3D3D226E756D62657222297B6F3D756E646566696E65647D766172206E3D612E64617461286F7C7C632C2269646C6554696D65724F626A22293B6E2E69646C653D216E2E69646C653B766172206C3D282B6E'; 539 | wwv_flow_api.g_varchar2_table(6) := '657720446174652829292D6E2E6F6C64646174653B6E2E6F6C64646174653D2B6E6577204461746528293B6966286E2E69646C652626286C3C6829297B6E2E69646C653D66616C73653B636C65617254696D656F757428612E69646C6554696D65722E74'; 540 | wwv_flow_api.g_varchar2_table(7) := '4964293B69662867297B612E69646C6554696D65722E7449643D73657454696D656F757428662C68297D72657475726E7D766172206D3D6A51756572792E4576656E7428612E6461746128632C2269646C6554696D6572222C6E2E69646C653F2269646C'; 541 | wwv_flow_api.g_varchar2_table(8) := '65223A2261637469766522292B222E69646C6554696D657222293B612863292E74726967676572286D297D2C693D66756E6374696F6E286C297B766172206D3D612E64617461286C2C2269646C6554696D65724F626A22297C7C7B7D3B6D2E656E61626C'; 542 | wwv_flow_api.g_varchar2_table(9) := '65643D66616C73653B636C65617254696D656F7574286D2E744964293B61286C292E756E62696E6428222E69646C6554696D657222297D2C623D66756E6374696F6E28297B766172206C3D612E6461746128746869732C2269646C6554696D65724F626A'; 543 | wwv_flow_api.g_varchar2_table(10) := '22293B636C65617254696D656F7574286C2E744964293B6966286C2E656E61626C6564297B6966286C2E69646C65297B662874686973297D6C2E7449643D73657454696D656F757428662C6C2E74696D656F7574297D7D3B76617220653D612E64617461'; 544 | wwv_flow_api.g_varchar2_table(11) := '28632C2269646C6554696D65724F626A22297C7C7B7D3B652E6F6C64646174653D652E6F6C64646174657C7C2B6E6577204461746528293B696628747970656F66206A3D3D3D226E756D62657222297B683D6A7D656C73657B6966286A3D3D3D22646573'; 545 | wwv_flow_api.g_varchar2_table(12) := '74726F7922297B692863293B72657475726E20746869737D656C73657B6966286A3D3D3D22676574456C617073656454696D6522297B72657475726E282B6E657720446174652829292D652E6F6C64646174657D7D7D612863292E62696E6428612E7472'; 546 | wwv_flow_api.g_varchar2_table(13) := '696D28286B2B222022292E73706C697428222022292E6A6F696E28222E69646C6554696D6572202229292C62293B652E69646C653D643B652E656E61626C65643D673B652E74696D656F75743D683B652E7449643D73657454696D656F757428662C652E'; 547 | wwv_flow_api.g_varchar2_table(14) := '74696D656F7574293B612E6461746128632C2269646C6554696D6572222C2261637469766522293B612E6461746128632C2269646C6554696D65724F626A222C65297D3B612E666E2E69646C6554696D65723D66756E6374696F6E2862297B6966287468'; 548 | wwv_flow_api.g_varchar2_table(15) := '69735B305D297B612E69646C6554696D657228622C746869735B305D297D72657475726E20746869737D7D2928617065782E6A5175657279293B'; 549 | null; 550 | end; 551 | / 552 | begin 553 | wwv_flow_api.create_plugin_file( 554 | p_id=>wwv_flow_api.id(36864303908283023785) 555 | ,p_plugin_id=>wwv_flow_api.id(89844768134533014906) 556 | ,p_file_name=>'lib/idle-timer/js/idle-timer.min.js' 557 | ,p_mime_type=>'text/javascript' 558 | ,p_file_charset=>'utf-8' 559 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table) 560 | ); 561 | end; 562 | / 563 | begin 564 | wwv_flow_api.import_end(p_auto_install_sup_obj => nvl(wwv_flow_application_install.get_auto_install_sup_obj, false), p_is_component_import => true); 565 | commit; 566 | end; 567 | / 568 | set verify on feedback on define on 569 | prompt ...done 570 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | const path = require('path'); 5 | const rename = require('gulp-rename'); 6 | const gulp = require('gulp'); 7 | const concat = require('gulp-concat'); 8 | const uglify = require('gulp-uglify'); 9 | const sourcemaps = require('gulp-sourcemaps'); 10 | const del = require('del'); 11 | 12 | const config = { 13 | masterFileName : 'apex-session-timeout', 14 | paths : { 15 | outputdir:'dist', 16 | builddir:'build', 17 | scripts: 'src/js/**/*.js', 18 | plsql: 'src/plsql/**/*.{sql,pks,pkb}' 19 | } 20 | }; 21 | 22 | gulp.task('clean', function () { 23 | return del([config.paths.builddir]); 24 | }); 25 | 26 | gulp.task('scripts', ['clean'], function () { 27 | return gulp.src(config.paths.scripts) 28 | .pipe(gulp.dest(path.join(config.paths.outputdir, 'js'))) 29 | .pipe(sourcemaps.init()) 30 | .pipe(uglify()) 31 | .pipe(rename({suffix:'.min'})) 32 | .pipe(sourcemaps.write('./maps')) 33 | .pipe(gulp.dest(path.join(config.paths.outputdir, 'js'))); 34 | }); 35 | 36 | gulp.task('plsql',function(){ 37 | return gulp.src(config.paths.plsql) 38 | .pipe(gulp.dest(path.join(config.paths.outputdir, 'plsql'))) 39 | }); 40 | 41 | gulp.task('watch', function () { 42 | gulp.watch(config.paths.scripts, ['scripts']); 43 | }); 44 | 45 | gulp.task('default', ['plsql','watch','scripts']); 46 | })(); 47 | -------------------------------------------------------------------------------- /lib/idle-timer/js/idle-timer.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery idleTimer plugin 3 | * version 0.9.100511 4 | * by Paul Irish. 5 | * http://github.com/paulirish/yui-misc/tree/ 6 | * MIT license 7 | 8 | * adapted from YUI idle timer by nzakas: 9 | * http://github.com/nzakas/yui-misc/ 10 | */ 11 | (function(a){a.idleTimer=function(j,c){var d=false,g=true,h=30000,k="mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove";c=c||document;var f=function(o){if(typeof o==="number"){o=undefined}var n=a.data(o||c,"idleTimerObj");n.idle=!n.idle;var l=(+new Date())-n.olddate;n.olddate=+new Date();if(n.idle&&(l' + 174 | '

'+ uiw.options.showWarningMessage +'

' + 175 | ''; 176 | 177 | $('body').append( dialogHtml ); 178 | uiw._elements.$dialog = $('.session-timeout-container'); 179 | 180 | uiw._elements.$dialog.dialog({ 181 | disabled: false, 182 | autoOpen: true, 183 | buttons: { "Ok": function() { $(this).dialog("close"); } }, 184 | closeOnEscape: true, 185 | closeText: 'Close', 186 | dialogClass: 'session-timeout-dialog', 187 | draggable: true, 188 | height: 'auto', 189 | hide: null, 190 | maxhHeight: false, 191 | maxWidth: false, 192 | minHeight: 100, 193 | minWidth: 200, 194 | modal: true, 195 | resizable: false, 196 | show: null, 197 | stack: true, 198 | title: uiw.options.showWarningTitle, 199 | close: function() { 200 | uiw._closeWarning(); 201 | } 202 | }); 203 | 204 | uiw._startTitleBlink(); 205 | uiw._values.isWarned = true; 206 | 207 | if(uiw.options.keepSessionAlive){ 208 | $.idleTimer('destroy'); 209 | } 210 | 211 | apex.debug('Session Timeout: _warn (end)'); 212 | }, 213 | _closeWarning: function(){ 214 | var uiw = this; 215 | 216 | apex.debug('Session Timeout: _closeWarning (start)'); 217 | 218 | uiw._elements.$dialog.dialog('destroy'); 219 | uiw._elements.$dialog.remove(); 220 | uiw._stopBlink(); 221 | uiw._stopTimers(); 222 | uiw._values.isWarned = false; 223 | 224 | if(uiw.options.keepSessionAlive){ 225 | uiw._pingSession(); 226 | uiw._startIdleMonitor(); 227 | } 228 | 229 | apex.debug('Session Timeout: _closeWarning (end)'); 230 | }, 231 | _startTitleBlink: function(){ 232 | var uiw = this; 233 | 234 | apex.debug('Session Timeout: _startTitleBlink (start)'); 235 | 236 | uiw._titleBlink(); 237 | uiw._values.titleBlinkIntervalID = setInterval(function(){ 238 | uiw._titleBlink(); 239 | }, uiw._values.titleBlinkInterval); 240 | 241 | apex.debug('Session Timeout: _startTitleBlink (end)'); 242 | }, 243 | _titleBlink: function(){ 244 | var uiw = this; 245 | 246 | apex.debug('Session Timeout: _titleBlink (start)'); 247 | 248 | document.title = uiw.options.showWarningTitle; 249 | setTimeout(function(){ 250 | document.title = uiw._values.docTitle; 251 | }, 500); 252 | 253 | apex.debug('Session Timeout: _titleBlink (end)'); 254 | }, 255 | _stopBlink: function(){ 256 | var uiw = this; 257 | 258 | apex.debug('Session Timeout: _stopBlink (start)'); 259 | 260 | document.title = uiw._values.docTitle; 261 | clearInterval(uiw._values.titleBlinkIntervalID); 262 | 263 | apex.debug('Session Timeout: _stopBlink (end)'); 264 | }, 265 | _redirect: function(url){ 266 | var uiw = this; 267 | 268 | apex.debug('Session Timeout: _redirect (start)'); 269 | 270 | if (uiw.options.hideHistory) { 271 | window.location.replace(url); 272 | } else { 273 | window.location.href = url; 274 | } 275 | 276 | apex.debug('Session Timeout: _redirect (end)'); 277 | }, 278 | _showMask: function(){ 279 | var uiw = this; 280 | var maskHeight = $(document).height(); 281 | var maskWidth = $(window).width(); 282 | var $mask = $(document.createElement('div')).attr('id','session-timeout-mask').css({ 283 | 'width' : maskWidth, 284 | 'height' : maskHeight 285 | }); 286 | 287 | apex.debug('Session Timeout: _showMask (start)'); 288 | apex.debug('...maskHeight:' + maskHeight); 289 | apex.debug('...maskWidth:' + maskWidth); 290 | 291 | $('body').append($mask); 292 | 293 | $(window).resize(function(){ 294 | var maskHeight = $(document).height(); 295 | var maskWidth = $(window).width(); 296 | 297 | $('#session-timeout-mask').css({'width':maskWidth,'height':maskHeight}); 298 | }); 299 | 300 | apex.debug('Session Timeout: _showMask (end)'); 301 | }, 302 | _handlePing: function(){ 303 | var uiw = this; 304 | 305 | apex.debug('Session Timeout: _handlePing (start)'); 306 | 307 | if($.data(document,'idleTimer') === 'active'){ 308 | apex.debug('session is active. Refreshing server session'); 309 | uiw._pingSession(); 310 | }else{ 311 | apex.debug('session is inactive. Do not refresh server session.'); 312 | } 313 | apex.debug('Session Timeout: _handlePing (end)'); 314 | }, 315 | _pingSession: function(){ 316 | var uiw = this; 317 | 318 | apex.debug('Session Timeout: _pingSession (start)'); 319 | 320 | plugin( 321 | uiw.options.ajaxIdentifier, 322 | {}, 323 | { 324 | dataType: 'text', 325 | success: function(data){ 326 | apex.debug('Ajax request successful'); 327 | clearTimeout(uiw._values.pingID); 328 | uiw._startPingTimer(); 329 | uiw._stopTimers(); 330 | uiw._startTimers(); 331 | } 332 | } 333 | ); 334 | 335 | apex.debug('Session Timeout: _pingSession (end)'); 336 | } 337 | }); 338 | })( apex.jQuery, apex.server.plugin ); -------------------------------------------------------------------------------- /src/plsql/pl-sql-code.sql: -------------------------------------------------------------------------------- 1 | FUNCTION render_session_timeout ( 2 | p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION, 3 | p_plugin IN APEX_PLUGIN.T_PLUGIN 4 | ) 5 | 6 | RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT 7 | 8 | IS 9 | 10 | l_result APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT; 11 | l_timeoutAction VARCHAR2(4000); 12 | l_timeoutMessage VARCHAR2(500); 13 | l_timeoutURL VARCHAR2(4000); 14 | l_logoutURL VARCHAR2(4000); 15 | l_showWarning BOOLEAN; 16 | l_showWarningMiliBefore NUMBER; 17 | l_showWarningTitle VARCHAR2(50); 18 | l_showWarningMessage VARCHAR2(500); 19 | l_hideHistory BOOLEAN; 20 | l_sessionIdleDuration NUMBER; 21 | l_maskBrowser BOOLEAN; 22 | l_keepSessionAlive BOOLEAN; 23 | l_crlf CHAR(2) := CHR(13)||CHR(10); 24 | 25 | BEGIN 26 | 27 | IF apex_application.g_debug 28 | THEN 29 | apex_plugin_util.debug_dynamic_action( 30 | p_plugin => p_plugin, 31 | p_dynamic_action => p_dynamic_action 32 | ); 33 | END IF; 34 | 35 | l_timeoutAction := NVL(p_plugin.attribute_01,'ALERT'); 36 | l_timeoutMessage := NVL(p_plugin.attribute_02,'Session has been idle for too long!'); 37 | l_showWarning := CASE p_plugin.attribute_03 38 | WHEN 'Y' THEN TRUE 39 | ELSE FALSE 40 | END; 41 | l_showWarningMiliBefore := p_plugin.attribute_06 * 1000; 42 | l_showWarningTitle := NVL(p_plugin.attribute_08,'Idle Session Warning'); 43 | l_showWarningMessage := NVL(p_plugin.attribute_04,'This session will expire shortly!'); 44 | l_hideHistory := FALSE; 45 | l_maskBrowser := CASE p_plugin.attribute_05 46 | WHEN 'N' THEN FALSE 47 | ELSE TRUE 48 | END; 49 | l_keepSessionAlive := CASE p_plugin.attribute_07 50 | WHEN 'Y' THEN TRUE 51 | ELSE FALSE 52 | END; 53 | 54 | SELECT 55 | NVL(MAXIMUM_SESSION_IDLE_SECONDS, 3600) * 1000, 56 | NVL(SESSION_IDLE_TIME_EXCEEDED_URL, HOME_LINK), 57 | NVL(LOGOUT_URL,'apex_authentication.logout?p_app_id=&APP_ID.&p_session_id=&SESSION.') 58 | INTO 59 | l_sessionIdleDuration, 60 | l_timeoutURL, 61 | l_logoutURL 62 | FROM 63 | apex_applications 64 | WHERE 65 | application_id = apex_application.g_flow_id; 66 | 67 | l_timeoutURL := apex_plugin_util.replace_substitutions (l_timeoutURL); 68 | 69 | l_logoutURL := apex_plugin_util.replace_substitutions (l_logoutURL); 70 | 71 | apex_css.add( 72 | p_css => 73 | '#session-timeout-mask{position: absolute;z-index: 9000;background-color : #343434;top: 0;left: 0;}' || l_crlf || 74 | '.session-timeout-dialog .ui-dialog-titlebar-close{display: none !important;}' 75 | ); 76 | 77 | apex_javascript.add_library( 78 | p_name => 'jquery.ui.button', 79 | p_directory => '#JQUERYUI_DIRECTORY#ui/', 80 | p_version => NULL 81 | ); 82 | 83 | IF l_keepSessionAlive THEN 84 | apex_javascript.add_library( 85 | p_name => 'idle-timer.min', 86 | p_directory => p_plugin.file_prefix||'lib/idle-timer/js/', 87 | p_version => NULL 88 | ); 89 | END IF; 90 | 91 | l_result.javascript_function := 92 | 'function(){apex.jQuery(document).apex_session_timeout({' || l_crlf 93 | || ' ' || apex_javascript.add_attribute('timeoutAction', l_timeoutAction) || l_crlf 94 | || ' ' || apex_javascript.add_attribute('timeoutMessage', l_timeoutMessage) || l_crlf 95 | || ' ' || apex_javascript.add_attribute('timeoutURL', l_timeoutURL) || l_crlf 96 | || ' ' || apex_javascript.add_attribute('logoutURL', l_logoutURL) || l_crlf 97 | || ' ' || apex_javascript.add_attribute('showWarning', l_showWarning) || l_crlf 98 | || ' ' || apex_javascript.add_attribute('showWarningMiliBefore',l_showWarningMiliBefore) || l_crlf 99 | || ' ' || apex_javascript.add_attribute('showWarningTitle', l_showWarningTitle) || l_crlf 100 | || ' ' || apex_javascript.add_attribute('showWarningMessage', l_showWarningMessage) || l_crlf 101 | || ' ' || apex_javascript.add_attribute('hideHistory', l_hideHistory) || l_crlf 102 | || ' ' || apex_javascript.add_attribute('sessionIdleDuration', l_sessionIdleDuration) || l_crlf 103 | || ' ' || apex_javascript.add_attribute('maskBrowser', l_maskBrowser) || l_crlf 104 | || ' ' || apex_javascript.add_attribute('keepSessionAlive', l_keepSessionAlive) || l_crlf 105 | || ' ' || apex_javascript.add_attribute('ajaxIdentifier', apex_plugin.get_ajax_identifier(), FALSE, FALSE) || l_crlf 106 | || '});}'; 107 | 108 | RETURN l_result; 109 | 110 | END render_session_timeout; 111 | 112 | FUNCTION ajax_session_timeout( 113 | p_dynamic_action IN apex_plugin.t_dynamic_action, 114 | p_plugin IN apex_plugin.t_plugin 115 | ) 116 | RETURN apex_plugin.t_dynamic_action_ajax_result 117 | IS 118 | l_result apex_plugin.t_dynamic_action_ajax_result; 119 | BEGIN 120 | RETURN l_result; 121 | END ajax_session_timeout; --------------------------------------------------------------------------------