Refactor out theclass assignment

This commit is contained in:
Henrik Giesel 2020-10-04 22:51:34 +02:00
parent 4c255b0289
commit e8c80174eb

View file

@ -284,12 +284,11 @@ class Editor:
else:
toggleScript = ""
tip = shortcut(tip)
theclass = class_
if not disables:
theclass += " perm"
class_ += " perm"
return """ <button tabindex=-1
{id}
class="{theclass}"
class="{class_}"
type="button"
title="{tip}"
onclick="pycmd('{cmd}');{togglesc}return false;"
@ -303,7 +302,7 @@ class Editor:
labelelm=labelelm,
id=idstr,
togglesc=toggleScript,
theclass=theclass,
class_=class_,
)
def setupShortcuts(self) -> None: