compass-jquery-plugin 0.3.0.beta.21 → 0.3.0.beta.22
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +212 -211
- data/VERSION.yml +5 -5
- data/compass-jquery-plugin.gemspec +25 -2
- data/gem_tasks/jqtouch.rake +221 -201
- data/gem_tasks/jrails.rake +322 -311
- data/lib/compiler.jar +0 -0
- data/lib/jquery/flash_messages.rb +45 -45
- data/lib/jquery/gridify/grid.rb +147 -147
- data/lib/jquery/gridify/grid_column.rb +134 -134
- data/lib/jquery/gridify/grid_finder.rb +223 -211
- data/lib/jquery/gridify/grid_options.rb +279 -279
- data/lib/jquery/gridify/grid_view.rb +435 -436
- data/lib/jquery/gridify.rb +42 -42
- data/templates/dynatree/jquery.dynatree.min.js +1 -1
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +6 -15
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +6 -15
- data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +5 -6
- data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +5 -8
- data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +6 -8
- data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +7 -7
- data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +7 -13
- data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +7 -7
- data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +6 -12
- data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +7 -7
- data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +7 -7
- data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +6 -13
- data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +6 -8
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -7
- data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +4 -4
- data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +5 -10
- data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +6 -7
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +6 -7
- data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +4 -5
- data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +7 -8
- data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +7 -16
- data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +6 -8
- data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +6 -7
- data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +6 -7
- data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +7 -16
- data/templates/jqgrid/jquery.jqGrid.js +11567 -11565
- data/templates/jqgrid/jquery.jqGrid.min.js +472 -472
- data/templates/jqical/jquery.jqical.js +5 -9
- data/templates/jqical/jquery.jqical.min.js +44 -44
- data/templates/jqical/jquery.ui/jqical.scss +1 -1
- data/templates/jqtouch/config/initializers/jqtouch.rb +5 -4
- data/templates/jqtouch/jqtouch/apple/activeButton.png +0 -0
- data/templates/jqtouch/jqtouch/default/backButton.png +0 -0
- data/templates/jqtouch/jqtouch/default/backButtonActive.png +0 -0
- data/templates/jqtouch/jqtouch/default/bigButton.png +0 -0
- data/templates/jqtouch/jqtouch/default/bigButtonActive.png +0 -0
- data/templates/jqtouch/jqtouch/default/button.png +0 -0
- data/templates/jqtouch/jqtouch/default/buttonActive.png +0 -0
- data/templates/jqtouch/jqtouch/default/chevron.png +0 -0
- data/templates/jqtouch/jqtouch/default/chevronActive.png +0 -0
- data/templates/jqtouch/jqtouch/default/chevronCircle.png +0 -0
- data/templates/jqtouch/jqtouch/default/chevronCircleActive.png +0 -0
- data/templates/jqtouch/jqtouch/default/loading.gif +0 -0
- data/templates/jqtouch/jqtouch/default/toggleSwitch.png +0 -0
- data/templates/jqtouch/jqtouch/default/toolbarBackground.png +0 -0
- data/templates/jqtouch/jqtouch/jqt/back_button_clicked.png +0 -0
- data/templates/jqtouch/jqtouch/jqt.apple.scss +24 -11
- data/templates/jqtouch/jqtouch/jqt.default.scss +537 -0
- data/templates/jqtouch/jqtouch/jqt.jqt.scss +20 -6
- data/templates/jqtouch/jqtouch/jqtouch.scss +173 -1
- data/templates/jqtouch/jqtouch/photo/btnBack.png +0 -0
- data/templates/jqtouch/jqtouch/photo/loading.gif +0 -0
- data/templates/jqtouch/jqtouch/photo/navNext.png +0 -0
- data/templates/jqtouch/jqtouch/photo/navPause.png +0 -0
- data/templates/jqtouch/jqtouch/photo/navPlay.png +0 -0
- data/templates/jqtouch/jqtouch/photo/navPrev.png +0 -0
- data/templates/jqtouch/jqtouch/photo/toolbar.png +0 -0
- data/templates/jqtouch/jquery.jqtouch.js +8219 -632
- data/templates/jqtouch/jquery.jqtouch.min.js +60 -1
- data/templates/jqtouch/manifest.rb +21 -0
- data/templates/jrails/config/initializers/jrails.rb +1 -0
- data/templates/jrails/haml.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-ar.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-az.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-bg.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-bs.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-cs.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-da.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-de.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-el.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-eo.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-et.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-fa.min.js +2 -3
- data/templates/jrails/i18n/jquery.ui/datepicker-fo.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-fr-CH.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-fr.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-he.min.js +2 -3
- data/templates/jrails/i18n/jquery.ui/datepicker-hr.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-hu.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-hy.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-ja.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-ko.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-kz.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-lt.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-lv.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-nl.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-no.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-pl.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-ro.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-ru.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-sk.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-sq.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-sr-SR.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-sr.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-sv.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-ta.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-th.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-tr.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-uk.min.js +2 -4
- data/templates/jrails/i18n/jquery.ui/datepicker-vi.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-CN.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-HK.min.js +2 -2
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-TW.min.js +2 -2
- data/templates/jrails/jquery-1.4.2.min.js +156 -156
- data/templates/jrails/jquery-ui-1.8.5.js +23753 -23341
- data/templates/jrails/jquery-ui-1.8.5.min.js +823 -808
- data/templates/jrails/jquery.contextMenu.min.js +1 -1
- data/templates/jrails/jquery.sparkline.js +1050 -0
- data/templates/jrails/jquery.sparkline.min.js +31 -0
- data/templates/jrails/jquery.ui/_theme.scss +1699 -1634
- data/templates/jrails/manifest.rb +13 -11
- data/templates/jstree/jquery.jstree.min.js +10 -10
- data/templates/ribbon/jquery.ribbon.min.js +6 -6
- metadata +27 -4
data/gem_tasks/jqtouch.rake
CHANGED
@@ -1,202 +1,222 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'lib/handle_js_files'
|
3
|
-
|
4
|
-
# Compass generator for jqtouch 3.5+
|
5
|
-
JQTOUCH_SRC = File.join(GEM_ROOT, 'src', 'jqtouch')
|
6
|
-
JQTOUCH_SRC_STYLESHEETS = File.join(JQTOUCH_SRC, 'css')
|
7
|
-
JQTOUCH_SRC_IMAGES = File.join(JQTOUCH_SRC, 'images')
|
8
|
-
JQTOUCH_SRC_THEMES = File.join(JQTOUCH_SRC, 'themes')
|
9
|
-
|
10
|
-
JQTOUCH_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'jqtouch')
|
11
|
-
JQTOUCH_DEST_STYLESHEETS = File.join(JQTOUCH_DEST_TEMPLATES, 'jqtouch')
|
12
|
-
JQTOUCH_DEST_THEMES = File.join(JQTOUCH_DEST_TEMPLATES, 'jqtouch')
|
13
|
-
JQTOUCH_DEST_IMAGES = File.join(JQTOUCH_DEST_STYLESHEETS)
|
14
|
-
|
15
|
-
JQTOUCH_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n# Install with: compass install jquery/jqtouch\n\n"
|
16
|
-
JQTOUCH_MESSAGE2 = "// Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n\n"
|
17
|
-
|
18
|
-
all_scripts = [
|
19
|
-
'js/jqtouch.js',
|
20
|
-
'js/jqtouch.transitions.js',
|
21
|
-
'js/mod_spinningwheel.js',
|
22
|
-
'js/zflow.js',
|
23
|
-
'js/jqtouch-ical.js',
|
24
|
-
'js/jquery.event.drag-1.0.js',
|
25
|
-
'js/jquery.event.drop-1.0.js',
|
26
|
-
'js/jquery.touch.js',
|
27
|
-
'js/
|
28
|
-
'js/
|
29
|
-
'js/extensions/jqt.
|
30
|
-
'js/extensions/jqt.
|
31
|
-
'js/extensions/jqt.
|
32
|
-
'js/extensions/jqt.
|
33
|
-
'js/extensions/jqt.
|
34
|
-
'js/extensions/jqt.
|
35
|
-
'js/extensions/jqt.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
'
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
43
|
-
'
|
44
|
-
].collect {|filename| File.read(File.join(JQTOUCH_SRC, filename))}.join "\n\n"
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
f.print
|
80
|
-
end
|
81
|
-
manifest.print "
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
#
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
Dir.foreach(src_dir) do |image|
|
111
|
-
next
|
112
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
113
|
-
manifest.print "image 'jqtouch
|
114
|
-
end
|
115
|
-
|
116
|
-
#
|
117
|
-
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, '
|
118
|
-
src_dir = File.join(JQTOUCH_SRC_IMAGES, '
|
119
|
-
dest_dir = File.join(JQTOUCH_DEST_IMAGES, '
|
120
|
-
Dir.foreach(src_dir) do |image|
|
121
|
-
next if /^\./ =~ image
|
122
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
123
|
-
manifest.print "image 'jqtouch/
|
124
|
-
end
|
125
|
-
|
126
|
-
#
|
127
|
-
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, '
|
128
|
-
src_dir = File.join(JQTOUCH_SRC_IMAGES, '
|
129
|
-
dest_dir = File.join(JQTOUCH_DEST_IMAGES, '
|
130
|
-
Dir.foreach(src_dir) do |image|
|
131
|
-
next if /^\./ =~ image
|
132
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
133
|
-
manifest.print "image 'jqtouch/
|
134
|
-
end
|
135
|
-
|
136
|
-
#
|
137
|
-
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, '
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
1
|
+
require 'fileutils'
|
2
|
+
require 'lib/handle_js_files'
|
3
|
+
|
4
|
+
# Compass generator for jqtouch 3.5+
|
5
|
+
JQTOUCH_SRC = File.join(GEM_ROOT, 'src', 'jqtouch')
|
6
|
+
JQTOUCH_SRC_STYLESHEETS = File.join(JQTOUCH_SRC, 'css')
|
7
|
+
JQTOUCH_SRC_IMAGES = File.join(JQTOUCH_SRC, 'images')
|
8
|
+
JQTOUCH_SRC_THEMES = File.join(JQTOUCH_SRC, 'themes')
|
9
|
+
|
10
|
+
JQTOUCH_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'jqtouch')
|
11
|
+
JQTOUCH_DEST_STYLESHEETS = File.join(JQTOUCH_DEST_TEMPLATES, 'jqtouch')
|
12
|
+
JQTOUCH_DEST_THEMES = File.join(JQTOUCH_DEST_TEMPLATES, 'jqtouch')
|
13
|
+
JQTOUCH_DEST_IMAGES = File.join(JQTOUCH_DEST_STYLESHEETS)
|
14
|
+
|
15
|
+
JQTOUCH_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n# Install with: compass install jquery/jqtouch\n\n"
|
16
|
+
JQTOUCH_MESSAGE2 = "// Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n\n"
|
17
|
+
|
18
|
+
all_scripts = [
|
19
|
+
'js/jqtouch.js',
|
20
|
+
'js/jqtouch.transitions.js',
|
21
|
+
'js/mod_spinningwheel.js',
|
22
|
+
'js/zflow.js',
|
23
|
+
'js/jqtouch-ical.js',
|
24
|
+
'js/jquery.event.drag-1.0.js',
|
25
|
+
'js/jquery.event.drop-1.0.js',
|
26
|
+
'js/jquery.touch.js',
|
27
|
+
'js/scrolling.css.js',
|
28
|
+
'js/chain.js',
|
29
|
+
'js/extensions/jqt.autotitles.js',
|
30
|
+
'js/extensions/jqt.database.js',
|
31
|
+
'js/extensions/jqt.dynamicheight.js',
|
32
|
+
'js/extensions/jqt.floaty.js',
|
33
|
+
'js/extensions/jqt.gestures.js',
|
34
|
+
'js/extensions/jqt.horizontal-scroll.js',
|
35
|
+
'js/extensions/jqt.location.js',
|
36
|
+
'js/extensions/jqt.offline.js',
|
37
|
+
'js/extensions/jqt.photo.js',
|
38
|
+
'js/extensions/jqt.scaling.js',
|
39
|
+
'js/extensions/jqt.scroll.js',
|
40
|
+
'js/extensions/jqt.scrolling.js',
|
41
|
+
'js/extensions/jqt.sliding.js',
|
42
|
+
#'js/extensions/jqt.tscroll.js',
|
43
|
+
'js/extensions/jqt.vertical-scroll.js'
|
44
|
+
].collect {|filename| File.read(File.join(JQTOUCH_SRC, filename))}.join "\n\n"
|
45
|
+
|
46
|
+
all_stylesheets = [
|
47
|
+
'css/jqtouch.css',
|
48
|
+
'css/scrolling.css',
|
49
|
+
#'css/jqt.tscroll.css',
|
50
|
+
'css/spinningwheel.css',
|
51
|
+
'css/zflow.css',
|
52
|
+
'css/jqtouch-ical.css',
|
53
|
+
'css/jqt.photo.css'
|
54
|
+
].collect {|filename| File.read(File.join(JQTOUCH_SRC, filename))}.join "\n\n"
|
55
|
+
|
56
|
+
namespace :build do
|
57
|
+
desc 'Build the stylesheets and templates for jqtouch.'
|
58
|
+
task :jqtouch do
|
59
|
+
|
60
|
+
FileUtils.remove_dir JQTOUCH_DEST_TEMPLATES if File.exists? JQTOUCH_DEST_TEMPLATES
|
61
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_TEMPLATES, 'config', 'initializers'))
|
62
|
+
|
63
|
+
open File.join(JQTOUCH_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
|
64
|
+
manifest.print JQTOUCH_MESSAGE1
|
65
|
+
|
66
|
+
open File.join(JQTOUCH_DEST_TEMPLATES, 'config', 'initializers', 'jqtouch.rb'), 'w' do |f|
|
67
|
+
f.print(File.read(File.join(JQTOUCH_SRC, 'config', 'initializers', 'jqtouch.rb')))
|
68
|
+
end
|
69
|
+
manifest.print "file 'config/initializers/jqtouch.rb'\n"
|
70
|
+
|
71
|
+
#JavaScripts
|
72
|
+
|
73
|
+
open File.join(JQTOUCH_DEST_TEMPLATES, 'jquery.jqtouch.js'), 'w' do |f|
|
74
|
+
f.print concat_files(all_scripts)
|
75
|
+
end
|
76
|
+
manifest.print "javascript 'jquery.jqtouch.js'\n"
|
77
|
+
|
78
|
+
open File.join(JQTOUCH_DEST_TEMPLATES, 'jquery.jqtouch.min.js'), 'w' do |f|
|
79
|
+
f.print compress_js(all_scripts, "yui")
|
80
|
+
end
|
81
|
+
manifest.print "javascript 'jquery.jqtouch.min.js'\n"
|
82
|
+
|
83
|
+
# Stylesheets
|
84
|
+
FileUtils.mkdir_p(JQTOUCH_DEST_STYLESHEETS)
|
85
|
+
|
86
|
+
open File.join(JQTOUCH_DEST_STYLESHEETS, 'jqtouch.scss'), 'w' do |f|
|
87
|
+
sass = JQTOUCH_MESSAGE2
|
88
|
+
IO.popen("sass-convert -F css -T scss", 'r+') { |ff| ff.print(all_stylesheets); ff.close_write; sass += ff.read }
|
89
|
+
f.print sass
|
90
|
+
end
|
91
|
+
manifest.print "stylesheet 'jqtouch/jqtouch.scss'\n"
|
92
|
+
|
93
|
+
Dir.foreach File.join(JQTOUCH_SRC, 'css') do |file|
|
94
|
+
next unless /\iphone-emulator.css$/ =~ file
|
95
|
+
css = File.read File.join(JQTOUCH_SRC, 'css', file)
|
96
|
+
sass = ''
|
97
|
+
IO.popen("sass-convert -F css -T scss", 'r+') { |f| f.print(css); f.close_write; sass = f.read }
|
98
|
+
open(File.join(JQTOUCH_DEST_STYLESHEETS, file.gsub(/\.css$/,'.scss')), 'w') do |f|
|
99
|
+
f.write JQTOUCH_MESSAGE2 + sass
|
100
|
+
end
|
101
|
+
manifest.print "stylesheet 'jqtouch/#{file.gsub(/\.css$/,'.scss')}'\n"
|
102
|
+
end
|
103
|
+
|
104
|
+
# iPhone Images
|
105
|
+
|
106
|
+
# Copy the images directory
|
107
|
+
src_dir = JQTOUCH_SRC_IMAGES
|
108
|
+
dest_dir = JQTOUCH_DEST_IMAGES
|
109
|
+
|
110
|
+
Dir.foreach(src_dir) do |image|
|
111
|
+
next unless /\.png$/ =~ image
|
112
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
113
|
+
manifest.print "image 'jqtouch/#{image}'\n"
|
114
|
+
end
|
115
|
+
|
116
|
+
# iCal Images
|
117
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'ical'))
|
118
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'ical')
|
119
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'ical')
|
120
|
+
Dir.foreach(src_dir) do |image|
|
121
|
+
next if /^\./ =~ image
|
122
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
123
|
+
manifest.print "image 'jqtouch/ical/#{image}'\n"
|
124
|
+
end
|
125
|
+
|
126
|
+
# Photo Images
|
127
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'photo'))
|
128
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'photo')
|
129
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'photo')
|
130
|
+
Dir.foreach(src_dir) do |image|
|
131
|
+
next if /^\./ =~ image
|
132
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
133
|
+
manifest.print "image 'jqtouch/photo/#{image}'\n"
|
134
|
+
end
|
135
|
+
|
136
|
+
# iPhone Icons
|
137
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'icons'))
|
138
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'icons')
|
139
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'icons')
|
140
|
+
Dir.foreach(src_dir) do |image|
|
141
|
+
next if /^\./ =~ image
|
142
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
143
|
+
manifest.print "image 'jqtouch/icons/#{image}'\n"
|
144
|
+
end
|
145
|
+
|
146
|
+
# Spinning wheel images
|
147
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'sw'))
|
148
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'sw')
|
149
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'sw')
|
150
|
+
Dir.foreach(src_dir) do |image|
|
151
|
+
next if /^\./ =~ image
|
152
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
153
|
+
manifest.print "image 'jqtouch/sw/#{image}'\n"
|
154
|
+
end
|
155
|
+
|
156
|
+
# glyphish Images
|
157
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'glyphish', 'icons'))
|
158
|
+
|
159
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'glyphish', 'icons')
|
160
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'glyphish', 'icons')
|
161
|
+
Dir.foreach(src_dir) do |image|
|
162
|
+
next if /^\./ =~ image
|
163
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
164
|
+
manifest.print "image 'jqtouch/glyphish/icons/#{image}'\n"
|
165
|
+
end
|
166
|
+
FileUtils.mkdir_p(File.join(JQTOUCH_DEST_IMAGES, 'glyphish', 'mini-icons'))
|
167
|
+
src_dir = File.join(JQTOUCH_SRC_IMAGES, 'glyphish', 'icons')
|
168
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, 'glyphish', 'mini-icons')
|
169
|
+
Dir.foreach(src_dir) do |image|
|
170
|
+
next if /^\./ =~ image
|
171
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
172
|
+
manifest.print "image 'jqtouch/glyphish/mini-icons/#{image}'\n"
|
173
|
+
end
|
174
|
+
|
175
|
+
open File.join(JQTOUCH_DEST_IMAGES, 'glyphish', 'Read me first - license.txt'), 'w' do |f|
|
176
|
+
f.print(File.read(File.join(JQTOUCH_SRC_IMAGES, 'glyphish', 'Read me first - license.txt')))
|
177
|
+
end
|
178
|
+
manifest.print "image 'jqtouch/glyphish/Read me first - license.txt'\n"
|
179
|
+
|
180
|
+
# jQuery jQTouch Themes
|
181
|
+
|
182
|
+
FileUtils.mkdir_p(JQTOUCH_DEST_THEMES)
|
183
|
+
|
184
|
+
Dir.foreach JQTOUCH_SRC_THEMES do |theme|
|
185
|
+
next if /^\./ =~ theme
|
186
|
+
|
187
|
+
# # Copy the stylesheets#
|
188
|
+
# Dir.foreach File.join(JQTOUCH_SRC_THEMES, "#{theme}") do |file|
|
189
|
+
# next unless /\.css$/ =~ file
|
190
|
+
# css = File.read File.join(JQTOUCH_SRC_THEMES, "#{theme}", file)
|
191
|
+
# open File.join(JQTOUCH_DEST_THEMES, file), 'w' do |f|
|
192
|
+
# f.print(css)
|
193
|
+
# end
|
194
|
+
# manifest.print "file 'public/stylesheets/jqtouch/#{file}'\n"
|
195
|
+
# end
|
196
|
+
|
197
|
+
# Convert the stylesheets
|
198
|
+
Dir.foreach File.join(JQTOUCH_SRC_THEMES, "#{theme}") do |file|
|
199
|
+
next unless /\.css$/ =~ file
|
200
|
+
css = File.read File.join(JQTOUCH_SRC_THEMES, "#{theme}", file)
|
201
|
+
sass = ''
|
202
|
+
IO.popen("sass-convert -F css -T scss", 'r+') { |f| f.print(css); f.close_write; sass = f.read }
|
203
|
+
open File.join(JQTOUCH_DEST_THEMES, "jqt.#{theme}.scss"), 'w' do |f|
|
204
|
+
f.write JQTOUCH_MESSAGE2 + sass
|
205
|
+
end
|
206
|
+
manifest.print "stylesheet 'jqtouch/jqt.#{theme}.scss', :media => 'screen, projection'\n"
|
207
|
+
end
|
208
|
+
|
209
|
+
# Copy the theme images directory
|
210
|
+
src_dir = File.join(JQTOUCH_SRC_THEMES, theme, 'images')
|
211
|
+
dest_dir = File.join(JQTOUCH_DEST_IMAGES, "#{theme}")
|
212
|
+
FileUtils.mkdir_p dest_dir
|
213
|
+
|
214
|
+
Dir.foreach(src_dir) do |image|
|
215
|
+
next if /^\./ =~ image
|
216
|
+
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
217
|
+
manifest.print "image 'jqtouch/#{theme}/#{image}'\n"
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
202
222
|
end
|