prime-rails 0.0.10 → 0.0.11
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.
- checksums.yaml +8 -8
- data/app/assets/images/images/rating.png +0 -0
- data/app/assets/javascripts/primefaces-rails.js +92 -18
- data/app/helpers/context_menu_helper.rb +34 -0
- data/app/helpers/galleria_helper.rb +49 -0
- data/app/helpers/lightbox_helper.rb +41 -0
- data/app/helpers/slide_menu_helper.rb +34 -0
- data/app/helpers/tiered_menu_helper.rb +34 -0
- data/lib/prime/rails/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
OTg4MTc0ZDIzOGMxZjdkOTRhNjU5NWQwOWZlNjc2NjFkMzhjMmJkYg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ODRkN2JmMGU2ZDBmMzdiMGI4NjQ5OTI2ZTgxOGJhNWJiYWYzNmQxMg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NWViMThhYzcwYzViNzRlYzNmOTI1OWIzMmIwMDcyM2U2MjU4ZWVkMTRmMTRk
|
|
10
|
+
YmM2ODAxM2JkY2RjMGU3YTY2NzU0MGMxNTVjOTRjNDY1NjQ0MmJiYWU0NzJj
|
|
11
|
+
N2Q0YzM3ODkyYzg3NDZkNmQzOThmYWI4YjgzNDlkMDU2YTIwOWI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MDkzMWRlZjU2MTM4NzQxZmY3ZmRjMjQ1YWE0NTBiODIxN2NkZjdlMjE2ZDk2
|
|
14
|
+
YjY0NmI1NzNiYzY5MDkzODFiMzc0YTNkYWYxNGQwOWUxOTJmMDQ5NzljYjNl
|
|
15
|
+
MjhhNjk4ZTNmMDhiZWNlNTkxMjZhZTc4Y2VlOGMzMTE2ZDA4OGE=
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
String.prototype.format = function
|
|
1
|
+
String.prototype.format = function(args) {
|
|
2
2
|
var newStr = this;
|
|
3
3
|
for (var key in args) {
|
|
4
4
|
newStr = newStr.replace(new RegExp('{' + key + '}', "g"), args[key]);
|
|
@@ -14,9 +14,11 @@ PrimeFaces.widget.InputText = PrimeFaces.widget.BaseWidget.extend({
|
|
|
14
14
|
this._super(cfg);
|
|
15
15
|
if (cfg.spinner) {
|
|
16
16
|
this.jq.puispinner(cfg);
|
|
17
|
+
} else if (cfg.rating){
|
|
18
|
+
this.jq.puirating(cfg);
|
|
17
19
|
} else {
|
|
18
20
|
this.jq.puiinputtext(cfg);
|
|
19
|
-
}
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
|
|
@@ -151,6 +153,12 @@ PrimeFaces.widget.Dropdown = PrimeFaces.widget.BaseWidget.extend({
|
|
|
151
153
|
contentFunc = cfg.content;
|
|
152
154
|
cfg.content = function(opt) { return contentFunc.format({ option: opt });};
|
|
153
155
|
}
|
|
156
|
+
|
|
157
|
+
if (cfg.change) {
|
|
158
|
+
contentChange = cfg.change;
|
|
159
|
+
cfg.change = function(e) { eval(contentChange); };
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
if (cfg.listbox) {
|
|
155
163
|
this.jq.puilistbox(cfg);
|
|
156
164
|
} else {
|
|
@@ -176,7 +184,7 @@ PrimeFaces.widget.Accordion = PrimeFaces.widget.BaseWidget.extend({
|
|
|
176
184
|
*/
|
|
177
185
|
PrimeFaces.widget.RadioButton = PrimeFaces.widget.BaseWidget.extend({
|
|
178
186
|
init: function(cfg) {
|
|
179
|
-
this._super(cfg);
|
|
187
|
+
this._super(cfg);
|
|
180
188
|
this.jq.find(':radio').puiradiobutton(cfg);
|
|
181
189
|
}
|
|
182
190
|
});
|
|
@@ -188,14 +196,16 @@ PrimeFaces.widget.Growl = PrimeFaces.widget.BaseWidget.extend({
|
|
|
188
196
|
init: function(cfg) {
|
|
189
197
|
this._super(cfg);
|
|
190
198
|
_self = this;
|
|
191
|
-
|
|
199
|
+
|
|
192
200
|
this.jq.puigrowl(cfg);
|
|
193
|
-
|
|
194
|
-
addMessage = function(msg) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
|
|
202
|
+
addMessage = function(msg) {
|
|
203
|
+
_self.jq.puigrowl('show', msg)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (cfg.messages) {
|
|
207
|
+
addMessage(cfg.messages);
|
|
208
|
+
}
|
|
199
209
|
}
|
|
200
210
|
});
|
|
201
211
|
|
|
@@ -205,13 +215,12 @@ PrimeFaces.widget.Growl = PrimeFaces.widget.BaseWidget.extend({
|
|
|
205
215
|
PrimeFaces.widget.Menu = PrimeFaces.widget.BaseWidget.extend({
|
|
206
216
|
init: function(cfg) {
|
|
207
217
|
this._super(cfg);
|
|
208
|
-
|
|
209
|
-
|
|
218
|
+
|
|
210
219
|
if (this.cfg.trigger) {
|
|
211
220
|
this.cfg.trigger = $(PrimeFaces.escapeClientId(this.cfg.trigger))
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
this.jq.puimenu(cfg);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
this.jq.puimenu(cfg);
|
|
215
224
|
}
|
|
216
225
|
});
|
|
217
226
|
|
|
@@ -221,8 +230,73 @@ PrimeFaces.widget.Menu = PrimeFaces.widget.BaseWidget.extend({
|
|
|
221
230
|
PrimeFaces.widget.Menubar = PrimeFaces.widget.BaseWidget.extend({
|
|
222
231
|
init: function(cfg) {
|
|
223
232
|
this._super(cfg);
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
|
|
234
|
+
this.jq.puimenubar(cfg);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* PrimeFaces ContextMenu Widget
|
|
240
|
+
*/
|
|
241
|
+
PrimeFaces.widget.ContextMenu = PrimeFaces.widget.BaseWidget.extend({
|
|
242
|
+
init: function(cfg) {
|
|
243
|
+
this._super(cfg);
|
|
244
|
+
|
|
245
|
+
if (this.cfg.target) {
|
|
246
|
+
this.cfg.target = $(PrimeFaces.escapeClientId(this.cfg.target))
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
this.jq.puicontextmenu(cfg);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* PrimeFaces SlideMenu Widget
|
|
255
|
+
*/
|
|
256
|
+
PrimeFaces.widget.SlideMenu = PrimeFaces.widget.BaseWidget.extend({
|
|
257
|
+
init: function(cfg) {
|
|
258
|
+
this._super(cfg);
|
|
259
|
+
|
|
260
|
+
if (this.cfg.trigger) {
|
|
261
|
+
this.cfg.trigger = $(PrimeFaces.escapeClientId(this.cfg.trigger))
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
this.jq.puislidemenu(cfg);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* PrimeFaces TieredMenu Widget
|
|
271
|
+
*/
|
|
272
|
+
PrimeFaces.widget.TieredMenu = PrimeFaces.widget.BaseWidget.extend({
|
|
273
|
+
init: function(cfg) {
|
|
274
|
+
this._super(cfg);
|
|
275
|
+
|
|
276
|
+
if (this.cfg.trigger) {
|
|
277
|
+
this.cfg.trigger = $(PrimeFaces.escapeClientId(this.cfg.trigger))
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
this.jq.puitieredmenu(cfg);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* PrimeFaces Lightbox Widget
|
|
286
|
+
*/
|
|
287
|
+
PrimeFaces.widget.Lightbox = PrimeFaces.widget.BaseWidget.extend({
|
|
288
|
+
init: function(cfg) {
|
|
289
|
+
this._super(cfg);
|
|
290
|
+
this.jq.puilightbox(cfg);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* PrimeFaces Galleria Widget
|
|
296
|
+
*/
|
|
297
|
+
PrimeFaces.widget.Galleria = PrimeFaces.widget.BaseWidget.extend({
|
|
298
|
+
init: function(cfg) {
|
|
299
|
+
this._super(cfg);
|
|
300
|
+
this.jq.puigalleria(cfg);
|
|
227
301
|
}
|
|
228
302
|
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module ContextMenuHelper
|
|
2
|
+
|
|
3
|
+
def p_context_menu(id,options={},&block)
|
|
4
|
+
output = context_menu_encode_markup(id,options,&block)
|
|
5
|
+
output += context_menu_encode_script(id,options)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
protected
|
|
9
|
+
|
|
10
|
+
def context_menu_encode_markup(id,options={},&block)
|
|
11
|
+
clientid = sanitize_to_id(id)
|
|
12
|
+
options = options.stringify_keys
|
|
13
|
+
options = options.merge(:id => clientid)
|
|
14
|
+
output = content_tag('ul', options) do
|
|
15
|
+
capture(&block)
|
|
16
|
+
end
|
|
17
|
+
output.html_safe
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def context_menu_encode_script(id,options={})
|
|
21
|
+
options = options.stringify_keys
|
|
22
|
+
clientid = sanitize_to_id(id)
|
|
23
|
+
widgetvar = options.has_key?("widgetVar") ? options["widgetVar"] : "widget_"+clientid
|
|
24
|
+
options_ui = options
|
|
25
|
+
options_ui = options_ui.merge(:id => clientid)
|
|
26
|
+
options_ui = options_ui.to_json
|
|
27
|
+
|
|
28
|
+
script = '$(function() {'
|
|
29
|
+
script += "PrimeFaces.cw('ContextMenu','#{widgetvar}',#{options_ui})"
|
|
30
|
+
script += '});'
|
|
31
|
+
javascript_tag(script, "id" => clientid+"_s")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module GalleriaHelper
|
|
2
|
+
|
|
3
|
+
def p_galleria(id,options={},&block)
|
|
4
|
+
output = galleria_encode_markup(id,options,&block)
|
|
5
|
+
output += galleria_encode_script(id,options)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def p_galleria_item(options={},&block)
|
|
9
|
+
options = options.stringify_keys
|
|
10
|
+
output = content_tag('li') do
|
|
11
|
+
src = options.delete('src')
|
|
12
|
+
if block_given?
|
|
13
|
+
image_tag(src,options) +
|
|
14
|
+
content_tag('div', capture(&block))
|
|
15
|
+
else
|
|
16
|
+
image_tag(src,options)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
protected
|
|
22
|
+
|
|
23
|
+
def galleria_encode_markup(id,options={},&block)
|
|
24
|
+
clientid = sanitize_to_id(id)
|
|
25
|
+
options = options.stringify_keys
|
|
26
|
+
options = options.merge(:id => clientid)
|
|
27
|
+
output = content_tag('div', options) do
|
|
28
|
+
content_tag('ul') do
|
|
29
|
+
capture(&block)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
output.html_safe
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def galleria_encode_script(id,options={})
|
|
36
|
+
options = options.stringify_keys
|
|
37
|
+
clientid = sanitize_to_id(id)
|
|
38
|
+
widgetvar = options.has_key?("widgetVar") ? options["widgetVar"] : "widget_"+clientid
|
|
39
|
+
options_ui = options
|
|
40
|
+
options_ui = options_ui.merge(:id => clientid)
|
|
41
|
+
options_ui = options_ui.to_json
|
|
42
|
+
|
|
43
|
+
script = '$(function() {'
|
|
44
|
+
script += "PrimeFaces.cw('Galleria','#{widgetvar}',#{options_ui})"
|
|
45
|
+
script += '});'
|
|
46
|
+
javascript_tag(script, "id" => clientid+"_s")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module LightboxHelper
|
|
2
|
+
|
|
3
|
+
def p_lightbox(id,options={},&block)
|
|
4
|
+
output = lightbox_encode_markup(id,options,&block)
|
|
5
|
+
output += lightbox_encode_script(id,options)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
protected
|
|
9
|
+
|
|
10
|
+
def lightbox_encode_markup(id,options={},&block)
|
|
11
|
+
clientid = sanitize_to_id(id)
|
|
12
|
+
options = options.stringify_keys
|
|
13
|
+
options = options.merge(:id => clientid)
|
|
14
|
+
|
|
15
|
+
if (options['iframe'])
|
|
16
|
+
output = content_tag('a', options) do
|
|
17
|
+
capture(&block)
|
|
18
|
+
end
|
|
19
|
+
else
|
|
20
|
+
output = content_tag('div', options) do
|
|
21
|
+
capture(&block)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
output.html_safe
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def lightbox_encode_script(id,options={})
|
|
28
|
+
options = options.stringify_keys
|
|
29
|
+
clientid = sanitize_to_id(id)
|
|
30
|
+
widgetvar = options.has_key?("widgetVar") ? options["widgetVar"] : "widget_"+clientid
|
|
31
|
+
options_ui = options
|
|
32
|
+
options_ui = options_ui.merge(:id => clientid)
|
|
33
|
+
options_ui = options_ui.to_json
|
|
34
|
+
|
|
35
|
+
script = '$(function() {'
|
|
36
|
+
script += "PrimeFaces.cw('Lightbox','#{widgetvar}',#{options_ui})"
|
|
37
|
+
script += '});'
|
|
38
|
+
javascript_tag(script, "id" => clientid+"_s")
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module SlideMenuHelper
|
|
2
|
+
|
|
3
|
+
def p_slide_menu(id,options={},&block)
|
|
4
|
+
output = slide_menu_encode_markup(id,options,&block)
|
|
5
|
+
output += slide_menu_encode_script(id,options)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
protected
|
|
9
|
+
|
|
10
|
+
def slide_menu_encode_markup(id,options={},&block)
|
|
11
|
+
clientid = sanitize_to_id(id)
|
|
12
|
+
options = options.stringify_keys
|
|
13
|
+
options = options.merge(:id => clientid)
|
|
14
|
+
output = content_tag('ul', options) do
|
|
15
|
+
capture(&block)
|
|
16
|
+
end
|
|
17
|
+
output.html_safe
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def slide_menu_encode_script(id,options={})
|
|
21
|
+
options = options.stringify_keys
|
|
22
|
+
clientid = sanitize_to_id(id)
|
|
23
|
+
widgetvar = options.has_key?("widgetVar") ? options["widgetVar"] : "widget_"+clientid
|
|
24
|
+
options_ui = options
|
|
25
|
+
options_ui = options_ui.merge(:id => clientid)
|
|
26
|
+
options_ui = options_ui.to_json
|
|
27
|
+
|
|
28
|
+
script = '$(function() {'
|
|
29
|
+
script += "PrimeFaces.cw('SlideMenu','#{widgetvar}',#{options_ui})"
|
|
30
|
+
script += '});'
|
|
31
|
+
javascript_tag(script, "id" => clientid+"_s")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module TieredMenuHelper
|
|
2
|
+
|
|
3
|
+
def p_tiered_menu(id,options={},&block)
|
|
4
|
+
output = tiered_menu_encode_markup(id,options,&block)
|
|
5
|
+
output += tiered_menu_encode_script(id,options)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
protected
|
|
9
|
+
|
|
10
|
+
def tiered_menu_encode_markup(id,options={},&block)
|
|
11
|
+
clientid = sanitize_to_id(id)
|
|
12
|
+
options = options.stringify_keys
|
|
13
|
+
options = options.merge(:id => clientid)
|
|
14
|
+
output = content_tag('ul', options) do
|
|
15
|
+
capture(&block)
|
|
16
|
+
end
|
|
17
|
+
output.html_safe
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def tiered_menu_encode_script(id,options={})
|
|
21
|
+
options = options.stringify_keys
|
|
22
|
+
clientid = sanitize_to_id(id)
|
|
23
|
+
widgetvar = options.has_key?("widgetVar") ? options["widgetVar"] : "widget_"+clientid
|
|
24
|
+
options_ui = options
|
|
25
|
+
options_ui = options_ui.merge(:id => clientid)
|
|
26
|
+
options_ui = options_ui.to_json
|
|
27
|
+
|
|
28
|
+
script = '$(function() {'
|
|
29
|
+
script += "PrimeFaces.cw('TieredMenu','#{widgetvar}',#{options_ui})"
|
|
30
|
+
script += '});'
|
|
31
|
+
javascript_tag(script, "id" => clientid+"_s")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
data/lib/prime/rails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prime-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lazaro Nixon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-09-
|
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jquery-rails
|
|
@@ -48,6 +48,7 @@ files:
|
|
|
48
48
|
- app/assets/images/images/messages.png
|
|
49
49
|
- app/assets/images/images/ornament.png
|
|
50
50
|
- app/assets/images/images/password-meter.png
|
|
51
|
+
- app/assets/images/images/rating.png
|
|
51
52
|
- app/assets/javascripts/jquery-ui.js
|
|
52
53
|
- app/assets/javascripts/js/accordion/accordion.js
|
|
53
54
|
- app/assets/javascripts/js/autocomplete/autocomplete.js
|
|
@@ -651,15 +652,20 @@ files:
|
|
|
651
652
|
- app/assets/themes/vader/theme.css
|
|
652
653
|
- app/helpers/accordion_helper.rb
|
|
653
654
|
- app/helpers/breadcrumb_helper.rb
|
|
655
|
+
- app/helpers/context_menu_helper.rb
|
|
654
656
|
- app/helpers/dialog_helper.rb
|
|
655
657
|
- app/helpers/fieldset_helper.rb
|
|
658
|
+
- app/helpers/galleria_helper.rb
|
|
656
659
|
- app/helpers/growl_helper.rb
|
|
660
|
+
- app/helpers/lightbox_helper.rb
|
|
657
661
|
- app/helpers/menu_helper.rb
|
|
658
662
|
- app/helpers/menubar_helper.rb
|
|
659
663
|
- app/helpers/panel_helper.rb
|
|
660
664
|
- app/helpers/progressbar_helper.rb
|
|
661
665
|
- app/helpers/radiobutton_helper.rb
|
|
666
|
+
- app/helpers/slide_menu_helper.rb
|
|
662
667
|
- app/helpers/tabview_helper.rb
|
|
668
|
+
- app/helpers/tiered_menu_helper.rb
|
|
663
669
|
- app/helpers/tooltip_helper.rb
|
|
664
670
|
- app/views/prime-rails/_breadcrumbs.html.erb
|
|
665
671
|
homepage: https://github.com/lazaronixon/prime-rails
|