-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support owncloud links from mail, calendar and open it in owncloud task
with transparent auth
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$(document).ready(function() { | ||
$('a').click(function (event) | ||
{ | ||
var url = $(this).attr('href'); | ||
if (url.indexOf(rcmail.env.owncloud_external_url) == 0) { | ||
var other_params = ""; | ||
if (url.length > rcmail.env.owncloud_external_url.length) { | ||
other_params = url.replace(rcmail.env.owncloud_external_url, ""); | ||
} | ||
$(this).attr('href', rcmail.env.owncloud_file_url.replace("%25%25other_params%25%25", encodeURIComponent(other_params))); | ||
} | ||
}); | ||
}); |
1518eb2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GREAT COMMIT! WOW! this its a great feature!