Skip to content
This repository was archived by the owner on Apr 21, 2019. It is now read-only.

Gets rid of some whitespace #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.mkd
Original file line number Diff line number Diff line change
@@ -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
-------------------------
Expand Down
1 change: 0 additions & 1 deletion css/index.css
Original file line number Diff line number Diff line change
@@ -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; }
Expand Down
26 changes: 13 additions & 13 deletions js/timeout-dialog.js
Original file line number Diff line number Diff line change
@@ -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));
*/
Expand Down Expand Up @@ -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;
Expand All @@ -78,7 +78,7 @@ String.prototype.format = function() {
self.destroyDialog();

$('<div id="timeout-dialog">' +
'<p id="timeout-message">' + settings.message.format('<span id="timeout-countdown">' + settings.countdown + '</span>') + '</p>' +
'<p id="timeout-message">' + settings.message.format('<span id="timeout-countdown">' + settings.countdown + '</span>') + '</p>' +
'<p id="timeout-question">' + settings.question + '</p>' +
'</div>')
.appendTo('body')
Expand All @@ -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() {
Expand Down Expand Up @@ -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);
Expand All @@ -177,4 +177,4 @@ String.prototype.format = function() {

TimeoutDialog.init();
};
}(window.jQuery);
}(window.jQuery);