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

Commit

Permalink
Browse files Browse the repository at this point in the history
Disable at last native autocompletion on share dialog, by removing na…
…me attribute.

Styling of the Minisite, customize Logo
Always sanitize user names as AJXP_SANITIZE_EMAILCHARS
Users dashboard, revert styling of FetchedResultPane, was ugly. To be improved still.
  • Loading branch information
cdujeu committed Jan 9, 2014
1 parent e8c4341 commit c29bf82
Show file tree
Hide file tree
Showing 46 changed files with 132 additions and 68 deletions.
25 changes: 0 additions & 25 deletions core/src/plugins/access.ajxp_user/manifest.xml
Expand Up @@ -57,31 +57,6 @@
.action_bar span.actionbar_button_label{
font-size: 11px;
}
.thumbnail_selectable_cell{
padding: 11px 2px;
}
.thumbLabel{
font-size: 18px;
}
.text_label{
padding-left: 0;
padding-right: 10px;
}
div.thumbnail_cell_metadata span.icon-angle-right{
display:none;
}
div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed div.thumbLabel{
padding-top:8px;
font-weight: bold;
}
.thumbnail_selectable_cell.detailed div.thumbnail_cell_metadata{
opacity: 1 !important;
}
div.thumbnail_cell_metadata .text_label{
font-size: 13px !important;
letter-spacing: 1px;
color: rgb(111, 121, 131);
}
</style>
]]></template_part>
<template_part ajxpId="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop", "fakeOptionUser":"true", "messageBoxReference":true}' theme="vision"><![CDATA[
Expand Down
17 changes: 16 additions & 1 deletion core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -750,6 +750,7 @@ public function initPublicFolder($downloadFolder)
$sLegend = $messages[20];

@copy($pDir."/res/dl.png", $downloadFolder."/dl.png");
@copy($pDir."/res/favi.png", $downloadFolder."/davi.png");
@copy($pDir."/res/grid_t.png", $downloadFolder."/grid_t.png");
@copy($pDir."/res/button_cancel.png", $downloadFolder."/button_cancel.png");
@copy(AJXP_INSTALL_PATH."/server/index.html", $downloadFolder."/index.html");
Expand Down Expand Up @@ -779,11 +780,21 @@ public static function loadMinisite($data)
{
$repository = $data["REPOSITORY"];
AJXP_PluginsService::getInstance()->initActivePlugins();
$shareCenter = AJXP_PluginsService::findPlugin("action", "share");
$confs = $shareCenter->getConfigs();
$minisiteLogo = "plugins/gui.ajax/PydioLogo250.png";
if(isSet($confs["CUSTOM_MINISITE_LOGO"])){
$minisiteLogo = "index_shared.php?get_action=get_global_binary_param&binary_id=". $confs["CUSTOM_MINISITE_LOGO"];
}
// UPDATE TEMPLATE
$html = file_get_contents(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/action.share/res/minisite.php");
AJXP_Controller::applyHook("tpl.filter_html", array(&$html));
$html = AJXP_XMLWriter::replaceAjxpXmlKeywords($html);
$html = str_replace("AJXP_MINISITE_LOGO", $minisiteLogo, $html);
$html = str_replace("AJXP_APPLICATION_TITLE", ConfService::getCoreConf("APPLICATION_TITLE"), $html);
$html = str_replace("AJXP_START_REPOSITORY", $repository, $html);
$html = str_replace("AJXP_REPOSITORY_LABEL", ConfService::getRepositoryById($repository)->getDisplay(), $html);

session_name("AjaXplorer_Shared");
session_start();
if (!empty($data["PRELOG_USER"])) {
Expand Down Expand Up @@ -1152,7 +1163,7 @@ public function createSharedRepository($httpVars, $repository, $accessDriver, $u
continue;
}
if ($eType == "user") {
$u = AJXP_Utils::decodeSecureMagic($httpVars["user_".$index], AJXP_SANITIZE_ALPHANUM);
$u = AJXP_Utils::decodeSecureMagic($httpVars["user_".$index], AJXP_SANITIZE_EMAILCHARS);
if (!AuthService::userExists($u) && !isSet($httpVars["user_pass_".$index])) {
$index++;
continue;
Expand Down Expand Up @@ -1321,6 +1332,10 @@ public function createSharedRepository($httpVars, $repository, $accessDriver, $u
$userObject->setParent($loggedUser->id);
$userObject->setGroupPath($loggedUser->getGroupPath());
$userObject->setProfile("shared");
if(isSet($httpVars["minisite"])){
$mess = ConfService::getMessages();
$userObject->personalRole->setParameterValue("core.conf", "USER_DISPLAY_NAME", "[".$mess["share_center.84"]."] ".$newRepo->getDisplay());
}
AJXP_Controller::applyHook("user.after_create", array($userObject));
}
// CREATE USER WITH NEW REPO RIGHTS
Expand Down
11 changes: 9 additions & 2 deletions core/src/plugins/action.share/manifest.xml
Expand Up @@ -60,6 +60,13 @@
<global_param name="CUSTOM_SHAREPAGE_BACKGROUND_ATTRIBUTES_3" group="CONF_MESSAGE[Page Background Images]" type="select"
choices="background-repeat:no-repeat;background-position:50% 50%;|Center in Page (no-repeat),background-repeat:repeat;background-size:100%;|Fetch Window (repeat vertically),background-repeat:no-repeat;background-size:100%; background-position:center center;|Fetch Window (no repeat),background-repeat:repeat;|Tile (repeat both directions)"
label="CONF_MESSAGE[Background Attributes(3)]" description="CONF_MESSAGE[Image used as a background]" mandatory="false" expose="true"/>
<global_param name="CUSTOM_MINISITE_LOGO" group="CONF_MESSAGE[Minisite]" type="image" label="CONF_MESSAGE[Minisite Logo]" description="CONF_MESSAGE[Top-right logo displayed on minisite page]" mandatory="false"
editable="true"
uploadAction="store_binary_temp"
loadAction="get_global_binary_param"
defaultImage="plugins/gui.ajax/PydioLogo250.png"
expose="true"
/>
</server_settings>
<client_settings>
<resources>
Expand Down Expand Up @@ -186,7 +193,7 @@
<span id="header_write" ajxp_message_id="share_center.32">AJXP_MESSAGE[share_center.32]</span>
<span id="header_watch" ajxp_message_id="share_center.33">AJXP_MESSAGE[share_center.33]</span>
</div>
<input type="text" class="dialogFocus" value="" style="width:98%;" placeholder="AJXP_MESSAGE[share_center.34]" name="shared_user" id="shared_user"/>
<input type="text" class="dialogFocus" value="" style="width:98%;" placeholder="AJXP_MESSAGE[share_center.34]" id="shared_user"/>
<div id="complete_indicator" style="position:absolute;top:25px;right:4px;display:none;"><img src="AJXP_THEME_FOLDER/images/autocompleter-loader.gif"></div>
<div id="shared_users_autocomplete_choices" class="autocomplete" style="margin-top:0px !important;z-index:20000 !important;"></div>
<div class="editable_users_list grey_gradient_light_inputs" id="shared_users_summary" style="margin-bottom:7px;">
Expand Down Expand Up @@ -332,7 +339,7 @@
<span id="header_write" ajxp_message_id="share_center.32">AJXP_MESSAGE[share_center.32]</span>
<span id="header_watch" ajxp_message_id="share_center.33">AJXP_MESSAGE[share_center.33]</span>
</div>
<input type="text" class="dialogFocus" value="" style="width:98%;" placeholder="AJXP_MESSAGE[share_center.34]" name="shared_user" id="shared_user"/>
<input type="text" class="dialogFocus" value="" style="width:98%;" placeholder="AJXP_MESSAGE[share_center.34]" id="shared_user"/>
<div id="complete_indicator" style="position:absolute;top:25px;right:4px;display:none;"><img src="AJXP_THEME_FOLDER/images/autocompleter-loader.gif"></div>
<div id="shared_users_autocomplete_choices" class="autocomplete" style="margin-top:0px !important;z-index:20000 !important;"></div>
<div class="editable_users_list grey_gradient_light_inputs" id="shared_users_summary" style="margin-bottom:7px;">
Expand Down
Binary file modified core/src/plugins/action.share/res/dl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/src/plugins/action.share/res/favi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/ca.php
Expand Up @@ -112,4 +112,5 @@
"108" => "Use a QRCode reader to scan the image ",
"80b"=> "Invite by email the selected users to visit this workspace",
"83b"=> "Toggle watch status to receive or not notifications when workspace is consulted",
"109" => "Minisite User",
);
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/de.php
Expand Up @@ -111,4 +111,5 @@
"108" => "Use a QRCode reader to scan the image ",
"80b"=> "Invite by email the selected users to visit this workspace",
"83b"=> "Toggle watch status to receive or not notifications when workspace is consulted",
"109" => "Minisite User",
);
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/en.php
Expand Up @@ -113,4 +113,5 @@
"108" => "Use a QRCode reader to scan the image ",
"80b"=> "Invite by email the selected users to visit this workspace",
"83b"=> "Toggle watch status to receive or not notifications when workspace is consulted",
"109" => "Minisite User",
);
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/es.php
Expand Up @@ -112,4 +112,5 @@
"108" => "Use a QRCode reader to scan the image ",
"80b"=> "Invite by email the selected users to visit this workspace",
"83b"=> "Toggle watch status to receive or not notifications when workspace is consulted",
"109" => "Minisite Usario",
);
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/fr.php
Expand Up @@ -113,4 +113,5 @@
"108" => "Utilisez un lecteur de QRCode pour scanner l'image ",
"80b"=> "Inviter les utilisateurs par email à visiter ce workspace",
"83b"=> "Changer le statut de surveillance pour recevoir ou non une alerte lorsque le workspace est consulté.",
"109" => "Utilisateur Minisite",
);
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/i18n/pt.php
Expand Up @@ -113,4 +113,5 @@
"108" => "Use a QRCode reader to scan the image ",
"80b"=> "Invite by email the selected users to visit this workspace",
"83b"=> "Toggle watch status to receive or not notifications when workspace is consulted",
"109" => "Minisite User",
);
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/minisite.php
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns:ajxp>
<head>
<title>Pydio</title>
<title>AJXP_APPLICATION_TITLE</title>
<base href="AJXP_PATH_TO_ROOT"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
Expand Down Expand Up @@ -29,7 +29,7 @@
}
.widget_logo {
background-image: url('plugins/gui.ajax/PydioLogo250.png');
background-image: url('AJXP_MINISITE_LOGO');
background-repeat: no-repeat;
background-position: right 5px;
background-size: 170px;
Expand Down
9 changes: 7 additions & 2 deletions core/src/plugins/action.share/res/public_links.php
@@ -1,6 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title><?php
if(!empty($CUSTOM_SHAREPAGE_TITLE)) echo(str_replace(array("AJXP_APPLICATION_TITLE","AJXP_FILENAME"), array(ConfService::getCoreConf("APPLICATION_TITLE"), $AJXP_LINK_BASENAME), $CUSTOM_SHAREPAGE_TITLE));
else echo sprintf($messages[1], ConfService::getCoreConf("APPLICATION_TITLE"))
?></title>
<link rel="icon" type="image/x-png" href="favi.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
* {
Expand All @@ -11,7 +16,7 @@
<?php if(!empty($CUSTOM_SHAREPAGE_TEXTSHADOW_COLOR)) echo "text-shadow: 0 1px 0 $CUSTOM_SHAREPAGE_TEXTSHADOW_COLOR;";?>
}
body{
background-image: url("grid_t.png");
/*background-image: url("grid_t.png");*/
<?php if(!empty($CUSTOM_SHAREPAGE_BACKGROUND_COLOR)) echo "background-color:$CUSTOM_SHAREPAGE_BACKGROUND_COLOR;";?>
}
h1 {
Expand All @@ -37,7 +42,7 @@
top: 0;
left: -15px;
border: 0px;
width: 226px;
width: 204px;
}
.link_w_pass{
position: absolute;
Expand Down
7 changes: 4 additions & 3 deletions core/src/plugins/boot.conf/class.BootConfLoader.php
Expand Up @@ -243,7 +243,7 @@ public function applyInstallerForm($action, $httpVars, $fileVars)
ConfService::setTmpStorageImplementations($newConfigPlugin, $newAuthPlugin);
require_once($newConfigPlugin->getUserClassFileName());

$adminLogin = $data["ADMIN_USER_LOGIN"];
$adminLogin = AJXP_Utils::sanitize($data["ADMIN_USER_LOGIN"], AJXP_SANITIZE_EMAILCHARS);
$adminName = $data["ADMIN_USER_NAME"];
$adminPass = $data["ADMIN_USER_PASS"];
$adminPass2 = $data["ADMIN_USER_PASS2"];
Expand All @@ -260,8 +260,9 @@ public function applyInstallerForm($action, $httpVars, $fileVars)
$pass2 = $data[str_replace("_LOGIN", "_PASS2", $loginP)];
$name = $data[str_replace("_LOGIN", "_NAME", $loginP)];
$mail = $data[str_replace("_LOGIN", "_MAIL", $loginP)];
AuthService::createUser($data[$loginP], $pass);
$uObj = $newConfigPlugin->createUserObject($data[$loginP]);
$saniLogin = AJXP_Utils::sanitize($data[$loginP], AJXP_SANITIZE_EMAILCHARS);
AuthService::createUser($saniLogin, $pass);
$uObj = $newConfigPlugin->createUserObject($saniLogin);
$uObj->personalRole->setParameterValue("core.conf", "email", $mail);
$uObj->personalRole->setParameterValue("core.conf", "USER_DISPLAY_NAME", $name);
AuthService::updateRole($uObj->personalRole);
Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/ca.php
Expand Up @@ -564,5 +564,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/cs.php
Expand Up @@ -562,5 +562,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/da.php
Expand Up @@ -567,5 +567,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/de.php
Expand Up @@ -566,5 +566,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
2 changes: 2 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/en.php
Expand Up @@ -564,4 +564,6 @@
"506"=> "Application parameters (users, workspaces, configurations)",
"507"=> "Welcome on %s",
"508"=> "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509"=> "Save the current users list as a personal team",
"510"=> "Please enter a team label"
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/es.php
Expand Up @@ -568,5 +568,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/et.php
Expand Up @@ -565,5 +565,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/eus.php
Expand Up @@ -563,6 +563,8 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/fi.php
Expand Up @@ -565,5 +565,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/fr.php
Expand Up @@ -564,5 +564,7 @@
"506" => "Paramètres de l'application (utilisateurs, workspaces, configurations)",
"507"=> "Bienvenue sur %s",
"508"=> "Je vous ai créé un compte sur %s. Pour vous connecter, veuillez cliquer sur le lien suivant %link, et utiliser ces identifiants: <br><br> Login: %user <br><br> Mot de passe: %pass",
"509" => "Sauver la sélection comme une équipe",
"510" => "Veuillez entrer un libellé",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/gr.php
Expand Up @@ -562,5 +562,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/he.php
Expand Up @@ -562,5 +562,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/hu.php
Expand Up @@ -567,5 +567,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/it.php
Expand Up @@ -582,5 +582,7 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* END SENTENCE */
);
);
4 changes: 3 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/ja.php
Expand Up @@ -567,6 +567,8 @@
"506" => "Application parameters (users, workspaces, configurations)",
"507" => "Welcome on %s",
"508" => "I just created an account for you on %s. To connect, please click on the following link %link and use these credentials: <br><br> Login: %user <br><br> Password: %pass",
"509" => "Save the current users list as a personal team",
"510" => "Please enter a team label",
/* 文章はここまで */
/* 文章終了 */
);
);

0 comments on commit c29bf82

Please sign in to comment.