Skip to content

Commit

Permalink
Prettier hack for avoiding edit navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
colymba committed Sep 5, 2012
1 parent 7a0b32e commit 2ba88c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 13 additions & 0 deletions css/GridFieldBulkManager.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
9 changes: 6 additions & 3 deletions javascript/GridFieldBulkManager.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
(function($) {


$.entwine('colymba', function($) {

$('td.col-bulkSelect').entwine({
onmatch: function(){
},
onunmatch: function(){
},
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
Expand All @@ -29,6 +30,8 @@
onunmatch: function(){
},
onclick: function(e) {
//e.preventDefault();
//return false;
}/*,
onchange: function(){
var idList, id;
Expand Down

0 comments on commit 2ba88c2

Please sign in to comment.