[Show Collaboration editor note for Blink Pro Adrian Georgescu **20110520132706 Ignore-this: 28b932bb9da6e1e1f2f0b2d4c9d89c9f ] hunk ./ChatView.html 519 +function showDisabledCollaborationEditor() { + collaboration_editor.innerHTML = "

Collaborative Text Editor is available in Blink Pro

"+ + "

Text entered in the area below can be modified simultaneously by all participants:"+ + ""+ + ""+ + "
"; + + chat_session.style.display = "none"; + collaboration_editor.style.display = "block"; + + scrollToBottom(); + +} + hunk ./ChatViewController.py 343 - hash = hashlib.sha1() + if NSApp.delegate().applicationName == 'Blink Pro': + hash = hashlib.sha1() hunk ./ChatViewController.py 346 - if self.delegate.sessionController.remote_focus: - id = '%s' % (self.delegate.sessionController.remoteSIPAddress) - else: - if self.delegate.sessionController.session.direction == "incoming": - id = '%s_%s' % (self.delegate.sessionController.remoteSIPAddress, self.delegate.sessionController.account.id) + if self.delegate.sessionController.remote_focus: + id = '%s' % (self.delegate.sessionController.remoteSIPAddress) hunk ./ChatViewController.py 349 - id = '%s_%s' % (self.delegate.sessionController.account.id, self.delegate.sessionController.remoteSIPAddress) + if self.delegate.sessionController.session.direction == "incoming": + id = '%s_%s' % (self.delegate.sessionController.remoteSIPAddress, self.delegate.sessionController.account.id) + else: + id = '%s_%s' % (self.delegate.sessionController.account.id, self.delegate.sessionController.remoteSIPAddress) hunk ./ChatViewController.py 354 - hash.update(id) - form_id = re.sub("[0-9]","", hash.hexdigest()) # replace digits of collaboration formid, they don't work for some reason - script = """showCollaborationEditor("%s", "%s")""" % (form_id, settings.server.collaboration_url) - self.outputView.stringByEvaluatingJavaScriptFromString_(script) + hash.update(id) + form_id = re.sub("[0-9]","", hash.hexdigest()) # replace digits of collaboration formid, they don't work for some reason + script = """showCollaborationEditor("%s", "%s")""" % (form_id, settings.server.collaboration_url) + self.outputView.stringByEvaluatingJavaScriptFromString_(script) + else: + script = "showDisabledCollaborationEditor()" + self.outputView.stringByEvaluatingJavaScriptFromString_(script)