simplecov-html 0.10.2 → 0.12.2
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.
- checksums.yaml +5 -5
- data/.gitignore +0 -1
- data/.rubocop.yml +42 -17
- data/.tool-versions +1 -0
- data/.travis.yml +16 -20
- data/CHANGELOG.md +64 -2
- data/Gemfile +8 -15
- data/Gemfile.lock +68 -0
- data/Guardfile +2 -0
- data/README.md +2 -2
- data/Rakefile +9 -4
- data/assets/javascripts/application.js +29 -34
- data/assets/javascripts/libraries/jquery-3.4.1.js +10598 -0
- data/assets/javascripts/plugins/jquery.colorbox.js +1101 -1086
- data/assets/javascripts/plugins/jquery.dataTables.js +15008 -0
- data/assets/javascripts/plugins/jquery.timeago.js +135 -44
- data/assets/stylesheets/plugins/datatables.css +462 -0
- data/assets/stylesheets/screen.css.sass +23 -1
- data/lib/simplecov-html.rb +28 -0
- data/lib/simplecov-html/version.rb +3 -1
- data/public/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/public/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/public/DataTables-1.10.20/images/sort_both.png +0 -0
- data/public/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/public/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/public/application.css +1 -799
- data/public/application.js +7 -1707
- data/public/{smoothness/images → images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/{smoothness/images → images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/{smoothness/images → images}/ui-icons_222222_256x240.png +0 -0
- data/public/{smoothness/images → images}/ui-icons_2e83ff_256x240.png +0 -0
- data/public/{smoothness/images → images}/ui-icons_454545_256x240.png +0 -0
- data/public/{smoothness/images → images}/ui-icons_888888_256x240.png +0 -0
- data/public/{smoothness/images → images}/ui-icons_cd0a0a_256x240.png +0 -0
- data/simplecov-html.gemspec +4 -3
- data/test/helper.rb +2 -0
- data/test/test_simple_cov-html.rb +3 -1
- data/views/covered_percent.erb +3 -0
- data/views/file_list.erb +63 -30
- data/views/layout.erb +8 -8
- data/views/source_file.erb +40 -9
- metadata +32 -39
- data/assets/javascripts/libraries/jquery-1.6.2.min.js +0 -18
- data/assets/javascripts/plugins/jquery.dataTables.min.js +0 -152
- data/assets/javascripts/plugins/jquery.url.js +0 -174
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 521389c06ee24e47f7547ed6711ed500672dde0c9489802d77f0a626536bc7a3
|
4
|
+
data.tar.gz: 209a5a8e7dad6f2840efb3d7c3c05ce13ef9a64ff05550016b22157f56aeade2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f9f0eb594a25f55bb3a5f16ecc9e46392a71c959754e36b976403943b81090f6e68bc125f4447ebc5ff9b253c52865e9e63678b03528f286ad48327b18429c3
|
7
|
+
data.tar.gz: 962890a18f9615e03c8a4b3e06392a315a8c7194cad69b7a0a3a32a0a9760f7ebc640a418a8f12d76207883e480c8c22e748a96d44348a9484dd7bb1d04cda39
|
data/.gitignore
CHANGED
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
|
-
|
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
|
-
|
17
|
-
|
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:
|
22
|
-
reduce:
|
23
|
-
find:
|
24
|
-
find_all:
|
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/
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
-
|
61
|
+
- "lib/simplecov-html/version.rb"
|
43
62
|
|
44
|
-
Style/
|
63
|
+
Style/NumericPredicate:
|
45
64
|
Enabled: false
|
46
65
|
|
47
|
-
Style/
|
48
|
-
|
66
|
+
Style/RegexpLiteral:
|
67
|
+
Enabled: false
|
49
68
|
|
50
69
|
Style/StringLiterals:
|
51
70
|
EnforcedStyle: double_quotes
|
52
71
|
|
53
|
-
Style/
|
54
|
-
|
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.6.5
|
data/.travis.yml
CHANGED
@@ -1,29 +1,25 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
before_install:
|
4
|
-
- gem
|
4
|
+
- gem i bundler
|
5
5
|
|
6
|
-
bundler_args: --without
|
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.4.9
|
11
|
+
- rvm: 2.5.7
|
12
|
+
- rvm: 2.6.5
|
13
|
+
- rvm: 2.7.0
|
14
|
+
- rvm: jruby-9.2.9.0
|
15
|
+
env: JRUBY_OPTS=--debug
|
16
|
+
jdk: openjdk8
|
17
|
+
- rvm: ruby-head
|
18
|
+
- rvm: jruby-head
|
19
|
+
env: JRUBY_OPTS=--debug
|
20
|
+
jdk: openjdk8
|
25
21
|
allow_failures:
|
26
22
|
- rvm: ruby-head
|
27
|
-
- rvm: jruby
|
28
|
-
|
23
|
+
- rvm: jruby-head
|
24
|
+
env: JRUBY_OPTS=--debug
|
29
25
|
fast_finish: true
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,73 @@
|
|
1
|
-
0.
|
1
|
+
0.12.2 (2020-02-27)
|
2
|
+
==================
|
3
|
+
|
4
|
+
## Bugfixes
|
5
|
+
* Refreshing the page while a source file is open works again. Thanks [@HansBug](https://github.com/HansBug) for the report [#94](https://github.com/colszowka/simplecov-html/issues/94) and [@Tietew](https://github.com/Tietew) for the fix!
|
6
|
+
|
7
|
+
0.12.1 (2020-02-23)
|
8
|
+
==================
|
9
|
+
|
10
|
+
Bugfix release to fix huge bugs that sadly test suit and maintainters didn't catch.
|
11
|
+
|
12
|
+
## Bugfixes
|
13
|
+
* Disable pagination and with it all files on 2nd page+ being broken/not able to open
|
14
|
+
* Fix display of non ASCII characters, for this you have to upgrade to simplecov 0.18.3 though (it's handled in there)
|
15
|
+
|
16
|
+
0.12.0 (2020-02-12)
|
17
|
+
==================
|
18
|
+
|
19
|
+
This release is basically a collection of long standing PRs finally merged.
|
20
|
+
Yes it looks different, no it's not a redesign - just a side effect of lots of dependency updates to improve CSP compatibility.
|
21
|
+
|
22
|
+
## Enhancements
|
23
|
+
* The HTML should now be servable with CSP settings of `default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self';`
|
24
|
+
* File list is horizontally scrollable if the space doesn't suffice
|
25
|
+
* numbers are now right aligned and displayed with the same number of decimals for easier comparison and reading.
|
26
|
+
|
27
|
+
## Bugfixes
|
28
|
+
* Make sorting icons appear again
|
29
|
+
* close link tag which could cause problems when parsing as xhtml/xml
|
30
|
+
* make sure encoding errors won't crash the formatter
|
31
|
+
* 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
|
32
|
+
|
33
|
+
0.11.0 (2020-01-28)
|
34
|
+
=======
|
35
|
+
|
36
|
+
This release goes together with simplecov 0.18 to bring branch coverage support to you. Please also check the notes of the beta releases.
|
37
|
+
|
38
|
+
## Enhancements
|
39
|
+
* Display total branch coverage percentage in the overview (if branch coverage enabled)
|
40
|
+
|
41
|
+
0.11.0.beta2 (2020-01-19)
|
42
|
+
=======
|
43
|
+
|
44
|
+
## Enhancements
|
45
|
+
* changed display of branch coverage to be `branch_type: hit_count` which should be more expressive and more intuitive
|
46
|
+
* Cached lookup of whether we're doing branch coverage or not (should be faster)
|
47
|
+
|
48
|
+
## Bugfixes
|
49
|
+
* Fixed sorting of percent column (regression in previous release)
|
50
|
+
|
51
|
+
0.11.0.beta1 (2020-01-05)
|
52
|
+
========
|
53
|
+
|
54
|
+
Changes ruby support to 2.4+, adds branch coverage support. Meant to be used with simplecov 0.18
|
55
|
+
|
56
|
+
## Breaking Changes
|
57
|
+
* Drops support for EOL'ed ruby versions, new support is ~> 2.4
|
58
|
+
|
59
|
+
## Enhancements
|
60
|
+
* 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
|
61
|
+
* Encoding compatibility errors are now caught and printed out
|
62
|
+
|
63
|
+
0.10.2 (2017-08-14)
|
2
64
|
========
|
3
65
|
|
4
66
|
## Bugfixes
|
5
67
|
|
6
68
|
* Allow usage with frozen-string-literal-enabled. See [#56](https://github.com/colszowka/simplecov-html/pull/56) (thanks @pat)
|
7
69
|
|
8
|
-
0.10.1 2017-05-17
|
70
|
+
0.10.1 (2017-05-17)
|
9
71
|
========
|
10
72
|
|
11
73
|
## Bugfixes
|
data/Gemfile
CHANGED
@@ -1,26 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source "https://rubygems.org"
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
|
-
|
6
|
-
gem "rake", "~> 10.5"
|
7
|
-
else
|
8
|
-
gem "rake", ">= 11"
|
9
|
-
end
|
7
|
+
gem "rake", ">= 11"
|
10
8
|
|
11
9
|
# Use local copy of simplecov in development when checked out, fetch from git otherwise
|
12
10
|
if File.directory?(File.dirname(__FILE__) + "/../simplecov")
|
13
11
|
gem "simplecov", :path => File.dirname(__FILE__) + "/../simplecov"
|
14
12
|
else
|
15
|
-
gem "simplecov", :
|
16
|
-
end
|
17
|
-
|
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"
|
13
|
+
gem "simplecov", :github => "colszowka/simplecov"
|
24
14
|
end
|
25
15
|
|
26
16
|
group :test do
|
@@ -30,5 +20,8 @@ end
|
|
30
20
|
group :development do
|
31
21
|
gem "rubocop"
|
32
22
|
gem "sass"
|
33
|
-
|
23
|
+
# sprockets 4.0 requires ruby 2.5+
|
24
|
+
gem "sprockets", "~> 3.7"
|
25
|
+
gem "uglifier"
|
26
|
+
gem "yui-compressor"
|
34
27
|
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simplecov-html (0.12.2)
|
5
|
+
|
6
|
+
PATH
|
7
|
+
remote: /home/tobi/github/simplecov
|
8
|
+
specs:
|
9
|
+
simplecov (0.18.5)
|
10
|
+
docile (~> 1.1)
|
11
|
+
simplecov-html (~> 0.11)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
ast (2.4.0)
|
17
|
+
concurrent-ruby (1.1.5)
|
18
|
+
docile (1.3.2)
|
19
|
+
execjs (2.7.0)
|
20
|
+
ffi (1.12.2)
|
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.1.2)
|
27
|
+
rainbow (3.0.0)
|
28
|
+
rake (13.0.1)
|
29
|
+
rb-fsevent (0.10.3)
|
30
|
+
rb-inotify (0.10.1)
|
31
|
+
ffi (~> 1.0)
|
32
|
+
rubocop (0.79.0)
|
33
|
+
jaro_winkler (~> 1.5.1)
|
34
|
+
parallel (~> 1.10)
|
35
|
+
parser (>= 2.7.0.1)
|
36
|
+
rainbow (>= 2.2.2, < 4.0)
|
37
|
+
ruby-progressbar (~> 1.7)
|
38
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
39
|
+
ruby-progressbar (1.10.1)
|
40
|
+
sass (3.7.4)
|
41
|
+
sass-listen (~> 4.0.0)
|
42
|
+
sass-listen (4.0.0)
|
43
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
44
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
45
|
+
sprockets (3.7.2)
|
46
|
+
concurrent-ruby (~> 1.0)
|
47
|
+
rack (> 1, < 3)
|
48
|
+
uglifier (4.2.0)
|
49
|
+
execjs (>= 0.3.0, < 3)
|
50
|
+
unicode-display_width (1.6.1)
|
51
|
+
yui-compressor (0.12.0)
|
52
|
+
|
53
|
+
PLATFORMS
|
54
|
+
ruby
|
55
|
+
|
56
|
+
DEPENDENCIES
|
57
|
+
minitest
|
58
|
+
rake (>= 11)
|
59
|
+
rubocop
|
60
|
+
sass
|
61
|
+
simplecov!
|
62
|
+
simplecov-html!
|
63
|
+
sprockets (~> 3.7)
|
64
|
+
uglifier
|
65
|
+
yui-compressor
|
66
|
+
|
67
|
+
BUNDLED WITH
|
68
|
+
2.1.4
|
data/Guardfile
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@ Default HTML formatter for SimpleCov
|
|
3
3
|
|
4
4
|
***Note: To learn more about SimpleCov, check out the main repo at https://github.com/colszowka/simplecov***
|
5
5
|
|
6
|
-
Generates a nice HTML report of your SimpleCov ruby code coverage results on Ruby
|
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,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "bundler"
|
2
4
|
Bundler::GemHelper.install_tasks
|
3
5
|
|
@@ -21,7 +23,7 @@ begin
|
|
21
23
|
RuboCop::RakeTask.new
|
22
24
|
rescue LoadError
|
23
25
|
task :rubocop do
|
24
|
-
|
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
|
-
|
37
|
-
|
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
|
-
|
9
|
-
|
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 :
|
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 =
|
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(
|
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
|
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
|
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 (
|
114
|
-
var 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
|
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
|
});
|