Skip to content

Commit

Permalink
Merge pull request #16 from nss-evening-cohort-04/pin-hn
Browse files Browse the repository at this point in the history
added general view
  • Loading branch information
helanan authored Dec 3, 2016
2 parents b0b3a8a + d30fe99 commit 7c12935
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 81 deletions.
41 changes: 0 additions & 41 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,3 @@ h1 {
font-family: 'Anton', sans-serif;
font-size: 1.5em;
}

/*=========================================*/ /*PARTIALS*/
/*=========================================*/

/*Login Partial*/

/*.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
margin-bottom: 10px;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}*/
11 changes: 5 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<body>
<body ng-app="PinThisApp">
<!-- <div ng-include='./partials/navbar.html'></div> -->
<div ng-include='./partials/navbar.html'></div>

<div class="row">
<h1>Pin This!</h1>
Expand All @@ -32,10 +32,9 @@ <h1>Pin This!</h1>
<script src="/javascripts/factories/BoardFactory.js">
<script src="/javascripts/factories/UserFactory.js"></script>
<script src="/javascripts/controllers/AuthCtrl.js"></script>
<!-- <script src="/javascripts/controllers/NavCtrl.js"></script> -->
<!-- <script src="/javascripts/controllers/GeneralViewCtrl.js"></script>
<script src="/javascripts/controllers/CreateBoardCtrl.js"></script> -->
<script src="/javascripts/controllers/BoardViewCtrl.js"></script>
<script src="/javascripts/controllers/BoardEditCtrl.js"></script>
<!-- <script src="/javascripts/controllers/GeneralViewCtrl.js"></script> -->
<!-- <script src="/javascripts/controllers/CreateBoardCtrl.js"></script> -->
<!-- <script src="/javascripts/controllers/BoardViewCtrl.js"></script> -->
<!-- <script src="/javascripts/controllers/BoardEditCtrl.js"></script> -->
</body>
</html>
2 changes: 1 addition & 1 deletion javascripts/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";

var app = angular.module("PinThisApp",["ngRoute"]);
var app = angular.module("PinThisApp", ["ngRoute"]);

4 changes: 2 additions & 2 deletions javascripts/controllers/NavCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ app.controller("NavCtrl", function($scope) {
},
{
name:"All Items",
url:"#/items/list"
url:"#/boards/list"
},
{
name:"New Item",
url:"#/items/new"
url:"#/boards/new"
}
];
});
2 changes: 0 additions & 2 deletions javascripts/index.js

This file was deleted.

14 changes: 14 additions & 0 deletions partials/board-new.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h3>New Todo</h3>
<form>
<div class="form-group">
<label>Pin</label>
<input type="text" class="form-control" placeholder="New Pin" ng-model="newPin.pin">
</div>

<div class="form-group">
<label>Assigned To</label>
<input type="text" class="form-control" placeholder="My Pins" ng-model="newPin.assignedTo">
</div>

<button type="button" class="btn btn-primary btn-lg col-xs-2" ng-click="addNewBoard()">New Board</button>
</form>
Empty file removed partials/create-board.html
Empty file.
37 changes: 37 additions & 0 deletions partials/general-view.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<div class="row">
<div class="col-xs-offset-2 col-xs-8" >
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default"><i class="fa fa-search"></i></button>
</span>
<input type="text" class="form-control" placeholder="Search for ..." ng-model="searchText">
</div>
</div>
</div>

<h3>Boards</h3>
<div ng-repeat="board in boards | filter: {isSelected:false} | filter:searchText">
<div class="panel panel-default">
<div class="panel-body">
<!-- boards start -->

<div class="col-xs-1"><input type="checkbox" name="" ng-model="board.isSelected" ng-change="inputChange(board)"></div>

<div class="col-xs-9"><a href="#/boards/view/{{board.id}}">{{board.pin}}</a></div>
<div class="col-xs-1">{{board.assignedTo}}</div>
<div class="col-xs-1"><button class="btn btn-danger fa fa-trash-o" ng-click="deleteBoard(board.id)"></button></div>
</div>
</div>
</div>

<h3>My Boards</h3>
<div ng-repeat="board in boards | filter: {isSelected:true} | filter:searchText">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-xs-1"><input type="checkbox" name="" ng-model="board.isSelected" ng-change="inputChange()"></div>
<div class="col-xs-9"><a href="#/boards/view/{{board.id}}">{{board.pin}}</a></div>
<div class="col-xs-1">{{board.assignedTo}}</div>
<div class="col-xs-1"><button class="btn btn-danger fa fa-trash-o" ng-click="deleteBoard(board.id)"></button></div>
</div>
</div>
</div>
17 changes: 0 additions & 17 deletions partials/login

This file was deleted.

28 changes: 20 additions & 8 deletions partials/navbar.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<img src=# alt="logo"/></img><form class="navbar-form navbar-left" role="search">
<div class="form-group">
<nav>
<input type="text" class="form-control" placeholder="Search">
</nav>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<nav class="navbar navbar-default" ng-controller="NavCtrl">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Todo App</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right" ng-repeat="thingy in navItems" ng-show="user">
<li><a href="{{thingy.url}}">{{thingy.name}}</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
8 changes: 4 additions & 4 deletions pinSeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"board0": {
"title": "Boot 1",
"assignedTo": "Helana",
"uid":""
"uid":"rVXxyfbQWDQBScEly0CQyg4XXT33"
},
"board1": {
"title": "Boot 2",
Expand All @@ -28,7 +28,7 @@
"board5": {
"title": "Boot 6",
"assignedTo": "Helana",
"uid":""
"uid":"rVXxyfbQWDQBScEly0CQyg4XXT33"
},
"board6": {
"title": "Boot 7",
Expand All @@ -44,7 +44,7 @@
"board8": {
"title": "Boot 9",
"assignedTo": "Helana",
"uid":""
"uid":"rVXxyfbQWDQBScEly0CQyg4XXT33"

},
"board9": {
Expand All @@ -60,7 +60,7 @@
"board11": {
"title": "Boot 12",
"assignedTo": "Helana",
"uid":""
"uid":"rVXxyfbQWDQBScEly0CQyg4XXT33"
}
},
"pins": {
Expand Down
71 changes: 71 additions & 0 deletions styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
body h1 {
color: green;
text-align: center; }

.search-bar {
text-align: center; }
.search-bar input {
margin-bottom: 20px; }

#incomplete-tasks, #completed-tasks {
padding-left: 40px;
padding-right: 40px; }

.new-text-container {
padding: 20px 0px; }

.newtodo-input {
padding-top: 5px; }

.inputTask {
display: none;
width: 93%;
margin-left: 10px;
margin-top: 6px; }

.inputLabel {
font-size: 18px;
line-height: 40px;
width: 237px;
padding: 0 0 0 11px; }

.checkboxStyle {
margin-top: 15px !important; }

h3 {
color: #333;
font-weight: 700;
font-size: 15px;
border-bottom: 2px solid #333;
padding: 30px 0 10px;
margin: 0; }

li * {
float: left; }

li, h3 {
clear: both;
list-style: none; }

label[for='new-task'] {
display: block;
margin: 0 0 20px; }

input#new-task {
float: left;
width: 318px; }

li {
overflow: hidden;
padding: 20px 0;
border-bottom: 1px solid #eee; }

#completed-tasks label {
text-decoration: line-through;
color: #888; }

ul li.editMode input[type=text] {
display: block; }

ul li.editMode label {
display: none; }

0 comments on commit 7c12935

Please sign in to comment.