catscope 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/img/arrow_refresh_small.png +0 -0
- data/assets/js/app.js +31 -6
- data/catscope.gemspec +2 -1
- data/{bin → exe}/catscope +0 -0
- data/lib/catscope/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2604186aa4dcc9ec5b1f526800edcdfcfaf27843
|
4
|
+
data.tar.gz: 180c34d1c278023ca9365c35e05fd1df6aae3d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b0669ef39d80f4cad0a95eae27e3707a520ff80d6f2da69f52e93531c5ff2da64da509669c60c4a2051dddd738bf6bd3f356bdcf50457d1761a09dc0f853d2
|
7
|
+
data.tar.gz: 6c6f82e547052ecd8e8f727721d4a7272f4bd3a0c19a7239d80dc0a23231c9f21ed6e19357f1fc6150dd67b89b0faeae28631acf403851c02d4fe81744220ab1
|
Binary file
|
data/assets/js/app.js
CHANGED
@@ -10,7 +10,7 @@ function __filelist_click_handler_builder(jq_child_ul) {
|
|
10
10
|
if (e.target.dataset.type == "dir") {
|
11
11
|
if (e.target.dataset.opened == "false") {
|
12
12
|
e.target.dataset.opened = "true";
|
13
|
-
|
13
|
+
filelist_expand_dir(e.target, $(e.target).parent().find('> ul'));
|
14
14
|
} else {
|
15
15
|
e.target.dataset.opened = "false";
|
16
16
|
jq_child_ul.empty();
|
@@ -30,6 +30,23 @@ function __filelist_click_handler_builder(jq_child_ul) {
|
|
30
30
|
};
|
31
31
|
}
|
32
32
|
|
33
|
+
function __filelist_dir_refresh_handler_builder(jq_child_ul) {
|
34
|
+
return function(e) {
|
35
|
+
var qTarget
|
36
|
+
|
37
|
+
if (e.target.tagName == "IMG") {
|
38
|
+
qTarget = $(e.target.parentElement);
|
39
|
+
} else {
|
40
|
+
$(e.target); // <a> (refresh button)
|
41
|
+
}
|
42
|
+
var eEntry = qTarget.parent().find('> a.js-entry')[0];
|
43
|
+
|
44
|
+
if (eEntry.dataset.type == "dir") {
|
45
|
+
filelist_expand_dir(eEntry, qTarget.parent().find('> ul'));
|
46
|
+
}
|
47
|
+
};
|
48
|
+
}
|
49
|
+
|
33
50
|
function filelist_expand_dir(entryElem, container) {
|
34
51
|
$.getJSON("/api/lsdir/" + entryElem.dataset.path,
|
35
52
|
function(jsonData, status, jqxhr) {
|
@@ -44,13 +61,21 @@ function filelist_expand_dir(entryElem, container) {
|
|
44
61
|
"data-name": entry.name,
|
45
62
|
"data-opened": "false",
|
46
63
|
text: entry.name,
|
47
|
-
class: "js-filelist-" + entry.type,
|
64
|
+
class: "js-entry js-filelist-" + entry.type,
|
48
65
|
click: __filelist_click_handler_builder(child_ul)});
|
49
66
|
var save_link = $('<a>', {href: "/save/" + entry.path})
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
67
|
+
save_link.append($('<img>', {src: "/assets/img/disk.png"}));
|
68
|
+
|
69
|
+
var refresh_link = $('<a>',
|
70
|
+
{class: "js-refresh",
|
71
|
+
click: __filelist_dir_refresh_handler_builder(child_ul)});
|
72
|
+
refresh_link.append($('<img>', {src: '/assets/img/arrow_refresh_small.png'}));
|
73
|
+
|
74
|
+
elem.append(anch);
|
75
|
+
if (entry.type == "dir") {
|
76
|
+
elem.append(" ");
|
77
|
+
elem.append(refresh_link);
|
78
|
+
} else {
|
54
79
|
elem.append(" ");
|
55
80
|
elem.append(save_link);
|
56
81
|
}
|
data/catscope.gemspec
CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.files += Dir.glob("assets/bower_components/**/*")
|
18
18
|
spec.files += Dir.glob("assets/stylesheets/**/*")
|
19
|
-
spec.
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
21
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
22
|
spec.require_paths = ["lib"]
|
22
23
|
|
data/{bin → exe}/catscope
RENAMED
File without changes
|
data/lib/catscope/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuto Hayamizu
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thin
|
@@ -1194,6 +1194,7 @@ files:
|
|
1194
1194
|
- assets/config.rb
|
1195
1195
|
- assets/example.html
|
1196
1196
|
- assets/img/anchor.png
|
1197
|
+
- assets/img/arrow_refresh_small.png
|
1197
1198
|
- assets/img/cross.png
|
1198
1199
|
- assets/img/disk.png
|
1199
1200
|
- assets/img/folder.png
|
@@ -1205,8 +1206,8 @@ files:
|
|
1205
1206
|
- assets/scss/app.scss
|
1206
1207
|
- assets/stylesheets/.gitdir
|
1207
1208
|
- assets/stylesheets/app.css
|
1208
|
-
- bin/catscope
|
1209
1209
|
- catscope.gemspec
|
1210
|
+
- exe/catscope
|
1210
1211
|
- lib/catscope.rb
|
1211
1212
|
- lib/catscope/app.rb
|
1212
1213
|
- lib/catscope/cli.rb
|