Fix secure iframes on Edge
This commit is contained in:
@@ -383,9 +383,18 @@ define([
|
|||||||
|
|
||||||
var $avatar = $userAdmin.find('.cp-dropdown-button-title');
|
var $avatar = $userAdmin.find('.cp-dropdown-button-title');
|
||||||
var oldUrl;
|
var oldUrl;
|
||||||
|
var loadingAvatar;
|
||||||
|
var to;
|
||||||
var updateButton = function () {
|
var updateButton = function () {
|
||||||
var myData = metadataMgr.getUserData();
|
var myData = metadataMgr.getUserData();
|
||||||
if (!myData) { return; }
|
if (!myData) { return; }
|
||||||
|
if (loadingAvatar) {
|
||||||
|
// Try again in 200ms
|
||||||
|
window.clearTimeout(to);
|
||||||
|
to = window.setTimeout(updateButton, 200);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loadingAvatar = true;
|
||||||
var newName = myData.name;
|
var newName = myData.name;
|
||||||
var url = myData.avatar;
|
var url = myData.avatar;
|
||||||
$displayName.text(newName || Messages.anonymous);
|
$displayName.text(newName || Messages.anonymous);
|
||||||
@@ -396,8 +405,11 @@ define([
|
|||||||
if ($img) {
|
if ($img) {
|
||||||
$userAdmin.find('button').addClass('cp-avatar');
|
$userAdmin.find('button').addClass('cp-avatar');
|
||||||
}
|
}
|
||||||
|
loadingAvatar = false;
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
loadingAvatar = false;
|
||||||
};
|
};
|
||||||
metadataMgr.onChange(updateButton);
|
metadataMgr.onChange(updateButton);
|
||||||
updateButton();
|
updateButton();
|
||||||
@@ -465,12 +477,13 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
common.initFilePicker(common, fileDialogCfg);
|
common.initFilePicker(fileDialogCfg);
|
||||||
var pickerCfg = {
|
var pickerCfg = {
|
||||||
types: [type],
|
types: [type],
|
||||||
where: ['template']
|
where: ['template']
|
||||||
};
|
};
|
||||||
common.openFilePicker(common, pickerCfg);
|
console.log(pickerCfg);
|
||||||
|
common.openFilePicker(pickerCfg);
|
||||||
};
|
};
|
||||||
|
|
||||||
return UI;
|
return UI;
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ define({
|
|||||||
// When either the outside or inside registers a query handler, this is sent.
|
// When either the outside or inside registers a query handler, this is sent.
|
||||||
'EV_REGISTER_HANDLER': true,
|
'EV_REGISTER_HANDLER': true,
|
||||||
|
|
||||||
|
// When an iframe is ready to receive messages
|
||||||
|
'EV_RPC_READY': true,
|
||||||
|
|
||||||
// Realtime events called from the outside.
|
// Realtime events called from the outside.
|
||||||
// When someone joins the pad, argument is a string with their netflux id.
|
// When someone joins the pad, argument is a string with their netflux id.
|
||||||
'EV_RT_JOIN': true,
|
'EV_RT_JOIN': true,
|
||||||
|
|||||||
@@ -1263,7 +1263,8 @@ define([
|
|||||||
if (APP.mobile() && !noStyle) { // noStyle means title in search result
|
if (APP.mobile() && !noStyle) { // noStyle means title in search result
|
||||||
return $container;
|
return $container;
|
||||||
}
|
}
|
||||||
var el = path[0] === SEARCH ? undefined : filesOp.find(path);
|
var isVirtual = virtualCategories.indexOf(path[0]) !== -1;
|
||||||
|
var el = isVirtual ? undefined : filesOp.find(path);
|
||||||
path = path[0] === SEARCH ? path.slice(0,1) : path;
|
path = path[0] === SEARCH ? path.slice(0,1) : path;
|
||||||
path.forEach(function (p, idx) {
|
path.forEach(function (p, idx) {
|
||||||
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
|
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ define([
|
|||||||
};
|
};
|
||||||
var updateContainer;
|
var updateContainer;
|
||||||
var createFileDialog = function () {
|
var createFileDialog = function () {
|
||||||
var types = filters.types;
|
var types = filters.types || [];
|
||||||
// Create modal
|
// Create modal
|
||||||
var $blockContainer = Cryptpad.createModal({
|
var $blockContainer = Cryptpad.createModal({
|
||||||
id: 'cp-filepicker-dialog',
|
id: 'cp-filepicker-dialog',
|
||||||
|
|||||||
@@ -608,7 +608,6 @@ define([
|
|||||||
initializing = false;
|
initializing = false;
|
||||||
|
|
||||||
onLocal(); // push local state to avoid parse errors later.
|
onLocal(); // push local state to avoid parse errors later.
|
||||||
console.log(editor.getValue());
|
|
||||||
Slide.update(editor.getValue());
|
Slide.update(editor.getValue());
|
||||||
Cryptpad.removeLoadingScreen();
|
Cryptpad.removeLoadingScreen();
|
||||||
|
|
||||||
@@ -736,9 +735,11 @@ define([
|
|||||||
onConnectError();
|
onConnectError();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
common.isPresentUrl(function (err, val) {
|
common.getSframeChannel().onReady(function () {
|
||||||
isPresentMode = val;
|
common.isPresentUrl(function (err, val) {
|
||||||
andThen(editor, CodeMirror, common);
|
isPresentMode = val;
|
||||||
|
andThen(editor, CodeMirror, common);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -239,8 +239,6 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(window).resize(Slide.updateFontSize);
|
|
||||||
|
|
||||||
// Swipe
|
// Swipe
|
||||||
var addSwipeEvents = function () {
|
var addSwipeEvents = function () {
|
||||||
var touch = {
|
var touch = {
|
||||||
@@ -294,6 +292,7 @@ define([
|
|||||||
options = Slide.options = opt;
|
options = Slide.options = opt;
|
||||||
addEvent();
|
addEvent();
|
||||||
addSwipeEvents();
|
addSwipeEvents();
|
||||||
|
$(window).resize(Slide.updateFontSize);
|
||||||
};
|
};
|
||||||
|
|
||||||
Slide.setTitle = function (titleObj) {
|
Slide.setTitle = function (titleObj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user