From 2919e7acdf70fcb09b9b188e581281f0a9a6aac2 Mon Sep 17 00:00:00 2001 From: Mark Guinn Date: Tue, 23 Dec 2014 17:57:09 +0000 Subject: [PATCH] Javascript and layout fixes --- code/GridFieldApplyToMultipleRows.php | 2 +- javascript/GridFieldCheckboxSelectComponent.js | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/code/GridFieldApplyToMultipleRows.php b/code/GridFieldApplyToMultipleRows.php index bda28bb..ad246a6 100644 --- a/code/GridFieldApplyToMultipleRows.php +++ b/code/GridFieldApplyToMultipleRows.php @@ -75,7 +75,7 @@ public function getHTMLFragments($gridField) { } return array( - $this->targetFragment => '

' . $button->Field() . '

', + $this->targetFragment => $button->Field(), ); } diff --git a/javascript/GridFieldCheckboxSelectComponent.js b/javascript/GridFieldCheckboxSelectComponent.js index 8eb8ee6..c75b129 100644 --- a/javascript/GridFieldCheckboxSelectComponent.js +++ b/javascript/GridFieldCheckboxSelectComponent.js @@ -28,15 +28,13 @@ return false; } - if (this.data('confirm')) { - if (confirm(this.data('confirm'))) { - return true; - } else { - e.preventDefault(); - e.stopPropagation(); - return false; - } + if (this.data('confirm') && !confirm(this.data('confirm'))) { + e.preventDefault(); + e.stopPropagation(); + return false; } + + this._super(e); } });