Skip to content

Commit

Permalink
#4 Adding fields to the input
Browse files Browse the repository at this point in the history
  • Loading branch information
eysteinbye committed Mar 12, 2014
1 parent 48cbc41 commit a2e461a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
25 changes: 22 additions & 3 deletions index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js"></script>
<script src="js/controller.js"></script>

<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body data-ng-controller="SaveController">
Expand All @@ -22,13 +21,33 @@ <h1>ShowMe.</h1>
</div>

<label>
Message
<input data-ng-show="user" type="text" data-ng-model="desc" data-ng-keydown="addMessage($event)" placeholder="Message...">
Description
<input data-ng-show="user" type="text" data-ng-model="desc" data-ng-keydown="addMessage($event)" placeholder="Description...">
</label>
<label>
Product name
<input data-ng-show="user" type="text" data-ng-model="product" data-ng-keydown="addMessage($event)" placeholder="Product name...">
</label>
<label>
Time
<input data-ng-show="user" type="text" data-ng-model="startTime" data-ng-keydown="addMessage($event)" placeholder="Time...">
</label>
<label>
ShowID
<input data-ng-show="user" type="text" data-ng-model="showId" data-ng-keydown="addMessage($event)" placeholder="ShowID...">
</label>
<label>
Code
<input data-ng-show="user" type="text" data-ng-model="code" data-ng-keydown="addMessage($event)" placeholder="Code...">
</label>
<label>
CodeType
<input data-ng-show="user" type="text" data-ng-model="codeType" data-ng-keydown="addMessage($event)" placeholder="CodeType...">
</label>
<label>
Image
<input data-ng-show="user" type="text" data-ng-model="imageUrl" data-ng-keydown="addMessage($event)" placeholder="Image">
</label>

<span data-ng-hide="user">
<a data-ng-click="loginFacebook()">Login fb</a>
Expand Down
5 changes: 5 additions & 0 deletions js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ function SaveController($scope, angularFire, angularFireAuth) {
$scope.messages.push({
name: $scope.user.name,
product: $scope.product,
startTime: $scope.startTime,
showId: $scope.showId,
code: $scope.code,
codeType: $scope.codeType,
imageUrl: $scope.imageUrl,
desc: $scope.desc
});

Expand Down

0 comments on commit a2e461a

Please sign in to comment.