This commit is contained in:
Damien Elmes 2011-08-28 14:40:00 +09:00
parent 6a00419ebc
commit cca48a0ced
2 changed files with 5 additions and 5 deletions

View file

@ -108,7 +108,7 @@ insert or replace into facts values (?, ?, ?, ?, ?, ?, ?, ?)""",
##################################################
def hasTag(self, tag):
return self.deck.tags.inStr(tag, self.tags)
return self.deck.tags.inList(tag, self.tags)
def stringTags(self):
return self.deck.tags.canonify(self.tags)

View file

@ -155,10 +155,6 @@ select id from cards where fid in (select id from facts where mid = ?)""",
return self.deck.db.scalar(
"select count() from facts where mid = ?", m['id'])
def css(self):
"CSS for all models."
return "\n".join([m['css'] for m in self.all()])
# Copying
##################################################
@ -171,6 +167,10 @@ select id from cards where fid in (select id from facts where mid = ?)""",
# CSS generation
##################################################
def css(self):
"CSS for all models."
return "\n".join([m['css'] for m in self.all()])
def _css(self, m):
# fields
css = "".join(self._fieldCSS(