mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Refactor out theclass assignment
This commit is contained in:
parent
4c255b0289
commit
e8c80174eb
1 changed files with 3 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue