diff --git a/R7.University/Controls/EditDocuments.ascx.cs b/R7.University/Controls/EditDocuments.ascx.cs index e2b53fe8..b2ae60c2 100644 --- a/R7.University/Controls/EditDocuments.ascx.cs +++ b/R7.University/Controls/EditDocuments.ascx.cs @@ -4,7 +4,7 @@ // Author: // Roman M. Yagodin // -// 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 @@ -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; @@ -125,5 +127,18 @@ protected override void OnResetForm () } #endregion + + public override void SetData (List 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; + } + } + } } } diff --git a/R7.University/releaseNotes.htm b/R7.University/releaseNotes.htm index 8744d4fe..b393c6bd 100644 --- a/R7.University/releaseNotes.htm +++ b/R7.University/releaseNotes.htm @@ -10,6 +10,7 @@

Version 1.13.0

  • Switch to use SettingsRepository to work with settings.
  • Fixed achievement suffix not displayed in the employee details (#160).
  • Workaround for employee details popups issue in IE if page URL contains Unicode characters (#159).
  • +
  • Speedup adding new documents by autoselecting first document's folder (#161).
  • Fixed minor issues on clean install.
  • Some code moved to the R7.DotNetNuke.Extensions library.