commit
c35e3386cc
|
@ -73,7 +73,7 @@ switch($build->getStatus())
|
|||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>', 'Build').onClose = function(){refreshBuildsTable();};">Delete Build</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>" class="phpci-app-delete-build">Delete Build</a></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
@ -60,7 +60,9 @@
|
|||
<script>
|
||||
refreshBuildsTable = function()
|
||||
{
|
||||
$('#latest-builds').load('<?= PHPCI_URL ?>home/latest');
|
||||
$('#latest-builds').load('<?= PHPCI_URL ?>home/latest', function () {
|
||||
$('#latest-builds').trigger('latest-builds:reload');
|
||||
});
|
||||
};
|
||||
|
||||
setInterval(refreshBuildsTable, 10000);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>user/delete/<?php print $user->getId(); ?>', 'User', true);">Delete User</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>user/delete/<?php print $user->getId(); ?>" class="phpci-app-delete-user">Delete User</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<script src="<?= PHPCI_URL ?>assets/js/jqueryui.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/class.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/phpci.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/init.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
|
|
36
public/assets/js/init.js
Normal file
36
public/assets/js/init.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* @file init.js
|
||||
* Initialization of frontend of the application goes here
|
||||
*
|
||||
* @author Pavel Pavlov <Pavel.Pavlov@alera.ru>
|
||||
* @date 12/31/13
|
||||
* @time 3:44 AM
|
||||
* @license LICENSE.md
|
||||
*
|
||||
* @package PHPCI
|
||||
*/
|
||||
|
||||
$(function () {
|
||||
$('#latest-builds').on('latest-builds:reload', bindAppDeleteEvents);
|
||||
$('#latest-builds').trigger('latest-builds:reload');
|
||||
});
|
||||
|
||||
function bindAppDeleteEvents () {
|
||||
$('.phpci-app-delete-build').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
confirmDelete(e.target.href, 'Build').onClose = function () {
|
||||
refreshBuildsTable();
|
||||
};
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.phpci-app-delete-user').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
confirmDelete(e.target.href, 'User', true);
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue