Testing through the Release Process for version 4.0.1 has highlighted a few issues, one bigger than the others. These will be fixed in a 4.0.2 release.
Setting of Columns for List Views
In version 4.0.1, I made some extra columns available for the list view. These extra columns changed the column number of some of the other columns. So for instance EventName was column 3 but is now column 4. In the resx files, the names are allocated by number. So what I did was just change the text against the number. So now instead of 4.Text being 'Image', it is now 'Title'. This works fine for people using the supplied resx. However for those using different languages, it is not immediately obvious that these columns need to be re-translated. This is causing problems for admins on sites using non en-US language packs.
So, to create greater flexibility for moving columns around in the future, I have remove the resx entries 1-10, and replaced with meaningful column names.
- EditButton - Edit Button
- BeginDateTime - Begin Date Time
- EndDateTime - End Date Time
- EventName - Event Name (reqd)
- Image - Image
- Duration - Duration
- Category - Category
- CustomField1 - Custom Field 1
- CustomField2 - Custom Field 2
- Description - Description
I also spotted a minor bug where if the remove all 'button' was clicked, duplicate column 4's were being added to the available column, when none should be added.
My Enrollments
Currently on the My Enrollments view, the Approved column is populated with the text 'True' or 'False'. To improve usability this has been changed to a checkbox. This involved some minor code changes
| Notes | From | To |
| ascx - Changed from label to checkbox that is automatically populated | <asp:Label id="lblApproved" runat="server"></asp:Label> | <asp:CheckBox ID="chkApproved" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"Approved") %>'/> |
| vb - Remove the code to set the label text | CType(grdEnrollment.Items(i).FindControl("lblApproved"), Label).Text = Localization.GetString("pl" & grdEnrollment.Items(i).Cells(4).Text, LocalResourceFile) | |
| resx - Remove the associated resx values | <data name="plFalse.Text" xml:space="preserve"> <value>False</value> </data> <data name="plTrue.Text" xml:space="preserve"> <value>True</value> </data> | |
Add Events
In order to make Add Events more usable. For the Image section and the Reminder section, the appropriate fields are only displayed when the check box at the top of the section is ticked. This is done by adding a Panel around the section that needs to be hidden, and making the checkbox do a postback.
Very similar code is added in each section, so I will only show one here. The highlighted code has been added.
| <tr> <td class="SubHead" valign="top"> <asp:Panel ID="pnlImage" runat="server" Width="100%"> <dnn:SectionHead ID="dshImageSettings" runat="server" CssClass="Head" Text="Image Settings" Section="tblImage" IncludeRule="True" ResourceKey="ImageSettings" IsExpanded="False"></dnn:SectionHead> <table id="tblImage" width="100%" cellpadding="2" cellspacing="2" border="0" runat="server"> <tr> <td class="SubHead" valign="top" width="150px"> <dnn:Label ID="lblDisplayImage" runat="server"></dnn:Label> </td> <td class="SubHead" valign="top" nowrap="nowrap"> <asp:CheckBox ID="chkDisplayImage" runat="server" resourcekey="Yes" CssClass="SubHead" Text="Yes" AutoPostBack="True"></asp:CheckBox> </td> </tr> </table> <asp:Panel ID="pnlImageURL" runat="server" Width="100%"> <table id="tblImageURL" width="100%" cellpadding="2" cellspacing="2" border="0" runat="server"> <tr> <td class="SubHead" valign="top" width="150px"> <dnn:Label ID="lblImageURL" runat="server"></dnn:Label> </td> <td class="SubHead" valign="top" nowrap="nowrap"> <dnn:URL ID="ctlURL" runat="server" Width="300" ShowFiles="True" ShowUrls="True" ShowNewWindow="False" ShowTrack="False" ShowLog="False" UrlType="F" ShowTabs="False"></dnn:URL> </td> </tr> <tr> <td class="SubHead" valign="top"> <dnn:Label ID="lblWidth" runat="server"></dnn:Label> </td> <td class="SubHead" valign="top" nowrap="nowrap"> <asp:TextBox ID="txtWidth" runat="server" CssClass="NormalTextBox" Columns="50" Width="37px"></asp:TextBox> <asp:RegularExpressionValidator ID="valWidth" runat="server" ControlToValidate="txtWidth" ErrorMessage="Width must be a valid Integer or Blank" resourcekey="valWidth" ValidationExpression="^[1-9]+[0-9]*$"></asp:RegularExpressionValidator> </td> </tr> <tr> <td class="SubHead" valign="top"> <dnn:Label ID="lblHeight" runat="server"></dnn:Label> </td> <td class="SubHead" valign="top" nowrap="nowrap"> <asp:TextBox ID="txtHeight" runat="server" CssClass="NormalTextBox" Columns="50" Width="37px"></asp:TextBox> <asp:RegularExpressionValidator ID="valHeight" runat="server" ControlToValidate="txtHeight" ErrorMessage="Height must be a valid Integer or Blank" resourcekey="valHeight" ValidationExpression="^[1-9]+[0-9]*$"></asp:RegularExpressionValidator> </td> </tr> </table> </asp:Panel> </asp:Panel> </td> </tr> |
In the vb the following code is added:-
| Private Sub chkDisplayImage_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkDisplayImage.CheckedChanged If Me.chkDisplayImage.Checked Then Me.pnlImageURL.Visible = True Else Me.pnlImageURL.Visible = False End If End Sub |
The If/End If code is also added into the Page_Load sub routine.
For Reminder, I had to move the time before fields on the view. This should also improved usability in languages where the word order is not the same as in English. This caused the following change in the resx:-
| Removed | Added |
| <data name="lblBeforeEvent.Text" xml:space="preserve"> <value>before event is to occur</value> </data> | <data name="lblTimeBefore.Help" xml:space="preserve"> <value>The amount of time before the event the notification will be sent out</value> </data> <data name="lblTimeBefore.Text" xml:space="preserve"> <value>Time Before Event:</value> </data> |
Also valBadReminderTime.Text needs to have a lowercase 'v' at the start, it previously had uppercase.