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

Commit

Permalink
Rewire the pushState router, by always passing a REBASE parameter. Fi…
Browse files Browse the repository at this point in the history
…x associated video URL.
  • Loading branch information
cdujeu committed Nov 15, 2014
1 parent c1f45a9 commit 57f30ad
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/editor.video/class.VideoPreviewer.js
Expand Up @@ -106,6 +106,9 @@ preload="auto" width="#{WIDTH}" height="#{HEIGHT}" data-setup="{}">\n\
}
if($$('base').length){
url = $$("base")[0].getAttribute("href");
if(!url.startsWith('http') && !url.startsWith('https')){
url = document.location.origin + url;
}
}

var html5proxies = $H({});
Expand Down
18 changes: 13 additions & 5 deletions core/src/plugins/gui.ajax/class.AJXP_ClientDriver.php
Expand Up @@ -141,13 +141,21 @@ public function switchAction($action, $httpVars, $fileVars)
}

$root = $_SERVER['REQUEST_URI'];
if(basename($root) == "dashboard" || basename($root) == "settings" || basename($root) == "welcome" || strpos(basename($root), "ws-") === 0){
$root = dirname($root);
$configUrl = ConfService::getCoreConf("SERVER_URL");
if(!empty($configUrl)){
$root = '/'.ltrim(parse_url($configUrl, PHP_URL_PATH), '/');
}else{
preg_match ('/ws-(\w)*\/|settings|dashboard|welcome/', $root, $matches, PREG_OFFSET_CAPTURE);
if(count($matches)){
$capture = $matches[0][1];
$root = substr($root, 0, $capture);
}
}
$START_PARAMETERS = array(
"BOOTER_URL"=>"index.php?get_action=get_boot_conf",
"MAIN_ELEMENT" => "ajxp_desktop",
"APPLICATION_ROOT" => $root
"BOOTER_URL" =>"index.php?get_action=get_boot_conf",
"MAIN_ELEMENT" => "ajxp_desktop",
"APPLICATION_ROOT" => $root,
"REBASE" => $root
);
if (AuthService::usersEnabled()) {
AuthService::preLogUser((isSet($httpVars["remote_session"])?$httpVars["remote_session"]:""));
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -135,12 +135,12 @@ Class.create("Ajaxplorer", {
var appRoot = ajxpBootstrap.parameters.get('APPLICATION_ROOT');
if(appRoot && appRoot != "/"){
Backbone.history.start({
pushState: false,
pushState: true,
root:appRoot
});
}else{
Backbone.history.start({
pushState: false
pushState: true
});
}
var navigate = function(repList, repId){
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer_boot.js

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions core/src/plugins/gui.ajax/res/js/lib/prototype/prototype.js
Expand Up @@ -2390,12 +2390,16 @@ Element.Methods = {
return styles.include('opacity') ?
element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
}
for (var property in styles)
if (property == 'opacity') element.setOpacity(styles[property]);
else
elementStyle[(property == 'float' || property == 'cssFloat') ?
(Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
property] = styles[property];
try{
for (var property in styles)
if (property == 'opacity') element.setOpacity(styles[property]);
else
elementStyle[(property == 'float' || property == 'cssFloat') ?
(Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
property] = styles[property];
}catch(invalid){
if(console) console.log('Invalid Styles', styles, element);
}

return element;
},
Expand Down Expand Up @@ -5752,7 +5756,9 @@ Form.EventObserver = Class.create(Abstract.EventObserver, {
if (document.createEvent)
element.dispatchEvent(event);
else
element.fireEvent(event.eventType, event);
try{
element.fireEvent(event.eventType, event);
}catch(unspec){}

return Event.extend(event);
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/gui.ajax/res/js/lib/prototype/splitter.js
Expand Up @@ -115,11 +115,12 @@ Class.create("Splitter", AjxpPane, {
if(!this.initBorderB) this.initBorderB = 0;

this.splitbar = new Element('div', {unselectable:'on'});
var zIndex = (this.options.invisibleBar?parseInt(this.group.getStyle('zIndex'))+1:'inherit') || '10000';
this.splitbar.addClassName(this.options.splitbarClass).setStyle({
position:'absolute',
cursor:this.options.cursor,
fontSize:'1px',
zIndex:(this.options.invisibleBar?parseInt(this.group.getStyle('zIndex'))+1:'inherit')
zIndex:zIndex
});
this.paneA.insert({after:this.splitbar});

Expand Down

0 comments on commit 57f30ad

Please sign in to comment.