Clicking on cancel inside a popover doesn't reload the page
This commit is contained in:
parent
5efb06f6f3
commit
746e1a4e3d
|
|
@ -14,7 +14,7 @@
|
|||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?php if ($ajax): ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?> <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $values['project_id'])) ?>
|
||||
<?= t('or') ?> <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -35,6 +35,11 @@ var Kanboard = (function() {
|
|||
$("#popover-content").click(function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(".close-popover").click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#popover-container').remove();
|
||||
});
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
|
|
|
|||
Loading…
Reference in New Issue