- this.node.find('button').click(function(e) {
- e.stopPropagation();
- var btn = $(e.currentTarget),
- btnName = btn.attr('data-name'),
- meta = btn.attr('data-meta'),
- params = {},
- command = btnName;
-
- if(btn.attr('data-btn-type') === 'toggle') {
- command = 'toggle-' + command;
- btn.toggleClass('active');
- params.toggle = btn.hasClass('active');
- }
-
- if(btnName === 'new-node') {
- command = 'newNodeRequested';
- params.wlxmlTag = view.getOption('newTag-tag');
- params.wlxmlClass = view.getOption('newTag-class');
- if(meta) {
- var split = meta.split('/');
- params.wlxmlTag = split[0];
- params.wlxmlClass = split[1];
- }
- } else {
- params.meta = meta;
- }
+ _.pairs(contextParams).forEach(function(pair) {
+ var name = pair[0],
+ value = pair[1];
+ action.updateContextParam(name, value);
+ });
+
+ group.append(view.dom);
+ view.on('actionExecuted', function(action, ret) {
+ sandbox.publish('actionExecuted', action, ret);
+ });