nwt.register({

	name: 'Button',

	methods: {
		init: function () {
			nwt.event.live('data-toggle', /(button-state|buttons-checkbox|buttons-radio|button)/, this.toggle);
		},

		toggle: function(el, action) {
			var togglers = {
				'button-state' : function(){
					el.setData('original-text', el.getHtml());
					el.setHtml(el.data('loading-text'));
					el.set('disabled', true);
				},
				'buttons-checkbox' : function(){
					togglers.button();
				},
				'buttons-radio' : function(){
					el.parent().all('.btn').removeClass('active');
					el.addClass('active');
				},
				'button' : function(){
					if ( el.hasClass('active') ) {
						el.removeClass('active');
					} else {
						el.addClass('active');
					}
				}
			};
			togglers[action[1]]();
		}
	}
});
nwt.plugin('Button');
@@ -192,16 +192,23 @@
 tion(el,
+target,
  action)
@@ -737,16 +737,63 @@
 %7D%0A%09%09%09%7D;%0A
+%09%09%09console.log('Performing action', action%5B1%5D)%0A
 %09%09%09toggl

Fix buttons