refinerycms-llama_widgets 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/refinery/widgets.js.coffee.erb +13 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed8b5189fb60a7aa96ea215e314875be0d74c34
|
4
|
+
data.tar.gz: 98d9b4a9bfb482641aeab8b9e7a1f45d3add63a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82912073ee94facdef763b54c33e03746805ccc97cb50b3cf56cda893a5df8ad0c4684db61838cf3d52b788bfed336fcab46af7a49f878f439d711b180679488
|
7
|
+
data.tar.gz: c7d9ce63720082946a2f4042a3704c3b0bc127bdb369bd6accf195424d2e6b25e478adb19d53872ee5497e39c7f3da71e8ea28442d5bd68c409ebb28479f2e81
|
@@ -1,12 +1,6 @@
|
|
1
1
|
jQuery ->
|
2
|
-
|
3
|
-
|
4
|
-
if ($(this).is(':checked'))
|
5
|
-
if $(this).is('[data-disabled-warning]')
|
6
|
-
alert $(this).attr('data-disabled-warning')
|
7
|
-
$(this).parents('[data-disabled-container]').find('[data-disabled-slave]').removeAttr('disabled')
|
8
|
-
else
|
9
|
-
$(this).parents('[data-disabled-container]').find('[data-disabled-slave]').attr('disabled', true)
|
2
|
+
|
3
|
+
initDisabled()
|
10
4
|
|
11
5
|
|
12
6
|
if $('#new_widget #widget_type').length > 0
|
@@ -44,6 +38,16 @@ jQuery ->
|
|
44
38
|
assessOrder()
|
45
39
|
})
|
46
40
|
|
41
|
+
window.initDisabled = () ->
|
42
|
+
$('[data-disabled-master]').each (index,element) ->
|
43
|
+
$(element).change (event) ->
|
44
|
+
if ($(this).is(':checked'))
|
45
|
+
if $(this).is('[data-disabled-warning]')
|
46
|
+
alert $(this).attr('data-disabled-warning')
|
47
|
+
$(this).parents('[data-disabled-container]').find('[data-disabled-slave]').removeAttr('disabled')
|
48
|
+
else
|
49
|
+
$(this).parents('[data-disabled-container]').find('[data-disabled-slave]').attr('disabled', true)
|
50
|
+
|
47
51
|
window.selectExistingWidgetForTemplate = (id) ->
|
48
52
|
activePart = window.parent.$('li.ui-tabs-active').attr('aria-controls')
|
49
53
|
index = window.parent.$('#template_part_index_' + activePart).attr('data-index')
|
@@ -70,6 +74,7 @@ window.selectExistingWidgetForPage = (id) ->
|
|
70
74
|
window.initWidgets = ->
|
71
75
|
WYMeditor.init()
|
72
76
|
assessOrder()
|
77
|
+
initDisabled()
|
73
78
|
|
74
79
|
window.linkFromDialog = (linkUrl) ->
|
75
80
|
window.parent.location = linkUrl
|