Tasks Should Work... Maybe

This commit is contained in:
Sagi Dayan 2015-08-03 00:22:10 +03:00
parent 35ecdd1f60
commit b1f8a6f4f3
3 changed files with 41 additions and 23 deletions

View file

@ -92,17 +92,11 @@ body.noscroll
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75); box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
} }
/* Added BY devMatan */ .md-toolbar-tools h1 {
font-size: inherit;
/*.disabledSubmitButton: font-weight: inherit;
{ margin: inherit;
/*background: #f7f7f7;*/ }
/*border-radius: 10000px;*/
/*text-align: center;*/
/*position: relative !important;*
}*/
.campusAvatar img .campusAvatar img
{ {
@ -298,6 +292,16 @@ body.noscroll
cursor: pointer; cursor: pointer;
} }
.hoverable{
cursor: pointer;
}
.hoverable:hover{
cursor: pointer;
background-color: #E2E2E2;
}
.se-menu li:active{ .se-menu li:active{
background-color: #B2B2B2; background-color: #B2B2B2;
text-shadow:#e0e0e0 1px 1px 0; text-shadow:#e0e0e0 1px 1px 0;

View file

@ -19,7 +19,7 @@ angular.module('SeHub')
///Need to show the List ///Need to show the List
$mdDialog.show({ $mdDialog.show({
controller: DialogController, controller: DialogController,
templateUrl: 'templates/views/UserStateList.html?v=1', templateUrl: 'templates/views/UserStateList.html?v=1122231',
parent: $scope, parent: $scope,
targetEvent: ev, targetEvent: ev,
locals: { locals: {
@ -43,9 +43,9 @@ angular.module('SeHub')
} }
apiService.isTaskSubmitted(token, task.id, ownerId).success(function(data) { apiService.isTaskSubmitted(token, task.id, ownerId).success(function(data) {
if (data.submitted) if (data.submitted)
$location.path('/tasks/overview/' + task.id + '/' + ownerId + '/' + ownerId) $location.path('/tasks/overview/' + task.id + '/' + ownerId + '/' + ownerId);
else else
$location.path('/tasks/fill/' + task.id + '/' + ownerId) $location.path('/tasks/fill/' + task.id + '/' + ownerId);
}) })
}).error(function(err) { }).error(function(err) {
console.error('Error: ', err); console.error('Error: ', err);
@ -56,8 +56,6 @@ angular.module('SeHub')
function DialogController($scope, $mdDialog, data, apiService) { function DialogController($scope, $mdDialog, data, apiService) {
console.log(apiService);
$scope.task = data.task; $scope.task = data.task;
$scope.isPersonal = data.isPersonal; $scope.isPersonal = data.isPersonal;
var token = data.token; var token = data.token;
@ -71,6 +69,11 @@ angular.module('SeHub')
$scope.hide(); $scope.hide();
}) })
$scope.goToTask = function(obj){
$mdDialog.hide();
$location.path('/tasks/overview/' + $scope.task.id + '/' + obj.id + '/' + obj.id);
}
$scope.hide = function() { $scope.hide = function() {
$mdDialog.hide(); $mdDialog.hide();

View file

@ -1,4 +1,4 @@
<md-dialog aria-label="Class Status" style='width: 80%'> <md-dialog aria-label="Class Status" style='width: 60%'>
<form> <form>
<md-toolbar> <md-toolbar>
<div class="md-toolbar-tools"> <div class="md-toolbar-tools">
@ -10,14 +10,14 @@
</div> </div>
</md-toolbar> </md-toolbar>
<md-dialog-conten layout-padding> <md-dialog-conten layout-padding>
<div ng-if='loading'> <!-- <div ng-if='loading'>
</div> </div>
<div ng-if='!loading'> <div ng-if='!loading'>
<div ng-repeat="obj in classList"> <div ng-repeat="obj in classList">
<div layout='row' width='100%' > <div layout='row' width='100%' max-height="20px">
<div> <div>
<img ng-src="{{obj.avatar_url || obj.logo_url}}" alt="" class='campusAvatar' style='max-height:auto'> <img ng-src="{{obj.avatar_url || obj.logo_url}}" alt="" class='campusAvatar' style='max-height=15px'>
</div> </div>
<div class='spacer'></div> <div class='spacer'></div>
<div>{{obj.name || obj.projectName}}</div> <div>{{obj.name || obj.projectName}}</div>
@ -28,9 +28,20 @@
</div> </div>
<md-divider ng-if="!$last"></md-divider> <md-divider ng-if="!$last"></md-divider>
</div> </div>
</div> </div> -->
<md-list>
<md-list-item class="md-3-line hoverable" ng-repeat="obj in classList" layout="row" ng-click='goToTask(obj)'>
<img ng-src="{{obj.avatar_url || obj.logo_url}}?{{$index}}" class="md-avatar" alt="{{obj.id}}" />
<div class="md-list-item-text">
<h4>{{obj.name || obj.projectName}}</h3>
<p>Grade: {{obj.grade.grade || "Not Yet Reviewed"}}</p>
<!-- <p>{{ item.notes }}</p> -->
</div>
</md-list-item>
</md-list>
</md-dialog-content> </md-dialog-content>
<div class="md-actions" layout="row"> <!-- <div class="md-actions" layout="row">
<md-button href="http://en.wikipedia.org/wiki/Mango" target="_blank" hide show-md> <md-button href="http://en.wikipedia.org/wiki/Mango" target="_blank" hide show-md>
More on Wikipedia More on Wikipedia
</md-button> </md-button>
@ -41,6 +52,6 @@
<md-button ng-click="answer('useful')" class="md-primary"> <md-button ng-click="answer('useful')" class="md-primary">
Useful Useful
</md-button> </md-button>
</div> </div> -->
</form> </form>
</md-dialog> </md-dialog>