Skip to content

Commit

Permalink
Add replaceTags imagebutton to replace Article Tags with selected lst…
Browse files Browse the repository at this point in the history
…Tags, and make addTags imagebutton append tags to Article Tags list
  • Loading branch information
Eric Wagner committed May 24, 2021
1 parent 30da239 commit fc8772b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions ucSubmitNews.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
<td runat="server" id="tdAllTagsList">
<asp:ListBox ID="lstTags" runat="server" CssClass="Normal" DataTextField="Name" DataValueField="Name" Width="300px" Height="150px" SelectionMode="Multiple" />
<asp:imagebutton id="addTags" resourcekey="btnAddTags.Help" runat="server" alternatetext="Add Tags To Article" ToolTip="Add Tags To Article" commandname="add" imageurl="~/images/action_import.gif"></asp:imagebutton>
<asp:imagebutton id="replaceTags" resourcekey="btnReplaceTags.Help" runat="server" alternatetext="Replace Article Tags" ToolTip="Replace Article Tags" commandname="replace" imageurl="~/images/action_refresh.gif"></asp:imagebutton>
</td>
<td runat="server" id="tdStaticTagsList">
<dnn:label id="plArticleTags" text="Article Tags:" runat="server" controlname="txtArticleTags"></dnn:label>
Expand Down
9 changes: 9 additions & 0 deletions ucSubmitNews.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion ucSubmitNews.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ Namespace Ventrian.NewsArticles

End Sub

Private Sub addTags_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addTags.Click
Private Sub replaceTags_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles replaceTags.Click

If lstTags.Items.Count > 0 Then
lstFinalTags.Items.Clear()
Expand All @@ -2023,6 +2023,24 @@ Namespace Ventrian.NewsArticles

End Sub

Private Sub addTags_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addTags.Click

For Each li As ListItem In lstTags.Items
If (li.Selected) Then

li.Selected = False
If Not lstFinalTags.Items.Contains(li) Then

lstFinalTags.Items.Add(li)

End If

End If
Next

End Sub


Private Sub cmdUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUp.Click

moveListItem(-1)
Expand Down

0 comments on commit fc8772b

Please sign in to comment.