jqr-helpers 1.0.43 → 1.0.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Readme.md +5 -4
- data/app/assets/javascripts/jqr-helpers.js +15 -11
- data/jqr-helpers.gemspec +2 -2
- data/lib/jqr-helpers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGYxZjI4YjA4YTA2NzQ1ODhkOTNlMTZmMTM5YmNlYTRiZWRiZjc5MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmU3YTZmZjhiZTc2MTI0ZGFmOWQxYTM0ZDM5NWRkOTBmNDQ0NzlmNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTUyMGU5MWI2MTExYTU5MDRiOTQyODE3NDIwZjU0Y2NlODRhODYyYWI5NGY2
|
10
|
+
MGExYjBmNjE0ZTE0NjI5ZjM2YTcyM2ZiZjFmYmI0N2EwYjAwYTFjNjNlZGFl
|
11
|
+
YzdkNjI1NDVjMjUyNTUxOGEwOTJjN2UyZGE3ZTZkN2E0ZTZiNjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGQ3YTc2OTAwODg2NDI2MzNmM2FmZWI2NWU5ODU0NDlhOTdmNjlmMjZiMmIw
|
14
|
+
OTdmYTExODA0MGU5NzViZWI4MTU0MWEzMTM3NDM4NzZkMTUxMmQ4YTdmZWJj
|
15
|
+
MGYzMjJiMmVhNjUyMzIwZTdjMjZmMjRmYjQ0YzY4NWZkMTkxNjk=
|
data/Readme.md
CHANGED
@@ -164,10 +164,11 @@ other elements.
|
|
164
164
|
* `:scroll_to` (Boolean) - if given, the element that was updated or inserted
|
165
165
|
will be scrolled into view (i.e. its top will be aligned with the top of the
|
166
166
|
page).
|
167
|
-
|
168
|
-
`:none`. By default it is `:small`, indicating
|
169
|
-
|
170
|
-
|
167
|
+
* `:throbber` (String) - This can be `:small`, `:large`, or
|
168
|
+
`:none`. By default for most Ajax requests it is `:small`, indicating
|
169
|
+
a small inline throbber next to the button or link. For ``link_to_dialog`` and
|
170
|
+
``button_to_dialog``, the default is ``:large``, meaning a throbber that goes in
|
171
|
+
front of the screen.`:none` shows no throbber at all.
|
171
172
|
|
172
173
|
## Monitoring Fields ##
|
173
174
|
|
@@ -23,7 +23,6 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
var ujsDialogElement = null; // the element that opened the dialog
|
26
|
-
var ujsLastDialog = null; // last opened dialog
|
27
26
|
var ujsSubmitElement = null; // the element that submitted a form
|
28
27
|
|
29
28
|
// called from dialog button value
|
@@ -32,18 +31,19 @@
|
|
32
31
|
}
|
33
32
|
|
34
33
|
// called from dialog button value
|
34
|
+
// uses $.proxy to set the "this" context
|
35
35
|
function ujsDialogClose() {
|
36
|
-
|
37
|
-
if (
|
38
|
-
|
36
|
+
var dialog = $(this).closest('.ui-dialog-content');
|
37
|
+
if (dialog.length == 0) dialog = $(this).find('.ui-dialog-content');
|
38
|
+
if (dialog.data('remote-dialog')) {
|
39
|
+
dialog.dialog('destroy').remove();
|
39
40
|
}
|
40
41
|
else {
|
41
|
-
|
42
|
+
dialog.dialog('destroy').addClass('ujs-dialog-hidden');
|
42
43
|
}
|
43
44
|
}
|
44
45
|
|
45
46
|
function ujsDialogOpen() {
|
46
|
-
ujsLastDialog = $(this);
|
47
47
|
$(this).css('maxHeight', ($(window).height() * 0.8) + 'px');
|
48
48
|
if ($(this).parent().height() > $(window).height()) {
|
49
49
|
$(this).height($(window).height() * 0.8);
|
@@ -102,10 +102,11 @@
|
|
102
102
|
dialogOptions.buttons[index].click = ujsSubmitDialogForm;
|
103
103
|
}
|
104
104
|
else if (element == 'close') {
|
105
|
-
dialogOptions.buttons[index] = ujsDialogClose;
|
105
|
+
dialogOptions.buttons[index] = $.proxy(ujsDialogClose, dialogElement);
|
106
106
|
}
|
107
107
|
else if (element.click == 'close') {
|
108
|
-
dialogOptions.buttons[index].click =
|
108
|
+
dialogOptions.buttons[index].click =
|
109
|
+
$.proxy(ujsDialogClose, dialogElement);
|
109
110
|
}
|
110
111
|
else {
|
111
112
|
dialogOptions.buttons[index] = eval(element);
|
@@ -146,7 +147,7 @@
|
|
146
147
|
}
|
147
148
|
|
148
149
|
function ujsDialogCloseClick() {
|
149
|
-
ujsDialogClose();
|
150
|
+
ujsDialogClose.call(this);
|
150
151
|
return false;
|
151
152
|
}
|
152
153
|
|
@@ -231,7 +232,7 @@
|
|
231
232
|
if (element.data('use-dialog-opener'))
|
232
233
|
targetElement = ujsDialogElement;
|
233
234
|
if (element.data('close-dialog'))
|
234
|
-
ujsDialogClose();
|
235
|
+
ujsDialogClose.call(element);
|
235
236
|
}
|
236
237
|
if (element.data('refresh')) {
|
237
238
|
window.location.reload();
|
@@ -256,7 +257,10 @@
|
|
256
257
|
|
257
258
|
switch (element.data('result-method')) {
|
258
259
|
case 'update':
|
259
|
-
|
260
|
+
// sometimes this adds text nodes
|
261
|
+
target = $(data).replaceAll(target).filter(function() {
|
262
|
+
return this.nodeType == 1;
|
263
|
+
});
|
260
264
|
target.trigger('jqr.load');
|
261
265
|
break;
|
262
266
|
case 'append':
|
data/jqr-helpers.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'jqr-helpers'
|
3
3
|
s.require_paths = %w(. lib lib/jqr-helpers)
|
4
|
-
s.version = '1.0.
|
5
|
-
s.date = '2014-
|
4
|
+
s.version = '1.0.44'
|
5
|
+
s.date = '2014-06-13'
|
6
6
|
s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
|
7
7
|
s.description = <<-EOF
|
8
8
|
This gem adds helper methods to create unobtrusive jQuery code. It outputs
|
data/lib/jqr-helpers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jqr-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|