Prettier hack for avoiding edit navigation

This commit is contained in:
colymba 2012-09-05 21:14:44 +03:00
parent 7a0b32eafd
commit 2ba88c2108
2 changed files with 19 additions and 3 deletions

View File

@ -26,6 +26,19 @@
width: auto !important;
}
.cms table.ss-gridfield-table tbody td a.tempDisabledEditLink
{
background: url('../../framework/admin/images/btn-icon/document--pencil.png') no-repeat 2px 0px;
display: inline-block;
width: 20px;
height: 20px;
text-indent: 119988px;
overflow: hidden;
vertical-align: middle;
background-position: 2px 0px;
background-repeat: no-repeat no-repeat;
}
/* ************************************************************************
* EDITING
*/

View File

@ -1,7 +1,8 @@
(function($) {
$.entwine('colymba', function($) {
$('td.col-bulkSelect').entwine({
onmatch: function(){
},
@ -9,11 +10,11 @@
},
onmouseover: function(){
//disable default row click behaviour -> avoid navigation to edit form when clicking the checkbox
$(this).parents('.ss-gridfield-item').find('.edit-link').addClass('tempDisabledEditLink').removeClass('edit-link').css('display','none');
$(this).parents('.ss-gridfield-item').find('.edit-link').removeClass('edit-link').addClass('tempDisabledEditLink');
},
onmouseout: function(){
//re-enable default row click behaviour
$(this).parents('.ss-gridfield-item').find('.tempDisabledEditLink').addClass('edit-link').removeClass('tempDisabledEditLink').css('display','inline-block');
$(this).parents('.ss-gridfield-item').find('.tempDisabledEditLink').addClass('edit-link').removeClass('tempDisabledEditLink');
},
onclick: function(e) {
//check/uncheck checkbox when clicking cell
@ -29,6 +30,8 @@
onunmatch: function(){
},
onclick: function(e) {
//e.preventDefault();
//return false;
}/*,
onchange: function(){
var idList, id;