Merge branch 'staging' of git://github.com/pbondoer/cryptpad into staging
This commit is contained in:
@@ -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.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.updated_0_header_logoTitle = 'Go to your CryptDrive';
|
||||||
out.header_logoTitle = out.updated_0_header_logoTitle;
|
out.header_logoTitle = out.updated_0_header_logoTitle;
|
||||||
|
out.header_homeTitle = 'Go to CryptPad homepage';
|
||||||
|
|
||||||
// Initial states
|
// Initial states
|
||||||
|
|
||||||
|
|||||||
@@ -388,24 +388,32 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
// add the splitter
|
// add the splitter
|
||||||
var splitter = $('<div>', {
|
if (!$iframe.has('.cp-splitter').length) {
|
||||||
'class': 'cp-splitter'
|
var $preview = $iframe.find('#previewContainer');
|
||||||
}).appendTo($iframe.find('#previewContainer'));
|
var splitter = $('<div>', {
|
||||||
|
'class': 'cp-splitter'
|
||||||
|
}).appendTo($preview);
|
||||||
|
|
||||||
var $target = $iframe.find('.CodeMirror');
|
$preview.on('scroll', function() {
|
||||||
splitter.on('mousedown', function (e) {
|
splitter.css('top', $preview.scrollTop() + 'px');
|
||||||
e.preventDefault();
|
|
||||||
var x = e.pageX;
|
|
||||||
var w = $target.width();
|
|
||||||
|
|
||||||
$iframe.on('mouseup mousemove', function handler(evt) {
|
|
||||||
if (evt.type === 'mouseup') {
|
|
||||||
$iframe.off('mouseup mousemove', handler);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$target.css('width', (w - x + evt.pageX) + 'px');
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
var $target = $iframe.find('.CodeMirror');
|
||||||
|
|
||||||
|
splitter.on('mousedown', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var x = e.pageX;
|
||||||
|
var w = $target.width();
|
||||||
|
|
||||||
|
$iframe.on('mouseup mousemove', function handler(evt) {
|
||||||
|
if (evt.type === 'mouseup') {
|
||||||
|
$iframe.off('mouseup mousemove', handler);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$target.css('width', (w - x + evt.pageX) + 'px');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Cryptpad.removeLoadingScreen();
|
Cryptpad.removeLoadingScreen();
|
||||||
setEditable(true);
|
setEditable(true);
|
||||||
|
|||||||
@@ -624,9 +624,14 @@ define([
|
|||||||
}).appendTo(toolbar.$top);
|
}).appendTo(toolbar.$top);
|
||||||
|
|
||||||
// We need to override the "a" tag action here because it is inside the iframe!
|
// 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>', {
|
var $aTag = $('<a>', {
|
||||||
href: "/drive/",
|
href: href,
|
||||||
title: Messages.header_logoTitle,
|
title: buttonTitle,
|
||||||
'class': "cryptpad-logo"
|
'class': "cryptpad-logo"
|
||||||
}).append($('<img>', {
|
}).append($('<img>', {
|
||||||
src: '/customize/images/logo_white.png'
|
src: '/customize/images/logo_white.png'
|
||||||
@@ -634,10 +639,10 @@ define([
|
|||||||
var onClick = function (e) {
|
var onClick = function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (e.ctrlKey) {
|
if (e.ctrlKey) {
|
||||||
window.open('/drive/');
|
window.open(href);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.location = "/drive/";
|
window.location = href;
|
||||||
};
|
};
|
||||||
|
|
||||||
var onContext = function (e) { e.stopPropagation(); };
|
var onContext = function (e) { e.stopPropagation(); };
|
||||||
|
|||||||
Reference in New Issue
Block a user