use constants from toolbar.js, address linter warnings
This commit is contained in:
@@ -391,6 +391,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var getHeadingText = function () {
|
var getHeadingText = function () {
|
||||||
|
var text;
|
||||||
if (['h1', 'h2', 'h3'].some(function (t) {
|
if (['h1', 'h2', 'h3'].some(function (t) {
|
||||||
var $header = $(inner).find(t + ':first-of-type');
|
var $header = $(inner).find(t + ':first-of-type');
|
||||||
if ($header.length && $header.text()) {
|
if ($header.length && $header.text()) {
|
||||||
@@ -426,12 +427,12 @@ define([
|
|||||||
toolbarList = info.userList;
|
toolbarList = info.userList;
|
||||||
var config = {
|
var config = {
|
||||||
userData: userList,
|
userData: userList,
|
||||||
changeNameID: 'cryptpad-changeName',
|
changeNameID: Toolbar.constants.changeName,
|
||||||
};
|
};
|
||||||
toolbar = info.realtime.toolbar = Toolbar.create($bar, info.myID, info.realtime, info.getLag, info.userList, config);
|
toolbar = info.realtime.toolbar = Toolbar.create($bar, info.myID, info.realtime, info.getLag, info.userList, config);
|
||||||
createChangeName('cryptpad-changeName', $bar);
|
createChangeName(Toolbar.constants.changeName, $bar);
|
||||||
|
|
||||||
var $rightside = $bar.find('.rtwysiwyg-toolbar-rightside');
|
var $rightside = $bar.find('.' + Toolbar.constants.rightside);
|
||||||
|
|
||||||
/* add an export button */
|
/* add an export button */
|
||||||
var $export = $('<button>')
|
var $export = $('<button>')
|
||||||
@@ -526,6 +527,7 @@ define([
|
|||||||
setEditable(false);
|
setEditable(false);
|
||||||
// TODO inform them that the session was torn down
|
// TODO inform them that the session was torn down
|
||||||
toolbar.failed();
|
toolbar.failed();
|
||||||
|
Cryptpad.alert("Network connection lost!");
|
||||||
};
|
};
|
||||||
|
|
||||||
var onLocal = realtimeOptions.onLocal = function () {
|
var onLocal = realtimeOptions.onLocal = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user