From cd905c18d4314c9c8dbfec487218cc52b5d5dc79 Mon Sep 17 00:00:00 2001 From: Chris Hynes Date: Sun, 25 Mar 2018 06:47:10 -0700 Subject: [PATCH] Add selection changed event --- Build/CommonAssemblyInfo.cs | 4 ++-- Griddly/Scripts/griddly.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Build/CommonAssemblyInfo.cs b/Build/CommonAssemblyInfo.cs index 1fc52bc..aefaa03 100644 --- a/Build/CommonAssemblyInfo.cs +++ b/Build/CommonAssemblyInfo.cs @@ -15,6 +15,6 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.3.0")] -[assembly: AssemblyFileVersion("2.3.0")] +[assembly: AssemblyVersion("2.4.0")] +[assembly: AssemblyFileVersion("2.4.0")] //[assembly: AssemblyInformationalVersion("2.0-alpha6")] diff --git a/Griddly/Scripts/griddly.js b/Griddly/Scripts/griddly.js index d4feabe..f540020 100644 --- a/Griddly/Scripts/griddly.js +++ b/Griddly/Scripts/griddly.js @@ -291,6 +291,9 @@ else el.show(350); + el.find(".griddly-selection-singular").toggle(this.options.selectedRows == 1); + el.find(".griddly-selection-plural").toggle(this.options.selectedRows != 1); + $(this.$element).find("[data-enable-on-selection=true]").removeClass("disabled"); } else @@ -305,6 +308,7 @@ $(this.$element).find("[data-enable-on-selection=true]").addClass("disabled"); } + this.$element.triggerHandler("selectionchanged.griddly", [this.options.selectedRows]); }, this); var self = this;