card-mod-script 0.14.2 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/real.yml +50 -0
- data/lib/ansi2html.rb +69 -0
- data/lib/card/mod/script.rb +1 -0
- data/set/abstract/00_script.rb +4 -4
- data/set/abstract/02_coffee_script.rb +9 -1
- data/set/all/head_javascript.rb +13 -22
- data/set/right/script.rb +1 -1
- data/set/type/coffee_script.rb +6 -0
- data/set/type/java_script.rb +6 -0
- data/set/type/local_script_folder_group.rb +2 -0
- data/set/type/local_script_manifest_group.rb +2 -0
- data/set/type_plus_right/mod/script.rb +1 -5
- data/set/type_plus_right/set/script.rb +3 -1
- metadata +13 -119
- data/assets/script/decko/autosave.js.coffee +0 -30
- data/assets/script/decko/bridge.js.coffee +0 -31
- data/assets/script/decko/card_menu.js.coffee +0 -26
- data/assets/script/decko/components.js.coffee +0 -49
- data/assets/script/decko/decko.js.coffee +0 -82
- data/assets/script/decko/doubleclick.js.coffee +0 -30
- data/assets/script/decko/editor.js.coffee +0 -57
- data/assets/script/decko/filter.js.coffee +0 -183
- data/assets/script/decko/filter_items.js.coffee +0 -128
- data/assets/script/decko/filter_links.js.coffee +0 -81
- data/assets/script/decko/follow.js.coffee +0 -22
- data/assets/script/decko/layout.js.coffee +0 -76
- data/assets/script/decko/link_editor.js.coffee +0 -61
- data/assets/script/decko/mod.js.coffee +0 -79
- data/assets/script/decko/modal.js.coffee +0 -113
- data/assets/script/decko/name_editor.js.coffee +0 -40
- data/assets/script/decko/navbox.js.coffee +0 -74
- data/assets/script/decko/nest_editor.js.coffee +0 -166
- data/assets/script/decko/nest_editor_name.js.coffee +0 -102
- data/assets/script/decko/nest_editor_options.js.coffee +0 -93
- data/assets/script/decko/nest_editor_rules.js.coffee +0 -3
- data/assets/script/decko/overlay.js.coffee +0 -54
- data/assets/script/decko/pointer_config.js.coffee +0 -79
- data/assets/script/decko/pointer_list_editor.js.coffee +0 -67
- data/assets/script/decko/recaptcha.js.coffee +0 -19
- data/assets/script/decko/selectable_filtered_content.js.coffee +0 -12
- data/assets/script/decko/slot.js.coffee +0 -182
- data/assets/script/decko/slot_ready.js.coffee +0 -12
- data/assets/script/decko/slotter.js.coffee +0 -268
- data/assets/script/decko/type_editor.js.coffee +0 -21
- data/assets/script/decko/upload.js.coffee +0 -64
- data/assets/script/jquery-ui.min.js +0 -13
- data/assets/script/jquery.autosize.js +0 -274
- data/assets/script/manifest.yml +0 -57
- data/db/migrate_core_cards/20200804112348_add_mod_script_assets_type.rb +0 -30
- data/vendor/jquery_file_upload/LICENSE.txt +0 -20
- data/vendor/jquery_file_upload/README.md +0 -224
- data/vendor/jquery_file_upload/SECURITY.md +0 -227
- data/vendor/jquery_file_upload/VULNERABILITIES.md +0 -118
- data/vendor/jquery_file_upload/cors/postmessage.html +0 -85
- data/vendor/jquery_file_upload/cors/result.html +0 -26
- data/vendor/jquery_file_upload/css/jquery.fileupload-noscript.css +0 -22
- data/vendor/jquery_file_upload/css/jquery.fileupload-ui-noscript.css +0 -17
- data/vendor/jquery_file_upload/css/jquery.fileupload-ui.css +0 -68
- data/vendor/jquery_file_upload/css/jquery.fileupload.css +0 -36
- data/vendor/jquery_file_upload/docker-compose.yml +0 -55
- data/vendor/jquery_file_upload/img/loading.gif +0 -0
- data/vendor/jquery_file_upload/img/progressbar.gif +0 -0
- data/vendor/jquery_file_upload/index.html +0 -357
- data/vendor/jquery_file_upload/js/cors/jquery.postmessage-transport.js +0 -126
- data/vendor/jquery_file_upload/js/cors/jquery.xdr-transport.js +0 -97
- data/vendor/jquery_file_upload/js/demo.js +0 -75
- data/vendor/jquery_file_upload/js/jquery.fileupload-audio.js +0 -101
- data/vendor/jquery_file_upload/js/jquery.fileupload-image.js +0 -347
- data/vendor/jquery_file_upload/js/jquery.fileupload-process.js +0 -170
- data/vendor/jquery_file_upload/js/jquery.fileupload-ui.js +0 -759
- data/vendor/jquery_file_upload/js/jquery.fileupload-validate.js +0 -119
- data/vendor/jquery_file_upload/js/jquery.fileupload-video.js +0 -101
- data/vendor/jquery_file_upload/js/jquery.fileupload.js +0 -1604
- data/vendor/jquery_file_upload/js/jquery.iframe-transport.js +0 -227
- data/vendor/jquery_file_upload/js/vendor/jquery.ui.widget.js +0 -805
- data/vendor/jquery_file_upload/package-lock.json +0 -6853
- data/vendor/jquery_file_upload/package.json +0 -116
- data/vendor/jquery_file_upload/server/gae-python/app.yaml +0 -18
- data/vendor/jquery_file_upload/server/gae-python/main.py +0 -204
- data/vendor/jquery_file_upload/server/gae-python/static/favicon.ico +0 -0
- data/vendor/jquery_file_upload/server/gae-python/static/robots.txt +0 -2
- data/vendor/jquery_file_upload/server/php/Dockerfile +0 -44
- data/vendor/jquery_file_upload/server/php/UploadHandler.php +0 -1480
- data/vendor/jquery_file_upload/server/php/index.php +0 -15
- data/vendor/jquery_file_upload/server/php/php.ini +0 -5
- data/vendor/jquery_file_upload/test/index.html +0 -49
- data/vendor/jquery_file_upload/test/unit.js +0 -989
- data/vendor/jquery_file_upload/test/vendor/chai.js +0 -10854
- data/vendor/jquery_file_upload/test/vendor/mocha.css +0 -325
- data/vendor/jquery_file_upload/test/vendor/mocha.js +0 -18178
- data/vendor/jquery_file_upload/wdio/LICENSE.txt +0 -20
- data/vendor/jquery_file_upload/wdio/assets/black+white-3x2.jpg +0 -0
- data/vendor/jquery_file_upload/wdio/assets/black+white-60x40.gif +0 -0
- data/vendor/jquery_file_upload/wdio/conf/chrome.js +0 -40
- data/vendor/jquery_file_upload/wdio/conf/firefox.js +0 -25
- data/vendor/jquery_file_upload/wdio/hooks/index.js +0 -36
- data/vendor/jquery_file_upload/wdio/test/pages/file-upload.js +0 -79
- data/vendor/jquery_file_upload/wdio/test/specs/01-file-upload.js +0 -25
- data/vendor/jquery_file_upload/wdio/wdio.conf.js +0 -4
- data/vendor/jquery_rails/CHANGELOG.md +0 -359
- data/vendor/jquery_rails/CONTRIBUTING.md +0 -132
- data/vendor/jquery_rails/Gemfile +0 -22
- data/vendor/jquery_rails/MIT-LICENSE +0 -21
- data/vendor/jquery_rails/README.md +0 -75
- data/vendor/jquery_rails/Rakefile +0 -59
- data/vendor/jquery_rails/VERSIONS.md +0 -62
- data/vendor/jquery_rails/jquery-rails.gemspec +0 -26
- data/vendor/jquery_rails/lib/jquery/assert_select.rb +0 -149
- data/vendor/jquery_rails/lib/jquery/rails/engine.rb +0 -6
- data/vendor/jquery_rails/lib/jquery/rails/version.rb +0 -9
- data/vendor/jquery_rails/lib/jquery/rails.rb +0 -8
- data/vendor/jquery_rails/lib/jquery-rails.rb +0 -1
- data/vendor/jquery_rails/test/assert_select_jquery_test.rb +0 -85
- data/vendor/jquery_rails/test/test_helper.rb +0 -6
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.js +0 -11008
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.js +0 -5
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.js +0 -9814
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.js +0 -4
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.js +0 -10364
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.js +0 -2
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery_ujs.js +0 -555
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61c8af991310acf4700552ba0690bfa466b62bc171f047fae46c598fc346258a
|
4
|
+
data.tar.gz: eea339f41ec56f46f34094e36b89cc2f70542300d77c0cbaf142df6fb0ea4ed8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d145ddc1bc27fa6b91025223e69c40bc9350bda85318563375f8f4fce3d61ceb13ca521f04df3288b32d1e2ed6300b5c35e780f9e5ec173d21ab75db6cde82c
|
7
|
+
data.tar.gz: '0387d3dd3646425e2f2c3cd62220e07716e7615d63273ee7482d6f9642e2e93c4151a360dc4c173f6bbeea4e49666d5057624e43d935408509599bf3d3e4ba18'
|
data/data/real.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
- :name: "*script"
|
3
|
+
:type: :setting
|
4
|
+
:codename: script
|
5
|
+
:fields:
|
6
|
+
:right:
|
7
|
+
:fields:
|
8
|
+
:content_options:
|
9
|
+
:type: :search_type
|
10
|
+
:content: ' {"type":["in", "JavaScript", "CoffeeScript"] }'
|
11
|
+
:input_type: list
|
12
|
+
- :name:
|
13
|
+
- :all
|
14
|
+
- :script
|
15
|
+
:type: :list
|
16
|
+
|
17
|
+
- :name: JavaScript
|
18
|
+
:type: :cardtype
|
19
|
+
:codename: java_script
|
20
|
+
:fields:
|
21
|
+
:description: |-
|
22
|
+
<p>
|
23
|
+
Create custom JavaScript for [[*script]] rules.
|
24
|
+
[[http://decko.org/JavaScript|more]]
|
25
|
+
</p>
|
26
|
+
:type:
|
27
|
+
:fields:
|
28
|
+
:create: Shark
|
29
|
+
:update: Shark
|
30
|
+
:delete: Shark
|
31
|
+
- :name: CoffeeScript
|
32
|
+
:type: :cardtype
|
33
|
+
:codename: coffee_script
|
34
|
+
:fields:
|
35
|
+
:description: |-
|
36
|
+
<p>
|
37
|
+
Generate JavaScript for [[*script]] rules.
|
38
|
+
[[http://decko.org/CoffeeScript|more]]
|
39
|
+
</p>
|
40
|
+
:type:
|
41
|
+
:fields:
|
42
|
+
:create: Shark
|
43
|
+
:update: Shark
|
44
|
+
:delete: Shark
|
45
|
+
- :name: Local script folder group
|
46
|
+
:type: :cardtype
|
47
|
+
:codename: local_script_folder_group
|
48
|
+
- :name: Local script manifest group
|
49
|
+
:type: :cardtype
|
50
|
+
:codename: local_script_manifest_group
|
data/lib/ansi2html.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Converts ansi formatting codes to html
|
2
|
+
module Ansi2html
|
3
|
+
class << self
|
4
|
+
def ansi2html data
|
5
|
+
data.gsub(/\033\[(?<code>[\d\;]{2,})m(?<content>.*?)\033\[0m/) do
|
6
|
+
to_span_tag Regexp.last_match(:code), Regexp.last_match(:content)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
ANSI_COLOR_CODE = {
|
13
|
+
0 => "black",
|
14
|
+
1 => "red",
|
15
|
+
2 => "green",
|
16
|
+
3 => "gold",
|
17
|
+
4 => "blue",
|
18
|
+
5 => "magenta",
|
19
|
+
6 => "darkcyan",
|
20
|
+
7 => "white"
|
21
|
+
}.freeze
|
22
|
+
|
23
|
+
ANSI_BRIGHT_COLOR_CODE = {
|
24
|
+
0 => "gray",
|
25
|
+
1 => "lightcoral",
|
26
|
+
2 => "lightgreen",
|
27
|
+
3 => "lightyellow",
|
28
|
+
4 => "lightblue",
|
29
|
+
5 => "mediumpurple",
|
30
|
+
6 => "lightcyan",
|
31
|
+
7 => "lightgray"
|
32
|
+
}.freeze
|
33
|
+
|
34
|
+
STYLE_MAPPINGS = {
|
35
|
+
1 => "font-weight:bold",
|
36
|
+
2 => "opacity:0.5",
|
37
|
+
3 => "font-style:italic",
|
38
|
+
4 => "text-decoration:underline",
|
39
|
+
5 => "text-decoration:blink",
|
40
|
+
6 => "text-decoration:blink",
|
41
|
+
9 => "text-decoration:line-through"
|
42
|
+
}.freeze
|
43
|
+
|
44
|
+
def to_span_tag codes, content
|
45
|
+
style = codes.split(";")
|
46
|
+
.map(&method(:translate_style_code))
|
47
|
+
.join
|
48
|
+
"<span style='#{style}'>#{content}</span>"
|
49
|
+
end
|
50
|
+
|
51
|
+
def translate_style_code code
|
52
|
+
return STYLE_MAPPINGS[code.to_i] if code.size == 1
|
53
|
+
|
54
|
+
color_code = code[-1].to_i
|
55
|
+
property, mapping =
|
56
|
+
case code[0..-2]
|
57
|
+
when "3"
|
58
|
+
["color", ANSI_COLOR_CODE]
|
59
|
+
when "4"
|
60
|
+
["background-color", ANSI_COLOR_CODE]
|
61
|
+
when "9"
|
62
|
+
["color", ANSI_BRIGHT_COLOR_CODE]
|
63
|
+
when "10"
|
64
|
+
["background-color", ANSI_BRIGHT_COLOR_CODE]
|
65
|
+
end
|
66
|
+
"#{property}: #{mapping[color_code]}; "
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Cardio::Railtie.config.double_click = :signed_in
|
data/set/abstract/00_script.rb
CHANGED
@@ -20,7 +20,7 @@ format :js do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def try_compress input
|
23
|
-
Uglifier.compile(input)
|
23
|
+
Uglifier.new(harmony: true).compile(input)
|
24
24
|
rescue StandardError => e
|
25
25
|
# CoffeeScript is compiled in a view
|
26
26
|
# If there is a CoffeeScript syntax error we get the rescued view here
|
@@ -71,12 +71,12 @@ format :html do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
view :core do
|
74
|
-
script = card.format(:js).render_core
|
75
|
-
process_content highlight(
|
74
|
+
# script = card.format(:js).render_core
|
75
|
+
process_content highlight(render_raw)
|
76
76
|
end
|
77
77
|
|
78
78
|
view :javascript_include_tag do
|
79
|
-
javascript_include_tag
|
79
|
+
javascript_include_tag path(format: :js)
|
80
80
|
end
|
81
81
|
|
82
82
|
def highlight script
|
@@ -8,15 +8,23 @@ format :html do
|
|
8
8
|
def ace_mode
|
9
9
|
:coffee
|
10
10
|
end
|
11
|
+
|
12
|
+
def bare_compile
|
13
|
+
true
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
format do
|
18
|
+
def bare_compile
|
19
|
+
false
|
20
|
+
end
|
21
|
+
|
14
22
|
view :core do
|
15
23
|
compile_coffee _render_raw
|
16
24
|
end
|
17
25
|
|
18
26
|
def compile_coffee script
|
19
|
-
::CoffeeScript.compile script
|
27
|
+
::CoffeeScript.compile script, no_wrap: bare_compile
|
20
28
|
rescue StandardError => e
|
21
29
|
line_nr = e.to_s.match(/\[stdin\]:(\d*)/)&.capture(0)&.to_i
|
22
30
|
line = script.lines[line_nr - 1] if line_nr
|
data/set/all/head_javascript.rb
CHANGED
@@ -1,18 +1,12 @@
|
|
1
1
|
format :html do
|
2
|
-
#
|
3
|
-
# - key is the
|
4
|
-
# - value is the
|
5
|
-
basket[:
|
2
|
+
# script_calls basket is a hash where
|
3
|
+
# - key is the name of a javascript method
|
4
|
+
# - value is the argument to send to the method
|
5
|
+
basket[:script_calls] = {}
|
6
6
|
|
7
|
-
|
8
|
-
super + %w[
|
9
|
-
decko_script_variables
|
10
|
-
head_javascript
|
11
|
-
script_config_and_initiation
|
12
|
-
]
|
13
|
-
end
|
7
|
+
basket[:head_views] += %w[head_javascript script_variables script_calls]
|
14
8
|
|
15
|
-
view :
|
9
|
+
view :script_variables, unknown: true, cache: :never, perms: :none do
|
16
10
|
javascript_tag do
|
17
11
|
decko_script_variables.each_with_object("") do |(k, v), string|
|
18
12
|
string << "#{k}=#{script_variable_to_js v};\n"
|
@@ -21,13 +15,11 @@ format :html do
|
|
21
15
|
end
|
22
16
|
|
23
17
|
view :head_javascript, unknown: true, cache: :never, perms: :none do
|
24
|
-
Array.wrap(head_javascript_paths).reject(&:empty?).join
|
18
|
+
Array.wrap(head_javascript_paths).reject(&:empty?).join
|
25
19
|
end
|
26
20
|
|
27
|
-
view :
|
28
|
-
javascript_tag
|
29
|
-
(script_configs << trigger_slot_ready).join "\n\n"
|
30
|
-
end
|
21
|
+
view :script_calls, unknown: true, perms: :none do
|
22
|
+
javascript_tag { (script_configs << trigger_slot_ready).join "\n\n" }
|
31
23
|
end
|
32
24
|
|
33
25
|
view :javascript_include_tag, unknown: true, perms: :none do
|
@@ -36,7 +28,7 @@ format :html do
|
|
36
28
|
|
37
29
|
def decko_script_variables
|
38
30
|
{
|
39
|
-
"
|
31
|
+
"decko.rootUrl": card_url(""),
|
40
32
|
"decko.doubleClick": Card.config.double_click,
|
41
33
|
"decko.cssPath": head_stylesheet_path,
|
42
34
|
"decko.currentUserId": (Auth.current_id if Auth.signed_in?)
|
@@ -54,7 +46,7 @@ format :html do
|
|
54
46
|
private
|
55
47
|
|
56
48
|
def trigger_slot_ready
|
57
|
-
"$('document').ready(function() { $('.card-slot').trigger('
|
49
|
+
"$('document').ready(function() { $('.card-slot').trigger('decko.slot.ready'); })"
|
58
50
|
end
|
59
51
|
|
60
52
|
def script_variable_to_js value
|
@@ -67,9 +59,8 @@ format :html do
|
|
67
59
|
end
|
68
60
|
|
69
61
|
def script_configs
|
70
|
-
basket[:
|
71
|
-
|
72
|
-
"decko.#{js_decko_function}('#{config_json}')"
|
62
|
+
basket[:script_calls].map do |js_function, ruby_method|
|
63
|
+
"decko.#{js_function}('#{escape_javascript send(ruby_method)}')"
|
73
64
|
end
|
74
65
|
end
|
75
66
|
|
data/set/right/script.rb
CHANGED
data/set/type/coffee_script.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
include_set Abstract::CoffeeScript
|
4
|
+
|
5
|
+
event :validate_coffeescript_syntax, :validate, on: :save, changed: %i[type_id content] do
|
6
|
+
::CoffeeScript.compile content
|
7
|
+
rescue ExecJS::RuntimeError => e
|
8
|
+
errors.add :content, e.message.remove("[stdin]:")
|
9
|
+
end
|
data/set/type/java_script.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
include_set Abstract::JavaScript
|
4
|
+
|
5
|
+
event :validate_javascript_syntax, :validate, on: :save, changed: %i[type_id content] do
|
6
|
+
Uglifier.compile content, harmony: true
|
7
|
+
rescue Uglifier::Error => e
|
8
|
+
errors.add :content, "<pre>#{Ansi2html.ansi2html(e.message)}</pre>".html_safe
|
9
|
+
end
|
@@ -41,11 +41,7 @@ format :html do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def remote_include_tags
|
44
|
-
|
45
|
-
return unless remote_items
|
46
|
-
|
47
|
-
remote_items.map do |args|
|
48
|
-
tag_args = args.clone
|
44
|
+
map_remote_items do |tag_args|
|
49
45
|
javascript_include_tag tag_args.delete("src"), tag_args
|
50
46
|
end
|
51
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-script
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-01-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,42 +18,42 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.105.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
28
|
+
version: 1.105.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-assets
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.15.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.15.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: card-mod-list
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.15.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.15.0
|
57
57
|
description: ''
|
58
58
|
email:
|
59
59
|
- info@decko.org
|
@@ -62,42 +62,10 @@ extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
64
|
- README.md
|
65
|
-
-
|
66
|
-
- assets/script/decko/bridge.js.coffee
|
67
|
-
- assets/script/decko/card_menu.js.coffee
|
68
|
-
- assets/script/decko/components.js.coffee
|
69
|
-
- assets/script/decko/decko.js.coffee
|
70
|
-
- assets/script/decko/doubleclick.js.coffee
|
71
|
-
- assets/script/decko/editor.js.coffee
|
72
|
-
- assets/script/decko/filter.js.coffee
|
73
|
-
- assets/script/decko/filter_items.js.coffee
|
74
|
-
- assets/script/decko/filter_links.js.coffee
|
75
|
-
- assets/script/decko/follow.js.coffee
|
76
|
-
- assets/script/decko/layout.js.coffee
|
77
|
-
- assets/script/decko/link_editor.js.coffee
|
78
|
-
- assets/script/decko/mod.js.coffee
|
79
|
-
- assets/script/decko/modal.js.coffee
|
80
|
-
- assets/script/decko/name_editor.js.coffee
|
81
|
-
- assets/script/decko/navbox.js.coffee
|
82
|
-
- assets/script/decko/nest_editor.js.coffee
|
83
|
-
- assets/script/decko/nest_editor_name.js.coffee
|
84
|
-
- assets/script/decko/nest_editor_options.js.coffee
|
85
|
-
- assets/script/decko/nest_editor_rules.js.coffee
|
86
|
-
- assets/script/decko/overlay.js.coffee
|
87
|
-
- assets/script/decko/pointer_config.js.coffee
|
88
|
-
- assets/script/decko/pointer_list_editor.js.coffee
|
89
|
-
- assets/script/decko/recaptcha.js.coffee
|
90
|
-
- assets/script/decko/selectable_filtered_content.js.coffee
|
91
|
-
- assets/script/decko/slot.js.coffee
|
92
|
-
- assets/script/decko/slot_ready.js.coffee
|
93
|
-
- assets/script/decko/slotter.js.coffee
|
94
|
-
- assets/script/decko/type_editor.js.coffee
|
95
|
-
- assets/script/decko/upload.js.coffee
|
96
|
-
- assets/script/jquery-ui.min.js
|
97
|
-
- assets/script/jquery.autosize.js
|
98
|
-
- assets/script/manifest.yml
|
99
|
-
- db/migrate_core_cards/20200804112348_add_mod_script_assets_type.rb
|
65
|
+
- data/real.yml
|
100
66
|
- init/early/init_execjs.rb
|
67
|
+
- lib/ansi2html.rb
|
68
|
+
- lib/card/mod/script.rb
|
101
69
|
- lib/javascript/jquery.iframe-transport.js
|
102
70
|
- lib/javascript/theme-textmate.js
|
103
71
|
- set/abstract/00_script.rb
|
@@ -116,81 +84,6 @@ files:
|
|
116
84
|
- set/type/local_script_manifest_group.rb
|
117
85
|
- set/type_plus_right/mod/script.rb
|
118
86
|
- set/type_plus_right/set/script.rb
|
119
|
-
- vendor/jquery_file_upload/LICENSE.txt
|
120
|
-
- vendor/jquery_file_upload/README.md
|
121
|
-
- vendor/jquery_file_upload/SECURITY.md
|
122
|
-
- vendor/jquery_file_upload/VULNERABILITIES.md
|
123
|
-
- vendor/jquery_file_upload/cors/postmessage.html
|
124
|
-
- vendor/jquery_file_upload/cors/result.html
|
125
|
-
- vendor/jquery_file_upload/css/jquery.fileupload-noscript.css
|
126
|
-
- vendor/jquery_file_upload/css/jquery.fileupload-ui-noscript.css
|
127
|
-
- vendor/jquery_file_upload/css/jquery.fileupload-ui.css
|
128
|
-
- vendor/jquery_file_upload/css/jquery.fileupload.css
|
129
|
-
- vendor/jquery_file_upload/docker-compose.yml
|
130
|
-
- vendor/jquery_file_upload/img/loading.gif
|
131
|
-
- vendor/jquery_file_upload/img/progressbar.gif
|
132
|
-
- vendor/jquery_file_upload/index.html
|
133
|
-
- vendor/jquery_file_upload/js/cors/jquery.postmessage-transport.js
|
134
|
-
- vendor/jquery_file_upload/js/cors/jquery.xdr-transport.js
|
135
|
-
- vendor/jquery_file_upload/js/demo.js
|
136
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-audio.js
|
137
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-image.js
|
138
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-process.js
|
139
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-ui.js
|
140
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-validate.js
|
141
|
-
- vendor/jquery_file_upload/js/jquery.fileupload-video.js
|
142
|
-
- vendor/jquery_file_upload/js/jquery.fileupload.js
|
143
|
-
- vendor/jquery_file_upload/js/jquery.iframe-transport.js
|
144
|
-
- vendor/jquery_file_upload/js/vendor/jquery.ui.widget.js
|
145
|
-
- vendor/jquery_file_upload/package-lock.json
|
146
|
-
- vendor/jquery_file_upload/package.json
|
147
|
-
- vendor/jquery_file_upload/server/gae-python/app.yaml
|
148
|
-
- vendor/jquery_file_upload/server/gae-python/main.py
|
149
|
-
- vendor/jquery_file_upload/server/gae-python/static/favicon.ico
|
150
|
-
- vendor/jquery_file_upload/server/gae-python/static/robots.txt
|
151
|
-
- vendor/jquery_file_upload/server/php/Dockerfile
|
152
|
-
- vendor/jquery_file_upload/server/php/UploadHandler.php
|
153
|
-
- vendor/jquery_file_upload/server/php/index.php
|
154
|
-
- vendor/jquery_file_upload/server/php/php.ini
|
155
|
-
- vendor/jquery_file_upload/test/index.html
|
156
|
-
- vendor/jquery_file_upload/test/unit.js
|
157
|
-
- vendor/jquery_file_upload/test/vendor/chai.js
|
158
|
-
- vendor/jquery_file_upload/test/vendor/mocha.css
|
159
|
-
- vendor/jquery_file_upload/test/vendor/mocha.js
|
160
|
-
- vendor/jquery_file_upload/wdio/LICENSE.txt
|
161
|
-
- vendor/jquery_file_upload/wdio/assets/black+white-3x2.jpg
|
162
|
-
- vendor/jquery_file_upload/wdio/assets/black+white-60x40.gif
|
163
|
-
- vendor/jquery_file_upload/wdio/conf/chrome.js
|
164
|
-
- vendor/jquery_file_upload/wdio/conf/firefox.js
|
165
|
-
- vendor/jquery_file_upload/wdio/hooks/index.js
|
166
|
-
- vendor/jquery_file_upload/wdio/test/pages/file-upload.js
|
167
|
-
- vendor/jquery_file_upload/wdio/test/specs/01-file-upload.js
|
168
|
-
- vendor/jquery_file_upload/wdio/wdio.conf.js
|
169
|
-
- vendor/jquery_rails/CHANGELOG.md
|
170
|
-
- vendor/jquery_rails/CONTRIBUTING.md
|
171
|
-
- vendor/jquery_rails/Gemfile
|
172
|
-
- vendor/jquery_rails/MIT-LICENSE
|
173
|
-
- vendor/jquery_rails/README.md
|
174
|
-
- vendor/jquery_rails/Rakefile
|
175
|
-
- vendor/jquery_rails/VERSIONS.md
|
176
|
-
- vendor/jquery_rails/jquery-rails.gemspec
|
177
|
-
- vendor/jquery_rails/lib/jquery-rails.rb
|
178
|
-
- vendor/jquery_rails/lib/jquery/assert_select.rb
|
179
|
-
- vendor/jquery_rails/lib/jquery/rails.rb
|
180
|
-
- vendor/jquery_rails/lib/jquery/rails/engine.rb
|
181
|
-
- vendor/jquery_rails/lib/jquery/rails/version.rb
|
182
|
-
- vendor/jquery_rails/test/assert_select_jquery_test.rb
|
183
|
-
- vendor/jquery_rails/test/test_helper.rb
|
184
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery.js
|
185
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery.min.js
|
186
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery.min.map
|
187
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery2.js
|
188
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.js
|
189
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.map
|
190
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery3.js
|
191
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.js
|
192
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.map
|
193
|
-
- vendor/jquery_rails/vendor/assets/javascripts/jquery_ujs.js
|
194
87
|
homepage: https://decko.org
|
195
88
|
licenses:
|
196
89
|
- GPL-3.0
|
@@ -201,6 +94,7 @@ metadata:
|
|
201
94
|
wiki_uri: https://decko.org
|
202
95
|
documentation_url: http://docs.decko.org/
|
203
96
|
card-mod: script
|
97
|
+
card-mod-group: gem-defaults
|
204
98
|
post_install_message:
|
205
99
|
rdoc_options: []
|
206
100
|
require_paths:
|
@@ -216,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
110
|
- !ruby/object:Gem::Version
|
217
111
|
version: '0'
|
218
112
|
requirements: []
|
219
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.3.11
|
220
114
|
signing_key:
|
221
115
|
specification_version: 4
|
222
116
|
summary: JavaScript, CoffeeScript, etc.
|
@@ -1,30 +0,0 @@
|
|
1
|
-
jQuery.fn.extend
|
2
|
-
autosave: ->
|
3
|
-
slot = @slot()
|
4
|
-
return if @attr 'no-autosave'
|
5
|
-
multi = @closest '.form-group'
|
6
|
-
if multi[0]
|
7
|
-
return unless id = multi.data 'cardId'
|
8
|
-
reportee = ': ' + multi.data 'cardName'
|
9
|
-
else
|
10
|
-
id = slot.data 'cardId'
|
11
|
-
reportee = ''
|
12
|
-
|
13
|
-
return unless id
|
14
|
-
|
15
|
-
# might be better to put this href base in the html
|
16
|
-
submit_url = decko.path 'update/~' + id
|
17
|
-
form_data = $('#edit_card_'+id).serializeArray().reduce( ((obj, item) ->
|
18
|
-
obj[item.name] = item.value
|
19
|
-
return obj
|
20
|
-
), { 'draft' : 'true', 'success[view]' : 'blank'});
|
21
|
-
$.ajax submit_url, {
|
22
|
-
data : form_data,
|
23
|
-
type : 'POST'
|
24
|
-
}
|
25
|
-
##{ 'card[content]' : @val() },
|
26
|
-
|
27
|
-
$(window).ready ->
|
28
|
-
$('body').on 'change', '.autosave .d0-card-content', ->
|
29
|
-
content_field = $(this)
|
30
|
-
setTimeout ( -> content_field.autosave() ), 500
|
@@ -1,31 +0,0 @@
|
|
1
|
-
decko.slotReady (slot, slotter) ->
|
2
|
-
slot.updateBridge(false, slotter)
|
3
|
-
|
4
|
-
links = slot.find('ul._auto-single-select > li.nav-item > a.nav-link')
|
5
|
-
if links.length == 1
|
6
|
-
$(links[0]).click()
|
7
|
-
|
8
|
-
jQuery.fn.extend
|
9
|
-
# overlayClosed=true means the bridge update was
|
10
|
-
# triggered by closing an overlay
|
11
|
-
updateBridge: (overlayClosed=false, slotter) ->
|
12
|
-
return unless @closest(".bridge").length > 0
|
13
|
-
if @data("breadcrumb")
|
14
|
-
@updateBreadcrumb()
|
15
|
-
else if slotter and $(slotter).data("breadcrumb")
|
16
|
-
$(slotter).updateBreadcrumb()
|
17
|
-
|
18
|
-
if overlayClosed
|
19
|
-
$(".bridge-pills > .nav-item > .nav-link.active").removeClass("active")
|
20
|
-
|
21
|
-
updateBreadcrumb: () ->
|
22
|
-
bc_item = $(".modal-header ._bridge-breadcrumb li:last-child")
|
23
|
-
bc_item.text(this.data("breadcrumb"))
|
24
|
-
bc_item.attr("class", "breadcrumb-item active #{this.data('breadcrumb-class')}")
|
25
|
-
|
26
|
-
$(window).ready ->
|
27
|
-
$('body').on "select2:select", "._close-rule-overlay-on-select", (event) ->
|
28
|
-
$(".overlay-container > ._overlay.card-slot.overlay_rule-view.RULE").removeOverlay()
|
29
|
-
|
30
|
-
$('body').on "click", "._update-history-pills", (event) ->
|
31
|
-
$(this).closest(".slotter").data("update-foreign-slot", ".card-slot.history_tab-view")
|
@@ -1,26 +0,0 @@
|
|
1
|
-
decko.isTouchDevice = ->
|
2
|
-
if 'ontouchstart' of window or window.DocumentTouch and
|
3
|
-
document instanceof DocumentTouch
|
4
|
-
return true
|
5
|
-
else
|
6
|
-
return detectMobileBrowser()
|
7
|
-
|
8
|
-
# source for this method: detectmobilebrowsers.com
|
9
|
-
detectMobileBrowser = (userAgent) ->
|
10
|
-
userAgent = navigator.userAgent or navigator.vendor or window.opera
|
11
|
-
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent) or /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0, 4))
|
12
|
-
|
13
|
-
decko.slotReady (slot) ->
|
14
|
-
if decko.isTouchDevice()
|
15
|
-
slot.find('._show-on-hover').removeClass('_show-on-hover')
|
16
|
-
|
17
|
-
$(window).ready ->
|
18
|
-
$('body').on 'show.bs.popover', '._card-menu-popover', () ->
|
19
|
-
$(this).closest(".card-menu._show-on-hover")
|
20
|
-
.removeClass("_show-on-hover")
|
21
|
-
.addClass("_show-on-hover-disabled")
|
22
|
-
|
23
|
-
$('body').on 'hide.bs.popover', '._card-menu-popover', () ->
|
24
|
-
$(this).closest(".card-menu._show-on-hover-disabled")
|
25
|
-
.removeClass("_show-on-hover-disabled")
|
26
|
-
.addClass("_show-on-hover")
|