mirror of https://github.com/MISP/MISP
Merge pull request #8250 from JakubOnderka/show-context-button
fix: [UI] Show context buttonpull/8258/head
commit
4331e8499e
|
@ -66,7 +66,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var showContext = false;
|
||||
$(function () {
|
||||
<?php
|
||||
if (!Configure::check('MISP.disable_event_locks') || !Configure::read('MISP.disable_event_locks')) {
|
||||
|
@ -77,8 +76,6 @@ $(function () {
|
|||
);
|
||||
}
|
||||
?>
|
||||
popoverStartup();
|
||||
|
||||
$(document.body).tooltip({
|
||||
selector: 'span[title], td[title], time[title]',
|
||||
placement: 'top',
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
);
|
||||
}
|
||||
if (!empty($buttonData)) {
|
||||
$tagData .= implode('', $buttonData);
|
||||
$tagData .= '<span style="white-space:nowrap">' . implode('', $buttonData) . '</span>';
|
||||
}
|
||||
echo sprintf(
|
||||
'<span class="tag-list-container">%s</span>',
|
||||
|
|
|
@ -11,7 +11,3 @@ echo $this->element('galaxyQuickViewNew', [
|
|||
'target_id' => $scope == 'event' ? $object['Event']['id'] : $object['Attribute']['id'],
|
||||
'target_type' => $scope
|
||||
]);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var showContext = false;
|
||||
</script>
|
||||
|
|
|
@ -4102,23 +4102,25 @@ function feedFormUpdate() {
|
|||
}
|
||||
|
||||
function setContextFields() {
|
||||
if (typeof showContext === "undefined") {
|
||||
showContext = false;
|
||||
}
|
||||
|
||||
var $button = $('#show_attribute_context');
|
||||
if (showContext) {
|
||||
$('.context').show();
|
||||
$('#show_context').addClass("attribute_filter_text_active");
|
||||
$('#show_context').removeClass("attribute_filter_text");
|
||||
$button.removeClass("btn-inverse").addClass("btn-primary");
|
||||
} else {
|
||||
$('.context').hide();
|
||||
$('#show_context').addClass("attribute_filter_text");
|
||||
$('#show_context').removeClass("attribute_filter_text_active");
|
||||
$button.removeClass("btn-primary").addClass("btn-inverse");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleContextFields() {
|
||||
if (!showContext) {
|
||||
showContext = true;
|
||||
} else {
|
||||
if (typeof showContext === "undefined") {
|
||||
showContext = false;
|
||||
}
|
||||
showContext = !showContext;
|
||||
setContextFields();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue