jquery-ui-bootstrap-rails-asset 0.0.2 → 0.0.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.
- data/CHANGELOG.md +13 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +2 -0
- data/README.md +101 -0
- data/Rakefile +8 -0
- data/app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/ui-bg_glass_75_ffffff_1x400.png +0 -0
- data/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/app/assets/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/ui-icons_f6cf3b_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui-bootstrap.js +7 -0
- data/app/assets/stylesheets/jquery-ui-bootstrap.css +2540 -0
- data/app/assets/stylesheets/jquery-ui-bootstrap.ie.css +55 -0
- data/lib/jquery-ui-bootstrap-rails-asset.rb +3 -0
- data/lib/jquery/ui/bootstrap/rails/asset.rb +2 -0
- data/lib/jquery/ui/bootstrap/rails/asset/engine.rb +12 -0
- data/lib/jquery/ui/bootstrap/rails/asset/version.rb +11 -0
- data/lib/tasks/jquery-ui-bootstrap-rails-asset_tasks.rake +124 -0
- metadata +30 -3
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-left, .ui-corner-bottom{ border-radius:0px;}
|
3
|
+
/*
|
4
|
+
* jQuery UI Tabs 1.10.0
|
5
|
+
*
|
6
|
+
* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
|
7
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
8
|
+
* http://jquery.org/license
|
9
|
+
*
|
10
|
+
* http://jqueryui.com/tabs/
|
11
|
+
*/
|
12
|
+
|
13
|
+
.ui-state-active,.ui-tabs-selected { border-radius:0px;}
|
14
|
+
.ui-tabs-selected { border-radius:0px;}
|
15
|
+
.ui-tabs .ui-tabs-nav li{ filter:none;}
|
16
|
+
.ui-tabs .ui-tabs-nav li a { border-radius:0px; }
|
17
|
+
|
18
|
+
.ui-button .ui-button-text {
|
19
|
+
display: block;
|
20
|
+
}
|
21
|
+
|
22
|
+
/*
|
23
|
+
* jQuery UI Button 1.10.2
|
24
|
+
*
|
25
|
+
* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
|
26
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
27
|
+
* http://jquery.org/license
|
28
|
+
*
|
29
|
+
* http://jqueryui.com/button/
|
30
|
+
*/
|
31
|
+
|
32
|
+
.ui-button-text-icon-primary{}
|
33
|
+
|
34
|
+
.ui-button-text-icon-primary .ui-button-text,
|
35
|
+
.ui-button-text-icons .ui-button-text {}
|
36
|
+
|
37
|
+
.ui-button-text-icon-primary .ui-icon{
|
38
|
+
top:50%;
|
39
|
+
margin-top: 5px;
|
40
|
+
margin-bottom:-26px;
|
41
|
+
}
|
42
|
+
|
43
|
+
.ui-button-icons-only .ui-icon {}
|
44
|
+
|
45
|
+
.ui-button-icon-only .ui-icon{
|
46
|
+
top:50%;
|
47
|
+
margin-top: 0px;
|
48
|
+
margin-bottom:-28px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.ui-menu li {
|
52
|
+
list-style-type: none;
|
53
|
+
display: inline;
|
54
|
+
line-height: 0;
|
55
|
+
}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
desc "Clean and then generate everything (default)"
|
4
|
+
task :assets => [:clean, :javascripts, :stylesheets, :images]
|
5
|
+
|
6
|
+
task :build => :assets
|
7
|
+
|
8
|
+
task :default => :assets
|
9
|
+
|
10
|
+
desc "Remove the app directory"
|
11
|
+
task :clean do
|
12
|
+
rm_rf 'app'
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Generate the JavaScript assets"
|
16
|
+
# TODO: rename *.js to jquery-ui-bootstrap.js
|
17
|
+
task :javascripts => :submodule do
|
18
|
+
target_dir = "app/assets/javascripts"
|
19
|
+
mkdir_p target_dir
|
20
|
+
Rake.rake_output_message 'Generating javascripts'
|
21
|
+
Dir.glob("jquery-ui/ui/*.js").each do |path|
|
22
|
+
basename = File.basename(path)
|
23
|
+
dep_modules = get_js_dependencies(basename).map(&method(:remove_js_extension))
|
24
|
+
File.open("#{target_dir}/#{basename}", "w") do |out|
|
25
|
+
dep_modules.each do |mod|
|
26
|
+
out.write("//= require #{mod}\n")
|
27
|
+
end
|
28
|
+
out.write("\n") unless dep_modules.empty?
|
29
|
+
source_code = File.read(path)
|
30
|
+
source_code.gsub!('@VERSION', version)
|
31
|
+
protect_copyright_notice(source_code)
|
32
|
+
out.write(source_code)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# process the i18n files separately for performance, since they will not have dependencies
|
37
|
+
# https://github.com/joliss/jquery-ui-rails/issues/9
|
38
|
+
Dir.glob("jquery-ui/ui/i18n/*.js").each do |path|
|
39
|
+
basename = File.basename(path)
|
40
|
+
File.open("#{target_dir}/#{basename}", "w") do |out|
|
41
|
+
source_code = File.read(path)
|
42
|
+
source_code.gsub!('@VERSION', version)
|
43
|
+
protect_copyright_notice(source_code)
|
44
|
+
out.write(source_code)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
File.open("#{target_dir}/jquery.ui.effect.all.js", "w") do |out|
|
49
|
+
Dir.glob("jquery-ui/ui/jquery.ui.effect*.js").sort.each do |path|
|
50
|
+
asset_name = remove_js_extension(File.basename(path))
|
51
|
+
out.write("//= require #{asset_name}\n")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
File.open("#{target_dir}/jquery.ui.all.js", "w") do |out|
|
55
|
+
Dir.glob("jquery-ui/ui/*.js").sort.each do |path|
|
56
|
+
asset_name = remove_js_extension(File.basename(path))
|
57
|
+
out.write("//= require #{asset_name}\n")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
desc "Generate the CSS assets"
|
63
|
+
# TODO: just rename "images/ by "/assets/ and use erb like jquery-ui-rails in the future
|
64
|
+
# TODO: rename *.css to jquery-ui-bootstrap.css and jquery-ui-bootstrap.ie.css
|
65
|
+
task :stylesheets => :submodule do
|
66
|
+
target_dir = "app/assets/stylesheets"
|
67
|
+
mkdir_p target_dir
|
68
|
+
Rake.rake_output_message 'Generating stylesheets'
|
69
|
+
|
70
|
+
css_dir = "jquery-ui/themes/base"
|
71
|
+
Dir.glob("#{css_dir}/*.css").each do |path|
|
72
|
+
basename = File.basename(path)
|
73
|
+
source_code = File.read(path)
|
74
|
+
source_code.gsub!('@VERSION', version)
|
75
|
+
protect_copyright_notice(source_code)
|
76
|
+
extra_dependencies = []
|
77
|
+
# Is "theme" listed among the dependencies for the matching JS file?
|
78
|
+
unless basename =~ /\.(all|base|core)\./
|
79
|
+
dependencies = DEPENDENCY_HASH[basename.sub(/\.css/, '.js')]
|
80
|
+
if dependencies.nil?
|
81
|
+
puts "Warning: No matching JavaScript dependencies found for #{basename}"
|
82
|
+
extra_dependencies << 'jquery.ui.core'
|
83
|
+
else
|
84
|
+
dependencies.each do |dependency|
|
85
|
+
dependency = dependency.sub(/\.js$/, '')
|
86
|
+
dependent_stylesheet = "#{dependency}.css"
|
87
|
+
extra_dependencies << dependency if File.exists?("#{css_dir}/#{dependent_stylesheet}")
|
88
|
+
end
|
89
|
+
extra_dependencies << 'jquery.ui.theme'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
extra_dependencies.reverse.each do |dep|
|
93
|
+
# Add after first comment block
|
94
|
+
source_code = source_code.sub(/\A((.*?\*\/\n)?)/m, "\\1/*\n *= require #{dep}\n */\n")
|
95
|
+
end
|
96
|
+
# Use "require" instead of @import
|
97
|
+
source_code.gsub!(/^@import (.*)$/) { |s|
|
98
|
+
m = s.match(/^@import (url\()?"(?<module>[-_.a-zA-Z]+)\.css"\)?;/) \
|
99
|
+
or fail "Cannot parse import: #{s}"
|
100
|
+
"/*\n *= require #{m['module']}\n */"
|
101
|
+
}
|
102
|
+
# Be cute: collapse multiple require comment blocks into one
|
103
|
+
source_code.gsub!(/^( \*= require .*)\n \*\/(\n+)\/\*\n(?= \*= require )/, '\1\2')
|
104
|
+
# Replace hard-coded image URLs with asset path helpers
|
105
|
+
source_code.gsub!(/url\("?images\/([-_.a-zA-Z0-9]+)"?\)/, 'url(<%= image_path("jquery-ui/\1") %>)')
|
106
|
+
File.open("#{target_dir}/#{basename}.erb", "w") do |out|
|
107
|
+
out.write(source_code)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
desc "Generate the image assets"
|
113
|
+
task :images => :submodule do
|
114
|
+
target_dir = "app/assets/images/jquery-ui"
|
115
|
+
mkdir_p target_dir
|
116
|
+
Rake.rake_output_message 'Copying images'
|
117
|
+
FileUtils.cp(Dir.glob("jquery-ui/themes/base/images/*"), target_dir)
|
118
|
+
end
|
119
|
+
|
120
|
+
# private
|
121
|
+
|
122
|
+
task :submodule do
|
123
|
+
sh 'git submodule update --init' unless File.exist?('jquery-ui/README.md')
|
124
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-ui-bootstrap-rails-asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -65,7 +65,34 @@ email:
|
|
65
65
|
executables: []
|
66
66
|
extensions: []
|
67
67
|
extra_rdoc_files: []
|
68
|
-
files:
|
68
|
+
files:
|
69
|
+
- app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png
|
70
|
+
- app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png
|
71
|
+
- app/assets/images/ui-bg_glass_65_ffffff_1x400.png
|
72
|
+
- app/assets/images/ui-bg_glass_75_dadada_1x400.png
|
73
|
+
- app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png
|
74
|
+
- app/assets/images/ui-bg_glass_75_ffffff_1x400.png
|
75
|
+
- app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
76
|
+
- app/assets/images/ui-bg_inset-soft_95_fef1ec_1x100.png
|
77
|
+
- app/assets/images/ui-icons_222222_256x240.png
|
78
|
+
- app/assets/images/ui-icons_2e83ff_256x240.png
|
79
|
+
- app/assets/images/ui-icons_454545_256x240.png
|
80
|
+
- app/assets/images/ui-icons_888888_256x240.png
|
81
|
+
- app/assets/images/ui-icons_cd0a0a_256x240.png
|
82
|
+
- app/assets/images/ui-icons_f6cf3b_256x240.png
|
83
|
+
- app/assets/javascripts/jquery-ui-bootstrap.js
|
84
|
+
- app/assets/stylesheets/jquery-ui-bootstrap.css
|
85
|
+
- app/assets/stylesheets/jquery-ui-bootstrap.ie.css
|
86
|
+
- lib/jquery/ui/bootstrap/rails/asset/engine.rb
|
87
|
+
- lib/jquery/ui/bootstrap/rails/asset/version.rb
|
88
|
+
- lib/jquery/ui/bootstrap/rails/asset.rb
|
89
|
+
- lib/jquery-ui-bootstrap-rails-asset.rb
|
90
|
+
- lib/tasks/jquery-ui-bootstrap-rails-asset_tasks.rake
|
91
|
+
- Gemfile
|
92
|
+
- CHANGELOG.md
|
93
|
+
- MIT-LICENSE
|
94
|
+
- Rakefile
|
95
|
+
- README.md
|
69
96
|
homepage: https://github.com/Applicat/jquery-ui-bootstrap-rails-asset
|
70
97
|
licenses: []
|
71
98
|
post_install_message:
|
@@ -80,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
107
|
version: '0'
|
81
108
|
segments:
|
82
109
|
- 0
|
83
|
-
hash:
|
110
|
+
hash: -575220325936367475
|
84
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
112
|
none: false
|
86
113
|
requirements:
|