Merge pull request #53 from xwiki-labs/update
minor fixes to html and userlist
This commit is contained in:
commit
5d9b81ab2f
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<link rel="stylesheet" type="text/css" href="customize/main.css" />
|
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||||
<script src="/bower_components/requirejs/require.js"></script>
|
<script src="/bower_components/requirejs/require.js"></script>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<link rel="stylesheet" type="text/css" href="customize/main.css" />
|
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||||
<script src="/bower_components/requirejs/require.js"></script>
|
<script src="/bower_components/requirejs/require.js"></script>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<link rel="stylesheet" type="text/css" href="customize/main.css" />
|
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||||
<script src="/bower_components/requirejs/require.js"></script>
|
<script src="/bower_components/requirejs/require.js"></script>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<link rel="stylesheet" type="text/css" href="customize/main.css" />
|
<link rel="stylesheet" type="text/css" href="/customize/main.css" />
|
||||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||||
<script src="/bower_components/requirejs/require.js"></script>
|
<script src="/bower_components/requirejs/require.js"></script>
|
||||||
|
|||||||
@ -7,6 +7,8 @@ There are a few guidelines for creating a module:
|
|||||||
Dependencies for your storage engine **should not** be added to Cryptpad.
|
Dependencies for your storage engine **should not** be added to Cryptpad.
|
||||||
Instead, write an adaptor, and place it in `cryptpad/storage/yourAdaptor.js`.
|
Instead, write an adaptor, and place it in `cryptpad/storage/yourAdaptor.js`.
|
||||||
|
|
||||||
|
Alternatively, storage adaptors can be published to npm, and required from your config (once installed).
|
||||||
|
|
||||||
## Your adaptor should conform to a simple API.
|
## Your adaptor should conform to a simple API.
|
||||||
|
|
||||||
It must export an object with a single property, `create`, which is a function.
|
It must export an object with a single property, `create`, which is a function.
|
||||||
|
|||||||
@ -250,9 +250,16 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var initializing = true;
|
var initializing = true;
|
||||||
var userList = {}; // List of pretty name of all users (mapped with their server ID)
|
var userList = module.userList = {}; // List of pretty name of all users (mapped with their server ID)
|
||||||
var toolbarList; // List of users still connected to the channel (server IDs)
|
var toolbarList; // List of users still connected to the channel (server IDs)
|
||||||
var addToUserList = function(data) {
|
var addToUserList = function(data) {
|
||||||
|
var users = module.users;
|
||||||
|
if (users && users.length) {
|
||||||
|
for (var userKey in userList) {
|
||||||
|
if (users.indexOf(userKey) === -1) { delete userList[userKey]; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (var attrname in data) { userList[attrname] = data[attrname]; }
|
for (var attrname in data) { userList[attrname] = data[attrname]; }
|
||||||
if(toolbarList && typeof toolbarList.onChange === "function") {
|
if(toolbarList && typeof toolbarList.onChange === "function") {
|
||||||
toolbarList.onChange(userList);
|
toolbarList.onChange(userList);
|
||||||
@ -603,6 +610,7 @@ define([
|
|||||||
//logging: true,
|
//logging: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
module.users = info.userList.users;
|
||||||
module.realtime = info.realtime;
|
module.realtime = info.realtime;
|
||||||
|
|
||||||
var shjson = info.realtime.getUserDoc();
|
var shjson = info.realtime.getUserDoc();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user