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

Commit

Permalink
Update share info panel
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 24, 2014
1 parent 7b014e1 commit 3a0cf4e
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 33 deletions.
63 changes: 40 additions & 23 deletions core/src/plugins/action.share/class.ShareCenter.js
Expand Up @@ -675,7 +675,7 @@ Class.create("ShareCenter", {
},

loadInfoPanel : function(container, node){
container.down('#ajxp_shared_info_panel table').update('<div class="infoPanelRow">\
container.down('#ajxp_shared_info_panel .infoPanelTable').update('<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.55']+'</div>\
<div class="infoPanelValue"><span class="icon-spinner"></span></div>\
</div>\
Expand Down Expand Up @@ -717,7 +717,7 @@ Class.create("ShareCenter", {
}
}

container.down('#ajxp_shared_info_panel table').update('\
container.down('#ajxp_shared_info_panel .infoPanelTable').update('\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.59']+'</div>\
<div class="infoPanelValue"><textarea style="width:100%;height: 45px;" readonly="true">'+ jsonData.publiclet_link +'</textarea></div>\
Expand All @@ -735,44 +735,61 @@ Class.create("ShareCenter", {
');

if(linksCount > 1){
container.down('#ajxp_shared_info_panel table').insert({bottom:'<div class="infoPanelRow">\
container.down('#ajxp_shared_info_panel .infoPanelTable').insert({bottom:'<div class="infoPanelRow">\
<div class="infoPanelLabel" colspan="2" style="text-align: center;font-style: italic;">'+MessageHash['share_center.'+(linksCount>2?'104':'105')].replace('%s', linksCount-1)+'</div>\
</div>'});
}

}else{
var mainCont = container.down("#ajxp_shared_info_panel .infoPanelTable");
var entries = [];
$A(jsonData.entries).each(function(entry){
entries.push(entry.LABEL + ' ('+ entry.RIGHT +')');
});
var linkString = '';
if(jsonData.minisite){
linkString = '\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.62']+'</div>\
<div class="infoPanelValue"><textarea style="width:100%;height: 40px;" readonly="true">'+ jsonData.minisite.public_link +'</textarea></div>\
</div>\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.61']+'</div>\
<div class="infoPanelValue"><textarea style="width:100%;height: 80px;" id="embed_code" readonly="true"></textarea></div>\
</div>\
';
}
container.down('#ajxp_shared_info_panel table').update(linkString + '\

if(node.isLeaf()){
// LEAF SHARE
mainCont.update('<div class="share_info_panel_main_legend">'+MessageHash["share_center.140"]+'</div>');
mainCont.insert('<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.121']+'</div>\
<div class="infoPanelValue"><input type="text" class="share_info_panel_link" readonly="true" value="'+ jsonData.minisite.public_link +'"></div>\
</div>\
');

}else if(jsonData.minisite){
// MINISITE FOLDER SHARE
mainCont.update('<div class="share_info_panel_main_legend">'+MessageHash["share_center.138"]+'</div>');
// Label
/*
mainCont.insert('\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.35']+'</div>\
<div class="infoPanelValue">'+ jsonData.label +'</div>\
</div>\
<div class="infoPanelRow">\
</div>');
*/
// Links textearea
mainCont.insert('\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.62']+'</div>\
<div class="infoPanelValue"><input type="text" class="share_info_panel_link" readonly="true" value="'+ jsonData.minisite.public_link +'"></div>\
</div>\
<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.61']+'</div>\
<div class="infoPanelValue"><textarea style="padding: 4px;width:97%;height: 80px;" id="embed_code" readonly="true"></textarea></div>\
</div>\
');
mainCont.down("#embed_code").setValue("<iframe height='500' width='600' style='border:1px solid black;' src='"+jsonData.minisite.public_link+"'></iframe>");
}else{
// WORKSPACE FOLDER
mainCont.update('<div class="share_info_panel_main_legend">'+MessageHash["share_center.139"]+'</div>');
mainCont.insert('<div class="infoPanelRow">\
<div class="infoPanelLabel">'+MessageHash['share_center.54']+'</div>\
<div class="infoPanelValue">'+ entries.join(', ') +'</div>\
</div>\
');
if(jsonData.minisite){
container.down("#embed_code").setValue("<iframe height='500' width='600' style='border:1px solid black;' src='"+jsonData.minisite.public_link+"'></iframe>");
');
}
}
container.select("textarea").each(function(t){
mainCont.select('textarea,input').each(function(t){
t.observe("focus", function(e){ ajaxplorer.disableShortcuts();});
t.observe("blur", function(e){ ajaxplorer.enableShortcuts();});
t.observe("click", function(event){event.target.select();});
Expand Down
7 changes: 5 additions & 2 deletions core/src/plugins/action.share/manifest.xml
Expand Up @@ -560,8 +560,11 @@
</messages>
<html><![CDATA[
<div id="ajxp_shared_info_panel" data-infoPanelPosition="first">
<div class="panelHeader infoPanelGroup" colspan="2"><span class="icon-share" data-ajxpAction="share-edit-shared" title="AJXP_MESSAGE[share_center.55]"></span>#{type_string}</div>
<table class="infoPanelTable" cellspacing="0" border="0" cellpadding="0"></table>
<div class="panelHeader infoPanelGroup" colspan="2">
<span class="user_meta_change" style="display: none;" data-ajxpaction="share-edit-shared" >AJXP_MESSAGE[457]</span>
<span class="icon-share" data-ajxpAction="share-edit-shared" title="AJXP_MESSAGE[share_center.55]"></span>#{type_string}
</div>
<div class="infoPanelTable" cellspacing="0" border="0" cellpadding="0"></div>
</div>
]]></html>
</infoPanelExtension>
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/en.php
Expand Up @@ -56,7 +56,7 @@
"51"=> "Downloaded",
"52"=> "Configuration",
"53"=> "none",
"54"=> "With...",
"54"=> "Shared with...",
"55"=> "Shared...",
"56"=> "Configure sharing...",
"57"=> "times",
Expand Down Expand Up @@ -128,7 +128,7 @@
"118" => "Password-protected minisite",
"119" => "Download link",
"120" => "Simple download page",
"121" => "Web link",
"121" => "Public link",
"122" => "Create a public URL",
"123" => "Selection as minisite",
"124" => "Publish current selection",
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/fr.php
Expand Up @@ -55,7 +55,7 @@
"51"=> "Téléchargé",
"52"=> "Configuration",
"53"=> "non",
"54"=> "Avec...",
"54"=> "Partagé avec...",
"55"=> "Partagé...",
"56"=> "Configurer le partage...",
"57"=> "fois",
Expand Down Expand Up @@ -127,7 +127,7 @@
"118" => "Partager en tant que nouveau minisite",
"119" => "Lien de téléchargement (historique)",
"120" => "Page de téléchargement simple",
"121" => "Page de prévisualisation",
"121" => "Lien Public",
"122" => "Partage avec prévisualisation",
"123" => "Selection comme Minisite",
"124" => "Publier la sélection comme un minisite",
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.ajaxplorer/i18n/fr.php
Expand Up @@ -510,7 +510,7 @@
"454" => "Sélectionner des fichiers",
"455" => "Workspaces",
"456" => "Plus",
"457" => "m-à-j",
"457" => "modifier",
"458" => "supprimer",
"459" => "Répertoire principal",
"460" => "Détails",
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.mailer/AjxpMailer.css
Expand Up @@ -75,7 +75,7 @@
.mailer_tofield_line{
overflow-y: auto;
position: relative;
height: 25px;
height: 31px;
}

.mailer_tofield_line span.mailer_input_label{
Expand Down
17 changes: 17 additions & 0 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css
Expand Up @@ -4467,6 +4467,23 @@ div.autocomplete_readonly span.delete_user_entry{
max-width: 400px;
}

.share_info_panel_main_legend {
padding: 10px 0;
font-size: 1.5em;
color: #555;
line-height: 1.4em;
}

input.share_info_panel_link {
margin: 0;
width: 96%;
padding: 5px;
text-align: center;
font-size: 1em;
background-color: transparent;
border-color: #ccc;
}

#share_container{
clear: left;
width: 95%;
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/orbit/css/allz.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/plugins/meta.user/class.UserMetaManager.php
Expand Up @@ -62,7 +62,7 @@ public function initMeta($accessDriver)
if(!isSet($this->options["meta_visibility"])) $visibilities = array("visible");
else $visibilities = explode(",", $this->options["meta_visibility"]);
$cdataHead = '<div>
<div class="panelHeader infoPanelGroup" colspan="2"><span class="icon-edit" data-ajxpAction="edit_user_meta" title="AJXP_MESSAGE[meta.user.1]"></span><span class="user_meta_change" style="display: none;" data-ajxpAction="edit_user_meta" title="AJXP_MESSAGE[meta.user.1]">modifier</span>AJXP_MESSAGE[meta.user.1]</div>
<div class="panelHeader infoPanelGroup" colspan="2"><span class="icon-edit" data-ajxpAction="edit_user_meta" title="AJXP_MESSAGE[meta.user.1]"></span><span class="user_meta_change" style="display: none;" data-ajxpAction="edit_user_meta" title="AJXP_MESSAGE[meta.user.1]">AJXP_MESSAGE[457]</span>AJXP_MESSAGE[meta.user.1]</div>
';
$cdataFoot = '</div>';
$cdataParts = "";
Expand Down

0 comments on commit 3a0cf4e

Please sign in to comment.