@@ -33,6 +33,7 @@ namespace DotNetNuke.Framework
33
33
using DotNetNuke . UI ;
34
34
using DotNetNuke . UI . Internals ;
35
35
using DotNetNuke . UI . Modules ;
36
+ using DotNetNuke . UI . Skins ;
36
37
using DotNetNuke . UI . Skins . Controls ;
37
38
using DotNetNuke . UI . Utilities ;
38
39
using DotNetNuke . Web . Client ;
@@ -184,25 +185,7 @@ protected override void OnInit(EventArgs e)
184
185
// set global page settings
185
186
this . InitializePage ( ) ;
186
187
187
- // load skin control and register UI js
188
- UI . Skins . Skin ctlSkin ;
189
- if ( this . PortalSettings . EnablePopUps )
190
- {
191
- ctlSkin = UrlUtils . InPopUp ( ) ? UI . Skins . Skin . GetPopUpSkin ( this ) : UI . Skins . Skin . GetSkin ( this ) ;
192
-
193
- // register popup js
194
- JavaScript . RequestRegistration ( CommonJs . jQueryUI ) ;
195
-
196
- var popupFilePath = HttpContext . Current . IsDebuggingEnabled
197
- ? "~/js/Debug/dnn.modalpopup.js"
198
- : "~/js/dnn.modalpopup.js" ;
199
-
200
- ClientResourceManager . RegisterScript ( this , popupFilePath , FileOrder . Js . DnnModalPopup ) ;
201
- }
202
- else
203
- {
204
- ctlSkin = UI . Skins . Skin . GetSkin ( this ) ;
205
- }
188
+ var ctlSkin = this . GetSkin ( ) ;
206
189
207
190
// DataBind common paths for the client resource loader
208
191
this . ClientResourceLoader . DataBind ( ) ;
@@ -689,6 +672,31 @@ private void SetSkinDoctype()
689
672
this . attributeList . Text = this . HtmlAttributeList ;
690
673
}
691
674
675
+ private Skin GetSkin ( )
676
+ {
677
+ // We always want to the popup skin if we are in a popup
678
+ // even if we have popups disabled because we could be inside a PersonaBar iframe.
679
+ if ( UrlUtils . InPopUp ( ) )
680
+ {
681
+ this . LoadPopupScriptsIfNeeded ( ) ;
682
+ return Skin . GetPopUpSkin ( this ) ;
683
+ }
684
+
685
+ return Skin . GetSkin ( this ) ;
686
+ }
687
+
688
+ private void LoadPopupScriptsIfNeeded ( )
689
+ {
690
+ if ( this . PortalSettings . EnablePopUps )
691
+ {
692
+ JavaScript . RequestRegistration ( CommonJs . jQueryUI ) ;
693
+ var popupFilePath = HttpContext . Current . IsDebuggingEnabled
694
+ ? "~/js/Debug/dnn.modalpopup.js"
695
+ : "~/js/dnn.modalpopup.js" ;
696
+ ClientResourceManager . RegisterScript ( this , popupFilePath , FileOrder . Js . DnnModalPopup ) ;
697
+ }
698
+ }
699
+
692
700
private void ManageFavicon ( )
693
701
{
694
702
string headerLink = FavIcon . GetHeaderLink ( this . PortalSettings . PortalId ) ;
0 commit comments