comparison libervia.tac @ 309:05e264e96a1c

browser_side: make unibox optional
author souliane <souliane@mailoo.org>
date Sun, 29 Dec 2013 23:07:28 +0100
parents 0ca441ba4317
children bbadd490e63c
comparison
equal deleted inserted replaced
308:0ca441ba4317 309:05e264e96a1c
241 @param text: microblog's text 241 @param text: microblog's text
242 """ 242 """
243 profile = ISATSession(self.session).profile 243 profile = ISATSession(self.session).profile
244 extra['allow_comments'] = 'True' 244 extra['allow_comments'] = 'True'
245 245
246 if not type_: # auto-detect
247 type_ = "PUBLIC" if dest == [] else "GROUP"
248
246 if type_ in ("PUBLIC", "GROUP") and text: 249 if type_ in ("PUBLIC", "GROUP") and text:
247 if type_ == "PUBLIC": 250 if type_ == "PUBLIC":
248 #This text if for the public microblog 251 #This text if for the public microblog
249 print "sending public blog" 252 print "sending public blog"
250 return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, extra, profile) 253 return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, extra, profile)
506 def jsonrpc_confirmationAnswer(self, confirmation_id, result, answer_data): 509 def jsonrpc_confirmationAnswer(self, confirmation_id, result, answer_data):
507 """Send the user's answer to any previous 'askConfirmation' signal""" 510 """Send the user's answer to any previous 'askConfirmation' signal"""
508 profile = ISATSession(self.session).profile 511 profile = ISATSession(self.session).profile
509 self.sat_host.bridge.confirmationAnswer(confirmation_id, result, answer_data, profile) 512 self.sat_host.bridge.confirmationAnswer(confirmation_id, result, answer_data, profile)
510 513
511 def jsonrpc_syntaxConvert(self, text, syntax_from=Const._SYNTAX_XHTML, syntax_to=Const._SYNTAX_CURRENT): 514 def jsonrpc_syntaxConvert(self, text, syntax_from=Const.SYNTAX_XHTML, syntax_to=Const.SYNTAX_CURRENT):
512 """ Convert a text between two syntaxes 515 """ Convert a text between two syntaxes
513 @param text: text to convert 516 @param text: text to convert
514 @param syntax_from: source syntax (e.g. "markdown") 517 @param syntax_from: source syntax (e.g. "markdown")
515 @param syntax_to: dest syntax (e.g.: "XHTML") 518 @param syntax_to: dest syntax (e.g.: "XHTML")
516 @param safe: clean resulting XHTML to avoid malicious code if True (forced here) 519 @param safe: clean resulting XHTML to avoid malicious code if True (forced here)