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

Commit

Permalink
Fix mp3 player positioning in "open" mode.
Browse files Browse the repository at this point in the history
Fix mp3 playing in minisite_preview : wait for window.soundManager to be initialized.
Add logs in Share Center for creating/update shares
  • Loading branch information
cdujeu committed Sep 5, 2014
1 parent 569c50f commit 3f44e35
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
31 changes: 14 additions & 17 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -1378,15 +1378,13 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)

$httpVars["minisite"] = true;
$httpVars["selection"] = true;
$createRestDownloadLink = false;
if(!isSet($userSelection)){
$userSelection = new UserSelection($repository, $httpVars);
$setFilter = false;
if($userSelection->isUnique()){
$node = $userSelection->getUniqueNode($this->accessDriver);
$node->loadNodeInfo();
if($node->isLeaf()){
$createRestDownloadLink = true;
$setFilter = true;
$httpVars["file"] = "/";
}
Expand Down Expand Up @@ -1436,21 +1434,6 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)
if(AuthService::usersEnabled()){
$data["OWNER_ID"] = AuthService::getLoggedUser()->getId();
}
/*
if($createRestDownloadLink && !isSet($data["DIRECT_DOWNLOAD_LINK"])){
// BUILD DIRECT DOWNLOAD LINK ON REST API
// http://user:password@server/api/newrepositoryID/download/contentFilterPathForNode
$repoId = $newRepo->getUniqueId();
$credentials = $userId;
if(empty($httpVars["guest_user_pass"]) && isSet($userPass)){
$credentials.=":".$userPass;
}
$cFilter = $newRepo->getContentFilter();
$virtualPath = array_pop(array_values($cFilter->filters));
$data["DIRECT_DOWNLOAD_LINK"] = "/api/".$repoId."/download".$virtualPath;
$data["DIRECT_DOWNLOAD_LINK_CREDENTIALS"] = $credentials;
}
*/

if(!isSet($httpVars["repository_id"])){
try{
Expand All @@ -1459,6 +1442,13 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)
return $e->getMessage();
}
$url = $this->buildPublicletLink($hash);
$this->logInfo("New Share", array(
"file" => "'".$httpVars['file']."'",
"url" => $url,
"expiration" => $data['EXPIRE_TIME'],
"limit" => $data['DOWNLOAD_LIMIT'],
"repo_uuid" => $repository->uuid
));
AJXP_Controller::applyHook("node.share.create", array(
'type' => 'minisite',
'repository' => &$repository,
Expand All @@ -1483,6 +1473,13 @@ public function createSharedMinisite($httpVars, $repository, $accessDriver)
return $e->getMessage();
}
$url = $this->buildPublicletLink($hash);
$this->logInfo("Update Share", array(
"file" => "'".$httpVars['file']."'",
"url" => $url,
"expiration" => $data['EXPIRE_TIME'],
"limit" => $data['DOWNLOAD_LIMIT'],
"repo_uuid" => $repository->uuid
));
AJXP_Controller::applyHook("node.share.update", array(
'type' => 'minisite',
'repository' => &$repository,
Expand Down
5 changes: 5 additions & 0 deletions core/src/plugins/editor.soundmanager/sm_preview_player.css
Expand Up @@ -56,4 +56,9 @@

.volume_slider_active{
background-color: rgba(255,255,255,0.7);
}

#smplayer_editor div.smplayer_preview_element {
margin: 0 auto;
width: 242px;
}
8 changes: 8 additions & 0 deletions core/src/plugins/gui.ajax/manifest.xml
Expand Up @@ -572,6 +572,10 @@
}
var root = dm.getRootNode();
if(root.getChildren().length){
var first = root.getChildren().first();
if((first.getAjxpMime() == 'mp3' || first.getAjxpMime() == 'wav') && !(window.soundManager && window.soundManager.enabled)){
return;
}
dm.setSelectedNodes([root.getChildren().first()], "dataModel");
window.setTimeout(function(){ajaxplorer.actionBar.fireDefaultAction("file");}, 1);
p.stop();
Expand All @@ -593,6 +597,7 @@
}
#browser{
background-color: #000;
width:102%;
-webkit-font-smoothing: antialiased;
}
#cpane_container{
Expand Down Expand Up @@ -622,6 +627,9 @@
padding: 20px 10px;
border-radius: 5px;
}
div.widget_logo{
height: 75px;
}
div#widget_title{
color: rgba(255,255,255,0.8);
position: absolute;
Expand Down

0 comments on commit 3f44e35

Please sign in to comment.