diff --git a/TugasBesar2_2017/WebApp/src/main/webapp/WEB-INF/order_driver.jsp b/TugasBesar2_2017/WebApp/src/main/webapp/WEB-INF/order_driver.jsp index ea7a8120c818fe502900d7b642ed1d3b18ce4936..2addc5db67340938736fd985c4c57c55c557c1db 100644 --- a/TugasBesar2_2017/WebApp/src/main/webapp/WEB-INF/order_driver.jsp +++ b/TugasBesar2_2017/WebApp/src/main/webapp/WEB-INF/order_driver.jsp @@ -3,7 +3,7 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<div ng-app= "" class="container"> +<div ng-app= "showApp" class="container"> <div class="wrapper row"> <div> <div class="page-title row txt-center height-fit float-container"> @@ -12,13 +12,13 @@ </div> </div> </div> - <div class="order-form"> + <div class="order-form" ng-controller="controlShow"> <div class="txt-center"> - <h2 ng-show="show" class="inline-block">Finding Order....</h2> + <h2 ng-show="textFind" class="inline-block">Finding Order....</h2> </div> <div class="txt-center"> - <button class="form-input find-button" ng-hide="closeFind" ng-click="show=true; showClose=true; closeFind=true">FIND ORDER</button> - <button class="close-button-order" ng-show="showClose" ng-click="show=false; closeFind=false; showClose=false">CLOSE</button> + <button class="form-input find-button" ng-hide="buttonFind" ng-click="hideFind()">FIND ORDER</button> + <button class="close-button-order" ng-show="buttonClose" ng-click="hideClose()">CLOSE</button> </div> </div> </div> @@ -30,3 +30,22 @@ <script> window.onload = toggleActive("nav-order"); </script> +<script> + var showApp = angular.module('showApp', []) + .controller('controlShow', function($scope) { + $scope.hideFind = function() { + $scope.textFind = true; + $scope.buttonClose = true; + $scope.buttonFind = true; + }; + + $scope.hideClose = function() { + $scope.textFind = false; + $scope.buttonFind = false; + $scope.buttonClose = false; + + }; + + }); + +</script>