Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 7c86d43

Browse files
committed
HTML Base Tag is not correctly applied in IE10 when dynamically inserting "link". Add an data-hrefRebase tag to be processed (prepending the base) on ie10 only.
1 parent 0cbf379 commit 7c86d43

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

core/src/plugins/gui.ajax/manifest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@
554554
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"thumb", "fixedDisplayMode":"thumb", "fixedThumbSize":60,"replaceScroller":false, "horizontalScroll":true, "messageBoxReference":true, "fit":"content", "fitParent":"cpane_container", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px", "invisibleSelection":false}'></div>
555555
</div>
556556
</div>
557-
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
557+
<link rel="stylesheet" data-hrefRebase="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
558558
<script>
559559
document.observe("ajaxplorer:afterApply-login", function(){
560560
AjxpPane.prototype.staticApplyBackgroundFromConfigs($("overlay"), "gui.ajax/CUSTOM_SHAREPAGE_BACKGROUND_", "display:block;", true);
@@ -681,7 +681,7 @@
681681
<div id="cpane_tabs" ajxpClass="AjxpTabulator" ajxpOptions='{"fit":"height", "fitParent":"cpane_container","registerAsEditorOpener":true, "saveState":false, "defaultTabId": "","tabInfos" : [], "uniqueTab":true}'></div>
682682
</div>
683683
</div>
684-
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
684+
<link rel="stylesheet" data-hrefRebase="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
685685
<script>
686686
document.observe("ajaxplorer:afterApply-login", function(){
687687
AjxpPane.prototype.staticApplyBackgroundFromConfigs($("overlay"), "gui.ajax/CUSTOM_SHAREPAGE_BACKGROUND_", "display:block;", true);
@@ -798,7 +798,7 @@
798798
<div id="share_toolbar" ajxpClass="ActionsToolbar" ajxpOptions='{"toolbarsList":["minisite-share-actions"], "skipCarousel":true}'></div>
799799
</div>
800800
</div>
801-
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
801+
<link rel="stylesheet" data-hrefRebase="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
802802
<script>
803803
document.observe("ajaxplorer:user_logged", function(){
804804
try{
@@ -831,7 +831,7 @@
831831
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"detail", "detailThumbSize": 50 ,"replaceScroller":true, "messageBoxReference":true, "fit":"height", "fitParent":"cpane_container", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px", "invisibleSelection":false}' style="border: 1px solid #bbb; border-width:0 1px;"></div>
832832
<div id="logo_widget" class="widget_logo" ajxpClass="LogoWidget" ajxpOptions='{"imageParameter":"gui.ajax/CUSTOM_MINISITE_LOGO"}'></div>
833833
</div>
834-
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
834+
<link rel="stylesheet" data-hrefRebase="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
835835
<style>img.custom_logo_image{ width: auto; height: 85px !important; top: inherit !important; bottom: 25px; } #cpane_container{left:0;} div#overlay.form-login_form_dynamic { opacity: 1; }</style>
836836
<script>
837837
document.observe("ajaxplorer:afterApply-login", function(){
@@ -848,7 +848,7 @@
848848
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"detail", "detailThumbSize": 50 ,"replaceScroller":true, "messageBoxReference":true, "fit":"height", "fitParent":"cpane_container", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px", "invisibleSelection":false}' style="border: 1px solid #bbb; border-width:0 1px;"></div>
849849
<div id="logo_widget" class="widget_logo" ajxpClass="LogoWidget" ajxpOptions='{"imageParameter":"gui.ajax/CUSTOM_MINISITE_LOGO"}'></div>
850850
</div>
851-
<link rel="stylesheet" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
851+
<link rel="stylesheet" data-hrefRebase="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css" href="plugins/gui.ajax/res/themes/orbit/css/fontfaces.css"/>
852852
<style>img.custom_logo_image{ width: auto; right: 6px !important; left: inherit !important; height: 87px !important; bottom: 3px; top: inherit !important; } div#overlay.form-login_form_dynamic { opacity: 1; }</style>
853853
<script>
854854
document.observe("ajaxplorer:afterApply-login", function(){

core/src/plugins/gui.ajax/res/js/ui/prototype/class.PydioUI.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,17 @@ Class.create("PydioUI", {
326326
return requiredClasses;
327327
},
328328

329+
updateHrefBase: function(cdataContent){
330+
if(!Prototype.Browser.IE10){
331+
return cdataContent;
332+
}
333+
var base = $$('base')[0].getAttribute("href");
334+
if(!base){
335+
return cdataContent;
336+
}
337+
return cdataContent.replace('data-hrefRebase="', 'href="'+base);
338+
},
339+
329340
/**
330341
* Parses a client_configs/template_part node
331342
*/
@@ -355,6 +366,7 @@ Class.create("PydioUI", {
355366
var cdataContent = "";
356367
if(parts[i].firstChild && parts[i].firstChild.nodeType == 4 && parts[i].firstChild.nodeValue != ""){
357368
cdataContent = parts[i].firstChild.nodeValue;
369+
cdataContent = this.updateHrefBase(cdataContent);
358370
}
359371
if(ajxpId){
360372
toUpdate[ajxpId] = [ajxpClassName, ajxpOptionsString, cdataContent];
@@ -530,7 +542,7 @@ Class.create("PydioUI", {
530542
else target = $$(target)[0];
531543
if(passedTarget) target = passedTarget;
532544
var position = tNodes[i].getAttribute("position");
533-
var obj = {}; obj[position] = tNodes[i].firstChild.nodeValue;
545+
var obj = {}; obj[position] = this.updateHrefBase(tNodes[i].firstChild.nodeValue);
534546
target.insert(obj);
535547
obj[position].evalScripts();
536548
}

0 commit comments

Comments
 (0)