backlog 0.24.0 → 0.25.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.
@@ -0,0 +1,27 @@
1
+ display_notice(page)
2
+ if @work && @work.errors.empty?
3
+ @updated_fields.each do |field_name|
4
+ if field_name.to_s =~ /(.*)_time$/
5
+ attribute_name = $1
6
+ value = @work[attribute_name]
7
+ if value.is_a? BigDecimal
8
+ value = '%d:%02d' % [value.to_i, (value.frac * 60).to_i]
9
+ else
10
+ value = value.strftime('%H:%M')
11
+ end
12
+ page["work_" + field_name.to_s].value = value
13
+ else
14
+ page["work_" + field_name.to_s].value = @work.send(field_name).to_s
15
+ end
16
+ end
17
+ #page.replace "work_#{@work.id}", :partial => 'row', :object => @work
18
+ #page["work_#{@work.id}_#{@next_field}"].select
19
+ #page["work_#{@work.id}_#{@next_field}"].focus
20
+ else
21
+ @work.errors.each do |error|
22
+ page["work_#{@work.id}_#{error[0]}"].addClassName('fieldWithErrors')
23
+ end
24
+ end
25
+ #if @day_total
26
+ # page.replace_html "hours_total", "#{'%d:%02d' % [@day_total.to_i, 60 * (@day_total % 1)]}"
27
+ #end
@@ -1,9 +1,13 @@
1
- page.replace "work_#{@work.id}", :partial => 'row', :object => @work
2
- page.replace "notice", :partial => '/layouts/notice'
3
- page.visual_effect(:highlight, "notice")
1
+ display_notice(page)
2
+ if @work && @work.errors.empty?
3
+ page.replace "work_#{@work.id}", :partial => 'row', :object => @work
4
+ page["work_#{@work.id}_#{@next_field}"].select
5
+ page["work_#{@work.id}_#{@next_field}"].focus
6
+ else
7
+ @work.errors.each do |error|
8
+ page["work_#{@work.id}_#{error[0]}"].addClassName('fieldWithErrors')
9
+ end
10
+ end
4
11
  if @day_total
5
12
  page.replace_html "hours_total", "#{'%d:%02d' % [@day_total.to_i, 60 * (@day_total % 1)]}"
6
13
  end
7
- page["work_#{@work.id}_#{@next_field}"].select
8
- page["work_#{@work.id}_#{@next_field}"].focus
9
-
data/lang/en.yaml CHANGED
@@ -38,6 +38,7 @@ experimental: Experimental!
38
38
  files: Files
39
39
  friday: Friday
40
40
  grab_task: Grab task
41
+ grabbed_by_you: Grabbed by you
41
42
  group: Group
42
43
  groups: Groups
43
44
  holidays_used: Holidays used
data/lang/no.yaml CHANGED
@@ -38,6 +38,7 @@ experimental: Eksperimentell!
38
38
  files: Files
39
39
  friday: Fredag
40
40
  grab_task: Grip oppgave
41
+ grabbed_by_you: Tatt av deg
41
42
  group: Gruppe
42
43
  groups: Grupper
43
44
  holidays_used: Brukte feriedager
@@ -21,7 +21,7 @@ class EstimatesControllerTest < Test::Unit::TestCase
21
21
  assert_response :redirect
22
22
  assert_redirected_to :controller => 'periods', :action => :show, :id => tasks(:first).period_id, :task_id => 1
23
23
 
24
- assert_equal count_before +1 , Estimate.count
24
+ assert_equal count_before + 1 , Estimate.count
25
25
  end
26
26
 
27
27
  def test_create_get_is_redirected_to_root
@@ -35,7 +35,8 @@ class TimeOfDay
35
35
  end
36
36
 
37
37
  def ==(other)
38
- (self <=> other) == 0
38
+ return false unless other.is_a? TimeOfDay
39
+ (self <=> other) == 0
39
40
  end
40
41
 
41
42
  def <=>(other)
@@ -46,8 +47,12 @@ class TimeOfDay
46
47
  on(Date.today).strftime(format)
47
48
  end
48
49
 
49
- def to_s
50
- "%02d:%02d:%02d" % [@hour, @minute, @second]
50
+ def to_s(with_seconds = true)
51
+ if with_seconds
52
+ "%02d:%02d:%02d" % [@hour, @minute, @second]
53
+ else
54
+ "%02d:%02d" % [@hour, @minute]
55
+ end
51
56
  end
52
57
 
53
58
  def self.yaml_new( klass, tag, val )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uwe Kubosch
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-29 00:00:00 +01:00
12
+ date: 2008-03-28 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -64,7 +64,7 @@ dependencies:
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 1.5.0
67
+ version: 1.5.1
68
68
  version:
69
69
  description: Backlog is a tool to help you collect and organize all your tasks, whether you are a single person or a small or large group. A time keeping module is also included to track time spent on the different tasks.
70
70
  email: uwe@kubosch.no
@@ -150,6 +150,7 @@ files:
150
150
  - app/views/backlogs/_name_list.rhtml
151
151
  - app/views/backlogs/show.rhtml
152
152
  - app/views/works
153
+ - app/views/works/update_new_row.rjs
153
154
  - app/views/works/new.rhtml
154
155
  - app/views/works/update_time.rjs
155
156
  - app/views/works/update_row.rjs
@@ -157,6 +158,7 @@ files:
157
158
  - app/views/works/_row.rhtml
158
159
  - app/views/works/list_excel.rhtml
159
160
  - app/views/works/_buttons.rhtml
161
+ - app/views/works/_task_id_list.rhtml
160
162
  - app/views/works/timeliste.rhtml
161
163
  - app/views/works/_description_list.rhtml
162
164
  - app/views/works/daily_work_sheet.rhtml
@@ -353,6 +355,7 @@ files:
353
355
  - test/performance/server_test.rb
354
356
  - test/performance/common.rb
355
357
  - test/performance/jetty_test.rb
358
+ - History.txt~
356
359
  - LICENSE_LOCALIZATION
357
360
  - README_LOCALIZATION
358
361
  - History.txt