mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FEATURE Trigger event when new or edit link is clicked
This commit is contained in:
parent
9efcb9b8fe
commit
7a755da101
@ -69,6 +69,20 @@ jQuery(function($){
|
||||
).css({'position':'relative','margin':'0 auto','width':'65%'}).appendTo(eleInput.closest('th'));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('fieldset.ss-gridfield .new-link').entwine({
|
||||
onclick: function(e) {
|
||||
$(this).trigger('opennewview', $(this).prop('href'));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('fieldset.ss-gridfield .edit-link').entwine({
|
||||
onclick: function(e) {
|
||||
$(this).trigger('openeditview', $(this).prop('href'));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
@ -1 +1 @@
|
||||
<a class="action-edit" href="$Link">edit</a>
|
||||
<a class="edit-link" href="$Link">edit</a>
|
@ -1,3 +1,3 @@
|
||||
<tr class="title">
|
||||
<th colspan="$ColumnCount"><h2>$Title</h2> <a href="$NewLink" class="action ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new">Add new</a></th>
|
||||
<th colspan="$ColumnCount"><h2>$Title</h2> <a href="$NewLink" class="action ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link">Add new</a></th>
|
||||
</tr>
|
Loading…
x
Reference in New Issue
Block a user