Changeset 696
- Timestamp:
- 06/19/08 13:39:00 (6 months ago)
- Files:
-
- oss/headstock/headstock/example/microblog/design/default/css/style.css (modified) (1 diff)
- oss/headstock/headstock/example/microblog/design/default/templates/help.mako (added)
- oss/headstock/headstock/example/microblog/design/default/templates/welcome.mako (modified) (2 diffs)
- oss/headstock/headstock/example/microblog/launcher.py (modified) (1 diff)
- oss/headstock/headstock/example/microblog/microblog/jabber/client.py (modified) (1 diff)
- oss/headstock/headstock/example/microblog/microblog/jabber/pubsub.py (modified) (2 diffs)
- oss/headstock/headstock/example/microblog/microblog/web/application.py (modified) (2 diffs)
- oss/headstock/headstock/example/microblog/microblog/web/atompub.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
oss/headstock/headstock/example/microblog/design/default/css/style.css
r692 r696 153 153 #footerrights { 154 154 } 155 156 a { 157 color: #BBBBB5; 158 text-decoration: none; 159 } 160 161 a:hover { 162 text-decoration: underline; 163 } oss/headstock/headstock/example/microblog/design/default/templates/welcome.mako
r684 r696 9 9 Welcome to Speak Up! 10 10 11 This small demo offers some possibilities about enhancing user experience over the web by integrating regular web applications with instant messaging applications . This means a greater interactivity for users.11 This small demo offers some possibilities about enhancing user experience over the web by integrating regular web applications with instant messaging applications (<a href="/help" title="speak up commands">see the available commands</a>). This means a greater interactivity for users. 12 12 </div> 13 13 … … 30 30 <img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"/> 31 31 </a> 32 <br /> 32 33 2008 Sylvain Hellegouarch 33 34 </span> oss/headstock/headstock/example/microblog/launcher.py
r682 r696 48 48 d.add('/service[/]', GET=self.atompubapp.service_get, 49 49 HEAD=self.atompubapp.service_head) 50 d.add('/help[/]', GET=self.webapp.help) 50 51 51 52 # OpenID controllers oss/headstock/headstock/example/microblog/microblog/jabber/client.py
r693 r696 189 189 for body in m.bodies: 190 190 message = remove_BOM(body.plain_body).strip() 191 if message == 'help': 192 m = Message(self.from_jid, m.from_jid) 193 b = """<ul> 194 <li>PI text</li> 195 <li>PI text</li> 196 <li>DI text</li> 197 <li>CN text</li> 198 <li>DN text</li> 199 <li>PN text</li> 200 <li>SN text</li> 201 <li>UN text</li> 202 </ul>""" 203 b = E.load(b).xml_root 204 m.bodies.append(XHTMLBody(b)) 205 self.send(m, 'outbox') 206 else: 207 print "Received message: %s" % repr(message) 208 try: 209 action, data = message.split(' ', 1) 210 except ValueError: 211 action = 'PI' 212 data = message 213 214 if action in self.outboxes: 215 self.send(data, action) 191 print "Received message: %s" % repr(message) 192 try: 193 action, data = message.split(' ', 1) 194 except ValueError: 195 action = 'PI' 196 data = message 197 198 if action in self.outboxes: 199 self.send(data, action) 216 200 217 201 if not self.anyReady(): oss/headstock/headstock/example/microblog/microblog/jabber/pubsub.py
r695 r696 313 313 attributes={u'term': unicode(tag)}, parent=entry) 314 314 315 print entry.xml()316 315 return uuid, entry 317 316 … … 359 358 node_id = self.recv("topurge") 360 359 p = Node(unicode(self.from_jid), u'pubsub.%s' % self.xmpphost, 361 node_name= self.pubsub_top_level_node)360 node_name=node_id) 362 361 self.send(p, "purge") 363 362 oss/headstock/headstock/example/microblog/microblog/web/application.py
r695 r696 30 30 return tpl.render(profile=profile) 31 31 32 def help(self): 33 tpl = self.tpl_lookup.get_template('help.mako') 34 return tpl.render() 35 32 36 def signin(self): 33 37 tpl = self.tpl_lookup.get_template('signin.mako') … … 91 95 92 96 controller = CollectionPagingHandler(c) 93 d.add('%s/paging ' % route, GET=controller.GET)97 d.add('%s/paging[/{start:digits}]' % route, GET=controller.GET) 94 98 95 99 controller = CollectionTagingHandler(c) oss/headstock/headstock/example/microblog/microblog/web/atompub.py
r695 r696 208 208 self.collection = collection 209 209 210 def GET(self, start=0): 210 def GET(self, start): 211 if not start: start = 0 211 212 start = int(start) 212 213
