mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-12 17:49:41 +00:00
Whitelist ins/del tags in activity popovers
This commit is contained in:
@@ -9,14 +9,13 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="popover"]').popover().click(function(){
|
$('[data-toggle="popover"]').popover().click(function(){
|
||||||
if($(this).attr('href')){
|
if($(this).attr('href')){
|
||||||
window.location.href = $(this).attr('href');
|
window.location.href = $(this).attr('href');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//moment().twitter();
|
})
|
||||||
})
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(function () {
|
$(function () {
|
||||||
$( "#activity" ).hide();
|
$( "#activity" ).hide();
|
||||||
@@ -24,15 +23,10 @@
|
|||||||
$('#activity_loading').slideUp('slow',function(){
|
$('#activity_loading').slideUp('slow',function(){
|
||||||
$('#activity').slideDown('slow');
|
$('#activity').slideDown('slow');
|
||||||
});
|
});
|
||||||
|
var whiteList = $.fn.tooltip.Constructor.Default.whiteList
|
||||||
$('#activity [data-toggle="popover"]').popover();
|
whiteList.ins = []
|
||||||
|
whiteList.del = []
|
||||||
/*$('.date').each(function (index, dateElem) {
|
$('#activity [data-toggle="popover"]').popover({whiteList: whiteList});
|
||||||
var $dateElem = $(dateElem);
|
|
||||||
var formatted = moment($dateElem.attr('data-date')).twitterLong();
|
|
||||||
$dateElem.text(formatted);
|
|
||||||
});*/
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{% if version.changes.item_changes or version.changes.field_changes or version.changes.old == None %}
|
{% if version.changes.item_changes or version.changes.field_changes or version.changes.old == None %}
|
||||||
{% for change in version.changes.field_changes %}
|
{% for change in version.changes.field_changes %}
|
||||||
<a tabindex="0" title="Changes to {{ change.field.verbose_name }}" type="button" class="badge badge-light" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}{% include "version_changes_change.html" %}{% endspaceless %}'>{{ change.field.verbose_name }}</a>
|
<a tabindex="0" title="Changes to {{ change.field.verbose_name }}" type="button" class="badge badge-secondary" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}{% include "version_changes_change.html" %}{% endspaceless %}'>{{ change.field.verbose_name }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for itemChange in version.changes.item_changes %}
|
{% for itemChange in version.changes.item_changes %}
|
||||||
<a tabindex="0" title="Changes to item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'" type="button" class="badge badge-light" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
|
<a tabindex="0" title="Changes to item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'" type="button" class="badge badge-secondary" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
{% for change in itemChange.field_changes %}
|
{% for change in itemChange.field_changes %}
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="dont-break-out">{{diff.text|linebreaksbr}}</span>
|
<span class="dont-break-out">{{diff.text|linebreaksbr}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if change.old %}
|
{% if change.old %}
|
||||||
<del{% if change.long %} class="overflow-ellipsis"{% endif %}>
|
<del{% if change.long %} class="overflow-ellipsis"{% endif %}>
|
||||||
{% if change.linebreaks %}
|
{% if change.linebreaks %}
|
||||||
|
|||||||
Reference in New Issue
Block a user