Improve javascript code and remove CSP errors
This commit is contained in:
@@ -107,7 +107,7 @@ abstract class Base
|
||||
$this->session->open(BASE_URL_DIRECTORY, SESSION_SAVE_PATH);
|
||||
|
||||
// HTTP secure headers
|
||||
$this->response->csp();
|
||||
$this->response->csp(array('style-src' => "'self' 'unsafe-inline'"));
|
||||
$this->response->nosniff();
|
||||
$this->response->xss();
|
||||
$this->response->hsts();
|
||||
|
||||
@@ -29,5 +29,3 @@
|
||||
<?php endif ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?= Helper\js('assets/js/board.js') ?>
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<a class="task-board-popover" href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> -
|
||||
<a class="task-edit-popover" href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> -
|
||||
|
||||
<span class="task-board-user">
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<a class="task-board-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a>
|
||||
<a class="assignee-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a>
|
||||
<?php else: ?>
|
||||
<a class="task-board-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-board-nobody"><?= t('Nobody assigned') ?></a>
|
||||
<a class="assignee-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-board-nobody"><?= t('Nobody assigned') ?></a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a href="?controller=file&action=download&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>"><?= Helper\escape($file['name']) ?></a>
|
||||
<span class="task-show-file-actions">
|
||||
<?php if ($file['is_image']): ?>
|
||||
<a href="?controller=file&action=open&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>" class="popover"><?= t('open') ?></a>,
|
||||
<a href="?controller=file&action=open&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>" class="file-popover"><?= t('open') ?></a>,
|
||||
<?php endif ?>
|
||||
<a href="?controller=file&action=confirm&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>"><?= t('remove') ?></a>
|
||||
</span>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<?= Helper\js('assets/js/jquery-ui-1.10.4.custom.min.js') ?>
|
||||
<?= Helper\js('assets/js/jquery.ui.touch-punch.min.js') ?>
|
||||
<?= Helper\js('assets/js/chosen.jquery.min.js') ?>
|
||||
<?= Helper\js('assets/js/app.js') ?>
|
||||
|
||||
<?= Helper\css('assets/css/app.css') ?>
|
||||
<?= Helper\css('assets/css/font-awesome.min.css') ?>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit a task') ?></h2>
|
||||
<?php if (!$ajax): ?>
|
||||
<?php if (! $ajax): ?>
|
||||
<ul>
|
||||
<li><a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="?controller=task&action=update&task_id=<?= $task['id'] ?>&ajax=<?= $ajax ?>" autocomplete="off">
|
||||
@@ -50,14 +50,12 @@
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?php if ($ajax): ?>
|
||||
<a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
|
||||
<?php endif ?>
|
||||
<?php if ($ajax): ?>
|
||||
<a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<?= Helper\js('assets/js/task.js'); ?>
|
||||
|
||||
@@ -13,6 +13,4 @@
|
||||
<?= $task_content_for_layout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<?= Helper\js('assets/js/task.js') ?>
|
||||
</section>
|
||||
@@ -49,6 +49,4 @@
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<?= Helper\js('assets/js/task.js'); ?>
|
||||
</section>
|
||||
Reference in New Issue
Block a user