Merge branch 'develop' of github.com:ether/etherpad-lite into develop
This commit is contained in:
commit
85c1787184
|
@ -1,6 +1,31 @@
|
|||
# Developer Guidelines
|
||||
(Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
|
||||
|
||||
## How to write a bug report
|
||||
|
||||
* Please be polite, we all are humans and problems can occur.
|
||||
* Please add as much information as possible, for example
|
||||
* client os(s) and version(s)
|
||||
* browser(s) and version(s), is the problem reproduceable on different clients
|
||||
* special environments like firewalls or antivirus
|
||||
* host os and version
|
||||
* npm and nodejs version
|
||||
* Logfiles if available
|
||||
* steps to reproduce
|
||||
* what you expected to happen
|
||||
* what actually happened
|
||||
* Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.
|
||||
|
||||
If you send logfiles, please set the loglevel switch DEBUG in your settings.json file:
|
||||
|
||||
```
|
||||
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
|
||||
"loglevel": "DEBUG",
|
||||
```
|
||||
|
||||
The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.
|
||||
|
||||
|
||||
## Important note for pull requests
|
||||
**Pull requests should be issued against the develop branch**. We never pull directly into master.
|
||||
|
||||
|
|
|
@ -247,6 +247,30 @@ Things in context:
|
|||
|
||||
This hook will allow a plug-in developer to re-write each line when exporting to HTML.
|
||||
|
||||
Example:
|
||||
```
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
|
||||
exports.getLineHTMLForExport = function (hook, context) {
|
||||
var header = _analyzeLine(context.attribLine, context.apool);
|
||||
if (header) {
|
||||
return "<" + header + ">" + context.lineContents + "</" + header + ">";
|
||||
}
|
||||
}
|
||||
|
||||
function _analyzeLine(alineAttrs, apool) {
|
||||
var header = null;
|
||||
if (alineAttrs) {
|
||||
var opIter = Changeset.opIterator(alineAttrs);
|
||||
if (opIter.hasNext()) {
|
||||
var op = opIter.next();
|
||||
header = Changeset.opAttributeValue(op, 'heading', apool);
|
||||
}
|
||||
}
|
||||
return header;
|
||||
}
|
||||
```
|
||||
|
||||
## stylesForExport
|
||||
Called from: src/node/utils/ExportHtml.js
|
||||
|
||||
|
@ -314,7 +338,7 @@ exports.exportHtmlAdditionalTags = function(hook, pad, cb){
|
|||
var padId = pad.id;
|
||||
cb(["massive","jugs"]);
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
## userLeave
|
||||
Called from src/node/handler/PadMessageHandler.js
|
||||
|
|
|
@ -257,11 +257,10 @@ exports.handleMessage = function(client, message)
|
|||
// FIXME: Use a hook instead
|
||||
// FIXME: Allow to override readwrite access with readonly
|
||||
|
||||
// FIXME: A message might arrive but wont have an auth object, this is obviously bad so we should deny it
|
||||
// Simulate using the load testing tool
|
||||
if(!sessioninfos[client.id].auth){
|
||||
console.error("Auth was never applied to a session. If you are using the stress-test tool then restart Etherpad and the Stress test tool.")
|
||||
callback();
|
||||
return;
|
||||
}else{
|
||||
var auth = sessioninfos[client.id].auth;
|
||||
var checkAccessCallback = function(err, statusObject)
|
||||
|
|
|
@ -141,14 +141,14 @@ $(document).ready(function () {
|
|||
|
||||
// Sort
|
||||
$('.sort.up').unbind('click').click(function() {
|
||||
search.sortBy = $(this).text().toLowerCase();
|
||||
search.sortBy = $(this).attr('data-label').toLowerCase();
|
||||
search.sortDir = false;
|
||||
search.offset = 0;
|
||||
search(search.searchTerm, search.results.length);
|
||||
search.results = [];
|
||||
})
|
||||
$('.sort.down, .sort.none').unbind('click').click(function() {
|
||||
search.sortBy = $(this).text().toLowerCase();
|
||||
search.sortBy = $(this).attr('data-label').toLowerCase();
|
||||
search.sortDir = true;
|
||||
search.offset = 0;
|
||||
search(search.searchTerm, search.results.length);
|
||||
|
|
|
@ -61,7 +61,7 @@ exports.availablePlugins = null;
|
|||
var cacheTimestamp = 0;
|
||||
|
||||
exports.getAvailablePlugins = function(maxCacheAge, cb) {
|
||||
request("http://static.etherpad.org/plugins.json", function(er, response, plugins){
|
||||
request("https://static.etherpad.org/plugins.json", function(er, response, plugins){
|
||||
if (er) return cb && cb(er);
|
||||
if(exports.availablePlugins && maxCacheAge && Math.round(+new Date/1000)-cacheTimestamp <= maxCacheAge) {
|
||||
return cb && cb(null, exports.availablePlugins)
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<th class="sort up" data-label="name">Name</th>
|
||||
<th class="sort none" data-label="description">Description</th>
|
||||
<th class="sort none" data-label="version">Version</th>
|
||||
<th class="sort none" data-label="time">Last update</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -86,6 +87,7 @@
|
|||
<td class="name" data-label="Name"></td>
|
||||
<td class="description" data-label="Description"></td>
|
||||
<td class="version" data-label="Version"></td>
|
||||
<td class="time" data-label="Time"></td>
|
||||
<td>
|
||||
<div class="actions">
|
||||
<input type="button" value="Install" class="do-install">
|
||||
|
|
Loading…
Reference in New Issue