Merge branch 'sfPassword' into ro

This commit is contained in:
yflory
2019-10-21 17:43:46 +02:00
27 changed files with 672 additions and 233 deletions

View File

@@ -548,6 +548,7 @@ define([
var sframeChan = common.getSframeChannel();
var changePwTitle = Messages.properties_changePassword;
var changePwConfirm = Messages.properties_confirmChange;
var isSharedFolder = parsed.type === 'drive';
if (!hasPassword) {
changePwTitle = Messages.properties_addPassword;
changePwConfirm = Messages.properties_confirmNew;
@@ -577,6 +578,7 @@ define([
password: newPass
}, function (err, data) {
if (err || data.error) {
console.error(err || data.error);
return void UI.alert(Messages.properties_passwordError);
}
UI.findOKButton().click();
@@ -589,7 +591,9 @@ define([
}, {force: true});
}
return void UI.alert(Messages.properties_passwordSuccess, function () {
common.gotoURL(hasPassword && newPass ? undefined : (data.href || data.roHref));
if (!isSharedFolder) {
common.gotoURL(hasPassword && newPass ? undefined : (data.href || data.roHref));
}
}, {force: true});
});
});
@@ -2564,7 +2568,7 @@ define([
'target': '_blank',
'rel': 'noopener',
'href': AppConfig.surveyURL,
'class': 'fa fa-graduation-cap'
'class': 'cp-toolbar-survey fa fa-graduation-cap'
},
content: h('span', Messages.survey)
});
@@ -2679,6 +2683,9 @@ define([
window.parent.location = origin+'/admin/';
}
});
$userAdmin.find('a.cp-toolbar-survey').click(function () {
Feedback.send('SURVEY_CLICKED');
});
$userAdmin.find('a.cp-toolbar-menu-profile').click(function () {
if (padType) {
window.open(origin+'/profile/');