Skip to content

Commit

Permalink
Implement #161: Speedup adding new documents by autoselecting first d…
Browse files Browse the repository at this point in the history
…ocument's folder
  • Loading branch information
roman-yagodin committed Jan 26, 2017
1 parent fe19dc5 commit a69f5c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion R7.University/Controls/EditDocuments.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Author:
// Roman M. Yagodin <[email protected]>
//
// Copyright (c) 2015-2016 Roman M. Yagodin
// Copyright (c) 2015-2017 Roman M. Yagodin
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand All @@ -23,8 +23,10 @@
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Tabs;
using R7.DotNetNuke.Extensions.ControlExtensions;
using R7.DotNetNuke.Extensions.Utilities;
using R7.University.ControlExtensions;
Expand Down Expand Up @@ -125,5 +127,18 @@ protected override void OnResetForm ()
}

#endregion

public override void SetData (List<DocumentInfo> items, int targetItemId)
{
base.SetData (items, targetItemId);

// speedup adding new documents by autoselecting first document's folder
if (items.Count > 0) {
var firstItem = items [0];
if (Globals.GetURLType (firstItem.Url) == TabType.File) {
urlDocumentUrl.Url = firstItem.Url;
}
}
}
}
}
1 change: 1 addition & 0 deletions R7.University/releaseNotes.htm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h3>Version 1.13.0</h3>
<li>Switch to use SettingsRepository to work with settings.</li>
<li>Fixed achievement suffix not displayed in the employee details (#160).</li>
<li>Workaround for employee details popups issue in IE if page URL contains Unicode characters (#159).</li>
<li>Speedup adding new documents by autoselecting first document's folder (#161).</li>
<li>Fixed minor issues on clean install.</li>
<li>Some code moved to the R7.DotNetNuke.Extensions library.</li>
</ul>
Expand Down

0 comments on commit a69f5c6

Please sign in to comment.