chutier icon added to corpus map nodepopup
This commit is contained in:
@@ -20,18 +20,7 @@
|
||||
function onClickAjaxLink(e){
|
||||
console.log('studio onClickAjaxLink chutier');
|
||||
e.preventDefault();
|
||||
// var $this = $(this);
|
||||
addRemoveToChutier($(this));
|
||||
// switch($this.attr('action')){
|
||||
// case 'add':
|
||||
// // TODO: get target chutier
|
||||
// addToChutier($this);
|
||||
// break;
|
||||
// case 'remove':
|
||||
// // TODO: if we use more than one chutoer per user get target chutier
|
||||
// removeFromChutier($this);
|
||||
// break;
|
||||
// }
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -51,6 +40,12 @@
|
||||
|
||||
function onActionToChutierDone($link, data){
|
||||
console.log('onActionToChutierDone',data);
|
||||
$('body').trigger({
|
||||
'type':'chutier-action-done',
|
||||
'action_done':data.action_done,
|
||||
'new_action':data.action_done == 'add' ? 'remove' : 'add',
|
||||
'target_id':$link.attr('target_id'),
|
||||
});
|
||||
$link.replaceWith(data.new_link);
|
||||
initAjax();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user