Explorar o código

jobs,processed,edit

David %!s(int64=10) %!d(string=hai) anos
pai
achega
36885d46ec
Modificáronse 6 ficheiros con 87 adicións e 12 borrados
  1. 8 9
      front/app.js
  2. 12 1
      front/controllers/cutCtrl.js
  3. 8 1
      front/index.html
  4. 3 1
      front/views/cut.html
  5. 26 0
      front/views/jobs.html
  6. 30 0
      front/views/processed.html

+ 8 - 9
front/app.js

@@ -7,6 +7,14 @@ app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $lo
 		templateUrl: 'views/raw.html',
 		controller: 'rawCtrl'
 	})
+	.when('/jobs', {
+		templateUrl: 'views/jobs.html',
+		controller: 'rawCtrl'
+	})
+	.when('/processed', {
+		templateUrl: 'views/processed.html',
+		controller: 'rawCtrl'
+	})
 	.when('/cut/:id', {
 		templateUrl: 'views/cut.html',
 		controller: 'cutCtrl',
@@ -19,15 +27,6 @@ app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $lo
 			}
 			}
 	})
-	.when('/processed', {
-		templateUrl: 'views/processed.html',
-		//controller: 'facturaCtrl'
-	})
-	.when('/youtube', {
-		templateUrl: 'views/youtube.html',
-		//controller: 'facturaCtrl'
-	})
-
 	.otherwise({
 		redirectTo: '/'
 	});

+ 12 - 1
front/controllers/cutCtrl.js

@@ -11,7 +11,7 @@ app.controller('cutCtrl', function ($scope, $http,video) {
 					desc: $scope.desc,
 					inicio: $scope.inicio,
 					fin: $scope.fin,
-					id: $routeParams.id
+					id: $scope.video._id
 				};
 		$http.post('/back/cut/', data).success(
 			function(data,state) {
@@ -19,5 +19,16 @@ app.controller('cutCtrl', function ($scope, $http,video) {
 			});
 	};
 
+	function getVideoTime(){
+		var video = document.getElementById("video");
+		return video.currentTime;
+	}
+	$scope.setEnd = function() {
+		$scope.fin=getVideoTime();
+	};
+	$scope.setStart = function() {
+		$scope.inicio=getVideoTime();
+	};
+
 });
 

+ 8 - 1
front/index.html

@@ -22,7 +22,14 @@
 	<div class="navbar">
 		<div class="nav-wrap">
 				<img src="images/logo-h.png">
-				TAB RAW | TAB PROCESADO | TAB YOUTUBE
+				<li>
+					<ul>
+						<a href="/">
+							TAB RAW 
+						</a>
+					</ul>
+					<ul><a href="/jobs">TAB JOBS</a></ul>
+					<ul><a href="/processed">TAB PROCESADO</a></ul>
 		</div>
 	</div>
 	<div class="clear"></div>

+ 3 - 1
front/views/cut.html

@@ -2,7 +2,7 @@
 <div>
 	<div class="row">
 		<div class="col-md-6">
-			<video width="100%" controls preload>
+			<video id="video" width="100%" controls preload>
 				<source src="{{video.file}}" type="video/mp4"> 
 				Error. Video no soportado
 			</video>
@@ -24,6 +24,8 @@
 				Desc:
 				<input ng-model="desc" type="text">
 			</label>
+			<button ng-click="setStart()">Inicio</button>
+			<button ng-click="setEnd()">Fin</button>
 			<button ng-click="post()">Enviar</button>
 		</div>
 </div>

+ 26 - 0
front/views/jobs.html

@@ -0,0 +1,26 @@
+<div>
+JOBS
+<table class="table table-striped">
+	<tr>
+		<th>Inicio</th>
+		<th>Tipo</th>
+		<th>Target</th>
+		<th>Estado</th>
+	</tr>
+	<tr ng-repeat="j in joblist">
+		<td>
+			{{j.start}}
+		</td>
+		<td>
+			{{j.type}}
+		</td>
+		<td>
+			{{j.target}}
+		</td>
+		<td>
+			{{j.status}}
+		</td>
+	</tr>
+</table>
+</div>
+

+ 30 - 0
front/views/processed.html

@@ -0,0 +1,30 @@
+<div>
+Procesados
+<table class="table table-striped">
+	<tr>
+		<th>Fecha</th>
+		<th>Archivo</th>
+		<th>Curso</th>
+		<th>Descripcion</th>
+		<th>Subir</th>
+	</tr>
+	<tr ng-repeat="v in videolist">
+		<td>
+			{{v.date}}
+		</td>
+		<td>
+			{{v.file}}
+		</td>
+		<td>
+			{{v.curso}}
+		</td>
+		<td>
+			{{v.desc}}
+		</td>
+		<td>
+			<a ng-href="/#/cut/{{r._id}}">subir</a>
+		</td>
+	</tr>
+</table>
+</div>
+