pwnstyles_rails 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/assets/javascripts/pwn-fx.js.coffee +20 -15
- data/pwnstyles_rails.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c7c1da86273339bc60eb017bb860d202317ac33
|
4
|
+
data.tar.gz: f61412f68b0c72138dc6f5ad5e08e1c9708349d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baea508c4e2b168c6599b57834a389b27fdea4452b6950612c596ee1a3e03ed5fa5ffe52e9d831535696176d5fb04776d5f9cb1b69f089a2a61558fa4f6ce0e9
|
7
|
+
data.tar.gz: d9bb4a5c435298f57ed0a8bca7d9c5a92114d886715171faabc8f071db67223951d18341ff6051a8d620aa0400fc66fbbe2ba9202300c7d4906a4b47be765d80
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -143,8 +143,9 @@ PwnFx = new PwnFxClass
|
|
143
143
|
#
|
144
144
|
# Attributes:
|
145
145
|
# data-pwnfx-move: an identifier connecting the move's target element
|
146
|
-
# data-pwnfx-move-target:
|
147
|
-
#
|
146
|
+
# data-pwnfx-move-target: a space-separated list of identifiers, one of which
|
147
|
+
# should match the value of data-pwnfx-move; set on the element that will
|
148
|
+
# receive the moved element as its last child
|
148
149
|
# data-pwnfx-move-method: 'append' adds the moved as the element as the
|
149
150
|
# target's last child, 'replace' clears the target element, then adds the
|
150
151
|
# moved element as the target's only child
|
@@ -152,7 +153,7 @@ class PwnFxMove
|
|
152
153
|
constructor: (element, identifier, scopeId) ->
|
153
154
|
scope = PwnFx.resolveScope scopeId, element
|
154
155
|
method = element.getAttribute('data-pwnfx-move-method') || 'append'
|
155
|
-
target = document.querySelector "[data-pwnfx-move-target
|
156
|
+
target = document.querySelector "[data-pwnfx-move-target~=\"#{identifier}\"]"
|
156
157
|
|
157
158
|
switch method
|
158
159
|
when 'append'
|
@@ -175,14 +176,15 @@ PwnFx.registerEffect 'move', PwnFxMove
|
|
175
176
|
# beforebegin, afterbegin, beforeend, afterend; defaults to beforeend
|
176
177
|
# data-pwnfx-render-randomize: regexp pattern whose matches will be replaced
|
177
178
|
# with a random string; useful for generating unique IDs
|
178
|
-
# data-pwnfx-render-target:
|
179
|
-
#
|
179
|
+
# data-pwnfx-render-target: a space-separated list of identifiers, one of
|
180
|
+
# which should match the value of data-pwnfx-render; set on the element(s)
|
181
|
+
# receiving the rendered HTML
|
180
182
|
# data-pwnfx-render-source: set to the identifier in data-pwnfx-render, on the
|
181
183
|
# <script> tag containing the source HTML
|
182
184
|
class PwnFxRender
|
183
185
|
constructor: (element, identifier, scopeId) ->
|
184
186
|
sourceSelector = "script[data-pwnfx-render-source=\"#{identifier}\"]"
|
185
|
-
targetSelector = "[data-pwnfx-render-target
|
187
|
+
targetSelector = "[data-pwnfx-render-target~=\"#{identifier}\"]"
|
186
188
|
insertionPoint = element.getAttribute('data-pwnfx-render-where') ||
|
187
189
|
'beforeend'
|
188
190
|
randomizedPatten = element.getAttribute('data-pwnfx-render-randomize')
|
@@ -221,11 +223,12 @@ PwnFx.registerEffect 'render', PwnFxRender
|
|
221
223
|
# data-pwnfx-delayed-method: the HTTP method of AJAX request (default: POST)
|
222
224
|
# data-pwnfx-delayed-ms: the delay between the page load and the issuing of
|
223
225
|
# the AJAX request (default: 1000ms)
|
224
|
-
# data-pwnfx-delayed-target:
|
225
|
-
#
|
226
|
+
# data-pwnfx-delayed-target: a space-separated list of identifiers, one of which
|
227
|
+
# should match the value of data-pwnfx-delayed; set on the element
|
228
|
+
# populated with the AJAX response
|
226
229
|
class PwnFxDelayed
|
227
230
|
constructor: (element, identifier, scopeId) ->
|
228
|
-
targetSelector = "[data-pwnfx-delayed-target
|
231
|
+
targetSelector = "[data-pwnfx-delayed-target~=\"#{identifier}\"]"
|
229
232
|
xhrUrl = element.getAttribute('data-pwnfx-delayed-url')
|
230
233
|
xhrMethod = element.getAttribute('data-pwnfx-delayed-method') || 'POST'
|
231
234
|
xhrForm = PwnFx.parentForm element
|
@@ -254,11 +257,12 @@ PwnFx.registerEffect 'delayed', PwnFxDelayed
|
|
254
257
|
# data-pwnfx-refresh-method: the HTTP method of AJAX request (default: POST)
|
255
258
|
# data-pwnfx-refresh-ms: delay between a change on the source element and
|
256
259
|
# AJAX refresh requests (default: 200ms)
|
257
|
-
# data-pwnfx-refresh-target:
|
258
|
-
#
|
260
|
+
# data-pwnfx-refresh-target: a space-separated list of identifiers, one of which
|
261
|
+
# should match the value of data-pwnfx-refresh; set on the element
|
262
|
+
# populated with the AJAX response
|
259
263
|
class PwnFxRefresh
|
260
264
|
constructor: (element, identifier, scopeId) ->
|
261
|
-
targetSelector = "[data-pwnfx-refresh-target
|
265
|
+
targetSelector = "[data-pwnfx-refresh-target~=\"#{identifier}\"]"
|
262
266
|
xhrUrl = element.getAttribute('data-pwnfx-refresh-url')
|
263
267
|
xhrMethod = element.getAttribute('data-pwnfx-refresh-method') || 'POST'
|
264
268
|
xhrForm = PwnFx.parentForm element
|
@@ -444,11 +448,12 @@ PwnFx.registerEffect 'showif', PwnFxShowIf
|
|
444
448
|
#
|
445
449
|
# Attributes:
|
446
450
|
# data-pwnfx-remove: an identifier connecting the elements to be removed
|
447
|
-
# data-pwnfx-remove-target:
|
448
|
-
#
|
451
|
+
# data-pwnfx-remove-target: a space-separated list of identifiers, one of which
|
452
|
+
# should match the value of data-pwnfx-remove; set on elements that will
|
453
|
+
# be removed when the element is clicked
|
449
454
|
class PwnFxRemove
|
450
455
|
constructor: (element, identifier, scopeId) ->
|
451
|
-
targetSelector = "[data-pwnfx-remove-target
|
456
|
+
targetSelector = "[data-pwnfx-remove-target~=\"#{identifier}\"]"
|
452
457
|
|
453
458
|
onClick = (event) ->
|
454
459
|
scope = PwnFx.resolveScope scopeId, element
|
data/pwnstyles_rails.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pwnstyles_rails 0.2.
|
5
|
+
# stub: pwnstyles_rails 0.2.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pwnstyles_rails"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Victor Costan"]
|
14
|
-
s.date = "2015-08-
|
14
|
+
s.date = "2015-08-30"
|
15
15
|
s.description = "Included CSS was designed for reuse across pwnb.us apps."
|
16
16
|
s.email = "victor@costan.us"
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwnstyles_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Costan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass-rails
|