simplecov-html 0.10.2 → 0.12.3

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 (52) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -1
  3. data/.rubocop.yml +42 -17
  4. data/.tool-versions +1 -0
  5. data/.travis.yml +15 -20
  6. data/CHANGELOG.md +72 -4
  7. data/Gemfile +10 -21
  8. data/Gemfile.lock +59 -0
  9. data/Guardfile +2 -0
  10. data/README.md +3 -3
  11. data/Rakefile +10 -5
  12. data/assets/javascripts/application.js +29 -34
  13. data/assets/javascripts/libraries/jquery-3.4.1.js +10598 -0
  14. data/assets/javascripts/plugins/jquery.colorbox.js +1101 -1086
  15. data/assets/javascripts/plugins/jquery.dataTables.js +15008 -0
  16. data/assets/javascripts/plugins/jquery.timeago.js +135 -44
  17. data/assets/stylesheets/plugins/datatables.css +462 -0
  18. data/assets/stylesheets/screen.css +316 -0
  19. data/lib/simplecov-html/version.rb +3 -1
  20. data/lib/simplecov-html.rb +28 -0
  21. data/public/DataTables-1.10.20/images/sort_asc.png +0 -0
  22. data/public/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  23. data/public/DataTables-1.10.20/images/sort_both.png +0 -0
  24. data/public/DataTables-1.10.20/images/sort_desc.png +0 -0
  25. data/public/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  26. data/public/application.css +1 -799
  27. data/public/application.js +7 -1707
  28. data/simplecov-html.gemspec +5 -4
  29. data/test/helper.rb +2 -0
  30. data/test/test_simple_cov-html.rb +3 -1
  31. data/views/covered_percent.erb +3 -0
  32. data/views/file_list.erb +63 -30
  33. data/views/layout.erb +8 -8
  34. data/views/source_file.erb +40 -9
  35. metadata +33 -40
  36. data/assets/javascripts/libraries/jquery-1.6.2.min.js +0 -18
  37. data/assets/javascripts/plugins/jquery.dataTables.min.js +0 -152
  38. data/assets/javascripts/plugins/jquery.url.js +0 -174
  39. data/assets/stylesheets/screen.css.sass +0 -220
  40. /data/public/{smoothness/images → images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  41. /data/public/{smoothness/images → images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
  42. /data/public/{smoothness/images → images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  43. /data/public/{smoothness/images → images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  44. /data/public/{smoothness/images → images}/ui-bg_glass_75_dadada_1x400.png +0 -0
  45. /data/public/{smoothness/images → images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  46. /data/public/{smoothness/images → images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  47. /data/public/{smoothness/images → images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  48. /data/public/{smoothness/images → images}/ui-icons_222222_256x240.png +0 -0
  49. /data/public/{smoothness/images → images}/ui-icons_2e83ff_256x240.png +0 -0
  50. /data/public/{smoothness/images → images}/ui-icons_454545_256x240.png +0 -0
  51. /data/public/{smoothness/images → images}/ui-icons_888888_256x240.png +0 -0
  52. /data/public/{smoothness/images → images}/ui-icons_cd0a0a_256x240.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7b390927b4068494470bc6dab12d889374683b2c
4
- data.tar.gz: a489f2db591a59851a07b12895730339c9537f54
2
+ SHA256:
3
+ metadata.gz: 745085dce51b66af38d5df35c34eb2e7947a678de037c3820032b63886dedd5f
4
+ data.tar.gz: af5be87c3c116c58cd569af0a4586312cae003d5608a86a4834589f296918a92
5
5
  SHA512:
6
- metadata.gz: a717a3f32fb55f02ae13694389bc7c85bd8f1e6bcab853176cbdbc97e9d87ead21b06610b1f1d20a6b0b97a61e430eb189af20f4f5dadff54ce37bfacaaa4e5c
7
- data.tar.gz: '08d47a31edd879fb6551a1e316ea3729ca49f8f3f9eb3ef2523086e134af2178c013316ec33df4e5c59d0b013d937198419c85e0f0fa12fa376847bd9cce06d0'
6
+ metadata.gz: 0b26420a8a6ce3d900653be4bfe2fa95178de27399502b2f2f862efe19ad3083d01d5e4435af81288fc73bf422451c11f10e133a34e27fdd7b3342baec58ba12
7
+ data.tar.gz: b51d0a535a43eacc69a791c8c6371f33b423e1df75735f9b8e3bb36eefed5de6d1d66af1e94a87cc2e2e383cd35a57e9e6896f7f58c37b67f4f6fe794a5db0d0
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  .rvmrc
2
2
  .bundle
3
- Gemfile.lock
4
3
 
5
4
  ## MAC OS
6
5
  .DS_Store
data/.rubocop.yml CHANGED
@@ -1,7 +1,23 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+ DisplayCopNames: true
4
+
5
+ Bundler/DuplicatedGem:
6
+ Enabled: false
7
+
8
+ Gemspec/RequiredRubyVersion:
9
+ Enabled: false
10
+
11
+ Layout/AccessModifierIndentation:
12
+ EnforcedStyle: outdent
13
+
14
+ Layout/SpaceInsideHashLiteralBraces:
15
+ EnforcedStyle: no_space
16
+
1
17
  Metrics/BlockNesting:
2
18
  Max: 2
3
19
 
4
- Metrics/LineLength:
20
+ Layout/LineLength:
5
21
  AllowURI: true
6
22
  Enabled: false
7
23
 
@@ -13,15 +29,17 @@ Metrics/ParameterLists:
13
29
  Max: 4
14
30
  CountKeywordArgs: true
15
31
 
16
- Style/AccessModifierIndentation:
17
- EnforcedStyle: outdent
32
+ Naming/FileName:
33
+ Exclude:
34
+ - "lib/simplecov-html.rb"
35
+ - "test/test_simple_cov-html.rb"
18
36
 
19
37
  Style/CollectionMethods:
20
38
  PreferredMethods:
21
- map: 'collect'
22
- reduce: 'inject'
23
- find: 'detect'
24
- find_all: 'select'
39
+ map: "collect"
40
+ reduce: "inject"
41
+ find: "detect"
42
+ find_all: "select"
25
43
 
26
44
  Style/Documentation:
27
45
  Enabled: false
@@ -29,26 +47,33 @@ Style/Documentation:
29
47
  Style/DoubleNegation:
30
48
  Enabled: false
31
49
 
32
- Style/FileName:
33
- Exclude:
34
- - 'lib/simplecov-html.rb'
35
- - 'test/test_simple_cov-html.rb'
50
+ Style/ExpandPathArguments:
51
+ Enabled: false
52
+
53
+ Style/FrozenStringLiteralComment:
54
+ Enabled: true
36
55
 
37
56
  Style/HashSyntax:
38
57
  EnforcedStyle: hash_rockets
39
58
 
40
59
  Style/MutableConstant:
41
60
  Exclude:
42
- - 'lib/simplecov-html/version.rb'
61
+ - "lib/simplecov-html/version.rb"
43
62
 
44
- Style/RegexpLiteral:
63
+ Style/NumericPredicate:
45
64
  Enabled: false
46
65
 
47
- Style/SpaceInsideHashLiteralBraces:
48
- EnforcedStyle: no_space
66
+ Style/RegexpLiteral:
67
+ Enabled: false
49
68
 
50
69
  Style/StringLiterals:
51
70
  EnforcedStyle: double_quotes
52
71
 
53
- Style/TrailingCommaInLiteral:
54
- EnforcedStyleForMultiline: 'comma'
72
+ Style/SymbolArray:
73
+ Enabled: false
74
+
75
+ Style/TrailingCommaInHashLiteral:
76
+ EnforcedStyleForMultiline: "comma"
77
+
78
+ Style/TrailingCommaInArrayLiteral:
79
+ EnforcedStyleForMultiline: "comma"
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.7.1
data/.travis.yml CHANGED
@@ -1,29 +1,24 @@
1
1
  language: ruby
2
2
 
3
3
  before_install:
4
- - gem install bundler
4
+ - gem i bundler
5
5
 
6
- bundler_args: --without development --jobs=3 --retry=3
7
-
8
- cache: bundler
9
-
10
- sudo: false
11
-
12
- rvm:
13
- - 1.8.7
14
- - 1.9.3
15
- - 2.0.0
16
- - 2.1
17
- - 2.2
18
- - 2.3.1
19
- - ruby-head
20
- - jruby
21
- - rbx-2
22
- - jruby-9.1.12.0
6
+ bundler_args: --without benchmark --jobs=3 --retry=3
23
7
 
24
8
  matrix:
9
+ include:
10
+ - rvm: 2.5.7
11
+ - rvm: 2.6.5
12
+ - rvm: 2.7.0
13
+ - rvm: jruby-9.2.9.0
14
+ env: JRUBY_OPTS=--debug
15
+ jdk: openjdk8
16
+ - rvm: ruby-head
17
+ - rvm: jruby-head
18
+ env: JRUBY_OPTS=--debug
19
+ jdk: openjdk8
25
20
  allow_failures:
26
21
  - rvm: ruby-head
27
- - rvm: jruby
28
- - rvm: rbx-2
22
+ - rvm: jruby-head
23
+ env: JRUBY_OPTS=--debug
29
24
  fast_finish: true
data/CHANGELOG.md CHANGED
@@ -1,13 +1,81 @@
1
- 0.10.2 2017-08-14
1
+ 0.12.3 (2020-09-23)
2
+ ==================
3
+
4
+ ## Bugfixes
5
+ * Relax ruby version requirement to work with Ruby 3.0 (next version, current `ruby-head`). Thanks [@byroot](https://github.com/byroot).
6
+
7
+ 0.12.2 (2020-02-27)
8
+ ==================
9
+
10
+ ## Bugfixes
11
+ * Refreshing the page while a source file is open works again. Thanks [@HansBug](https://github.com/HansBug) for the report [#94](https://github.com/simplecov-ruby/simplecov-html/issues/94) and [@Tietew](https://github.com/Tietew) for the fix!
12
+
13
+ 0.12.1 (2020-02-23)
14
+ ==================
15
+
16
+ Bugfix release to fix huge bugs that sadly test suit and maintainters didn't catch.
17
+
18
+ ## Bugfixes
19
+ * Disable pagination and with it all files on 2nd page+ being broken/not able to open
20
+ * Fix display of non ASCII characters, for this you have to upgrade to simplecov 0.18.3 though (it's handled in there)
21
+
22
+ 0.12.0 (2020-02-12)
23
+ ==================
24
+
25
+ This release is basically a collection of long standing PRs finally merged.
26
+ Yes it looks different, no it's not a redesign - just a side effect of lots of dependency updates to improve CSP compatibility.
27
+
28
+ ## Enhancements
29
+ * The HTML should now be servable with CSP settings of `default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self';`
30
+ * File list is horizontally scrollable if the space doesn't suffice
31
+ * numbers are now right aligned and displayed with the same number of decimals for easier comparison and reading.
32
+
33
+ ## Bugfixes
34
+ * Make sorting icons appear again
35
+ * close link tag which could cause problems when parsing as xhtml/xml
36
+ * make sure encoding errors won't crash the formatter
37
+ * When viewing a short source file while you have a big file list you will no longer be able to scroll on after the source file has ended
38
+
39
+ 0.11.0 (2020-01-28)
40
+ =======
41
+
42
+ This release goes together with simplecov 0.18 to bring branch coverage support to you. Please also check the notes of the beta releases.
43
+
44
+ ## Enhancements
45
+ * Display total branch coverage percentage in the overview (if branch coverage enabled)
46
+
47
+ 0.11.0.beta2 (2020-01-19)
48
+ =======
49
+
50
+ ## Enhancements
51
+ * changed display of branch coverage to be `branch_type: hit_count` which should be more expressive and more intuitive
52
+ * Cached lookup of whether we're doing branch coverage or not (should be faster)
53
+
54
+ ## Bugfixes
55
+ * Fixed sorting of percent column (regression in previous release)
56
+
57
+ 0.11.0.beta1 (2020-01-05)
58
+ ========
59
+
60
+ Changes ruby support to 2.4+, adds branch coverage support. Meant to be used with simplecov 0.18
61
+
62
+ ## Breaking Changes
63
+ * Drops support for EOL'ed ruby versions, new support is ~> 2.4
64
+
65
+ ## Enhancements
66
+ * Support/display of branch coverage from simplecov 0.18.0.beta1, little badges saying `hit_count, positive_or_negative` will appear next to lines if branch coverage is activated. `0, +` means positive branch was never hit, `2, -` means negative branch was hit twice
67
+ * Encoding compatibility errors are now caught and printed out
68
+
69
+ 0.10.2 (2017-08-14)
2
70
  ========
3
71
 
4
72
  ## Bugfixes
5
73
 
6
- * Allow usage with frozen-string-literal-enabled. See [#56](https://github.com/colszowka/simplecov-html/pull/56) (thanks @pat)
74
+ * Allow usage with frozen-string-literal-enabled. See [#56](https://github.com/simplecov-ruby/simplecov-html/pull/56) (thanks @pat)
7
75
 
8
- 0.10.1 2017-05-17
76
+ 0.10.1 (2017-05-17)
9
77
  ========
10
78
 
11
79
  ## Bugfixes
12
80
 
13
- * circumvent a regression that happens in the new JRuby 9.1.9.0 release. See [#53](https://github.com/colszowka/simplecov-html/pull/53) thanks @koic
81
+ * circumvent a regression that happens in the new JRuby 9.1.9.0 release. See [#53](https://github.com/simplecov-ruby/simplecov-html/pull/53) thanks @koic
data/Gemfile CHANGED
@@ -1,27 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
4
6
 
5
- if RUBY_VERSION == "1.8.7"
6
- gem "rake", "~> 10.5"
7
- else
8
- gem "rake", ">= 11"
9
- end
10
-
11
- # Use local copy of simplecov in development when checked out, fetch from git otherwise
12
- if File.directory?(File.dirname(__FILE__) + "/../simplecov")
13
- gem "simplecov", :path => File.dirname(__FILE__) + "/../simplecov"
14
- else
15
- gem "simplecov", :git => "https://github.com/colszowka/simplecov"
16
- end
7
+ gem "rake", ">= 11"
17
8
 
18
- platforms :ruby_18, :ruby_19 do
19
- gem "json", "~> 1.8"
20
- end
21
-
22
- platforms :ruby_18, :ruby_19, :ruby_20, :ruby_21 do
23
- gem "rack", "~> 1.6"
24
- end
9
+ # Use local copy of simplecov in development if you want to
10
+ # gem "simplecov", :path => File.dirname(__FILE__) + "/../simplecov"
11
+ gem "simplecov", :github => "simplecov-ruby/simplecov"
25
12
 
26
13
  group :test do
27
14
  gem "minitest"
@@ -29,6 +16,8 @@ end
29
16
 
30
17
  group :development do
31
18
  gem "rubocop"
32
- gem "sass"
33
- gem "sprockets"
19
+ # sprockets 4.0 requires ruby 2.5+
20
+ gem "sprockets", "~> 3.7"
21
+ gem "uglifier"
22
+ gem "yui-compressor"
34
23
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,59 @@
1
+ GIT
2
+ remote: https://github.com/simplecov-ruby/simplecov.git
3
+ revision: 80700ec9f9b5ae426c22d06f62620f7e7b71ff42
4
+ specs:
5
+ simplecov (0.18.5)
6
+ docile (~> 1.1)
7
+ simplecov-html (~> 0.11)
8
+
9
+ PATH
10
+ remote: .
11
+ specs:
12
+ simplecov-html (0.12.3)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ ast (2.4.0)
18
+ concurrent-ruby (1.1.5)
19
+ docile (1.3.2)
20
+ execjs (2.7.0)
21
+ jaro_winkler (1.5.4)
22
+ minitest (5.14.0)
23
+ parallel (1.19.1)
24
+ parser (2.7.0.2)
25
+ ast (~> 2.4.0)
26
+ rack (2.2.3)
27
+ rainbow (3.0.0)
28
+ rake (13.0.1)
29
+ rubocop (0.79.0)
30
+ jaro_winkler (~> 1.5.1)
31
+ parallel (~> 1.10)
32
+ parser (>= 2.7.0.1)
33
+ rainbow (>= 2.2.2, < 4.0)
34
+ ruby-progressbar (~> 1.7)
35
+ unicode-display_width (>= 1.4.0, < 1.7)
36
+ ruby-progressbar (1.10.1)
37
+ sprockets (3.7.2)
38
+ concurrent-ruby (~> 1.0)
39
+ rack (> 1, < 3)
40
+ uglifier (4.2.0)
41
+ execjs (>= 0.3.0, < 3)
42
+ unicode-display_width (1.6.1)
43
+ yui-compressor (0.12.0)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ minitest
50
+ rake (>= 11)
51
+ rubocop
52
+ simplecov!
53
+ simplecov-html!
54
+ sprockets (~> 3.7)
55
+ uglifier
56
+ yui-compressor
57
+
58
+ BUNDLED WITH
59
+ 2.1.4
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  Default HTML formatter for SimpleCov
2
2
  ====================================
3
3
 
4
- ***Note: To learn more about SimpleCov, check out the main repo at https://github.com/colszowka/simplecov***
4
+ ***Note: To learn more about SimpleCov, check out the main repo at https://github.com/simplecov-ruby/simplecov***
5
5
 
6
- Generates a nice HTML report of your SimpleCov ruby code coverage results on Ruby 1.9 using client-side Javascript
6
+ Generates a nice HTML report of your SimpleCov ruby code coverage results on Ruby 2.4+ using client-side Javascript
7
7
  quite extensively.
8
8
 
9
9
 
@@ -17,7 +17,7 @@ modify the formatter, please make sure the simplecov test suites still pass by d
17
17
  * `cd` there, run `bundle`
18
18
  * You should end up with all dev dependencies installed and simplecov-html being used from your disk
19
19
  * Run the tests (units and features)
20
-
20
+
21
21
  Please remember to add tests if you add functionality.
22
22
 
23
23
  **Important:** If you modify the JS/CSS assets, you'll have to precompile them using `rake assets:compile` - otherwise,
data/Rakefile CHANGED
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler"
2
4
  Bundler::GemHelper.install_tasks
3
5
 
4
- # See https://github.com/colszowka/simplecov/issues/171
6
+ # See https://github.com/simplecov-ruby/simplecov/issues/171
5
7
  desc "Set permissions on all files so they are compatible with both user-local and system-wide installs"
6
8
  task :fix_permissions do
7
9
  system 'bash -c "find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;"'
@@ -21,7 +23,7 @@ begin
21
23
  RuboCop::RakeTask.new
22
24
  rescue LoadError
23
25
  task :rubocop do
24
- $stderr.puts "Rubocop is disabled"
26
+ warn "Rubocop is disabled"
25
27
  end
26
28
  end
27
29
 
@@ -32,9 +34,12 @@ namespace :assets do
32
34
  task :compile do
33
35
  puts "Compiling assets"
34
36
  require "sprockets"
35
- assets = Sprockets::Environment.new
36
- assets.append_path "assets/javascripts"
37
- assets.append_path "assets/stylesheets"
37
+ assets = Sprockets::Environment.new do |env|
38
+ env.append_path "assets/javascripts"
39
+ env.append_path "assets/stylesheets"
40
+ env.js_compressor = :uglify
41
+ env.css_compressor = :yui
42
+ end
38
43
  assets["application.js"].write_to("public/application.js")
39
44
  assets["application.css"].write_to("public/application.css")
40
45
  end
@@ -2,34 +2,23 @@
2
2
  //= require_directory ./plugins/
3
3
  //= require_self
4
4
 
5
- $(document).ready(function() {
6
- // Configuration for fancy sortable tables for source file groups
5
+ $(document).ready(function () {
7
6
  $('.file_list').dataTable({
8
- "aaSorting": [[ 1, "asc" ]],
9
- "bPaginate": false,
10
- "bJQueryUI": true,
11
- "aoColumns": [
12
- null,
13
- { "sType": "percent" },
14
- null,
15
- null,
16
- null,
17
- null,
18
- null
19
- ]
7
+ order: [[1, "asc"]],
8
+ paging: false
20
9
  });
21
10
 
22
11
  // Syntax highlight all files up front - deactivated
23
12
  // $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
24
13
 
25
14
  // Syntax highlight source files on first toggle of the file view popup
26
- $("a.src_link").click(function() {
15
+ $("a.src_link").click(function () {
27
16
  // Get the source file element that corresponds to the clicked element
28
17
  var source_table = $($(this).attr('href'));
29
18
 
30
19
  // If not highlighted yet, do it!
31
20
  if (!source_table.hasClass('highlighted')) {
32
- source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
21
+ source_table.find('pre code').each(function (i, e) { hljs.highlightBlock(e, ' ') });
33
22
  source_table.addClass('highlighted');
34
23
  };
35
24
  });
@@ -44,14 +33,16 @@ $(document).ready(function() {
44
33
  opacity: 1,
45
34
  width: "95%",
46
35
  height: "95%",
47
- onLoad: function() {
48
- prev_anchor = curr_anchor ? curr_anchor : jQuery.url.attr('anchor');
36
+ onLoad: function () {
37
+ prev_anchor = curr_anchor ? curr_anchor : window.location.hash.substring(1);
49
38
  curr_anchor = this.href.split('#')[1];
50
39
  window.location.hash = curr_anchor;
40
+
41
+ $('.file_list_container').hide();
51
42
  },
52
- onCleanup: function() {
43
+ onCleanup: function () {
53
44
  if (prev_anchor && prev_anchor != curr_anchor) {
54
- $('a[href="#'+prev_anchor+'"]').click();
45
+ $('a[href="#' + prev_anchor + '"]').click();
55
46
  curr_anchor = prev_anchor;
56
47
  } else {
57
48
  $('.group_tabs a:first').click();
@@ -59,16 +50,19 @@ $(document).ready(function() {
59
50
  curr_anchor = "#_AllFiles";
60
51
  }
61
52
  window.location.hash = curr_anchor;
53
+
54
+ var active_group = $('.group_tabs li.active a').attr('class');
55
+ $("#" + active_group + ".file_list_container").show();
62
56
  }
63
57
  });
64
58
 
65
- window.onpopstate = function(event){
66
- if (location.hash.substring(0,2) == "#_") {
59
+ window.onpopstate = function (event) {
60
+ if (window.location.hash.substring(0, 2) == "#_") {
67
61
  $.colorbox.close();
68
- curr_anchor = jQuery.url.attr('anchor');
62
+ curr_anchor = window.location.hash.substring(1);
69
63
  } else {
70
64
  if ($('#colorbox').is(':hidden')) {
71
- $('a.src_link[href="'+location.hash+'"]').colorbox({ open: true });
65
+ $('a.src_link[href="' + window.location.hash + '"]').colorbox({ open: true });
72
66
  }
73
67
  }
74
68
  };
@@ -78,23 +72,23 @@ $(document).ready(function() {
78
72
  $('.file_list_container').hide();
79
73
 
80
74
  // Add tabs based upon existing file_list_containers
81
- $('.file_list_container h2').each(function(){
75
+ $('.file_list_container h2').each(function () {
82
76
  var container_id = $(this).parent().attr('id');
83
77
  var group_name = $(this).find('.group_name').first().html();
84
78
  var covered_percent = $(this).find('.covered_percent').first().html();
85
79
 
86
- $('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' ('+ covered_percent +')</a></li>');
80
+ $('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' (' + covered_percent + ')</a></li>');
87
81
  });
88
82
 
89
- $('.group_tabs a').each( function() {
83
+ $('.group_tabs a').each(function () {
90
84
  $(this).addClass($(this).attr('href').replace('#', ''));
91
85
  });
92
86
 
93
87
  // Make sure tabs don't get ugly focus borders when active
94
- $('.group_tabs a').live('focus', function() { $(this).blur(); });
88
+ $('.group_tabs').on('focus', 'a', function () { $(this).blur(); });
95
89
 
96
90
  var favicon_path = $('link[rel="shortcut icon"]').attr('href');
97
- $('.group_tabs a').live('click', function(){
91
+ $('.group_tabs').on('click', 'a', function () {
98
92
  if (!$(this).parent().hasClass('active')) {
99
93
  $('.group_tabs a').parent().removeClass('active');
100
94
  $(this).parent().addClass('active');
@@ -105,17 +99,17 @@ $(document).ready(function() {
105
99
  // Force favicon reload - otherwise the location change containing anchor would drop the favicon...
106
100
  // Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
107
101
  $('link[rel="shortcut icon"]').remove();
108
- $('head').append('<link rel="shortcut icon" type="image/png" href="'+ favicon_path +'" />');
102
+ $('head').append('<link rel="shortcut icon" type="image/png" href="' + favicon_path + '" />');
109
103
  };
110
104
  return false;
111
105
  });
112
106
 
113
- if (jQuery.url.attr('anchor')) {
114
- var anchor = jQuery.url.attr('anchor')
107
+ if (window.location.hash) {
108
+ var anchor = window.location.hash.substring(1);
115
109
  if (anchor.length == 40) {
116
- $('a.src_link[href=#' + anchor + ']').click();
110
+ $('a.src_link[href="#' + anchor + '"]').click();
117
111
  } else {
118
- $('.group_tabs a.'+anchor.replace('_', '')).click();
112
+ $('.group_tabs a.' + anchor.replace('_', '')).click();
119
113
  }
120
114
  } else {
121
115
  $('.group_tabs a:first').click();
@@ -124,4 +118,5 @@ $(document).ready(function() {
124
118
  $("abbr.timeago").timeago();
125
119
  $('#loading').fadeOut();
126
120
  $('#wrapper').show();
121
+ $('.dataTables_filter input').focus()
127
122
  });