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
""" | |
Remote authentication stub for Flask | |
This is meant as a template for your own customization. | |
You can identify the user anyway you like, | |
integrate it into your intranet, web app or similar. | |
""" | |
from flask import Flask, request, redirect | |
import time |
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
</script> | |
<script type="text/javascript"> | |
$j('#suggestions_for_new_topic div.related-topics-header h3').text("Custom Text Here"); |
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
<script type="text/javascript"> | |
$j('#_getButton').bind('click', function () { | |
var current_agent = "{{current_user.email}}"; | |
search_url = "/api/v2/search.json?query=type%3Aticket%20status%3Csolved%20assignee%3A" + current_agent; | |
$j.get(search_url, function(data) { | |
alert(data.count + ' tickets assigned to you. First ticket URL is '+ data.results[0].url); | |
}); | |
}); | |
</script> |
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
{% for comment in ticket.comments %} | |
Attachments: | |
{% for attachment in comment.attachments %} | |
<a href="{{attachment.url}}">{{attachment.filename}}</a> | |
{% endfor %} | |
{% endfor %} |
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
</script> | |
<script type="text/javascript"> | |
var entriesRegex = /^\/entries\//; | |
if (window.location.pathname.match(entriesRegex)) { | |
$j(".content_green").css("display", "block"); | |
} |
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
{% if content contains "font-family:'Lucida Sans Unicode','Lucida Grande','Tahoma',Verdana,sans-serif;" %} | |
{{content | replace: "font-family:'Lucida Sans Unicode','Lucida Grande','Tahoma',Verdana,sans-serif;", "font-family: Arial;" }} | |
{% else %} | |
{{content}} | |
{% endif %} |
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
{% if content contains "1px dotted #c5c5c5" %} | |
{{content | replace: "1px dotted #c5c5c5", "none" | replace: "'Lucida Sans Unicode','Lucida Grande','Tahoma',Verdana,sans-serif", "Arial, Helvetica, sans-serif" }} | |
{% else %} | |
{{content}} | |
{% endif %} |
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
{% if content contains "1px dotted #c5c5c5" %} | |
{{content | replace: "1px dotted #c5c5c5", "none" | replace : "15px", "0px" | replace: "13px", "0px"}} | |
{% else %} | |
{{content}} | |
{% endif %} |
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 example relies on you having installed PyJWT, `sudo easy_install PyJWT` - you can | |
# read more about this in the GitHub repository https://github.com/progrium/pyjwt | |
from flask import Flask, request, redirect | |
import time | |
import uuid | |
import jwt | |
# insert token here | |
app.config['SHARED_KEY'] = '' |
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
events: { | |
'click .your_button': function(data){ | |
data.target.ownerDocument.defaultView.open(); | |
} | |
} |
OlderNewer