point to homepage in drive

pull/1/head
Pierre Bondoerffer 7 years ago
parent 9dce40f3af
commit baf64114a6
No known key found for this signature in database
GPG Key ID: C0C7C0C5063F2236

@ -611,6 +611,7 @@ define(function () {
out.header_support = '<a href="http://ng.open-paas.org/" title="OpenPaaS::ng" target="_blank" rel="noopener noreferrer"> <img src="/customize/openpaasng.png" alt="OpenPaaS-ng" class="bottom-bar-openpaas" /></a>';
out.updated_0_header_logoTitle = 'Go to your CryptDrive';
out.header_logoTitle = out.updated_0_header_logoTitle;
out.header_homeTitle = 'Go to CryptPad homepage';
// Initial states

@ -624,9 +624,14 @@ define([
}).appendTo(toolbar.$top);
// We need to override the "a" tag action here because it is inside the iframe!
var inDrive = /^\/drive/;
var href = inDrive ? '/index.html' : '/drive/';
var buttonTitle = inDrive ? Messages.header_homeTitle : Messages.header_logoTitle;
var $aTag = $('<a>', {
href: "/drive/",
title: Messages.header_logoTitle,
href: href,
title: buttonTitle,
'class': "cryptpad-logo"
}).append($('<img>', {
src: '/customize/images/logo_white.png'
@ -634,10 +639,10 @@ define([
var onClick = function (e) {
e.preventDefault();
if (e.ctrlKey) {
window.open('/drive/');
window.open(href);
return;
}
window.location = "/drive/";
window.location = href;
};
var onContext = function (e) { e.stopPropagation(); };

Loading…
Cancel
Save