fix: [UI] Put back jQuery UI

pull/8318/head
Jakub Onderka 2022-04-30 18:02:49 +02:00
parent 04caef79d5
commit 809a1b07b0
9 changed files with 17 additions and 28 deletions

View File

@ -38,7 +38,7 @@ class TemplateElementsController extends AppController
$this->loadModel('Attribute');
$this->set('validTypeGroups', $this->Attribute->validTypeGroups);
$this->set('id', $id);
$this->layout = 'ajaxTemplate';
$this->layout = false;
$this->set('elements', $templateElements);
$mayModify = false;
if ($this->_isSiteAdmin() || $template['Template']['org'] == $this->Auth->user('Organisation')['name']) {
@ -116,7 +116,7 @@ class TemplateElementsController extends AppController
$this->set('categoryArray', $categoryArray);
$this->set('categories', $categories);
}
$this->layout = 'ajaxTemplate';
$this->layout = false;
$this->render('ajax/template_element_add_' . $type);
} elseif ($this->request->is('post')) {
$pos = $this->TemplateElement->lastPosition($id);
@ -210,7 +210,7 @@ class TemplateElementsController extends AppController
$this->set('categoryArray', $categoryArray);
$this->set('categories', $categories);
}
$this->layout = 'ajaxTemplate';
$this->layout = false;
$this->render('ajax/template_element_edit_' . $type);
} elseif ($this->request->is('post') || $this->request->is('put')) {
$this->request->data[$ModelType]['id'] = $templateElement[$ModelType][0]['id'];

View File

@ -189,6 +189,7 @@
echo $this->Html->css('vis');
echo $this->Html->css('distribution-graph');
echo $this->Html->script('network-distribution-graph');
echo $this->Html->script('jquery-ui.min');
?>
<?php
if (!$ajax) echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'event-collection', 'menuItem' => 'index'));

View File

@ -1,7 +1,7 @@
<?php
echo $this->element('genericElements/assetLoader', [
'css' => ['query-builder.default', 'attack_matrix'],
'js' => ['doT', 'extendext', 'moment.min', 'query-builder', 'network-distribution-graph', 'd3', 'd3.custom'],
'js' => ['doT', 'extendext', 'moment.min', 'query-builder', 'network-distribution-graph', 'd3', 'd3.custom', 'jquery-ui.min'],
]);
echo $this->element(
'genericElements/SingleViews/single_view',

View File

@ -1,22 +0,0 @@
<?php
/**
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
<?php
echo $this->Html->css('jquery-ui');
echo $this->Html->script('jquery-ui');
echo $content_for_layout; ?>

View File

@ -22,7 +22,7 @@
$js_collection = array(
'jquery',
'misp-touch',
'chosen.jquery.min'
'chosen.jquery.min',
);
echo $this->element('genericElements/assetLoader', array(
'css' => $css_collection,

View File

@ -76,6 +76,7 @@
<?php
echo $this->Html->script('vis');
echo $this->Html->css('vis');
echo $this->Html->script('jquery-ui.min');
echo $this->Html->css('distribution-graph');
echo $this->Html->script('network-distribution-graph');
?>

View File

@ -38,4 +38,7 @@ echo $this->element(
]
);
echo $this->element('genericElements/assetLoader', [
'js' => ['jquery-ui.min'],
]);
echo $this->element('templateElements/templateElements', ['templateId' => $template['Template']['id']]);

View File

@ -117,7 +117,7 @@
}
echo $this->element('genericElements/assetLoader', array(
'css' => array('vis', 'distribution-graph'),
'js' => array('vis', 'network-distribution-graph')
'js' => array('vis', 'jquery-ui.min', 'network-distribution-graph')
));
echo sprintf(
'<div class="users view"><div class="row-fluid"><div class="span8" style="margin:0px;">%s</div></div>%s<div style="margin-top:20px;">%s%s</div></div>',

6
app/webroot/js/jquery-ui.min.js vendored Normal file

File diff suppressed because one or more lines are too long