diff --git a/README.mkd b/README.mkd index ce3f29e..4bcd840 100755 --- a/README.mkd +++ b/README.mkd @@ -1,7 +1,11 @@ timeout-dialog.js ================= -Timeout-dialog.js is a JQuery plugin that displays a timeout popover after a certain period of time. The timeout dialog should be used whenever you want to display to the user that the logged in session is about to expire. It creates a light box with a countdown and options to stay signed in or sign out. +Timeout-dialog.js is a JQuery plugin that displays a timeout popover after +a certain period of time. The timeout dialog should be used whenever you +want to display to the user that the logged in session is about to expire. +It creates a light box with a countdown and options to stay signed in or +sign out. Example and Documentation ------------------------- diff --git a/css/index.css b/css/index.css index 72e1a3e..b527a9e 100755 --- a/css/index.css +++ b/css/index.css @@ -1,4 +1,3 @@ - body { font-family: Century Gothic, sans-serif; color:#444; margin: 0; padding: 0;} p { margin: 0; } h1, h2, h3, h4, h5, h6 { font-weight: normal; } diff --git a/js/timeout-dialog.js b/js/timeout-dialog.js index a77b342..b85f4b2 100755 --- a/js/timeout-dialog.js +++ b/js/timeout-dialog.js @@ -1,33 +1,33 @@ /* * timeout-dialog.js v1.0.1, 01-03-2012 - * + * * @author: Rodrigo Neri (@rigoneri) - * + * * (The MIT License) - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * THE SOFTWARE. */ /* String formatting, you might want to remove this if you already use it. * Example: - * + * * var location = 'World'; * alert('Hello {0}'.format(location)); */ @@ -57,14 +57,14 @@ String.prototype.format = function() { logout_redirect_url: '/', restart_on_yes: true, dialog_width: 350 - } + } $.extend(settings, options); var TimeoutDialog = { init: function () { this.setupDialogTimer(); - }, + }, setupDialogTimer: function() { var self = this; @@ -78,7 +78,7 @@ String.prototype.format = function() { self.destroyDialog(); $('
' + - '

' + settings.message.format('' + settings.countdown + '') + '

' + + '

' + settings.message.format('' + settings.countdown + '') + '

' + '

' + settings.question + '

' + '
') .appendTo('body') @@ -93,7 +93,7 @@ String.prototype.format = function() { dialogClass: 'timeout-dialog', title: settings.title, buttons : { - 'keep-alive-button' : { + 'keep-alive-button' : { text: settings.keep_alive_button_text, id: "timeout-keep-signin-btn", click: function() { @@ -165,7 +165,7 @@ String.prototype.format = function() { else { self.redirectLogout(is_forced); } - }, + }, redirectLogout: function(is_forced){ var target = settings.logout_redirect_url + '?next=' + encodeURIComponent(window.location.pathname + window.location.search); @@ -177,4 +177,4 @@ String.prototype.format = function() { TimeoutDialog.init(); }; -}(window.jQuery); \ No newline at end of file +}(window.jQuery);