Pad: Disable toolbar and import/export when reconnecting

This commit is contained in:
Richard Hansen 2020-09-10 13:11:10 -04:00 committed by John McLear
parent 6f28e415ec
commit 5ac5b65aff
2 changed files with 10 additions and 2 deletions

View file

@ -146,7 +146,7 @@ var padeditbar = (function()
self.dropdowns = [];
$("#editbar .editbarbutton").attr("unselectable", "on"); // for IE
$("#editbar").removeClass("disabledtoolbar").addClass("enabledtoolbar");
this.enable();
$("#editbar [data-key]").each(function () {
$(this).unbind("click");
(new ToolbarItem($(this))).bind(function (command, item) {
@ -194,6 +194,10 @@ var padeditbar = (function()
{
$("#editbar").addClass('disabledtoolbar').removeClass("enabledtoolbar");
},
enable: function()
{
$('#editbar').addClass('enabledtoolbar').removeClass('disabledtoolbar');
},
commands: {},
registerCommand: function (cmd, callback) {
this.commands[cmd] = callback;