Skip to content
This repository has been archived by the owner on Oct 29, 2018. It is now read-only.

Commit

Permalink
Merge pull request #570 from raelgc/568-fixing-post-link
Browse files Browse the repository at this point in the history
Fixing post link (#568)
  • Loading branch information
raelgc authored Apr 26, 2017
2 parents 5f8638b + 90f366c commit 170fe70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scudcloud/resources/scudcloud.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions scudcloud/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ def pasted(self, checked):
pixmap.save(buffer, "PNG")
self.call("setClipboard", str(byteArray.toBase64(), sys.stdout.encoding))

@QtCore.pyqtSlot(str)
def createPost(self, teamUrl):
self.systemOpen("{}files/create/space".format(teamUrl))

@QtCore.pyqtSlot(str)
def open(self, url):
self.systemOpen(url)
Expand Down
3 changes: 3 additions & 0 deletions sources/scudcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ ScudCloud = {
document.onpaste = function(e){desktop.pasted(false);};
// Forcing call button handling
$('body').delegate('#channel_calls_button', 'click', function(){desktop.open(TS.boot_data.team_url+'call/'+TS.model.active_cid);});
// Forcing new posts to get opened in system browser (Fixes #225, #568)
$("body").undelegate('a[href="/files/create/space"]', "click");
$("body").delegate('a[href="/files/create/space"]', "click", function(e){desktop.createPost(TS.boot_data.team_url);e.preventDefault();});
window.winssb = TSSSB = ScudCloud;
// Sometimes didFinishLoading is not loaded
if(ScudCloud.unloaded){
Expand Down

0 comments on commit 170fe70

Please sign in to comment.