Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 369 → Rev 370

/branches/BR-0.4/basico/services/srv_annotations.py
180,6 → 180,11
return None
 
 
def get_metadata_value(self, aid, key):
metadata = self.get_metadata_from_aid(aid)
return metadata[key]
 
def is_valid(self, aid):
ANNOTATION_FILE = LPATH['ANNOTATIONS'] + aid + '.json'
valid = os.path.exists(ANNOTATION_FILE)
/branches/BR-0.4/basico/services/srv_attachment.py
124,6 → 124,7
else:
return None
 
 
def get_metadata_value(self, tid, key):
metadata = self.get_metadata_from_tid(tid)
return metadata[key]
/branches/BR-0.4/basico/widgets/wdg_annot.py
587,11 → 587,17
 
def preview(self):
aid = self.get_aid_from_widget()
atype = self.srvant.get_metadata_value(aid, 'Type')
browser = self.srvgui.get_widget('annotation_browser')
# ~ self.log.debug("Execute asciidoc for current annotation: %s", self.sid)
try:
target = self.srvacd.generate_preview(aid)
browser.load_url(html.escape(target))
if atype == 'Bookmark':
alink = self.srvant.get_metadata_value(aid, 'Link')
if len(alink) > 0:
browser.load_url(alink)
else:
target = self.srvacd.generate_preview(aid)
browser.load_url(html.escape(target))
except:
self.log.debug("Showing editor instead preview")
stack_annotation = self.srvgui.get_widget('stack_annotation')
/branches/BR-0.4/setup.py
43,7 → 43,6
('basico/data/res/css',
[
'basico/data/res/css/basico.css',
'basico/data/res/css/asciidoctor.css',
'basico/data/res/css/custom-asciidoc.css',
]),
('basico/data/tpl', ['basico/data/tpl/report.html']),