Mercurial > hg > webaudioevaluationtool
changeset 3098:348d59ab726e
Test creator uses Bootstrap modals
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 16 Jan 2018 15:23:45 +0000 |
parents | c8707694f4e7 |
children | fc9718756d55 |
files | test_create.html test_create/style.css test_create/test_core.js |
diffstat | 3 files changed, 35 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/test_create.html Tue Jan 16 14:33:07 2018 +0000 +++ b/test_create.html Tue Jan 16 15:23:45 2018 +0000 @@ -1089,42 +1089,44 @@ </div> </div> </div> - <div id="popupHolder" ng-show="popupVisible"> - <div ng-controller="introduction" class="popup" ng-show="popupVisible"> - <div class="popupTitle" ng-switch="state"> - <span ng-switch-when="0">Test Creator <span class="label label-primary">v1.2.2</span></span> - <span ng-switch-when="1">Create New Test</span> - </div> - <div class="popupContent container-fluid" ng-switch="state"> - <div ng-switch-when="0"> - <div> - <span>Welcome to the WAET test creator tool. This will allow you to create a new test from scratch to suit your testing needs. If you wish to update a test file, please drag and drop the XML document into the area below for processing, otherwise press 'Next' to start a new test. This tool generates files for the WAET 1.2.2 version.</span> + <div class="modal fade bs-example-modal-lg" id="popupHolder" tabindex="-1" role="dialog" ng-controller="introduction"> + <div class="modal-dialog modal-lg" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h4>Test Creator</h4> + <h4 class="label label-primary">v1.2.3</h4> + </div> + <div class="modal-body" ng-switch="state"> + <div ng-switch-when="0"> + <div> + <span>Welcome to the WAET test creator tool. This will allow you to create a new test from scratch to suit your testing needs. If you wish to update a test file, please drag and drop the XML document into the area below for processing, otherwise press 'Next' to start a new test. This tool generates files for the WAET 1.2.3 version.</span> + </div> + <div> + <input type="file" id="files" ng-model="files" onchange="handleFiles(event)" /> + </div> </div> - <div> - <input type="file" id="files" ng-model="files" onchange="handleFiles(event)" /> - </div> - </div> - <div ng-switch-when="1"> - <div> - <span>Please select the interface you would like to use below. Selecting an interface will give a brief description of the interface type.</span> - </div> - <div class="row"> - <div class="col-md-6" style="overflow-y: scroll;height: 333px;"> - <div class="new-test" ng-repeat="i in testSpecifications.interfaces" ng-mouseover="mouseover(i.name)" ng-click="select(i.name)"> - <label style="cursor:pointer"> - <input type="radio" name="new-test" value="{{i.name}}" id="i.name" style="cursor:pointer" /> {{i.name}} - </label> + <div ng-switch-when="1"> + <div> + <span>Please select the interface you would like to use below. Selecting an interface will give a brief description of the interface type.</span> + </div> + <div class="row"> + <div class="col-md-6" style="overflow-y: scroll;height: 333px;"> + <div class="new-test" ng-repeat="i in testSpecifications.interfaces" ng-mouseover="mouseover(i.name)" ng-click="select(i.name)"> + <label style="cursor:pointer"> + <input type="radio" name="new-test" value="{{i.name}}" id="i.name" style="cursor:pointer" /> {{i.name}} + </label> + </div> </div> - </div> - <div class="col-md-6"> - <span>{{description}}</span> + <div class="col-md-6"> + <span>{{description}}</span> + </div> </div> </div> </div> - </div> - <div class="popupButtons"> - <button id="popupBack" type="button" class="btn btn-default" ng-show="state>0" ng-click="back()">Back</button> - <button id="popupNext" type="button" class="btn btn-default" ng-click="next()">Next</button> + <div class="modal-footer"> + <button id="popupBack" type="button" class="btn btn-default" ng-show="state>0" ng-click="back()">Back</button> + <button id="popupNext" type="button" class="btn btn-default" ng-click="next()">Next</button> + </div> </div> </div> </div>
--- a/test_create/style.css Tue Jan 16 14:33:07 2018 +0000 +++ b/test_create/style.css Tue Jan 16 15:23:45 2018 +0000 @@ -8,12 +8,6 @@ background-color: rgba(0, 0, 0, 0.75); } #popupHolder { - text-align: center; - width: 100%; - height: 100%; - position: fixed; - top: 0px; - z-index: 2; } .popup { position: relative;
--- a/test_create/test_core.js Tue Jan 16 14:33:07 2018 +0000 +++ b/test_create/test_core.js Tue Jan 16 15:23:45 2018 +0000 @@ -72,6 +72,7 @@ window.onload = function () { // Get the test interface specifications toggleDropdowns(); + $("#popupHolder").modal("show"); }; function toggleDropdowns() { @@ -87,7 +88,6 @@ } AngularInterface.controller("view", ['$scope', '$element', '$window', function ($s, $e, $w) { - $s.popupVisible = true; $s.testSpecifications = {}; (function () { @@ -111,12 +111,6 @@ }); })(); - $s.showPopup = function () { - $s.popupVisible = true; - }; - $s.hidePopup = function () { - $s.popupVisible = false; - }; $s.globalSchema = undefined; get("xml/test-schema.xsd").then(function (text) { specification.processSchema(text); @@ -216,7 +210,7 @@ $s.next = function () { $s.state++; if ($s.state > 1 || $s.file) { - $s.hidePopup(); + $($e[0]).modal('hide') $s.initialise($s.selected); } };