compass-jquery-plugin 0.3.0.beta.18 → 0.3.0.beta.19
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/README.textile +2 -1
- data/VERSION.yml +1 -1
- data/compass-jquery-plugin.gemspec +8 -6
- data/gem_tasks/jrails.rake +14 -1
- data/lib/jquery.rb +11 -11
- data/templates/jrails/config/initializers/jrails.rb +1 -0
- data/templates/jrails/haml.js +506 -0
- data/templates/jrails/haml.min.js +5 -0
- data/templates/jrails/manifest.rb +2 -0
- data/templates/jstree/jquery.ui/jstree.aero.scss +2 -0
- data/templates/jstree/jquery.ui/jstree.aqua.scss +2 -0
- data/templates/jstree/jquery.ui/jstree.classic.scss +2 -0
- data/templates/jstree/jquery.ui/{jstree.chrystal → jstree.crystal}/d.gif +0 -0
- data/templates/jstree/jquery.ui/{jstree.chrystal → jstree.crystal}/d.png +0 -0
- data/templates/jstree/jquery.ui/{jstree.chrystal → jstree.crystal}/throbber.gif +0 -0
- data/templates/jstree/jquery.ui/{jstree.chrystal.scss → jstree.crystal.scss} +22 -20
- data/templates/jstree/manifest.rb +4 -4
- metadata +10 -8
data/README.textile
CHANGED
@@ -187,7 +187,8 @@ h3. jQuery Plugins included
|
|
187
187
|
* Chris Domigan for <b>"jQuery ContextMenu Plugin":http://www.trendskitchens.co.nz/jquery/contextmenu/</b>
|
188
188
|
* Denis Howlett for <b>"jQuery Table Drag and Drop Plugin":http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/</b>
|
189
189
|
* Michael Aufreiter for <b>"jQuery UI Multiselect Plugin":http://quasipartikel.at</b>
|
190
|
-
* Tim Caswell for <b>"jQuery haml Plugin":http://github.com/creationix/haml
|
190
|
+
* Tim Caswell for <b>"jQuery haml Plugin":http://github.com/creationix/jquery-haml</b>
|
191
|
+
* Tim Caswell for <b>"halm-js":http://github.com/creationix/haml-js</b> Server side templating language for JavaScript
|
191
192
|
* Rick DeNatale for <b>"ri_cal":http://github.com/rubyredrick/ri_cal/</b>
|
192
193
|
* Andrew M Andrews III for <b>"Any+Time":http://www.ama3.com/anytime/</b>
|
193
194
|
* Adam Shaw for <b>"FullCalendar":http://arshaw.com/fullcalendar/</b>
|
data/VERSION.yml
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{compass-jquery-plugin}
|
8
|
-
s.version = "0.3.0.beta.
|
8
|
+
s.version = "0.3.0.beta.19"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kosmas Schuetz"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-17}
|
13
13
|
s.description = %q{A compass plugin that integrates jRails, jQuery, jQuery UI and Themes, jqGrid and more into the Compass Sass framework.}
|
14
14
|
s.email = %q{kosmas.schuetz@gmx.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -619,6 +619,8 @@ Gem::Specification.new do |s|
|
|
619
619
|
"templates/jqtouch/jquery.jqtouch.min.js",
|
620
620
|
"templates/jqtouch/manifest.rb",
|
621
621
|
"templates/jrails/config/initializers/jrails.rb",
|
622
|
+
"templates/jrails/haml.js",
|
623
|
+
"templates/jrails/haml.min.js",
|
622
624
|
"templates/jrails/i18n/jquery.ui/datepicker-af.js",
|
623
625
|
"templates/jrails/i18n/jquery.ui/datepicker-af.min.js",
|
624
626
|
"templates/jrails/i18n/jquery.ui/datepicker-ar.js",
|
@@ -1213,14 +1215,14 @@ Gem::Specification.new do |s|
|
|
1213
1215
|
"templates/jstree/jquery.ui/jstree.aqua/d.png",
|
1214
1216
|
"templates/jstree/jquery.ui/jstree.aqua/hovered.png",
|
1215
1217
|
"templates/jstree/jquery.ui/jstree.aqua/throbber.gif",
|
1216
|
-
"templates/jstree/jquery.ui/jstree.chrystal.scss",
|
1217
|
-
"templates/jstree/jquery.ui/jstree.chrystal/d.gif",
|
1218
|
-
"templates/jstree/jquery.ui/jstree.chrystal/d.png",
|
1219
|
-
"templates/jstree/jquery.ui/jstree.chrystal/throbber.gif",
|
1220
1218
|
"templates/jstree/jquery.ui/jstree.classic.scss",
|
1221
1219
|
"templates/jstree/jquery.ui/jstree.classic/d.png",
|
1222
1220
|
"templates/jstree/jquery.ui/jstree.classic/dot_for_ie.gif",
|
1223
1221
|
"templates/jstree/jquery.ui/jstree.classic/throbber.gif",
|
1222
|
+
"templates/jstree/jquery.ui/jstree.crystal.scss",
|
1223
|
+
"templates/jstree/jquery.ui/jstree.crystal/d.gif",
|
1224
|
+
"templates/jstree/jquery.ui/jstree.crystal/d.png",
|
1225
|
+
"templates/jstree/jquery.ui/jstree.crystal/throbber.gif",
|
1224
1226
|
"templates/jstree/jquery.ui/jstree.default-rtl.scss",
|
1225
1227
|
"templates/jstree/jquery.ui/jstree.default-rtl/d.gif",
|
1226
1228
|
"templates/jstree/jquery.ui/jstree.default-rtl/d.png",
|
data/gem_tasks/jrails.rake
CHANGED
@@ -7,6 +7,7 @@ JRAILS_SRC = File.join(GEM_ROOT, 'src', 'jrails', 'jrails.1.4.2')
|
|
7
7
|
JRAILS_SRC_SCRIPTS = JRAILS_SRC + "/*.js"
|
8
8
|
|
9
9
|
JHAML_SRC_SCRIPTS = File.join(GEM_ROOT, 'src', 'jrails', 'jquery-haml') + "/*.js"
|
10
|
+
HAML_JS_SRC_SCRIPTS = File.join(GEM_ROOT, 'src', 'jrails', 'haml-js') + "/*.js"
|
10
11
|
|
11
12
|
FLASH_SRC = File.join(GEM_ROOT, 'src', 'jrails', 'flash_messages')
|
12
13
|
FLASH_SRC_IMAGES = File.join(FLASH_SRC, 'images')
|
@@ -86,7 +87,19 @@ namespace :build do
|
|
86
87
|
open File.join(JRAILS_DEST_TEMPLATES, 'jquery.haml.min.js'), 'w' do |f|
|
87
88
|
f.print compress_js(all_files(JHAML_SRC_SCRIPTS), "google")
|
88
89
|
end
|
89
|
-
manifest.print "javascript 'jquery.haml.min.js'\n"
|
90
|
+
manifest.print "javascript 'jquery.haml.min.js'\n"
|
91
|
+
|
92
|
+
# HAML Js
|
93
|
+
|
94
|
+
open File.join(JRAILS_DEST_TEMPLATES, 'haml.js'), 'w' do |f|
|
95
|
+
f.print concat_files(all_files(HAML_JS_SRC_SCRIPTS))
|
96
|
+
end
|
97
|
+
manifest.print "javascript 'haml.js'\n"
|
98
|
+
|
99
|
+
open File.join(JRAILS_DEST_TEMPLATES, 'haml.min.js'), 'w' do |f|
|
100
|
+
f.print compress_js(all_files(JHAML_SRC_SCRIPTS), "google")
|
101
|
+
end
|
102
|
+
manifest.print "javascript 'haml.min.js'\n"
|
90
103
|
|
91
104
|
# jQuery 1.4
|
92
105
|
|
data/lib/jquery.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
require File.join(File.dirname(__FILE__), 'jquery', 'compass_plugin')
|
3
|
-
|
4
|
-
module CompassJqueryPlugin
|
5
|
-
version = YAML.load_file(File.dirname(__FILE__) + '/../VERSION.yml')
|
6
|
-
if version[:commit]
|
7
|
-
VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}.#{version[:commit]}"
|
8
|
-
else
|
9
|
-
VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
|
10
|
-
end
|
11
|
-
end
|
1
|
+
require 'yaml'
|
2
|
+
require File.join(File.dirname(__FILE__), 'jquery', 'compass_plugin')
|
3
|
+
|
4
|
+
module CompassJqueryPlugin
|
5
|
+
version = YAML.load_file(File.dirname(__FILE__) + '/../VERSION.yml')
|
6
|
+
if version[:commit]
|
7
|
+
VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}.#{version[:commit]}"
|
8
|
+
else
|
9
|
+
VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
|
10
|
+
end
|
11
|
+
end
|
@@ -20,6 +20,7 @@ ActionView::Helpers::AssetTagHelper::reset_javascript_include_default
|
|
20
20
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jquery_142 => ['jquery-1.4.2.min', 'jquery-ui-1.8.4.min']
|
21
21
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jrails => ['jrails.min']
|
22
22
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jhaml => ['jquery.haml.min']
|
23
|
+
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :haml_js => ['haml-js.min']
|
23
24
|
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :contextMenu => ['compiled/jquery.ui/contextMenu.css']
|
24
25
|
ActionView::Helpers::AssetTagHelper.register_javascript_expansion :contextMenu => ['jquery.contextMenu.min']
|
25
26
|
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :farbtastic => ['compiled/jquery.ui/farbtastic.css']
|
@@ -0,0 +1,506 @@
|
|
1
|
+
var Haml;
|
2
|
+
|
3
|
+
(function () {
|
4
|
+
|
5
|
+
var matchers, self_close_tags, embedder, forceXML;
|
6
|
+
|
7
|
+
function html_escape(text) {
|
8
|
+
return (text + "").
|
9
|
+
replace(/&/g, "&").
|
10
|
+
replace(/</g, "<").
|
11
|
+
replace(/>/g, ">").
|
12
|
+
replace(/\"/g, """);
|
13
|
+
}
|
14
|
+
|
15
|
+
function render_attribs(attribs) {
|
16
|
+
var key, value, result = [];
|
17
|
+
for (key in attribs) {
|
18
|
+
if (key !== '_content' && attribs.hasOwnProperty(key)) {
|
19
|
+
switch (attribs[key]) {
|
20
|
+
case 'undefined':
|
21
|
+
case 'false':
|
22
|
+
case 'null':
|
23
|
+
case '""':
|
24
|
+
break;
|
25
|
+
default:
|
26
|
+
try {
|
27
|
+
value = JSON.parse("[" + attribs[key] +"]")[0];
|
28
|
+
if (value === true) {
|
29
|
+
value = key;
|
30
|
+
} else if (typeof value === 'string' && embedder.test(value)) {
|
31
|
+
value = '" +\n' + parse_interpol(html_escape(value)) + ' +\n"';
|
32
|
+
} else {
|
33
|
+
value = html_escape(value);
|
34
|
+
}
|
35
|
+
result.push(" " + key + '=\\"' + value + '\\"');
|
36
|
+
} catch (e) {
|
37
|
+
result.push(" " + key + '=\\"" + html_escape(' + attribs[key] + ') + "\\"');
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return result.join("");
|
43
|
+
}
|
44
|
+
|
45
|
+
// Parse the attribute block using a state machine
|
46
|
+
function parse_attribs(line) {
|
47
|
+
var attributes = {},
|
48
|
+
l = line.length,
|
49
|
+
i, c,
|
50
|
+
count = 1,
|
51
|
+
quote = false,
|
52
|
+
skip = false,
|
53
|
+
open, close, joiner, seperator,
|
54
|
+
pair = {
|
55
|
+
start: 1,
|
56
|
+
middle: null,
|
57
|
+
end: null
|
58
|
+
};
|
59
|
+
|
60
|
+
if (!(l > 0 && (line.charAt(0) === '{' || line.charAt(0) === '('))) {
|
61
|
+
return {
|
62
|
+
_content: line[0] === ' ' ? line.substr(1, l) : line
|
63
|
+
};
|
64
|
+
}
|
65
|
+
open = line.charAt(0);
|
66
|
+
close = (open === '{') ? '}' : ')';
|
67
|
+
joiner = (open === '{') ? ':' : '=';
|
68
|
+
seperator = (open === '{') ? ',' : ' ';
|
69
|
+
|
70
|
+
function process_pair() {
|
71
|
+
if (typeof pair.start === 'number' &&
|
72
|
+
typeof pair.middle === 'number' &&
|
73
|
+
typeof pair.end === 'number') {
|
74
|
+
var key = line.substr(pair.start, pair.middle - pair.start).trim(),
|
75
|
+
value = line.substr(pair.middle + 1, pair.end - pair.middle - 1).trim();
|
76
|
+
attributes[key] = value;
|
77
|
+
}
|
78
|
+
pair = {
|
79
|
+
start: null,
|
80
|
+
middle: null,
|
81
|
+
end: null
|
82
|
+
};
|
83
|
+
}
|
84
|
+
|
85
|
+
for (i = 1; count > 0; i += 1) {
|
86
|
+
|
87
|
+
// If we reach the end of the line, then there is a problem
|
88
|
+
if (i > l) {
|
89
|
+
throw "Malformed attribute block";
|
90
|
+
}
|
91
|
+
|
92
|
+
c = line.charAt(i);
|
93
|
+
if (skip) {
|
94
|
+
skip = false;
|
95
|
+
} else {
|
96
|
+
if (quote) {
|
97
|
+
if (c === '\\') {
|
98
|
+
skip = true;
|
99
|
+
}
|
100
|
+
if (c === quote) {
|
101
|
+
quote = false;
|
102
|
+
}
|
103
|
+
} else {
|
104
|
+
if (c === '"' || c === "'") {
|
105
|
+
quote = c;
|
106
|
+
}
|
107
|
+
|
108
|
+
if (count === 1) {
|
109
|
+
if (c === joiner) {
|
110
|
+
pair.middle = i;
|
111
|
+
}
|
112
|
+
if (c === seperator || c === close) {
|
113
|
+
pair.end = i;
|
114
|
+
process_pair();
|
115
|
+
if (c === seperator) {
|
116
|
+
pair.start = i + 1;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
if (c === open || c === "(") {
|
122
|
+
count += 1;
|
123
|
+
}
|
124
|
+
if (c === close || (count > 1 && c === ")")) {
|
125
|
+
count -= 1;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
attributes._content = line.substr(i, line.length);
|
131
|
+
return attributes;
|
132
|
+
}
|
133
|
+
|
134
|
+
// Split interpolated strings into an array of literals and code fragments.
|
135
|
+
function parse_interpol(value) {
|
136
|
+
var items = [],
|
137
|
+
pos = 0,
|
138
|
+
next = 0,
|
139
|
+
match;
|
140
|
+
while (true) {
|
141
|
+
// Match up to embedded string
|
142
|
+
next = value.substr(pos).search(embedder);
|
143
|
+
if (next < 0) {
|
144
|
+
if (pos < value.length) {
|
145
|
+
items.push(JSON.stringify(value.substr(pos)));
|
146
|
+
}
|
147
|
+
break;
|
148
|
+
}
|
149
|
+
items.push(JSON.stringify(value.substr(pos, next)));
|
150
|
+
pos += next;
|
151
|
+
|
152
|
+
// Match embedded string
|
153
|
+
match = value.substr(pos).match(embedder);
|
154
|
+
next = match[0].length;
|
155
|
+
if (next < 0) { break; }
|
156
|
+
items.push(match[1] || match[2]);
|
157
|
+
pos += next;
|
158
|
+
}
|
159
|
+
return items.filter(function (part) { return part && part.length > 0}).join(" +\n");
|
160
|
+
}
|
161
|
+
|
162
|
+
// Used to find embedded code in interpolated strings.
|
163
|
+
embedder = /\#\{([^}]*)\}/;
|
164
|
+
|
165
|
+
self_close_tags = ["meta", "img", "link", "br", "hr", "input", "area", "base"];
|
166
|
+
|
167
|
+
// All matchers' regexps should capture leading whitespace in first capture
|
168
|
+
// and trailing content in last capture
|
169
|
+
matchers = [
|
170
|
+
// html tags
|
171
|
+
{
|
172
|
+
regexp: /^(\s*)((?:[.#%][a-z_\-][a-z0-9_:\-]*)+)(.*)$/i,
|
173
|
+
process: function () {
|
174
|
+
var tag, classes, ids, attribs, content;
|
175
|
+
tag = this.matches[2];
|
176
|
+
classes = tag.match(/\.([a-z_\-][a-z0-9_\-]*)/gi);
|
177
|
+
ids = tag.match(/\#([a-z_\-][a-z0-9_\-]*)/gi);
|
178
|
+
tag = tag.match(/\%([a-z_\-][a-z0-9_:\-]*)/gi);
|
179
|
+
|
180
|
+
// Default to <div> tag
|
181
|
+
tag = tag ? tag[0].substr(1, tag[0].length) : 'div';
|
182
|
+
|
183
|
+
attribs = this.matches[3];
|
184
|
+
if (attribs) {
|
185
|
+
attribs = parse_attribs(attribs);
|
186
|
+
if (attribs._content) {
|
187
|
+
this.contents.unshift(attribs._content.trim());
|
188
|
+
delete(attribs._content);
|
189
|
+
}
|
190
|
+
} else {
|
191
|
+
attribs = {};
|
192
|
+
}
|
193
|
+
|
194
|
+
if (classes) {
|
195
|
+
classes = classes.map(function (klass) {
|
196
|
+
return klass.substr(1, klass.length);
|
197
|
+
}).join(' ');
|
198
|
+
if (attribs['class']) {
|
199
|
+
try {
|
200
|
+
attribs['class'] = JSON.stringify(classes + " " + JSON.parse(attribs['class']));
|
201
|
+
} catch (e) {
|
202
|
+
attribs['class'] = JSON.stringify(classes + " ") + " + " + attribs['class'];
|
203
|
+
}
|
204
|
+
} else {
|
205
|
+
attribs['class'] = JSON.stringify(classes);
|
206
|
+
}
|
207
|
+
}
|
208
|
+
if (ids) {
|
209
|
+
ids = ids.map(function (id) {
|
210
|
+
return id.substr(1, id.length);
|
211
|
+
}).join(' ');
|
212
|
+
if (attribs.id) {
|
213
|
+
attribs.id = JSON.stringify(ids + " ") + attribs.id;
|
214
|
+
} else {
|
215
|
+
attribs.id = JSON.stringify(ids);
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
attribs = render_attribs(attribs);
|
220
|
+
|
221
|
+
content = this.render_contents();
|
222
|
+
if (content === '""') {
|
223
|
+
content = '';
|
224
|
+
}
|
225
|
+
|
226
|
+
if (forceXML ? content.length > 0 : self_close_tags.indexOf(tag) == -1) {
|
227
|
+
return '"<' + tag + attribs + '>"' +
|
228
|
+
(content.length > 0 ? ' + \n' + content : "") +
|
229
|
+
' + \n"</' + tag + '>"';
|
230
|
+
} else {
|
231
|
+
return '"<' + tag + attribs + ' />"';
|
232
|
+
}
|
233
|
+
}
|
234
|
+
},
|
235
|
+
|
236
|
+
// each loops
|
237
|
+
{
|
238
|
+
regexp: /^(\s*)(?::for|:each)\s+(?:([a-z_][a-z_\-]*),\s*)?([a-z_][a-z_\-]*)\s+in\s+(.*)(\s*)$/i,
|
239
|
+
process: function () {
|
240
|
+
var ivar = this.matches[2] || '__key__', // index
|
241
|
+
vvar = this.matches[3], // value
|
242
|
+
avar = this.matches[4], // array
|
243
|
+
rvar = '__result__'; // results
|
244
|
+
|
245
|
+
if (this.matches[5]) {
|
246
|
+
this.contents.unshift(this.matches[5]);
|
247
|
+
}
|
248
|
+
return '(function () { ' +
|
249
|
+
'var ' + rvar + ' = [], ' + ivar + ', ' + vvar + '; ' +
|
250
|
+
'for (' + ivar + ' in ' + avar + ') { ' +
|
251
|
+
'if (' + avar + '.hasOwnProperty(' + ivar + ')) { ' +
|
252
|
+
vvar + ' = ' + avar + '[' + ivar + ']; ' +
|
253
|
+
rvar + '.push(\n' + (this.render_contents() || "''") + '\n); ' +
|
254
|
+
'} } return ' + rvar + '.join(""); }).call(this)';
|
255
|
+
}
|
256
|
+
},
|
257
|
+
|
258
|
+
// if statements
|
259
|
+
{
|
260
|
+
regexp: /^(\s*):if\s+(.*)\s*$/i,
|
261
|
+
process: function () {
|
262
|
+
var condition = this.matches[2];
|
263
|
+
return '(function () { ' +
|
264
|
+
'if (' + condition + ') { ' +
|
265
|
+
'return (\n' + (this.render_contents() || '') + '\n);' +
|
266
|
+
'} else { return ""; } }).call(this)';
|
267
|
+
}
|
268
|
+
},
|
269
|
+
|
270
|
+
// declarations
|
271
|
+
{
|
272
|
+
regexp: /^()!!!(?:\s*(.*))\s*$/,
|
273
|
+
process: function () {
|
274
|
+
var line = '';
|
275
|
+
switch ((this.matches[2] || '').toLowerCase()) {
|
276
|
+
case '':
|
277
|
+
// XHTML 1.0 Transitional
|
278
|
+
line = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
279
|
+
break;
|
280
|
+
case 'strict':
|
281
|
+
case '1.0':
|
282
|
+
// XHTML 1.0 Strict
|
283
|
+
line = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
|
284
|
+
break;
|
285
|
+
case 'frameset':
|
286
|
+
// XHTML 1.0 Frameset
|
287
|
+
line = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
|
288
|
+
break;
|
289
|
+
case '5':
|
290
|
+
// XHTML 5
|
291
|
+
line = '<!DOCTYPE html>';
|
292
|
+
break;
|
293
|
+
case '1.1':
|
294
|
+
// XHTML 1.1
|
295
|
+
line = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
|
296
|
+
break;
|
297
|
+
case 'basic':
|
298
|
+
// XHTML Basic 1.1
|
299
|
+
line = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">';
|
300
|
+
break;
|
301
|
+
case 'mobile':
|
302
|
+
// XHTML Mobile 1.2
|
303
|
+
line = '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">';
|
304
|
+
break;
|
305
|
+
case 'xml':
|
306
|
+
// XML
|
307
|
+
line = "<?xml version='1.0' encoding='utf-8' ?>";
|
308
|
+
break;
|
309
|
+
case 'xml iso-8859-1':
|
310
|
+
// XML iso-8859-1
|
311
|
+
line = "<?xml version='1.0' encoding='iso-8859-1' ?>";
|
312
|
+
break;
|
313
|
+
}
|
314
|
+
return JSON.stringify(line + "\n");
|
315
|
+
}
|
316
|
+
},
|
317
|
+
|
318
|
+
// Embedded markdown. Needs to be added to exports externally.
|
319
|
+
{
|
320
|
+
regexp: /^(\s*):markdown\s*$/i,
|
321
|
+
process: function () {
|
322
|
+
return parse_interpol(exports.Markdown.encode(this.contents.join("\n")));
|
323
|
+
}
|
324
|
+
},
|
325
|
+
|
326
|
+
// script blocks
|
327
|
+
{
|
328
|
+
regexp: /^(\s*):(?:java)?script\s*$/,
|
329
|
+
process: function () {
|
330
|
+
return parse_interpol('\n<script type="text/javascript">\n' +
|
331
|
+
'//<![CDATA[\n' +
|
332
|
+
this.contents.join("\n") +
|
333
|
+
"\n//]]>\n</script>\n");
|
334
|
+
}
|
335
|
+
},
|
336
|
+
|
337
|
+
// css blocks
|
338
|
+
{
|
339
|
+
regexp: /^(\s*):css\s*$/,
|
340
|
+
process: function () {
|
341
|
+
return JSON.stringify('\n<style type="text/css">\n' +
|
342
|
+
this.contents.join("\n") +
|
343
|
+
"\n</style>\n");
|
344
|
+
}
|
345
|
+
},
|
346
|
+
|
347
|
+
];
|
348
|
+
|
349
|
+
function compile(lines) {
|
350
|
+
var block = false,
|
351
|
+
output = [];
|
352
|
+
|
353
|
+
// If lines is a string, turn it into an array
|
354
|
+
if (typeof lines === 'string') {
|
355
|
+
lines = lines.trim().split("\n");
|
356
|
+
}
|
357
|
+
|
358
|
+
lines.forEach(function(line) {
|
359
|
+
var match, found = false;
|
360
|
+
|
361
|
+
// Collect all text as raw until outdent
|
362
|
+
if (block) {
|
363
|
+
match = block.check_indent(line);
|
364
|
+
if (match) {
|
365
|
+
block.contents.push(match[1] || "");
|
366
|
+
return;
|
367
|
+
} else {
|
368
|
+
output.push(block.process());
|
369
|
+
block = false;
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
matchers.forEach(function (matcher) {
|
374
|
+
if (!found) {
|
375
|
+
match = matcher.regexp(line);
|
376
|
+
if (match) {
|
377
|
+
block = {
|
378
|
+
contents: [],
|
379
|
+
matches: match,
|
380
|
+
check_indent: new RegExp("^(?:\\s*|" + match[1] + " (.*))$"),
|
381
|
+
process: matcher.process,
|
382
|
+
render_contents: function () {
|
383
|
+
return compile(this. contents);
|
384
|
+
}
|
385
|
+
};
|
386
|
+
found = true;
|
387
|
+
}
|
388
|
+
}
|
389
|
+
});
|
390
|
+
|
391
|
+
// Match plain text
|
392
|
+
if (!found) {
|
393
|
+
output.push(function () {
|
394
|
+
// Escaped plain text
|
395
|
+
if (line[0] === '\\') {
|
396
|
+
return parse_interpol(line.substr(1, line.length));
|
397
|
+
}
|
398
|
+
|
399
|
+
// Plain variable data
|
400
|
+
if (line[0] === '=') {
|
401
|
+
line = line.substr(1, line.length).trim();
|
402
|
+
try {
|
403
|
+
return parse_interpol(JSON.parse(line));
|
404
|
+
} catch (e) {
|
405
|
+
return line;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
|
409
|
+
// HTML escape variable data
|
410
|
+
if (line.substr(0, 2) === "&=") {
|
411
|
+
line = line.substr(2, line.length).trim();
|
412
|
+
try {
|
413
|
+
return JSON.stringify(html_escape(JSON.parse(line)));
|
414
|
+
} catch (e2) {
|
415
|
+
return 'html_escape(' + line + ')';
|
416
|
+
}
|
417
|
+
}
|
418
|
+
|
419
|
+
// Plain text
|
420
|
+
return parse_interpol(line);
|
421
|
+
}());
|
422
|
+
}
|
423
|
+
|
424
|
+
});
|
425
|
+
if (block) {
|
426
|
+
output.push(block.process());
|
427
|
+
}
|
428
|
+
return output.filter(function (part) { return part && part.length > 0}).join(" +\n");
|
429
|
+
};
|
430
|
+
|
431
|
+
function optimize(js) {
|
432
|
+
var new_js = [], buffer = [], part, end;
|
433
|
+
|
434
|
+
function flush() {
|
435
|
+
if (buffer.length > 0) {
|
436
|
+
new_js.push(JSON.stringify(buffer.join("")) + end);
|
437
|
+
buffer = [];
|
438
|
+
}
|
439
|
+
}
|
440
|
+
js.split("\n").forEach(function (line) {
|
441
|
+
part = line.match(/^(\".*\")(\s*\+\s*)?$/);
|
442
|
+
if (!part) {
|
443
|
+
flush();
|
444
|
+
new_js.push(line);
|
445
|
+
return;
|
446
|
+
}
|
447
|
+
end = part[2] || "";
|
448
|
+
part = part[1];
|
449
|
+
try {
|
450
|
+
buffer.push(JSON.parse(part));
|
451
|
+
} catch (e) {
|
452
|
+
flush();
|
453
|
+
new_js.push(line);
|
454
|
+
}
|
455
|
+
});
|
456
|
+
flush();
|
457
|
+
return new_js.join("\n");
|
458
|
+
};
|
459
|
+
|
460
|
+
function render(text, options) {
|
461
|
+
options = options || {};
|
462
|
+
text = text || "";
|
463
|
+
var js = compile(text);
|
464
|
+
if (options.optimize) {
|
465
|
+
js = Haml.optimize(js);
|
466
|
+
}
|
467
|
+
return execute(js, options.context || Haml, options.locals);
|
468
|
+
};
|
469
|
+
|
470
|
+
function execute(js, self, locals) {
|
471
|
+
return (function () {
|
472
|
+
with(locals || {}) {
|
473
|
+
try {
|
474
|
+
return eval("(" + js + ")");
|
475
|
+
} catch (e) {
|
476
|
+
return "\n<pre class='error'>" + html_escape(e.stack) + "</pre>\n";
|
477
|
+
}
|
478
|
+
|
479
|
+
}
|
480
|
+
}).call(self);
|
481
|
+
};
|
482
|
+
|
483
|
+
Haml = function Haml(haml, xml) {
|
484
|
+
forceXML = xml;
|
485
|
+
var js = optimize(compile(haml));
|
486
|
+
return new Function("locals",
|
487
|
+
html_escape + "\n" +
|
488
|
+
"with(locals || {}) {\n" +
|
489
|
+
" try {\n" +
|
490
|
+
" return (" + js + ");\n" +
|
491
|
+
" } catch (e) {\n" +
|
492
|
+
" return \"\\n<pre class='error'>\" + html_escape(e.stack) + \"</pre>\\n\";\n" +
|
493
|
+
" }\n" +
|
494
|
+
"}");
|
495
|
+
}
|
496
|
+
Haml.compile = compile;
|
497
|
+
Haml.optimize = optimize;
|
498
|
+
Haml.render = render;
|
499
|
+
Haml.execute = execute;
|
500
|
+
|
501
|
+
}());
|
502
|
+
|
503
|
+
// Hook into module system
|
504
|
+
if (typeof module !== 'undefined') {
|
505
|
+
module.exports = Haml;
|
506
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
(function(e){function l(a,b){if(a===undefined)return b==="undefined";if(a===null)return b==="null";return a.constructor.toString().match(RegExp(b,"i"))!==null}function q(a,b){if(a&&a[b]){var g=a[b];delete a[b];return g}}function u(a){if(typeof a!=="string"||a.length<2)return false;a=a.charAt(0);if(!(a==="."||a==="#"||a==="%"))return false;return true}function r(a,b){function g(h,c){if(!(c===undefined||c===null))if(c.nodeType||c.jquery)h.append(c);else if(l(c,"String")&&c.length>0){if(c[0]==="\\")c=
|
2
|
+
c.substr(1);h.append(document.createTextNode(c))}else if(l(c,"Number"))h.append(document.createTextNode(c));else l(c,"Array")&&c.length>0&&r(h,c)}var i,k,d,f,m,n,j;d=Array.prototype.slice.call(b,0);if(d.length&&d.length>0){if(u(d[0])){f=d.shift();m=f.match(/\.[^\.#]+/g);n=f.match(/#[^\.#]+/g);f=(f=f.match(/^%([^\.#]+)/g))?f[0].substr(1):"div";j=e(document.createElement(f));if(d.length>0&&l(d[0],"Object")&&!d[0].nodeType&&!d[0].jquery){f=d.shift();i=q(f,"css");k=q(f,"$");j.attr(f)}n&&e.each(n,function(){var h,
|
3
|
+
c;h=this.substr(1);(c=j.attr("id"))?j.attr("id",c+" "+h):j.attr("id",h)});m&&e.each(m,function(){j.addClass(this.substr(1))});i&&j.css(i);a.append(j);a=j;k&&e.each(k,function(h){o.push({node:a,method:h,params:this})})}e.each(d,function(){g(a,this)})}else g(a,d)}function s(){e.each(o,function(){if(this.method==="$")this.params.apply(this.node,[]);else{if(!l(this.params,"Array"))this.params=[this.params];this.node[this.method].apply(this.node,this.params)}});o=[]}function t(a){var b;b=e(document.createElement("div"));
|
4
|
+
r(b,a);this.append(b.contents());this.closest("body").length>0&&s();return b.contents()}var o=[],p={};e.fn.insertHaml=function(){return t.call(this,Array.prototype.slice.call(arguments,0))};e.fn.haml=function(){t.call(this,Array.prototype.slice.call(arguments,0));return this};e.haml={placeholder:function(a){function b(){var i=e(document.createElement("div"));i.haml(a.apply(this,arguments));return g=i.contents()}var g;return{inject:b,update:function(){var i=arguments;e.each(g,function(k,d){k===0?e(d).replaceWith(b.apply(this,
|
5
|
+
i)):e(d).remove()});s()}}},onDemand:function(a,b){var g;b=["%div",{style:"text-align: center; cursor: wait"},b||"Loading..."];return function(i){var k=Array.prototype.slice.call(arguments,1);return g=e.haml.placeholder(function(){var d=Util.stringify(k);if(p[d]!==undefined)return i(p[d]);else{a.apply(this,[function(f){p[d]=f;g.update()}].concat(k));return b}})}}}})(jQuery);
|
@@ -13,6 +13,8 @@ image 'jquery.ui/flash_messages/flash-warning-bg.png'
|
|
13
13
|
image 'jquery.ui/flash_messages/flash-warning.png'
|
14
14
|
javascript 'jquery.haml.js'
|
15
15
|
javascript 'jquery.haml.min.js'
|
16
|
+
javascript 'haml.js'
|
17
|
+
javascript 'haml.min.js'
|
16
18
|
javascript 'jquery-1.4.2.js'
|
17
19
|
javascript 'jquery-1.4.2.min.js'
|
18
20
|
javascript 'jquery.compat-1.3.js'
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,14 +1,16 @@
|
|
1
1
|
// Generated by compass-jquery-plugin/gem-tasks/jstree.rake
|
2
2
|
|
3
3
|
/*
|
4
|
-
* jsTree
|
4
|
+
* jsTree crystal theme 1.0
|
5
5
|
* Supported features: dots/no-dots, icons/no-icons, focused, loading
|
6
6
|
* Supported plugins: ui (hovered, clicked), checkbox, radio, contextmenu, search
|
7
7
|
*/
|
8
8
|
|
9
|
-
.jstree-
|
9
|
+
.jstree-crystal {
|
10
|
+
font-family: "Lucida Grande", Verdana, Geneva, Arial, Helvetica, sans-serif;
|
11
|
+
font-size: 1.0em;
|
10
12
|
li, ins {
|
11
|
-
background-image: image_url("jquery.ui/jstree.
|
13
|
+
background-image: image_url("jquery.ui/jstree.crystal/d.png");
|
12
14
|
background-repeat: no-repeat;
|
13
15
|
background-color: transparent; }
|
14
16
|
li {
|
@@ -39,7 +41,7 @@
|
|
39
41
|
.jstree-open > a .jstree-icon {
|
40
42
|
background-position: -56px -54px; }
|
41
43
|
a.jstree-loading .jstree-icon {
|
42
|
-
background: image_url("jquery.ui/jstree.
|
44
|
+
background: image_url("jquery.ui/jstree.crystal/throbber.gif") center center no-repeat !important; }
|
43
45
|
&.jstree-focused {
|
44
46
|
background: white; }
|
45
47
|
.jstree-no-dots {
|
@@ -90,21 +92,21 @@
|
|
90
92
|
.jstree-undetermined > a > .jstree-radio:hover {
|
91
93
|
background-position: -20px -91px; } }
|
92
94
|
|
93
|
-
#vakata-dragged.jstree-
|
95
|
+
#vakata-dragged.jstree-crystal {
|
94
96
|
ins {
|
95
97
|
background: transparent !important; }
|
96
98
|
.jstree-ok {
|
97
|
-
background: image_url("jquery.ui/jstree.
|
99
|
+
background: image_url("jquery.ui/jstree.crystal/d.png") -56px -71px no-repeat !important; }
|
98
100
|
.jstree-invalid {
|
99
|
-
background: image_url("jquery.ui/jstree.
|
101
|
+
background: image_url("jquery.ui/jstree.crystal/d.png") -72px -71px no-repeat !important; } }
|
100
102
|
|
101
|
-
#jstree-marker.jstree-
|
102
|
-
background: image_url("jquery.ui/jstree.
|
103
|
+
#jstree-marker.jstree-crystal {
|
104
|
+
background: image_url("jquery.ui/jstree.crystal/d.png") -95px -75px no-repeat !important; }
|
103
105
|
|
104
|
-
.jstree-
|
106
|
+
.jstree-crystal a.jstree-search {
|
105
107
|
color: aqua; }
|
106
108
|
|
107
|
-
#vakata-contextmenu.jstree-
|
109
|
+
#vakata-contextmenu.jstree-crystal-context {
|
108
110
|
background: #f0f0f0;
|
109
111
|
border: 1px solid #979797;
|
110
112
|
-moz-box-shadow: 1px 1px 2px #999;
|
@@ -154,18 +156,18 @@
|
|
154
156
|
|
155
157
|
/* IE6 BEGIN */
|
156
158
|
|
157
|
-
.jstree-
|
159
|
+
.jstree-crystal {
|
158
160
|
li, ins {
|
159
|
-
_background-image: image_url("jquery.ui/jstree.
|
161
|
+
_background-image: image_url("jquery.ui/jstree.crystal/d.gif"); } }
|
160
162
|
|
161
|
-
#vakata-dragged.jstree-
|
163
|
+
#vakata-dragged.jstree-crystal {
|
162
164
|
.jstree-invalid, .jstree-ok {
|
163
|
-
_background-image: image_url("jquery.ui/jstree.
|
165
|
+
_background-image: image_url("jquery.ui/jstree.crystal/d.gif"); } }
|
164
166
|
|
165
|
-
#jstree-marker.jstree-
|
166
|
-
_background-image: image_url("jquery.ui/jstree.
|
167
|
+
#jstree-marker.jstree-crystal {
|
168
|
+
_background-image: image_url("jquery.ui/jstree.crystal/d.gif"); }
|
167
169
|
|
168
|
-
.jstree-
|
170
|
+
.jstree-crystal {
|
169
171
|
.jstree-leaf ins {
|
170
172
|
_background-position: -72px 0; }
|
171
173
|
.jstree-open ins {
|
@@ -182,13 +184,13 @@
|
|
182
184
|
&.jstree-open {
|
183
185
|
_background-position: -56px -54px; } } }
|
184
186
|
|
185
|
-
#vakata-contextmenu.jstree-
|
187
|
+
#vakata-contextmenu.jstree-crystal-context {
|
186
188
|
ins {
|
187
189
|
_display: none; }
|
188
190
|
li {
|
189
191
|
_zoom: 1; } }
|
190
192
|
|
191
|
-
.jstree-
|
193
|
+
.jstree-crystal {
|
192
194
|
.jstree-undetermined a .jstree-checkbox {
|
193
195
|
_background-position: -20px -37px; }
|
194
196
|
.jstree-checked a .jstree-checkbox {
|
@@ -16,14 +16,14 @@ image 'jquery.ui/jstree.aqua/d.gif'
|
|
16
16
|
image 'jquery.ui/jstree.aqua/d.png'
|
17
17
|
image 'jquery.ui/jstree.aqua/hovered.png'
|
18
18
|
image 'jquery.ui/jstree.aqua/throbber.gif'
|
19
|
-
stylesheet 'jquery.ui/jstree.chrystal.scss', :media => 'screen, projection'
|
20
|
-
image 'jquery.ui/jstree.chrystal/d.gif'
|
21
|
-
image 'jquery.ui/jstree.chrystal/d.png'
|
22
|
-
image 'jquery.ui/jstree.chrystal/throbber.gif'
|
23
19
|
stylesheet 'jquery.ui/jstree.classic.scss', :media => 'screen, projection'
|
24
20
|
image 'jquery.ui/jstree.classic/d.png'
|
25
21
|
image 'jquery.ui/jstree.classic/dot_for_ie.gif'
|
26
22
|
image 'jquery.ui/jstree.classic/throbber.gif'
|
23
|
+
stylesheet 'jquery.ui/jstree.crystal.scss', :media => 'screen, projection'
|
24
|
+
image 'jquery.ui/jstree.crystal/d.gif'
|
25
|
+
image 'jquery.ui/jstree.crystal/d.png'
|
26
|
+
image 'jquery.ui/jstree.crystal/throbber.gif'
|
27
27
|
stylesheet 'jquery.ui/jstree.default.scss', :media => 'screen, projection'
|
28
28
|
image 'jquery.ui/jstree.default/d.gif'
|
29
29
|
image 'jquery.ui/jstree.default/d.png'
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-jquery-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196405
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.3.0.beta.
|
11
|
+
- 19
|
12
|
+
version: 0.3.0.beta.19
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Kosmas Schuetz
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-09-
|
20
|
+
date: 2010-09-17 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -680,6 +680,8 @@ files:
|
|
680
680
|
- templates/jqtouch/jquery.jqtouch.min.js
|
681
681
|
- templates/jqtouch/manifest.rb
|
682
682
|
- templates/jrails/config/initializers/jrails.rb
|
683
|
+
- templates/jrails/haml.js
|
684
|
+
- templates/jrails/haml.min.js
|
683
685
|
- templates/jrails/i18n/jquery.ui/datepicker-af.js
|
684
686
|
- templates/jrails/i18n/jquery.ui/datepicker-af.min.js
|
685
687
|
- templates/jrails/i18n/jquery.ui/datepicker-ar.js
|
@@ -1274,14 +1276,14 @@ files:
|
|
1274
1276
|
- templates/jstree/jquery.ui/jstree.aqua/d.png
|
1275
1277
|
- templates/jstree/jquery.ui/jstree.aqua/hovered.png
|
1276
1278
|
- templates/jstree/jquery.ui/jstree.aqua/throbber.gif
|
1277
|
-
- templates/jstree/jquery.ui/jstree.chrystal.scss
|
1278
|
-
- templates/jstree/jquery.ui/jstree.chrystal/d.gif
|
1279
|
-
- templates/jstree/jquery.ui/jstree.chrystal/d.png
|
1280
|
-
- templates/jstree/jquery.ui/jstree.chrystal/throbber.gif
|
1281
1279
|
- templates/jstree/jquery.ui/jstree.classic.scss
|
1282
1280
|
- templates/jstree/jquery.ui/jstree.classic/d.png
|
1283
1281
|
- templates/jstree/jquery.ui/jstree.classic/dot_for_ie.gif
|
1284
1282
|
- templates/jstree/jquery.ui/jstree.classic/throbber.gif
|
1283
|
+
- templates/jstree/jquery.ui/jstree.crystal.scss
|
1284
|
+
- templates/jstree/jquery.ui/jstree.crystal/d.gif
|
1285
|
+
- templates/jstree/jquery.ui/jstree.crystal/d.png
|
1286
|
+
- templates/jstree/jquery.ui/jstree.crystal/throbber.gif
|
1285
1287
|
- templates/jstree/jquery.ui/jstree.default-rtl.scss
|
1286
1288
|
- templates/jstree/jquery.ui/jstree.default-rtl/d.gif
|
1287
1289
|
- templates/jstree/jquery.ui/jstree.default-rtl/d.png
|