Skip to content

Instantly share code, notes, and snippets.

@vinniefranco
Created January 4, 2012 00:49
Show Gist options
  • Save vinniefranco/1557820 to your computer and use it in GitHub Desktop.
Save vinniefranco/1557820 to your computer and use it in GitHub Desktop.
w = Widget.create({
"initalize" function() {
this.active_toggle = ".active_toggle";
}
"template": "widget_item",
"!change .active-toggle @is_active": function(is_active) {
// Update is_active status
this.active_toggle.prop("checked", is_active);
}
"inlineEditors(.item-title)": {
fields: {"title": {options: { defaultValue: "(Untitled)" } }},
classPrefix: "widget_list_item",
data: item,
restParams: ["lists", list_id, "items", item.id]
},
"!click .deets": "slideToggle:.drawer"
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment