Skip to content

Commit

Permalink
implementing dataview actions: Fix #10, Fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
EitanBlumin committed Aug 16, 2018
1 parent 9dc09bb commit 9e7d6da
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
14 changes: 14 additions & 0 deletions src/CrudePortalDB/CrudePortalDB.refactorlog
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,18 @@
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="DataTablePagingStyle" />
</Operation>
<Operation Name="Rename Refactor" Key="1d025c57-314d-4560-a8e0-a3e0d031d0df" ChangeDateTime="08/16/2018 12:12:46">
<Property Name="ElementName" Value="[portal].[DataViewAction].[NgClick]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[portal].[DataViewAction]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="NgClickCode" />
</Operation>
<Operation Name="Rename Refactor" Key="28c4b93d-e3a4-4a9d-a075-1aa8b66638cd" ChangeDateTime="08/16/2018 12:12:53">
<Property Name="ElementName" Value="[portal].[DataViewAction].[NgClickCode]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[portal].[DataViewAction]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="NgClickJSCode" />
</Operation>
</Operations>
1 change: 1 addition & 0 deletions src/CrudePortalDB/CrudePortalDB.sqlproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<Build Include="Views\portal.DataViewDataTableFlags.sql" />
<Build Include="Views\portal.DataViewPagingTypes.sql" />
<Build Include="Functions\portal.GetNavigationRecursive.sql" />
<Build Include="Tables\portal.DataViewActionParameters.sql" />
</ItemGroup>
<ItemGroup>
<RefactorLog Include="CrudePortalDB.refactorlog" />
Expand Down
15 changes: 10 additions & 5 deletions src/CrudePortalDB/Tables/portal.DataViewAction.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
CREATE TABLE [portal].[DataViewAction] (
[ActionID] INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_DataViewAction PRIMARY KEY NONCLUSTERED,
[ViewID] INT NOT NULL,
[ActionID] INT NOT NULL,
[ActionLabel] NVARCHAR (100) NOT NULL,
[ParentActionID] INT NULL,
[ActionTooltip] NVARCHAR (300) NULL,
[ActionDescription] NVARCHAR (1000) NULL,
[ActionOrder] INT CONSTRAINT [DF_DataViewAction_ActionOrder] DEFAULT ((1)) NOT NULL,
[RequireConfirmation] BIT CONSTRAINT [DF_DataViewAction_RequireConfirmation] DEFAULT ((1)) NOT NULL,
[ActionUri] NVARCHAR (1000) NULL,
[NgClick] NVARCHAR (1000) NULL,
CONSTRAINT [PK_DataViewAction] PRIMARY KEY CLUSTERED ([ViewID] ASC, [ActionID] ASC)
[ActionUri] NVARCHAR (1000) NULL,
[UriTargetWindow] VARCHAR(25) NOT NULL DEFAULT '_blank',
[NgClickJSCode] NVARCHAR (1000) NULL,
[GlyphIcon] NVARCHAR(50) NULL,
[DatabaseCommand] NVARCHAR(4000) NULL,
[IsPerRow] BIT NOT NULL DEFAULT 0
);

GO
CREATE CLUSTERED INDEX [IX_DataViewAction_ViewID_ActionID] ON [portal].[DataViewAction] ([ViewID] ASC, [ActionID] ASC)
20 changes: 20 additions & 0 deletions src/CrudePortalDB/Tables/portal.DataViewActionParameters.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CREATE TABLE [portal].[DataViewActionParameters]
(
[ActionParameterId] INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_DataViewActionParameters PRIMARY KEY NONCLUSTERED,
[ActionID] INT NOT NULL CONSTRAINT FK_DataViewActionParameters_DataViewAction FOREIGN KEY REFERENCES portal.DataViewAction (ActionID) ON DELETE CASCADE,
[ParamSystemName] NVARCHAR(50) NOT NULL,
[ParamLabel] NVARCHAR(100) NOT NULL,
[ParamOrder] INT NOT NULL DEFAULT 1,
[ParamIsRequired] BIT NOT NULL DEFAULT 1,
[ParamDefaultValue] NVARCHAR(1000) NULL,
[ParamTooltip] NVARCHAR(255) NULL,
[ParamDescription] NVARCHAR(1000) NULL,
[ParamDataType] INT NOT NULL,
[ParamLinkedTable] NVARCHAR(1000) NULL,
[ParamLinkedTableTitleField] NVARCHAR(200) NULL,
[ParamLinkedTableValueField] NVARCHAR(200) NULL,
[ParamLinkedTableGroupField] NVARCHAR(200) NULL,
[ParamLinkedTableAddition] NVARCHAR(1000) NULL
)
GO
CREATE CLUSTERED INDEX IX_DataViewActionParameters ON [portal].[DataViewActionParameters] (ActionID, ActionParameterID);

0 comments on commit 9e7d6da

Please sign in to comment.