Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into users/manish/bug…
Browse files Browse the repository at this point in the history
…fixes
  • Loading branch information
Manish Kumar committed Mar 25, 2022
2 parents 4a80ba0 + 822beec commit bd7f768
Show file tree
Hide file tree
Showing 24 changed files with 251 additions and 60 deletions.
10 changes: 5 additions & 5 deletions DesktopModules/Vanjaro/Common/Factories/BrowseUploadFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public static string GetLink(PortalSettings PortalSettings, ModuleInfo ActiveMod
{
string result = "";
IFileInfo file = null;
if (HttpContext.Current != null && ActiveModule != null && !string.IsNullOrEmpty(fileurl))
if (HttpContext.Current != null && !string.IsNullOrEmpty(fileurl))
{
if (fileurl.StartsWith("pages"))
{
Expand Down Expand Up @@ -631,13 +631,13 @@ public static string GetLink(PortalSettings PortalSettings, ModuleInfo ActiveMod
}
else
{
file = FileManager.Instance.GetFile(ActiveModule.PortalID, fileurl.Replace(PortalSettings.HomeDirectory, ""));
file = FileManager.Instance.GetFile(PortalSettings.PortalId, fileurl.Replace(PortalSettings.HomeDirectory, ""));
}

if (file != null)
{
string str = string.Format("fileID={0}", file.FileId);
result = DotNetNuke.Common.Globals.LinkClick(str, ActiveModule.TabID, Null.NullInteger);
result = DotNetNuke.Common.Globals.LinkClick(str, PortalSettings.ActiveTab.TabID, Null.NullInteger);
}
}
break;
Expand All @@ -649,13 +649,13 @@ public static string GetLink(PortalSettings PortalSettings, ModuleInfo ActiveMod
}
else
{
file = FileManager.Instance.GetFile(ActiveModule.PortalID, fileurl.Replace(PortalSettings.HomeDirectory, ""));
file = FileManager.Instance.GetFile(PortalSettings.PortalId, fileurl.Replace(PortalSettings.HomeDirectory, ""));
}

if (file != null)
{
string str = string.Format("fileID={0}", file.FileId);
result = string.Format("{0}://{1}{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Authority, DotNetNuke.Common.Globals.LinkClick(str, ActiveModule.TabID, Null.NullInteger));
result = string.Format("{0}://{1}{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Authority, DotNetNuke.Common.Globals.LinkClick(str, PortalSettings.ActiveTab.TabID, Null.NullInteger));
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ uiengine {
.validationGroup label.error {
font-size: 12px;
color: red;
width: 100%
}

.control-background {
Expand Down Expand Up @@ -255,6 +256,7 @@ a.btn.btn-primary.button-left {
margin-right: 5px;
width: 5px;
}

.browseurl .uploaddefault .l_folder span.arrowicon {
margin-right: 0px;
}
Expand All @@ -267,10 +269,11 @@ a.btn.btn-primary.button-left {
background-color: transparent !important;
border-color: transparent !important;
}
.uploaddefault .l_folder .pagedir span.arrowicon {
position: relative;
right: 10px;
}

.uploaddefault .l_folder .pagedir span.arrowicon {
position: relative;
right: 10px;
}

.uploaddefault span.fas.fa-folder {
font-size: 10px;
Expand Down Expand Up @@ -961,8 +964,8 @@ a.page-link.active {
background: #eee;
}

ul.pagination{
justify-content:center;
ul.pagination {
justify-content: center;
}

.pagination a.page-link.active,
Expand Down Expand Up @@ -1065,3 +1068,122 @@ ul.nav.nav-tabs {
-o-transition: background-color .2s linear,width .2s ease-in-out;
transition: background-color .2s linear,width .2s ease-in-out;
}

/*Common Css*/

.accordion-item {
border-bottom: 1px solid rgba(0,0,0,.125);
border-bottom-right-radius: .25rem;
border-bottom-left-radius: .25rem;
}

.accordion-header {
border-bottom: 1px solid transparent;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
background-color: rgba(0,0,0,.03);
}

.accordion-button .fa-caret-right, .accordion-button .fa-caret-down {
transform: rotate( 0deg );
transition: .5s transform ease-in-out;
font-size: 20px;
}

.accordion-button[aria-expanded="true"] .fa-caret-right {
transform: rotate( 90deg );
transition: .5s transform ease-in-out;
}

.accordion-button.collapsed .fa-caret-down {
transform: rotate( -90deg );
transition: .5s transform ease-in-out;
}

.accordion-header .accordion-button {
font-size: 16px;
color: #333;
line-height: 20px;
padding: 10px 15px 7px;
border-bottom: 1px solid transparent;
background-color: transparent;
display: inline-block;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
text-decoration: none !important;
}

.accordion-item {
border-bottom: 1px solid rgba(0,0,0,.125);
border-bottom-right-radius: .25rem;
border-bottom-left-radius: .25rem;
}

.accordion-item + .accordion-item {
margin-top: 5px;
}

.dropdown .dropdown-menu a {
font-size: inherit;
font-weight: inherit;
line-height: inherit;
cursor: pointer;
}

.dropdown-menu .dropdown-item, .box-icon {
display: block;
font-size: 12px;
padding: 5px 10px 5px 5px;
cursor: pointer;
}

.dropdown .dropdown-menu .dropdown-item.active {
font-weight: bold !important;
}

.dropdown .dropdown-menu a.dropdown-item:active,
.dropdown .dropdown-menu a.dropdown-item.active:hover,
.dropdown .dropdown-menu a.dropdown-item:active em {
color: #16181b !important;
background: #ececec;
}

.dropdown.dropbtn .dropdownmenu:hover {
background: #eee;
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.text-end.fixed-footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #fff;
padding: 15px;
z-index: 999;
display: block;
border-top: 1px solid #ccc;
}

.box-icon em {
width: 25px;
padding: 5px;
text-align: center;
color: #76838c;
font-size: 12px;
border-radius: 2px;
margin-right: 10px;
}

.toggle_right {
display: flex;
align-items: center;
}

.toggle_right div {
margin-left: auto;
}

.toggle_right br {
display: none;
}
2 changes: 1 addition & 1 deletion DesktopModules/Vanjaro/Common/Utilities/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static string BrowseUrl(int ModuleId, bool InculdePopup, string Key = "",
}
else
{
result += "popUp=true&hidecommandbar=true&SkinSrc=[G]Skins/_default/popUpSkin";
result += "popUp=true&hidecommandbar=true&SkinSrc=[g]skins/vanjaro/base";
}
}
result = result.TrimEnd('?', '&');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public dynamic Dismiss(NotificationDTO postData)
try
{
NotificationManager.Dismiss(postData.NotificationId, this.UserInfo.UserID);
CacheFactory.Clear(CacheFactory.Keys.NotificationTask + "PortalID" + PortalSettings.PortalId);
response.NotifyCount = Core.Managers.NotificationManager.RenderNotificationsCount(PortalSettings.PortalId);
response.NotificationsCount = NotificationsController.Instance.CountNotifications(this.UserInfo.UserID, PortalSettings.PortalId);
response.IsSuccess = true;
CacheFactory.Clear(CacheFactory.Keys.NotificationTask + "PortalID" + PortalSettings.PortalId);
}
catch (Exception exc)
{
Expand All @@ -75,9 +75,10 @@ public dynamic DismissAll()
{
NotificationManager.Dismiss(Notification.NotificationID, this.UserInfo.UserID);
}
response.TotalNotifications = TotalNotifications;
response.IsSuccess = true;
CacheFactory.Clear(CacheFactory.Keys.NotificationTask + "PortalID" + PortalSettings.PortalId);
response.NotifyCount = NotificationManager.RenderNotificationsCount(PortalSettings.PortalId);
response.NotificationsCount = NotificationsController.Instance.CountNotifications(this.UserInfo.UserID, PortalSettings.PortalId);
response.IsSuccess = true;
}
catch (Exception exc)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@
};
common.webApi.post('Notification/Dismiss', '', postData).then(function (data) {
if (data.data.IsSuccess) {
$("#VJnotifycount", parent.document).text(parseInt($("#VJnotifycount", parent.document).text()) - 1);
$('#Notification .Messagetab a>span', window.document).html(parseInt($('#Notification .Messagetab a>span', window.document).html()) - 1);
$('.registerlink-notification > sup > strong', parent.document).text(parseInt($('#Notification .Messagetab a>span', window.document).html()) - 1);
$("#VJnotifycount", parent.document).text(data.data.NotifyCount);
$('#Notification .Messagetab a>span', window.document).html(data.data.NotificationsCount);
//Set notification count (My Account) block in edit mode
$(parent.document).find('.gjs-frame').contents().find('.registerlink-notification-profile sup strong').text(data.data.NotifyCount);

$(parent.document).find('.registerlink-notification span.badge').text(data.data.NotifyCount);
$(parent.document).find('.registerlink-notification-profile sup strong').text(data.data.NotifyCount);
//Set notification count in Mobile mode
$(parent.document).find('.mobile-registerbox-btn sup strong').text(data.data.NotifyCount);

$scope.Pipe_NotificationsPages($scope.NotificationsPagestableState);
}
});
Expand All @@ -58,9 +65,16 @@
if (isConfirm) {
common.webApi.post('Notification/DismissAll', '',).then(function (data) {
if (data.data.IsSuccess) {
$("#VJnotifycount", parent.document).text(parseInt($("#VJnotifycount", parent.document).text()) - data.data.TotalNotifications);
$('#Notification .Messagetab a>span', window.document).html(parseInt($('#Notification .Messagetab a>span', window.document).html()) - data.data.TotalNotifications);
$('.registerlink-notification > sup > strong', parent.document).text(parseInt($('#Notification .Messagetab a>span', window.document).html()) - data.data.TotalNotifications);
$("#VJnotifycount", parent.document).text(data.data.NotifyCount);
$('#Notification .Messagetab a>span', window.document).html(data.data.NotificationsCount);
//Set notification count (My Account) block in edit mode
$(parent.document).find('.gjs-frame').contents().find('.registerlink-notification-profile sup strong').text(data.data.NotifyCount);

$(parent.document).find('.registerlink-notification span.badge').text(data.data.NotifyCount);
$(parent.document).find('.registerlink-notification-profile sup strong').text(data.data.NotifyCount);
//Set notification count in Mobile mode
$(parent.document).find('.mobile-registerbox-btn sup strong').text(data.data.NotifyCount);

$scope.Pipe_NotificationsPages($scope.NotificationsPagestableState);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ private static EditorOptions DefaultSettings()
string url = "/api/vanjaro/";
if (HttpContext.Current != null)
{
var alias = PortalAliasController.Instance.GetPortalAliasesByPortalId(PortalSettings.Current.PortalId).OrderByDescending(a => a.IsPrimary).FirstOrDefault();
var alias = PortalAliasController.Instance.GetPortalAliasesByPortalId(PortalSettings.Current.PortalId).Where(x => x.CultureCode == PortalSettings.Current.CultureCode && x.IsPrimary).OrderByDescending(a => a.IsPrimary).FirstOrDefault();
if (alias == null)
alias = PortalAliasController.Instance.GetPortalAliasesByPortalId(PortalSettings.Current.PortalId).OrderByDescending(a => a.IsPrimary).FirstOrDefault();

var httpAlias = DotNetNuke.Common.Globals.AddHTTP(alias.HTTPAlias);
var originalUrl = HttpContext.Current.Items["UrlRewrite:OriginalUrl"];
httpAlias = DotNetNuke.Common.Globals.AddPort(httpAlias, originalUrl?.ToString().ToLowerInvariant() ?? httpAlias);
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using DotNetNuke.Services.Social.Messaging.Internal;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Services.Cache;
using DotNetNuke.Services.Social.Messaging.Internal;
using DotNetNuke.Services.Social.Notifications;
using System;
using System.Collections.Generic;
Expand All @@ -23,6 +26,11 @@ public static void Dismiss(int NotificationId, int UserID)
if (recipient != null)
{
NotificationsController.Instance.DeleteNotificationRecipient(NotificationId, UserID);

#region Clear Notification count cache
var cacheKey = string.Format(DataCache.UserNotificationsCountCacheKey, PortalSettings.Current.PortalId, UserID);
CachingProvider.Instance().Clear("Prefix", cacheKey);
#endregion
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ public static void ApplyingSettings(string Version)
}
}
break;
case "01.03.01":
{
HostController.Instance.Update("HostTitle", "Vanjaro");
}
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<HostFee></HostFee>
<HostPortalId>0</HostPortalId>
<HostSpace></HostSpace>
<HostTitle>DNN Corp</HostTitle>
<HostTitle>Vanjaro</HostTitle>
<HostURL>http://www.dnnsoftware.com</HostURL>
<HttpCompression>0</HttpCompression>
<HttpCompressionLevel>0</HttpCompressionLevel>
Expand Down
1 change: 1 addition & 0 deletions DesktopModules/Vanjaro/Core/Library/Vanjaro.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@
<Content Include="Themes\Basic\scss\Bootstrap\_utilities.scss" />
<Content Include="Themes\Basic\scss\Bootstrap\_variables.scss" />
<Content Include="Install\Core.01.02.00.SqlDataProvider" />
<Content Include="Install\Core.01.03.01.SqlDataProvider" />
<None Include="web.Debug.config">
<DependentUpon>web.config</DependentUpon>
</None>
Expand Down
7 changes: 6 additions & 1 deletion DesktopModules/Vanjaro/Core/Library/Vanjaro.dnn
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
<name>Core.01.02.00.SqlDataProvider</name>
<version>01.02.00</version>
</script>
<script type="Install">
<path>Install</path>
<name>Core.01.03.01.SqlDataProvider</name>
<version>01.03.01</version>
</script>
<script type="UnInstall">
<path>Install</path>
<name>Uninstall.Core.SqlDataProvider</name>
Expand Down Expand Up @@ -1205,7 +1210,7 @@
<attributes>
<businessControllerClass>Vanjaro.Core.Components.BusinessController, Vanjaro.Core</businessControllerClass>
<desktopModuleID>[DESKTOPMODULEID]</desktopModuleID>
<upgradeVersionsList>01.00.00,01.00.01,01.00.02,01.00.05,01.01.00,01.02.00</upgradeVersionsList>
<upgradeVersionsList>01.00.00,01.00.01,01.00.02,01.00.05,01.01.00,01.02.00,01.03.01</upgradeVersionsList>
</attributes>
</eventMessage>
</package>
Expand Down
7 changes: 6 additions & 1 deletion DesktopModules/Vanjaro/Core/Library/VanjaroDistribution.dnn
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
<name>Core.01.02.00.SqlDataProvider</name>
<version>01.02.00</version>
</script>
<script type="Install">
<path>Install</path>
<name>Core.01.03.01.SqlDataProvider</name>
<version>01.03.01</version>
</script>
<script type="UnInstall">
<path>Install</path>
<name>Uninstall.Core.SqlDataProvider</name>
Expand Down Expand Up @@ -1182,7 +1187,7 @@
<attributes>
<businessControllerClass>Vanjaro.Core.Components.BusinessController, Vanjaro.Core</businessControllerClass>
<desktopModuleID>[DESKTOPMODULEID]</desktopModuleID>
<upgradeVersionsList>01.00.00,01.00.01,01.00.05,01.01.00,01.02.00</upgradeVersionsList>
<upgradeVersionsList>01.00.00,01.00.01,01.00.05,01.01.00,01.02.00,01.03.01</upgradeVersionsList>
</attributes>
</eventMessage>
</package>
Expand Down
Loading

0 comments on commit bd7f768

Please sign in to comment.