diff --git a/PHPCI/View/Build.phtml b/PHPCI/View/Build.phtml index b34722a0..15ad8304 100644 --- a/PHPCI/View/Build.phtml +++ b/PHPCI/View/Build.phtml @@ -64,104 +64,15 @@ -getStatus() == 0 || $build->getStatus() == 1 || true): ?> - - - - - - - +
\ No newline at end of file diff --git a/assets/css/phpci.css b/assets/css/phpci.css new file mode 100644 index 00000000..076a5d59 --- /dev/null +++ b/assets/css/phpci.css @@ -0,0 +1,42 @@ +body +{ + background: #246; + font-family: Roboto, Arial, Sans-Serif; + font-style: normal; + font-weight: 300; + padding-top: 70px; +} + +#content +{ + background: #fff; + border: 10px solid #369; + padding: 10px; +} + +.widget-title, .modal-header, .table th, div.dataTables_wrapper .ui-widget-header, .ui-dialog .ui-dialog-titlebar { + background-color: #efefef; + background-image: -webkit-gradient(linear, 0 0%, 0 100%, from(#fdfdfd), to(#eaeaea)); + background-image: -webkit-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%); + background-image: -moz-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%); + background-image: -ms-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%); + background-image: -o-linear-gradient(top, #fdfdfd 0%, #eaeaea 100%); + background-image: -linear-gradient(top, #fdfdfd 0%, #eaeaea 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#eaeaea',GradientType=0 ); /* IE6-9 */ + border-bottom: 1px solid #CDCDCD; +} + +#title +{ + background: #f8f8f8; + border-bottom: 1px solid #ccc; + margin: -10px -10px 15px -10px; + padding: 10px; +} + + #title h1 + { + font-size: 2em; + margin: 0; + padding: 0; + } \ No newline at end of file diff --git a/assets/js/.DS_Store b/assets/js/.DS_Store deleted file mode 100644 index e018eaeb..00000000 Binary files a/assets/js/.DS_Store and /dev/null differ diff --git a/assets/js/phpci.js b/assets/js/phpci.js new file mode 100644 index 00000000..49c758f7 --- /dev/null +++ b/assets/js/phpci.js @@ -0,0 +1,171 @@ +/** +* Used for delete buttons in the system, just to prevent accidental clicks. +*/ +function confirmDelete(url) +{ + if(confirm('Are you sure you want to delete this?')) + { + window.location.href = url; + } + else + { + return false; + } +} + +/** +* Updates the build screen. Called at regular intervals on /build/view/X +*/ +function updateBuildView(data) +{ + $('#status').attr('class', 'alert'); + + var cls; + var msg; + + switch(data.status) + { + case 0: + cls = 'alert-info'; + msg = 'This build has not yet started.'; + break; + + case 1: + cls = 'alert-warning'; + msg = 'This build is in progress.'; + break; + + case 2: + cls = 'alert-success'; + msg = 'This build was successful!'; + break; + + case 3: + cls = 'alert-error'; + msg = 'This build has failed.'; + break; + } + + $('#status').addClass(cls).text(msg); + + if(data.created) + { + $('#created').text(data.created); + } + else + { + $('#created').text('Not created yet.'); + } + + if(data.started) + { + $('#started').text(data.started); + } + else + { + $('#started').text('Not started yet.'); + } + + if(data.finished) + { + $('#finished').text(data.finished); + } + else + { + $('#finished').text('Not finished yet.'); + } + + if(data.plugins) + { + $('#plugins').empty(); + + for(var plugin in data.plugins) + { + var row = $('