Skip to content

Commit

Permalink
#5 : Open PsNext
Browse files Browse the repository at this point in the history
  • Loading branch information
zorelien committed Nov 26, 2014
1 parent 733be55 commit a0e55d2
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
11 changes: 10 additions & 1 deletion src/main/java/cantine/controller/PsNext.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;
import java.util.Date;

@RestController
public class PsNext {
Expand All @@ -26,4 +25,14 @@ public boolean getPsNext() throws Exception {
return false;
}

@RequestMapping(value = "/openPs", method = RequestMethod.GET)
@ResponseBody
public void openPsNext() throws Exception {
Runtime runtime = Runtime.getRuntime();
//runtime.exec(new String[] { "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe", "https://ressources.rh.recouv/index.php?module=1140"} );
//TODO a paramétrer
runtime.exec(new String[] { "C:\\Windows\\SysWOW64\\javaws.exe ", "-localfile", "-J-Djnlp.application.href=http://sciforma.altair.recouv/sciforma/128/WebStart_fr.jnlp",
"D:\\UTILISATEURS\\CER3100444\\AppData\\LocalLow\\Sun\\Java\\Deployment\\cache\\6.0\\42\\2e7526a-55dccc3d"} );
}

}
6 changes: 3 additions & 3 deletions src/main/resources/static/accueil.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<strong>Cool!</strong> T'as un café gratos!!!!
</div>

<!--PsNext-->
<div ng-show="psNext" class="alert alert-warning alert-dismissible" role="alert" ng-cloak>
<!--PsNext ng-show="psNext" -->
<div class="alert alert-warning alert-dismissible" role="alert" ng-cloak>
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
</button>
<strong>C'est vendredi</strong> Fais ton PsNext!!!!
C'est vendredi, fais ton <span class="cursor" ng-click="openPsNext()"> <strong>PsNext</strong> </span> !!!
</div>

<div class="jumbotron">
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/static/css/cantine.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ table.table tr.odd td.cell_selected {

span.mvt {
margin-left: 15px;
}

.cursor {
cursor: pointer;
}
7 changes: 6 additions & 1 deletion src/main/resources/static/js/controllers/accueil.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var accueilControllers = angular.module('accueilControllers',['ui.bootstrap']);

//accueil Hello
accueilControllers.controller('AccueilCtrl', ['$scope', 'userNameService', 'asTuBadgeService', 'menuDuJourService', 'psNextService' , function ($scope, userNameService, asTuBadgeService, menuDuJourService, psNextService) {
accueilControllers.controller('AccueilCtrl', ['$scope', 'userNameService', 'asTuBadgeService', 'menuDuJourService', 'psNextService', 'openPsNextService' , function ($scope, userNameService, asTuBadgeService, menuDuJourService, psNextService, openPsNextService) {

var username;

Expand Down Expand Up @@ -39,6 +39,11 @@ accueilControllers.controller('AccueilCtrl', ['$scope', 'userNameService', 'asTu
});


$scope.openPsNext = function(nom) {
openPsNextService.openPsNext();
}


// TODO refactoriser avec la methode mail de cantine
// methode appeler lorsqu'on appuie sur le bouton mail
// 1. enregiste le choix du plat
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/js/iLikeCirso.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var myApp = angular.module('ILikeCirso', ['ngRoute', 'accueilControllers', 'menuControllers', 'badgeuseControllers','ui.bootstrap','iLikeCirsoAnimations']);
var myApp = angular.module('ILikeCirso', ['ngRoute', 'accueilControllers', 'menuControllers', 'badgeuseControllers', 'ui.bootstrap','iLikeCirsoAnimations']);



Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/static/js/services/psNextService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ myApp.factory('psNextService', function($http) {
}
});


myApp.factory('openPsNextService', function($http) {
return {
openPsNext : function() {
return $http.get('/openPs');
}
}
});

0 comments on commit a0e55d2

Please sign in to comment.