Reorder binders.
Showing
1 changed file
with
16 additions
and
15 deletions
1 | # Core binders that are included with Rivets.js. | 1 | # Core binders that are included with Rivets.js. |
2 | |||
3 | Rivets.binders.text = (el, value) -> | ||
4 | if el.textContent? | ||
5 | el.textContent = if value? then value else '' | ||
6 | else | ||
7 | el.innerText = if value? then value else '' | ||
8 | |||
9 | Rivets.binders.html = (el, value) -> | ||
10 | el.innerHTML = if value? then value else '' | ||
11 | |||
12 | Rivets.binders.show = (el, value) -> | ||
13 | el.style.display = if value then '' else 'none' | ||
14 | |||
15 | Rivets.binders.hide = (el, value) -> | ||
16 | el.style.display = if value then 'none' else '' | ||
17 | |||
2 | Rivets.binders.enabled = (el, value) -> | 18 | Rivets.binders.enabled = (el, value) -> |
3 | el.disabled = !value | 19 | el.disabled = !value |
4 | 20 | ||
... | @@ -29,15 +45,6 @@ Rivets.binders.unchecked = | ... | @@ -29,15 +45,6 @@ Rivets.binders.unchecked = |
29 | else | 45 | else |
30 | el.checked = !value | 46 | el.checked = !value |
31 | 47 | ||
32 | Rivets.binders.show = (el, value) -> | ||
33 | el.style.display = if value then '' else 'none' | ||
34 | |||
35 | Rivets.binders.hide = (el, value) -> | ||
36 | el.style.display = if value then 'none' else '' | ||
37 | |||
38 | Rivets.binders.html = (el, value) -> | ||
39 | el.innerHTML = if value? then value else '' | ||
40 | |||
41 | Rivets.binders.value = | 48 | Rivets.binders.value = |
42 | publishes: true | 49 | publishes: true |
43 | bind: (el) -> | 50 | bind: (el) -> |
... | @@ -56,12 +63,6 @@ Rivets.binders.value = | ... | @@ -56,12 +63,6 @@ Rivets.binders.value = |
56 | else if value?.toString() isnt el.value?.toString() | 63 | else if value?.toString() isnt el.value?.toString() |
57 | el.value = if value? then value else '' | 64 | el.value = if value? then value else '' |
58 | 65 | ||
59 | Rivets.binders.text = (el, value) -> | ||
60 | if el.textContent? | ||
61 | el.textContent = if value? then value else '' | ||
62 | else | ||
63 | el.innerText = if value? then value else '' | ||
64 | |||
65 | Rivets.binders.if = | 66 | Rivets.binders.if = |
66 | block: true | 67 | block: true |
67 | 68 | ... | ... |
-
Please register or sign in to post a comment