From 43592f730d3be8a42e9d1f78efee94b043ddef76 Mon Sep 17 00:00:00 2001 From: Javi Jimenez Villar Date: Tue, 12 Mar 2013 16:53:19 +0100 Subject: [PATCH] New data-control-checkbox --- src/boot/Lungo.Boot.Data.coffee | 4 +--- src/modules/Lungo.Attributes.coffee | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/boot/Lungo.Boot.Data.coffee b/src/boot/Lungo.Boot.Data.coffee index 48806564..83ab85c9 100644 --- a/src/boot/Lungo.Boot.Data.coffee +++ b/src/boot/Lungo.Boot.Data.coffee @@ -32,9 +32,7 @@ Lungo.Boot.Data = do(lng = Lungo) -> el = lng.dom(children) _bindDataAttribute el, el.data(key), attribute.html - _bindDataAttribute = (element, value, html) -> - html_binded = html.replace(BINDING.START + BINDING.KEY + BINDING.END, value) - element.prepend html_binded + element.prepend html.replace(/\{\{value\}\}/g, value) init: init diff --git a/src/modules/Lungo.Attributes.coffee b/src/modules/Lungo.Attributes.coffee index 1fc62c0c..2cf61a22 100644 --- a/src/modules/Lungo.Attributes.coffee +++ b/src/modules/Lungo.Attributes.coffee @@ -42,6 +42,13 @@ Lungo.Attributes = selector: "header" html: "{{value}}" + "control-checkbox": + selector: "*" + html: """ + + + """ + loading: selector: "*" html: """