-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
261 lines (245 loc) · 11.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html lang="en" ng-app="App">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Nower</title>
<meta name="generator" content="Bootply"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Bootstrap Core CSS -->
<ink rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="./lib/bower_components/bootstrap/dist/css/bootstrap.min.css"/>
<!-- Custom CSS -->
<link href="css/styles.css" rel="stylesheet">
<!-- alerts CSS-->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- references scripts -->
<script type="text/javascript" src="lib/bower_components/jquery/dist/jquery.min.js"></script>
<!-- bootstrap scripts -->
<script type="text/javascript" src="lib/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> -->
<!-- angular scripts -->
<script src="http://code.angularjs.org/1.2.25/angular.js"></script>
<script src="js/lib/angular-local-storage.js"></script>
<script src="https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.js"></script>
<script src="js/lib/angular.dcb-clear-input.js"></script>
<!-- scripts alerts -->
<script src="js/lib/angular-ui-bootstrap0.12.1.js"></script>
<!-- Controllers -->
<script src="js/controllers/app.js"></script>
<script src="js/controllers/login.js"></script>
<script src="js/controllers/post_promotion.js"></script>
<script src="js/controllers/create_branch.js"></script>
<script src="js/controllers/create_store.js"></script>
<script src="js/controllers/redeem_promotion.js"></script>
<script src="js/controllers/detail_promotion.js"></script>
<script src="js/controllers/modify_branches.js"></script>
<script src="js/controllers/modify_promotion.js"></script>
<script src="js/controllers/admin_branches.js"></script>
<script src="js/controllers/admin_promotions.js"></script>
<script src="js/controllers/admin_store.js"></script>
<!-- <script src="js/controllers/test.js"></script> -->
<!-- <script src="js/controllers/script_data.js"></script> -->
<!-- <link rel="stylesheet" href="bower_components/html5-boilerplate/css/ui-bootstrap.css"> -->
<script>
if(sessionStorage.getItem("token") != null){
function logout(){
sessionStorage.removeItem("token");
sessionStorage.removeItem("storeId");
window.location.assign("./index.html");
}
window.onload = function what(){
if(sessionStorage.getItem("token") == null){
window.location.assign("./index.html")
}
};
}
</script>
<script>
window.onload = function what(){
if(sessionStorage.getItem("token") != null){
$('#list1 #' + 'branchItem').show();
$('#list1 #' + 'promoItem').show();
$('#list1 #' + 'codeItem').show();
$('#list1 #' + 'modifyBranchItem').show();
$('#list2 #' + 'logginItem').hide();
$('#list2 #' + 'registerItem').hide();
$('#list2 #' + 'userItem').show();
}else {
$('#list1 #' + 'branchItem').hide();
$('#list1 #' + 'promoItem').hide();
$('#list1 #' + 'codeItem').hide();
$('#list1 #' + 'modifyBranchItem').hide();
$('#list2 #' + 'logginItem').show();
$('#list2 #' + 'registerItem').show();
$('#list2 #' + 'userItem').hide();
}
};
</script>
</head>
<body>
<!-- Navigation bar -->
<div class="navbar navbar-custom navbar-fixed-top">
<div class="navbar-header"><a class="navbar-brand" href="#">Nower</a>
<a class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</div>
<div class="navbar-collapse collapse" ng-controller="LoadStoreName">
<ul id="list1" class="nav navbar-nav">
<li id="branchItem">
<a href="views/create_branch.html">
<span>Nueva sucursal</span>
</a>
</li>
<li id="promoItem">
<a href="views/post_promotion.html">
<span>Nueva promoción</span>
</a>
</li>
<li id="codeItem">
<a href="views/redeem_promotion.html">
<span>Redimir código</span>
</a>
</li>
</ul>
<ul id="list2"class="nav navbar-nav navbar-right">
<li id="logginItem">
<a data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-log-in"></span> Iniciar Sesion</a>
</li>
<li style="margin-right:10px;" id="registerItem">
<a href="views/create_store.html"><span class="glyphicon glyphicon-user"></span> Registrarse</a>
</li>
<li id="userItem" class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">{{storeName}} <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>
<a href="views/admin_promotions.html"><span class="glyphicon glyphicon-pencil"></span> Administrar promociones</a>
</li>
<li>
<a href="views/admin_branches.html"><span class="glyphicon glyphicon-pencil"></span> Administrar sucursales</a>
</li>
<li>
<a href="views/admin_store.html"><span class="glyphicon glyphicon-pencil"></span> Administrar tienda</a>
</li>
<li onclick="logout()">
<a><span class="glyphicon glyphicon-off"></span> Cerrar Sesion</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- imágenes -->
<div class="box" id="carouselBox">
<div class="row">
<div class="col-md-10 col-md-offset-2 text-center">
<div id="carousel-example-generic" class="carousel slide">
<!-- Indicators -->
<ol class="carousel-indicators hidden-xs">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img class="img-responsive img-full" src="rs/img/promo1.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive img-full" src="rs/img/promo2.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive img-full" src="rs/img/promo3.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive img-full" src="rs/img/promo4.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive img-full" src="rs/img/promo5.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive img-full" src="rs/img/promo6.jpg" alt="">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
</div>
</div>
</div>
<!--login Modal-->
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" ng-controller="SendLoginCtrl">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="text-center">Iniciar sesión</h1>
<!-- alert -->
<div class="form-group" ng-controller="AlertDemoCtrl">
<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</alert>
</div>
</div>
<div class="row">
<div class="col-xs-8 col-sm-8 col-md-8 col-xs-push-2 col-sm-push-2 col-md-push-2">
<div class="modal-body">
<form id="loginForm" class="form center-block" class="form-horizontal" ng-submit="loginStore(store)">
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-envelope"></i>
</span>
<input type="email" class="form-control input-lg" placeholder="Correo electrónico" ng-model="store.email">
</div>
<br />
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-lock"></i>
</span>
<input type="password" class="form-control input-lg" placeholder="Contraseña" ng-model="store.password">
</div>
<br />
<div class="form-group">
<button class="btn btn-primary btn-lg btn-block">Ingresar</button>
<span class="pull-right"><a href="views/create_store.html">Registrarse</a></span><span><a href="#">¿Necesita ayuda?</a></span>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-xs-pull-5 col-sm-pull-5 col-md-pull-5">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancelar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p class="copyright text-muted text-center">Copyright © Nower 2015</p>
</div>
</div>
</div>
</footer>
<script>
$('.carousel').carousel({
interval: 5000 //changes the speed
})
</script>
</body>
</html>