add the file manager in the main page
This commit is contained in:
parent
b7f2ef97c7
commit
2b077a8e95
@ -67,7 +67,7 @@
|
|||||||
</noscript>
|
</noscript>
|
||||||
<h5 id="tryit" data-localization="tryIt"></h5>
|
<h5 id="tryit" data-localization="tryIt"></h5>
|
||||||
|
|
||||||
<table class="recent scroll" style="display:none">
|
<!-- <table class="recent scroll" style="display:none">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -80,6 +80,8 @@
|
|||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
-->
|
||||||
|
<iframe src="/file#iframe" style="width: 100%; height: 500px;"></iframe>
|
||||||
|
|
||||||
<div id="buttons" class="buttons">
|
<div id="buttons" class="buttons">
|
||||||
<a id="create-pad" class="button create" href="/pad/" data-localization="button_newpad"></a>
|
<a id="create-pad" class="button create" href="/pad/" data-localization="button_newpad"></a>
|
||||||
|
|||||||
@ -272,9 +272,15 @@ li {
|
|||||||
#content .list .element span.name {
|
#content .list .element span.name {
|
||||||
width: 478px;
|
width: 478px;
|
||||||
}
|
}
|
||||||
|
.iframe #content .list .element span.name {
|
||||||
|
width: 278px;
|
||||||
|
}
|
||||||
#content .list .header span.name {
|
#content .list .header span.name {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
}
|
}
|
||||||
|
.iframe #content .list .header span.name {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
#content .list .element span.type, #content .list .element span.atime, #content .list .element span.ctime {
|
#content .list .element span.type, #content .list .element span.atime, #content .list .element span.ctime {
|
||||||
width: 175px;
|
width: 175px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,9 +18,7 @@ define([
|
|||||||
var saveAs = window.saveAs;
|
var saveAs = window.saveAs;
|
||||||
var $iframe = $('#pad-iframe').contents();
|
var $iframe = $('#pad-iframe').contents();
|
||||||
var ifrw = $('#pad-iframe')[0].contentWindow;
|
var ifrw = $('#pad-iframe')[0].contentWindow;
|
||||||
|
var homePageIframe = false;
|
||||||
var hash = window.location.hash || localStorage.FS_hash;
|
|
||||||
var secret = Cryptpad.getSecrets(hash);
|
|
||||||
|
|
||||||
var ROOT = "root";
|
var ROOT = "root";
|
||||||
var ROOT_NAME = Messages.fm_rootName;
|
var ROOT_NAME = Messages.fm_rootName;
|
||||||
@ -1356,17 +1354,31 @@ define([
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var listmapConfig = module.config = {
|
|
||||||
data: {},
|
|
||||||
websocketURL: Cryptpad.getWebsocketURL(),
|
|
||||||
channel: secret.channel,
|
|
||||||
readOnly: false,
|
|
||||||
validateKey: secret.keys.validateKey || undefined,
|
|
||||||
crypto: Crypto.createEncryptor(secret.keys),
|
|
||||||
};
|
|
||||||
|
|
||||||
// don't initialize until the store is ready.
|
// don't initialize until the store is ready.
|
||||||
Cryptpad.ready(function () {
|
Cryptpad.ready(function () {
|
||||||
|
if (window.location.hash && window.location.hash === "#iframe") {
|
||||||
|
$('.top-bar').hide();
|
||||||
|
$('#pad-iframe').css({
|
||||||
|
top: "0px",
|
||||||
|
height: "100%"
|
||||||
|
});
|
||||||
|
$iframe.find('body').addClass('iframe');
|
||||||
|
window.location.hash = "";
|
||||||
|
homePageIframe = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var hash = window.location.hash || localStorage.FS_hash;
|
||||||
|
var secret = Cryptpad.getSecrets(hash);
|
||||||
|
|
||||||
|
var listmapConfig = module.config = {
|
||||||
|
data: {},
|
||||||
|
websocketURL: Cryptpad.getWebsocketURL(),
|
||||||
|
channel: secret.channel,
|
||||||
|
readOnly: false,
|
||||||
|
validateKey: secret.keys.validateKey || undefined,
|
||||||
|
crypto: Crypto.createEncryptor(secret.keys),
|
||||||
|
};
|
||||||
|
|
||||||
var rt = window.rt = module.rt = Listmap.create(listmapConfig);
|
var rt = window.rt = module.rt = Listmap.create(listmapConfig);
|
||||||
rt.proxy.on('create', function (info) {
|
rt.proxy.on('create', function (info) {
|
||||||
var realtime = module.realtime = info.realtime;
|
var realtime = module.realtime = info.realtime;
|
||||||
@ -1394,8 +1406,9 @@ define([
|
|||||||
initLocalStorage();
|
initLocalStorage();
|
||||||
init(rt.proxy);
|
init(rt.proxy);
|
||||||
})
|
})
|
||||||
.on('disconnect', function () {
|
.on('disconnect', function (info) {
|
||||||
//setEditable(false);
|
//setEditable(false);
|
||||||
|
console.error('err');
|
||||||
Cryptpad.alert(Messages.common_connectionLost);
|
Cryptpad.alert(Messages.common_connectionLost);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user