diff options
author | Michael Leibman <michael.leibman@gmail.com> | 2013-06-20 14:02:49 -0400 |
---|---|---|
committer | Michael Leibman <michael.leibman@gmail.com> | 2013-06-20 14:02:49 -0400 |
commit | 59c371f5349c4fb6de3df320552a513f8a8bf9a1 (patch) | |
tree | 064f7d56144194230bcddc1297a99ff09f2ce997 | |
parent | 15ac2ca6fcdecc789b9b16bb2293d8da8b840ed4 (diff) | |
download | SlickGrid-59c371f5349c4fb6de3df320552a513f8a8bf9a1.zip SlickGrid-59c371f5349c4fb6de3df320552a513f8a8bf9a1.tar.gz SlickGrid-59c371f5349c4fb6de3df320552a513f8a8bf9a1.tar.bz2 |
Remove the use of jQueryUI effect and move the invalid cell animation into CSS.
-rw-r--r-- | examples/slick-default-theme.css | 14 | ||||
-rw-r--r-- | slick.grid.js | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/examples/slick-default-theme.css b/examples/slick-default-theme.css index 67cb04b..6efd255 100644 --- a/examples/slick-default-theme.css +++ b/examples/slick-default-theme.css @@ -101,4 +101,18 @@ classes should alter those! .slick-cell.invalid { border-color: red; + -moz-animation-duration: 0.2s; + -webkit-animation-duration: 0.2s; + -moz-animation-name: slickgrid-invalid-hilite; + -webkit-animation-name: slickgrid-invalid-hilite; +} + +@-moz-keyframes slickgrid-invalid-hilite { + from { box-shadow: 0 0 6px red; } + to { box-shadow: none; } +} + +@-webkit-keyframes slickgrid-invalid-hilite { + from { box-shadow: 0 0 6px red; } + to { box-shadow: none; } }
\ No newline at end of file diff --git a/slick.grid.js b/slick.grid.js index b7945d9..9fa3f6f 100644 --- a/slick.grid.js +++ b/slick.grid.js @@ -3103,9 +3103,10 @@ if (typeof Slick === "undefined") { // check whether the lock has been re-acquired by event handlers
return !getEditorLock().isActive();
} else {
- // TODO: remove and put in onValidationError handlers in examples
+ // Re-add the CSS class to trigger transitions, if any.
+ $(activeCellNode).removeClass("invalid");
+ $(activeCellNode).width(); // force layout
$(activeCellNode).addClass("invalid");
- $(activeCellNode).stop(true, true).effect("highlight", {color: "red"}, 300);
trigger(self.onValidationError, {
editor: currentEditor,
|