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

Commit

Permalink
Fix mailer and various share strings. Hide "From" field.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 24, 2014
1 parent 3a0cf4e commit 1002beb
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 34 deletions.
20 changes: 14 additions & 6 deletions core/src/plugins/action.share/class.ShareCenter.js
Expand Up @@ -193,7 +193,7 @@ Class.create("ShareCenter", {
}else{
this.currentNode.getMetadata().set("ajxp_shared", "true");
ajaxplorer.fireNodeRefresh(this.currentNode);
ajaxplorer.displayMessage('SUCCESS', 'Created a new public folder at ' + response);
ajaxplorer.displayMessage('SUCCESS', MessageHash["share_center.156"].replace("%s", response));
oForm.down("#share_container").setValue(response);
this._currentRepositoryLink = response;
this._currentRepositoryLabel = oForm.down("#repo_label").getValue();
Expand Down Expand Up @@ -393,7 +393,7 @@ Class.create("ShareCenter", {
}

if(this.shareFolderMode != "workspace"){
this.updateDialogButtons(oForm.down('#share_result').down("div.SF_horizontal_fieldsRow"), oForm, "folder", json);
this.updateDialogButtons(oForm.down('#target_repository_toggle'), oForm, "folder", json);
}else{
var El = new Element('div', {className:"SF_horizontal_fieldsRow"}).update('<div class="SF_horizontal_actions SF_horizontal_pastilles" style="padding-top: 12px;padding-left: 7px;"></div>');
oForm.down("#shareDialogButtons").insert({top:El});
Expand Down Expand Up @@ -920,7 +920,7 @@ Class.create("ShareCenter", {
// WATCH BUTTON
if(ajaxplorer.hasPluginOfType("meta", "watch")){
var st = (shareType == "folder" ? MessageHash["share_center.38"] : MessageHash["share_center.39"]);
if(!dialogButtonsOrRow.down('#watch_folder')) {
if(!dialogButtonsOrRow.down('#watch_folder_eye')) {
dialogButtonsOrRow.down('.SF_horizontal_actions').insert({top:"<span class='icon-eye-close simple_tooltip_observer' id='watch_folder_eye' data-tooltipTitle='"+MessageHash["share_center."+(shareType=='folder'?'83b':'83')]+"'> "+MessageHash["share_center.82"]+"<input type='checkbox' id='watch_folder' style='display:none;'></span>"});
}
var folderEye = dialogButtonsOrRow.down('#watch_folder_eye');
Expand Down Expand Up @@ -995,17 +995,25 @@ Class.create("ShareCenter", {
link = dialogButtonsOrRow.down('[name="link_url"]').getValue();
message = s + "\n\n " + "<a href='"+link+"'>"+link+"</a>";
}else{
s = MessageHash["share_center.43"];
if(this.currentNode.isLeaf()){
s = MessageHash["share_center.42"]
}else{
s = MessageHash["share_center.43"];
}
if(s) s = s.replace("%s", ajaxplorer.appTitle);
link = this._currentRepositoryLink;
message = s + "\n\n " + "<a href='" + this._currentRepositoryLink+"'>" + MessageHash["share_center.46"].replace("%s1", this._currentRepositoryLabel).replace("%s2", ajaxplorer.appTitle) + "</a>";
if(this.shareFolderMode == 'workspace'){
message = s + "\n\n " + "<a href='" + link +"'>" + MessageHash["share_center.46"].replace("%s1", this._currentRepositoryLabel).replace("%s2", ajaxplorer.appTitle) + "</a>";
}else{
message = s + "\n\n " + "<a href='" + link +"'>" + MessageHash["share_center.46" + (this.currentNode.isLeaf()?'_file':'_mini')].replace("%s1", this._currentRepositoryLabel) + "</a>";
}
}
if(dialogButtonsOrRow.down('.share_qrcode') && dialogButtonsOrRow.down('.share_qrcode').visible() && dialogButtonsOrRow.down('.share_qrcode > img')){
message += "\n\n "+ MessageHash["share_center.108"] + "\n\n" + dialogButtonsOrRow.down('.share_qrcode').innerHTML;
}
var mailer = new AjxpMailer();
var usersList = null;
if(shareType == 'folder' && oForm) {
if(this.shareFolderMode == 'workspace' && oForm) {
usersList = oForm.down(".editable_users_list");
}
console.log(mailerShower);
Expand Down
8 changes: 4 additions & 4 deletions core/src/plugins/action.share/manifest.xml
Expand Up @@ -7,7 +7,7 @@
<global_param name="FILE_MAX_EXPIRATION" group="CONF_MESSAGE[Link Generation]" description="CONF_MESSAGE[Maximum share expiration limit for file, 0 = unlimited]" label="CONF_MESSAGE[Maximum file expiration limit]" type="integer" default="0" expose="true"/>
<global_param name="FILE_MAX_DOWNLOAD" group="CONF_MESSAGE[Link Generation]" description="CONF_MESSAGE[Maximum download limit for file, 0 = unlimited]" label="CONF_MESSAGE[Maximum file download limit]" type="integer" default="0" expose="true"/>
<global_param name="EMAIL_INVITE_EXTERNAL" group="CONF_MESSAGE[Link Generation]" description="CONF_MESSAGE[Use external mailer for invitations]" label="CONF_MESSAGE[Force External Mailer]" type="boolean" default="false" expose="true"/>
<global_param name="CREATE_QRCODE" group="CONF_MESSAGE[Link Generation]" description="CONF_MESSAGE[Create and display QRCode for shared link]" label="CONF_MESSAGE[Create QRCode]" type="boolean" default="true" expose="true"/>
<global_param name="CREATE_QRCODE" group="CONF_MESSAGE[Link Generation]" description="CONF_MESSAGE[Create and display QRCode for shared link]" label="CONF_MESSAGE[Create QRCode]" type="boolean" default="false" expose="true"/>
<global_param name="ENABLE_FOLDER_SHARING" group="CONF_MESSAGE[Folder Sharing]" description="CONF_MESSAGE[Enable folder sharing (workspace and minisite)]" label="CONF_MESSAGE[Enable folder sharing]" type="boolean" default="true" expose="true"/>
<global_param name="AVOID_SHARED_FOLDER_SAME_LABEL" group="CONF_MESSAGE[Folder Sharing]" description="CONF_MESSAGE[Disallow users to create shared folders if a workspace already exists with the same label]" label="CONF_MESSAGE[Avoid labels duplication]" type="boolean" default="false"/>
<global_param name="SHARED_USERS_TMP_PREFIX" group="CONF_MESSAGE[Shared users configurations]" description="CONF_MESSAGE[Mandatory prefix for users created temporary users login]" label="CONF_MESSAGE[Tmp users prefix]" type="string" expose="true"/>
Expand Down Expand Up @@ -167,13 +167,13 @@
<span class="mode-ws no_share_leaf">AJXP_MESSAGE[share_center.139]</span>
<span class="mode-minipub only_share_leaf">AJXP_MESSAGE[share_center.140]</span>
<a><span class="params_view">AJXP_MESSAGE[share_center.141]</span><span class="params_hide">AJXP_MESSAGE[share_center.142]</span></a>
<div class="SF_horizontal_actions SF_horizontal_pastilles"></div>
</div>
<div style="display:none;position:relative;margin:10px;min-height:85px;" id="share_result" class="">
<div class="dialogContentMainTitle" style="margin-bottom: 5px;" ajxp_message_id="share_center.29">AJXP_MESSAGE[share_center.29]</div>
<div id="generate_indicator" style="position:absolute;top:2px;right:4px;display:none;"><img src="AJXP_THEME_FOLDER/images/autocompleter-loader.gif"></div>
<div class="SF_horizontal_fieldsRow">
<div class="SF_horizontal_actions SF_horizontal_pastilles"></div>
<input type="text" id="share_container" style="clear:left; width: 95%; margin:0 5px; font-size:13px;"/>
<input type="text" id="share_container" style="clear:left; width: 95%; margin:15px 5px 0; font-size:13px;"/>
<div class="non_macos">AJXP_MESSAGE[share_center.143]</div>
<div class="macos_only" style="display:none;">AJXP_MESSAGE[share_center.144]</div>
<div class="share_qrcode" style="margin-top:5px; clear:left; display:none;"></div>
Expand Down Expand Up @@ -225,7 +225,7 @@
<div class="largeButton">AJXP_MESSAGE[share_center.152]</div>
</div>
</div>
<div id="target_user" style="margin:0 5px;position:relative;display:none;" class="mode-ws mode-minipriv">
<div id="target_user" style="margin:0 12px;position:relative;display:none;" class="mode-ws mode-minipriv">
<div class="dialogContentMainTitle mode-ws" ajxp_message_id="share_center.30" style="display:none;">AJXP_MESSAGE[share_center.30]</div>
<div style="clear: both; margin-top:20px;" class="mode-minipriv">&nbsp;</div>
<div class="editable_users_header">
Expand Down
5 changes: 3 additions & 2 deletions core/src/plugins/action.share/res/i18n/ca.php
Expand Up @@ -149,8 +149,8 @@
"140" => "You have shared this file via a public link",
"141" => "Change parameters",
"142" => "Hide parameters",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the url to your clipboard",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the url to your clipboard",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the link",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the link",
"145" => "Description",
"146" => "Will be displayed to the shared users",
"147" => "Security",
Expand All @@ -162,4 +162,5 @@
"153" => "Standard (file list with application header)",
"154" => "Film Strip (good for image galleries)",
"155" => "Embedded (smaller header, for widgets)",
"156" => "Successfully published link %s",
);
5 changes: 3 additions & 2 deletions core/src/plugins/action.share/res/i18n/de.php
Expand Up @@ -148,8 +148,8 @@
"140" => "You have shared this file via a public link",
"141" => "Change parameters",
"142" => "Hide parameters",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the url to your clipboard",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the url to your clipboard",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the link",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the link",
"145" => "Description",
"146" => "Will be displayed to the shared users",
"147" => "Security",
Expand All @@ -161,4 +161,5 @@
"153" => "Standard (file list with application header)",
"154" => "Film Strip (good for image galleries)",
"155" => "Embedded (smaller header, for widgets)",
"156" => "Successfully published link %s",
);
11 changes: 7 additions & 4 deletions core/src/plugins/action.share/res/i18n/en.php
Expand Up @@ -23,7 +23,7 @@
"18"=> "Folder is shared as a new workspace",
"19"=> "Shared workspace options were successfully modified",
"20"=> "Ooops, the file you required could not be found! Maybe it was deleted or it is not shared with you anymore.",
"21"=> "Expire after (days)",
"21"=> "Expire in (days)",
"22"=> "Allowed Downloads",
"23"=> "Password",
"24"=> "Set expiration limits and define a password to access the file, then click on the <span class=\"icon-plus-sign\"></span> sign to generate web link. You can generate many links to send them to different people.",
Expand All @@ -44,11 +44,13 @@
"39"=> "Watch this file activity",
"40"=> "Invitations",
"41"=> "Send invitations by email to the users you have shared this item with.",
"42"=> "A user of %s is sharing a link with you",
"42"=> "A user of %s is sharing a file with you",
"43"=> "A user of %s is sharing a folder with you",
"44"=> "%s Share",
"45"=> "Send Invitation",
"46"=> "Open workspace %s1 directly in %s2",
"46_mini"=> "Open mini %s1",
"46_file"=> "Open file %s1",
"47"=> "Successfully updated watch status",
"48"=> "You are not allowed to access this data",
"49"=> "create user",
Expand Down Expand Up @@ -150,8 +152,8 @@
"140" => "You have shared this file via a public link",
"141" => "Change parameters",
"142" => "Hide parameters",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the url to your clipboard",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the url to your clipboard",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the link",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the link",
"145" => "Description",
"146" => "Will be displayed to the shared users",
"147" => "Security",
Expand All @@ -163,4 +165,5 @@
"153" => "Standard (file list with application header)",
"154" => "Film Strip (good for image galleries)",
"155" => "Embedded (smaller header, for widgets)",
"156" => "Successfully published link %s",
);
5 changes: 3 additions & 2 deletions core/src/plugins/action.share/res/i18n/es.php
Expand Up @@ -149,8 +149,8 @@
"140" => "You have shared this file via a public link",
"141" => "Change parameters",
"142" => "Hide parameters",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the url to your clipboard",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the url to your clipboard",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the link",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the link",
"145" => "Description",
"146" => "Will be displayed to the shared users",
"147" => "Security",
Expand All @@ -162,4 +162,5 @@
"153" => "Standard (file list with application header)",
"154" => "Film Strip (good for image galleries)",
"155" => "Embedded (smaller header, for widgets)",
"156" => "Successfully published link %s",
);
15 changes: 9 additions & 6 deletions core/src/plugins/action.share/res/i18n/fr.php
Expand Up @@ -22,7 +22,7 @@
"18"=> "Le répertoire a été partagé comme un nouveau dépôt",
"19"=> "Les options de partage ont été modifiées avec succès",
"20"=> "Ouups, le fichier que vous recherchez n'a pas été trouvé! Peut-être n'est il plus partagé avec vous?",
"21"=> "Expire après (jours)",
"21"=> "Expire dans (jours)",
"22"=> "Downloads autorisés",
"23"=> "Mot de passe",
"24"=> "Fixer les limites et mot de passe optionnels, puis cliquer sur le bouton <span class=\"icon-plus-sign\"></span> pour générer le weblien. Vous pouvez générer plusieurs liens pour un même fichier.",
Expand All @@ -43,11 +43,13 @@
"39"=> "Surveiller l'activité sur ce fichier",
"40"=> "Invitations",
"41"=> "Envoyer des invitations par email aux utilisateurs avec qui vous partagez le fichier",
"42"=> "Un utilisateur de %s partage un lien avec vous",
"43"=> "Un utilisateur de %s vous invite à partager un dossier",
"42"=> "Un utilisateur de %s a partagé un fichier avec vous",
"43"=> "Un utilisateur de %s a partagé un dossier avec vous",
"44"=> "Partage %s",
"45"=> "Envoyer l'invitation",
"46"=> "Ouvrir le dépôt %s1 directement dans %s2",
"46"=> "Ouvrir le dépôt <b>%s1</b> directement dans %s2",
"46_mini"=> "Ouvrir le minisite <b>%s1</b>",
"46_file"=> "Ouvrir le fichier <b>%s1</b>",
"47"=> "Le statut de surveillance a été changé",
"48"=> "Vous n'êtes pas autorisé à accéder à cette donnée.",
"49"=> "créer l'utilisateur",
Expand Down Expand Up @@ -149,8 +151,8 @@
"140" => "Vous avez partagé ce fichier via un lien public.",
"141" => "Changer les paramètres",
"142" => "Cacher les paramètres",
"143" => "Utilisez <kbd>Ctrl</kbd>+<kbd>C</kbd> pour copier l'adresse dans votre presse-papiers",
"144" => "Utilisez <kbd>&#8984;</kbd>+<kbd>C</kbd> pour copier l'adresse dans votre presse-papiers",
"143" => "Utilisez <kbd>Ctrl</kbd>+<kbd>C</kbd> pour copier l'adresse",
"144" => "Utilisez <kbd>&#8984;</kbd>+<kbd>C</kbd> pour copier l'adresse",
"145" => "Description",
"146" => "Sera affichée aux utilisateurs",
"147" => "Sécurité",
Expand All @@ -162,5 +164,6 @@
"153" => "Standard (liste de fichiers avec header)",
"154" => "Pellicule (pour galleries de photos)",
"155" => "Minimal (header plus petit, pour un widget)",
"156" => "Le lien %s a été publié",
// will be replaced by the filename to download
);
5 changes: 3 additions & 2 deletions core/src/plugins/action.share/res/i18n/pt.php
Expand Up @@ -149,8 +149,8 @@
"140" => "You have shared this file via a public link",
"141" => "Change parameters",
"142" => "Hide parameters",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the url to your clipboard",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the url to your clipboard",
"143" => "Use <kbd>Ctrl</kbd>+<kbd>C</kbd>to copy the link",
"144" => "Use <kbd>&#8984;</kbd>+<kbd>C</kbd> to copy the link",
"145" => "Description",
"146" => "Will be displayed to the shared users",
"147" => "Security",
Expand All @@ -162,5 +162,6 @@
"153" => "Standard (file list with application header)",
"154" => "Film Strip (good for image galleries)",
"155" => "Embedded (smaller header, for widgets)",
"156" => "Successfully published link %s",
// will be replaced by the filename to download
);
2 changes: 1 addition & 1 deletion core/src/plugins/core.mailer/AjxpMailer.css
Expand Up @@ -60,7 +60,7 @@
.mailer_input_line span.user{
display: inline-block;
padding: 4px;
background-color: #aaa;
background-color: #555;
border-radius: 4px;
color: white;
margin: 1px 3px;
Expand Down
6 changes: 3 additions & 3 deletions core/src/plugins/core.mailer/class.AjxpMailer.js
Expand Up @@ -56,9 +56,9 @@ Class.create("AjxpMailer", {
}
var fromString = ajaxplorer.user.id;
$("mailer_message").update("<div id='mailer_message' style='position: relative;'><div id='emails_autocomplete' style='position:absolute;z-index:1200;'></div><div class='message_body'><form>" +
"<div class='grey_gradient_light_inputs mailer_input_line'><span class='mailer_input_label'>From:</span><input class='mailer_input_field' type='text' name='from' value='"+fromString+"'/></div>" +
"<div class='grey_gradient_light_inputs mailer_input_line mailer_tofield_line'><span class='mailer_input_label' style='float: left;'>To:</span><input class='mailer_input_field' type='text' name='to' id='tofield' value=''/></div>" +
"<div class='grey_gradient_light_inputs mailer_input_line'><span class='mailer_input_label'>Subject:</span><input class='mailer_input_field' type='text' name='subject' value='"+subject+"'/></div>" +
"<div class='grey_gradient_light_inputs mailer_input_line' style='display: none;'><span class='mailer_input_label'>"+MessageHash['core.mailer.4']+":</span><input class='mailer_input_field' type='text' name='from' value='"+fromString+"'/></div>" +
"<div class='grey_gradient_light_inputs mailer_input_line mailer_tofield_line'><span class='mailer_input_label' style='float: left;'>"+MessageHash['core.mailer.5']+":</span><input placeholder='"+MessageHash['core.mailer.8']+"' class='mailer_input_field' type='text' name='to' id='tofield' value=''/></div>" +
"<div class='grey_gradient_light_inputs mailer_input_line'><span class='mailer_input_label'>"+MessageHash['core.mailer.6']+":</span><input class='mailer_input_field' type='text' name='subject' value='"+subject+"'/></div>" +
"<textarea name='message' class='grey_gradient_light_inputs'>"+body+"</textarea>" +
"</form></div></div>");
if(paneTitle){
Expand Down
5 changes: 5 additions & 0 deletions core/src/plugins/core.mailer/i18n/en.php
Expand Up @@ -22,4 +22,9 @@
"1" => "Email successfully sent to %s user(s)",
"2" => "No address found to send the email!",
"3" => "No mailer configured to send emails, contact your administrator",
"4" => "From",
"5" => "To",
"6" => "Subject",
"7" => "Message",
"8" => "User or email",
);
5 changes: 5 additions & 0 deletions core/src/plugins/core.mailer/i18n/fr.php
Expand Up @@ -22,4 +22,9 @@
"1" => "L'email a été envoyé avec succès à %s utilisateur(s)",
"2" => "Impossible de trouver une adresse pour envoyer le mail!",
"3" => "Pas d'extension trouvée pour envoyer des mails, contactez votre administrateur",
"4" => "De",
"5" => "A",
"6" => "Sujet",
"7" => "Message",
"8" => "Utilisateur ou email",
);
5 changes: 5 additions & 0 deletions core/src/plugins/core.mailer/i18n/pt.php
Expand Up @@ -22,4 +22,9 @@
"1" => "E-mail enviado com sucesso para %s ",
"2" => "Endereço de e-mail do destinatário não existente!",
"3" => "Não existe um serviço de e-mails configurado, por favor contacte o seu administrador",
"4" => "From",
"5" => "To",
"6" => "Subject",
"7" => "Message",
"8" => "User or email",
);

0 comments on commit 1002beb

Please sign in to comment.