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

Commit

Permalink
Fix delete share from My Account (clear metadata)
Browse files Browse the repository at this point in the history
Fix AjxpMailer : renamed recipent to recipient
Add tooltip on alerts list
Many css fixes
Disable bookmarklet action, never used
  • Loading branch information
cdujeu committed Mar 22, 2016
1 parent 931b83f commit fd3c7fd
Show file tree
Hide file tree
Showing 20 changed files with 133 additions and 50 deletions.
4 changes: 3 additions & 1 deletion core/src/core/classes/class.AJXP_XMLWriter.php
Expand Up @@ -707,12 +707,14 @@ public static function repositoryToXML($repoId, $repoObject, $exposed, $streams,
}
$isSharedString = "";
$currentUserIsOwner = false;
$ownerLabel = null;
if ($repoObject->hasOwner()) {
$uId = $repoObject->getOwner();
if(AuthService::usersEnabled() && AuthService::getLoggedUser()->getId() == $uId){
$currentUserIsOwner = true;
}
$label = ConfService::getUserPersonalParameter("USER_DISPLAY_NAME", $uId, "core.conf", $uId);
$ownerLabel = $label;
$isSharedString = 'owner="'.AJXP_Utils::xmlEntities($label).'"';
}
if ($repoObject->securityScope() == "USER" || $currentUserIsOwner){
Expand All @@ -722,7 +724,7 @@ public static function repositoryToXML($repoId, $repoObject, $exposed, $streams,
$descTag = "";
$public = false;
if(!empty($_SESSION["CURRENT_MINISITE"])) $public = true;
$description = $repoObject->getDescription($public);
$description = $repoObject->getDescription($public, $ownerLabel);
if (!empty($description)) {
$descTag = '<description>'.AJXP_Utils::xmlEntities($description, true).'</description>';
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.ajxp_conf/ajxp_confActions.xml
Expand Up @@ -265,8 +265,8 @@
</div>
<div id="driver_form" style="margin-top:32px;"></div>
<div class="dialogButtons" style="direction:rtl;">
<input type="image" src="AJXP_THEME_FOLDER/images/actions/22/forward.png" height="22" width="22" class="dialogButton" id="submit_create_repo" value="Next" class="button" onclick="return false;">
<input type="image" src="AJXP_THEME_FOLDER/images/actions/22/dialog_close.png" height="22" width="22" class="dialogButton" value="Cancel" class="button" onclick="hideLightBox();return false;">
<input type="submit" class="dialogButton" id="submit_create_repo" value="Next" class="button" onclick="return false;">
<input type="button" class="dialogButton" value="Cancel" class="button" onclick="hideLightBox();return false;">
</div>
</div>
]]></clientForm>
Expand Down
15 changes: 7 additions & 8 deletions core/src/plugins/access.ajxp_user/dashboard.css
Expand Up @@ -51,7 +51,7 @@


div#userdashboard_main_tab.horizontal_tabulator div.tabulatorContainer{
padding-top: 62px;
padding-top: 63px;
background-color: #444;
}

Expand All @@ -63,14 +63,13 @@ div#userdashboard_main_tab.horizontal_tabulator div.tabbed_editor{
div#userdashboard_myparams_title{
position: absolute;
color: #ffffff;
font-weight: normal;
padding: 22px;
height: 17px;
font-weight: 300;
padding: 25px 16px;
height: 63px;
font-size: 13px;
width: 196px;
left: 0;
background-color: #444;
letter-spacing: 1px;
width: 100%;
border-bottom: 1px solid rgba(255,255,255,0.15);
box-sizing: border-box;
}

div#userdashboard_myparams_title span#dash_title{
Expand Down
7 changes: 2 additions & 5 deletions core/src/plugins/access.ajxp_user/manifest.xml
Expand Up @@ -108,18 +108,15 @@
text-align: right;
}
.action_bar a{
background-color: #ffffff;
margin-top:3px;
cursor: pointer;
color: #555;
}
div.class-FetchedResultPane{
background-color: #f8f8f8;
}
.action_bar, #buttons_bar{
background-color: #ffffff;
background-color: #f8f8f8;
height: 32px;
border-bottom: 1px solid rgba(0,0,0,0.16);
border-bottom: 1px solid rgba(0,0,0,0.08);
padding:18px 14px 12px;
text-align: right;
}
Expand Down
6 changes: 4 additions & 2 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -659,9 +659,11 @@ public function switchAction($action, $httpVars, $fileVars)
case "unshare":

$mess = ConfService::getMessages();
$userSelection = new UserSelection($this->repository, $httpVars);
if(isSet($httpVars["hash"])){

$result = $this->getShareStore()->deleteShare($httpVars["element_type"], $httpVars["hash"]);
$sanitizedHash = AJXP_Utils::sanitize($httpVars["hash"], AJXP_SANITIZE_ALPHANUM);
$ajxpNode = ($userSelection->isEmpty() ? null : $userSelection->getUniqueNode());
$result = $this->getShareStore()->deleteShare($httpVars["element_type"], $sanitizedHash, false, false, $ajxpNode);
if($result !== false){
AJXP_XMLWriter::header();
AJXP_XMLWriter::sendMessage($mess["share_center.216"], null);
Expand Down
14 changes: 13 additions & 1 deletion core/src/plugins/action.share/class.ShareStore.php
Expand Up @@ -395,7 +395,7 @@ public function testUserCanEditShare($userId, $shareData){
* @throws Exception
* @return bool
*/
public function deleteShare($type, $element, $keepRepository = false, $ignoreRepoNotFound = false)
public function deleteShare($type, $element, $keepRepository = false, $ignoreRepoNotFound = false, $ajxpNode = null)
{
$mess = ConfService::getMessages();
AJXP_Logger::debug(__CLASS__, __FILE__, "Deleting shared element ".$type."-".$element);
Expand All @@ -420,6 +420,9 @@ public function deleteShare($type, $element, $keepRepository = false, $ignoreRep
throw new Exception($mess[427]);
}
}
if($ajxpNode != null){
$this->getMetaManager()->removeShareFromMeta($ajxpNode, $element);
}
if($this->sqlSupported){
if(isSet($share) && count($share)){
$this->confStorage->simpleStoreClear("share", $element);
Expand All @@ -428,6 +431,9 @@ public function deleteShare($type, $element, $keepRepository = false, $ignoreRep
if(count($shares)){
$keys = array_keys($shares);
$this->confStorage->simpleStoreClear("share", $keys[0]);
if($ajxpNode != null){
$this->getMetaManager()->removeShareFromMeta($ajxpNode, $keys[0]);
}
}
}
}
Expand Down Expand Up @@ -460,6 +466,12 @@ public function deleteShare($type, $element, $keepRepository = false, $ignoreRep
}else if($this->sqlSupported){
$this->confStorage->simpleStoreClear("share", $element);
}
if($ajxpNode !== null){
$this->getMetaManager()->removeShareFromMeta($ajxpNode, $element);
if(!$keepRepository){
$this->getMetaManager()->removeShareFromMeta($ajxpNode, $repoId);
}
}
} else if ($type == "user") {
$this->testUserCanEditShare($element, array());
AuthService::deleteUser($element);
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/react-share-form.css
Expand Up @@ -414,6 +414,7 @@ div#ajxp_shared_info_panel .copy-button {
border-radius: 0 2px 2px 0;
}
div#ajxp_shared_info_panel .copy-message {
padding-top: 5px;
text-align: center;
font-size: 13px;
}
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/action.share/res/react-share-form.less
Expand Up @@ -439,6 +439,7 @@ div#ajxp_shared_info_panel{
border-radius: 0 2px 2px 0;
}
.copy-message{
padding-top: 5px;
text-align: center;
font-size: 13px;
}
Expand Down
Expand Up @@ -729,6 +729,7 @@
params["hash"] = meta.get('shared_element_hash');
params["tmp_repository_id"] = meta.get('shared_element_parent_repository');
params["element_type"] = meta.get('share_type');
params["file"] = meta.get("original_path");
}else{
params["file"] = uniqueNode.getPath();
params["element_type"] = uniqueNode.isLeaf() ? "file" : meta.get("ajxp_shared_minisite")? "minisite" : "repository";
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/core.mailer/class.AjxpMailer.php
Expand Up @@ -96,7 +96,7 @@ public function mailConsumeQueue ($action, $httpVars, $fileVars) {
$useHtml = false;
}
$ajxpKey = $value["html"]."|".$ajxpAction."|".$ajxpAuthor."|".$ajxpContent;
$arrayResultsSQL[$value['recipent']][$ajxpNodeWorkspace][$ajxpKey][] = $ajxpNotification;
$arrayResultsSQL[$value['recipient']][$ajxpNodeWorkspace][$ajxpKey][] = $ajxpNotification;
}
//this $body must be here because we need this css
if($useHtml){
Expand Down Expand Up @@ -245,7 +245,7 @@ public function processNotification(AJXP_Notification &$notification)
}
foreach ($arrayRecipients as $recipient) {
try {
dibi::query("INSERT INTO [ajxp_mail_queue] ([recipent],[url],[date_event],[notification_object],[html]) VALUES (%s,%s,%s,%bin,%b) ",
dibi::query("INSERT INTO [ajxp_mail_queue] ([recipient],[url],[date_event],[notification_object],[html]) VALUES (%s,%s,%s,%bin,%b) ",
$recipient,
$notification->getNode()->getUrl(),
$nextFrequency,
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.notifications/manifest.xml
Expand Up @@ -139,7 +139,7 @@
id="navigation_alerts"
position="0"
type="ListProvider"
options='{"title":"notification_center.3", "titleClassName":"colorcode-alert", "startOpen":true, "dataModelBadge":{"property":"metadata","metadata_sum":"event_occurence", "className":"alerts_number_badge"}, "fit":"content","silentLoading":true,"actionBarGroups":["inline-notifications"],"nodeProviderProperties":{"get_action":"get_my_feed", "connexion_discrete":true, "format":"xml", "current_repository":"true", "feed_type":"alert", "merge_description":"false"},"reloadOnServerMessage":"tree/reload_user_feed", "connexion_discrete":true, "emptyChildrenMessage":"notification_center.8"}'/>
options='{"title":"notification_center.3", "titleClassName":"colorcode-alert", "startOpen":true, "dataModelBadge":{"property":"metadata","metadata_sum":"event_occurence", "className":"alerts_number_badge"}, "fit":"content","silentLoading":true,"actionBarGroups":["inline-notifications"],"nodeProviderProperties":{"get_action":"get_my_feed", "connexion_discrete":true, "format":"xml", "current_repository":"true", "feed_type":"alert", "merge_description":"false"},"reloadOnServerMessage":"tree/reload_user_feed", "connexion_discrete":true, "tipAttribute":"event_description_long", "emptyChildrenMessage":"notification_center.8"}'/>
</component_config>
</client_configs>
</registry_contributions>
Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/editor.eml/emlViewer.css
Expand Up @@ -23,6 +23,7 @@ div#emlHeaderContainer{
border-right-width: 0px;
font-family: Trebuchet MS,sans-serif;
font-size: 12px;
position: relative;
}

div#emlHeaderContainer #attachments_container{
Expand Down Expand Up @@ -91,5 +92,6 @@ div#treeSelectorCpContainer{
padding: 5px;
background-color: white;
top: 156px;
box-shadow: 1px 1px 4px #BBB;
box-shadow: 1px 1px 4px #BBB;
z-index: 200;
}
34 changes: 27 additions & 7 deletions core/src/plugins/editor.exif/manifest.xml
Expand Up @@ -14,19 +14,39 @@
<a href="#" onclick="return false;" class="icon-map-marker" id="gpsLocateButton"><img width="22" height="22" src="plugins/meta.exif/world.png" alt="AJXP_MESSAGE[meta.exif.2]" border="0"><br><span message_id="meta.exif.2">AJXP_MESSAGE[meta.exif.2]</span></a>
</div>
<style>
.ajxp_theme_orbit div#exifContainer {
background-color: #f5f5f5;
}
.ajxp_theme_orbit .exifSection {
width: 19%;
width: 20%;
float: left;
margin: 1% !important;
margin: 7px 4px 0 !important;
border: 0 !important;
background-color: #eee;
border-radius: 11px;
padding: 1%;
min-width: 250px;
box-shadow: 2px 2px 2px rgba(0,0,0,0.15);
background-color: #fff;
border-radius: 2px;
padding: 0;
min-width: 260px;
box-shadow: 0 0px 3px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.43);
height: 390px;
overflow: auto;
}
.ajxp_theme_orbit div#exifContainer .infoPanelTable{
margin:16px;
}
.ajxp_theme_orbit div#exifContainer .infoPanelValue{
color: rgba(0,0,0,0.76);
}
.ajxp_theme_orbit div#exifContainer .infoPanelLabel{
color: rgba(0,0,0,0.43);
padding: 10px 0 3px;
font-size: 13px;
}
#exifContainer .panelHeader.infoPanelGroup {
padding: 10px 16px;
background-color: rgb(107, 107, 107);
color: white;
font-size: 14px;
}
</style>
</div>
]]></clientForm>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.openlayer/manifest.xml
Expand Up @@ -36,7 +36,7 @@
<clientForm id="openlayer_box"><![CDATA[
<div id="openlayer_box" action="ol_view" box_width="80%" box_height="90%" box_padding="0">
<div class="action_bar full_width_action_bar" style="border-bottom:1px solid #DDDDDD;position:relative;right: 0;padding-left: 5px;">
<div id="filterButton" style="cursor:pointer;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background-color:#FFF8D1;border:1px solid #CCCCCC;padding:1px 5px;border-bottom:0px;position: absolute;right: 8px;bottom: 0px;"><b>AJXP_MESSAGE[openlayer.2]</b> <img width="10" height="6" border="0" src="AJXP_THEME_FOLDER/images/arrow_down.png" align="top" style="margin-left:3px;margin-top:5px"></div>
<div id="filterButton" style="font-size:12px;cursor:pointer;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background-color:#FFF8D1;border:1px solid #CCCCCC;padding:1px 5px;border-bottom:0px;position: absolute;right: 8px;bottom: 0px;"><b>AJXP_MESSAGE[openlayer.2]</b> <img width="10" height="6" border="0" src="AJXP_THEME_FOLDER/images/arrow_down.png" align="top" style="margin-left:3px;margin-top:5px"></div>
<div style="padding-top: 1px; padding-right: 5px; font-size:11px;position: absolute;bottom: 1px;right: 77px;height: 16px;">
<b>AJXP_MESSAGE[openlayer.3] :</b> <span id="location"></span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.other/manifest.xml
Expand Up @@ -20,7 +20,7 @@
<div id="editor_selector"></div>
<div class="dialogButtons">
<div id="clear_assoc_link">AJXP_MESSAGE[openother.5]</div>
<input type="image" name="close" src="AJXP_THEME_FOLDER/images/actions/22/dialog_close.png" height="22" width="22" title="OK" class="dialogButton"/>
<input type="submit" name="close" value="OK" class="dialogButton"/>
</div>
</div>
]]></clientForm>
Expand Down
12 changes: 12 additions & 0 deletions core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js
Expand Up @@ -252,13 +252,25 @@

var component;
if(this.state.componentLaunched){
var entryRenderFirstLine;
if(paneData.options['tipAttribute']){
entryRenderFirstLine = function(node){
var meta = node.getMetadata().get(paneData.options['tipAttribute']);
if(meta){
return <div title={meta.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?(\/)?>|<\/\w+>/gi, '')}>{node.getLabel()}</div>;
}else{
return node.getLabel();
}
};
}
component = (
<ReactPydio.NodeListCustomProvider
pydio={this.props.pydio}
ref={paneData.id}
title={title}
elementHeight={36}
heightAutoWithMax={4000}
entryRenderFirstLine={entryRenderFirstLine}
nodeClicked={this.props.nodeClicked}
presetDataModel={this.state.dataModel}
reloadOnServerMessage={paneData.options['reloadOnServerMessage']}
Expand Down
Expand Up @@ -28,7 +28,7 @@
}
a {
background: @white;
border-radius: 17px;
border-radius: 3px;
display: inline-block;
float: left;
font-size: 11px;
Expand Down Expand Up @@ -79,11 +79,26 @@
display: none;
}
a {
padding: 1px 8px 2px !important;
background-color: transparent;
padding: 3px 8px!important;
margin-top: 4px;
text-transform: uppercase;
margin-left: 2px;
transition: background-color 550ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
&:hover{
background-color: rgba(255, 255, 255, 0.65);
}
&.disabled:hover{
background-color: transparent;
}
}
&.icons_only a{
padding: 4px 8px!important;
font-size: 18px;
}
span.actionbar_button_label {
font-size: 11px !important;
font-weight: bold;
font-weight: 500;
font-family: @fontReact;
}
&.full_width_action_bar {
Expand Down Expand Up @@ -161,12 +176,15 @@
}
&.floatingBar {
background-color: #333333 !important;
border-radius: 5px;
border-radius: 3px;
cursor: move;
opacity: 0.90;
padding-left: 10px;
padding-right: 10px;
position: absolute;
a{
background-color: transparent !important;
}
a.separator {
border-right: 1px solid rgba(148, 148, 148, 1);
display: block !important;
Expand Down
Expand Up @@ -328,7 +328,6 @@ div.menu {
}
&.separator {
border-top: 1px solid fade(@menu_dark_items_color, 75%);
margin: 2px 0;
line-height: 1px !important;
height: 0 !important;
&.menuTitle{
Expand Down

0 comments on commit fd3c7fd

Please sign in to comment.