punchcard 0.2.3 → 0.2.4

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/public/js/app.js +13 -9
  3. data/punchcard.gemspec +1 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -5,15 +5,6 @@ function update_status() {
5
5
  $.each(json, function(index, person) {
6
6
  update_person(person);
7
7
  });
8
- $('abbr.timeago').timeago();
9
-
10
- title = 'Punchcard.'
11
- if ($('.gravatar.pending').size() > 0) {
12
- title = 'In office: ' + $('.gravatar.pending').map(function() {
13
- return $(this).attr('title').replace(/[^A-Z]/g, '');
14
- }).get().join(', ');
15
- }
16
- $('head title').html(title);
17
8
  });
18
9
  };
19
10
 
@@ -26,8 +17,21 @@ function update_person(json) {
26
17
  } else {
27
18
  $('#people #' + json._id).replaceWith(rendered_template);
28
19
  };
20
+ $('abbr.timeago').timeago();
21
+ update_title();
29
22
  };
30
23
 
24
+ // Update page title based upon people present in office
25
+ function update_title() {
26
+ title = 'Punchcard.'
27
+ if ($('.gravatar.pending').size() > 0) {
28
+ title = 'In office: ' + $('.gravatar.pending').map(function() {
29
+ return $(this).attr('title').replace(/[^A-Z]/g, '');
30
+ }).get().join(', ');
31
+ }
32
+ $('head title').html(title);
33
+ }
34
+
31
35
  $(document).ready(function() {
32
36
  $( "#personTemplate" ).template( "personTemplate" );
33
37
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{punchcard}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Olszowka"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Christoph Olszowka