hotspotlogin 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -25,6 +25,7 @@ On the command-line:
25
25
  $ hotspotlogin [options]
26
26
 
27
27
  ==== General Options
28
+ All this options may be put into the YAML config file specified by --conf
28
29
 
29
30
  --[no-]daemon daemonize [by default, executes in foreground]
30
31
 
@@ -50,10 +51,16 @@ On the command-line:
50
51
 
51
52
  --logo <IMAGE FILE> will be displayed in any page as
52
53
  /hotspotlogin/logo.( png | jpg | etc... )
54
+
55
+ --logo-link <URL>
53
56
 
54
57
  --signup-url <URL> if you have a web page where end-users may create
55
58
  new accounts, a link will be displayed
56
59
 
60
+ --my-url <URL> "My Account" link, where -USER- will be replaced by
61
+ the actual username, e.g.
62
+ http://accounts.mysite.com/?id=-USER-
63
+
57
64
  --custom-text <FRAGMENT.html>
58
65
 
59
66
  --custom-footer <FRAGMENT.html>
@@ -10,4 +10,6 @@ custom-headline: My Organization Name
10
10
  custom-text: /some/path/fragment.html
11
11
  custom-footer: /some/other/path/fragment.html
12
12
  logo: /some/path/to/mylogo.png
13
+ logo-link: http://myorg.com
14
+ my-url: http://accounts.myorg.com/?id=-USER- # -USER- will be dinamically replaced by real username
13
15
  favicon: /path/to/favicon.ico
@@ -189,6 +189,7 @@ module HotSpotLogin
189
189
  :timeleft => params['timeleft'], # legacy...
190
190
  :interval => HotSpotLogin.config['interval'],
191
191
  :signup_url => HotSpotLogin.config['signup-url'],
192
+ :my_url => HotSpotLogin.config['my-url'],
192
193
  :custom_headline =>
193
194
  HotSpotLogin.config['custom-headline'], # like "MyOrg Name"
194
195
  :custom_text => HotSpotLogin.config['custom-text'],
@@ -1,6 +1,6 @@
1
1
  module HotSpotLogin
2
2
 
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
 
5
5
  DEFAULT_CONFIG = {
6
6
  'listen-address' => '0.0.0.0',
@@ -141,6 +141,12 @@ function showUserStatus(h) {
141
141
  break;
142
142
  }
143
143
  }
144
+
145
+ var e = document.getElementById('myAccount');
146
+ if (e) {
147
+ e.style.display = '';
148
+ e.setAttribute( 'href', h.myAccountUrlTemplate.replace('-USER-', chilliController.session.userName) );
149
+ }
144
150
  }
145
151
 
146
152
  function updateReplyMessage(clientState) {
@@ -32,6 +32,12 @@
32
32
  id="logInLogOut"
33
33
  href="http://<%= uamip %>:<%= uamport %>/logoff">Logout</a>
34
34
  <a href="#" onClick="javascript:chilliController.refresh();">Refresh</a>
35
+ <a
36
+ id="myAccount"
37
+ href=""
38
+ target="_blank"
39
+ style="display:none;"
40
+ >My Account<a>
35
41
  </div>
36
42
  <% elsif [2, 5, 3, 13].include? result %>
37
43
  <div id="form-container">
data/views/layout.erb CHANGED
@@ -61,6 +61,14 @@
61
61
 
62
62
  </script>
63
63
 
64
+ <!-- CovaChilli JSON interface -->
65
+ <script
66
+ type="text/javascript" src="hotspotlogin/js/ChilliLibrary.js">
67
+ </script>
68
+ <script
69
+ type="text/javascript" src="hotspotlogin/js/UserStatus.js">
70
+ </script>
71
+
64
72
  <link rel="stylesheet" href="/hotspotlogin/css/default.css"/>
65
73
  <link rel="shortcut icon" href="/hotspotlogin/favicon.ico"/>
66
74
 
@@ -68,24 +76,19 @@
68
76
 
69
77
  <body onLoad="javascript:doOnLoad(<%= result %>, '<%= request.path_info %>?res=popup2&uamip=<%= uamip %>&uamport=<%= uamport %>&userurl=<%= userurl %>&redirurl=<%= redirurl %>&reply=<%= Rack::Utils::escape reply %>','<%= userurl %>', '<%= redirurl %>', '<%= timeleft %>')">
70
78
  <div id="powered-by">
71
- Powered by <a href="http://rubygems.org/gems/hotspotlogin">hotspotlogin.rb</a>
79
+ Powered by <a target="_blank" href="http://dev.vemarsas.it/projects/hospotlogin/wiki">hotspotlogin.rb</a>
72
80
  </div>
73
81
  <div id="main">
74
82
  <%= yield %>
75
83
  </div>
76
84
  <% if status_window?(result) %>
77
85
  <!-- CovaChilli JSON interface -->
78
- <script
79
- type="text/javascript" src="hotspotlogin/js/ChilliLibrary.js">
80
- </script>
81
- <script
82
- type="text/javascript" src="hotspotlogin/js/UserStatus.js">
83
- </script>
84
86
  <script language="JavaScript">
85
87
  showUserStatus( {
86
- uamip: "<%= uamip %>",
87
- uamport: <%= uamport %>,
88
- interval: <%= interval %>
88
+ uamip: "<%= uamip %>",
89
+ uamport: <%= uamport %>,
90
+ interval: <%= interval %>,
91
+ myAccountUrlTemplate: '<%= my_url %>'
89
92
  } );
90
93
  </script>
91
94
  <% end %>
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 1.1.0
9
+ version: 1.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Guido De Rosa
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-03 00:00:00 +00:00
17
+ date: 2011-08-08 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency