-
Notifications
You must be signed in to change notification settings - Fork 3
/
catbrowser.html
246 lines (224 loc) · 11.6 KB
/
catbrowser.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootfresco - Category Navigator</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/sticky-footer-navbar.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" src="js/lib/jquery-2.0.3.js"></script>
<script type="text/javascript" src="js/lib/purl.js"></script>
<script type="text/javascript" src="js/lib/jquery.jfeed.js"></script>
<script type="text/javascript" src="js/lib/plupload.full.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/component.categories.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<script>
checkUser();
</script>
<div class="modal fade" id="createCategoryDialog" tabindex="-1" role="dialog" aria-labelledby="createCategoryLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="createCategoryLabel">Create Category</h4>
</div>
<div class="modal-body">
<form role="form" class="form-horizontal" id="formCreateCategory">
<div class="form-group">
<label for="catName" class="col-sm-3 control-label">Category Name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="catName" placeholder="Category Name" required autofocus />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" id="btnCreateCategory">Create Category</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="editCategoryDialog" tabindex="-1" role="dialog" aria-labelledby="editCategoryLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="editCategoryLabel">Edit Category</h4>
</div>
<div class="modal-body">
<form role="form" class="form-horizontal" id="formEditCategory">
<div class="form-group">
<label for="catNewName" class="col-sm-3 control-label">Category Name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="catNewName" placeholder="Category Name" required autofocus />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" id="btnEditCategory">Save Category</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="themeDialog" tabindex="-1" role="dialog" aria-labelledby="themeDialogLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="themeDialogLabel">Bootfresco Theme</h4>
</div>
<div class="modal-body">
<form role="form" id="formTheme">
<div class="form-group">
<label for="themes">Choose from available themes</label>
<select id="themes" class="form-control">
<option value="">Default</option>
<option value="amelia">Amelia</option>
<option value="cerulean">Cerulean</option>
<option value="cyborg">Cyborg</option>
<option value="flatly">Flatly</option>
<option value="slate">Slate</option>
<option value="shamrock">Shamrock</option>
<option value="spacelab">Spacelab</option>
<option value="superhero">Superhero</option>
<option value="united">United</option>
</select>
<span class="help-block">Thanks to <a href="http://bootswatch.com/" target="_blank">Thomas Park</a> for these themes.</span>
</div>
<div class="form-group">
<label for="onlinetheme">Or, use a theme from the Web</label>
<input type="url" class="form-control" id="onlinetheme" placeholder="Theme Url" />
<span class="help-block">Clear this Url to use the chosen theme from above.</span>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-off"></span> Cancel</button>
<button type="button" class="btn btn-success" id="btnApplyTheme"><span class="glyphicon glyphicon-ok-sign"></span> Apply</button>
</div>
</div>
</div>
</div>
<div id="wrap">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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 brand" href="#" title="Bootstrap client of Alfresco">Bootfresco</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="landing.html"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li class="dropdown active">
<a id="dropRepos" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"><span class="glyphicon glyphicon-book"></span> Browser <b class="caret"></b></a>
<ul class="dropdown-menu" aria-labelledby="dropRepos" role="menu">
<li role="presentation"><a href="browser.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-book"></span> Folder Navigator</a></li>
<li role="presentation"><a href="sitebrowser.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-globe"></span> Site Navigator</a></li>
<li class="active" role="presentation"><a href="catbrowser.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-tag"></span> Category Navigator</a></li>
</ul>
</li>
<li class="dropdown">
<a id="dropMine" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"><span class="glyphicon glyphicon-inbox"></span> My Stuff <b class="caret"></b></a>
<ul class="dropdown-menu" aria-labelledby="dropMine" role="menu">
<li role="presentation"><a href="profile.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-user"></span> My Profile</a></li>
<li role="presentation"><a href="tasks.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-tasks"></span> My Tasks</a></li>
</ul>
</li>
<li class="dropdown">
<a id="dropAdmin" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"><span class="glyphicon glyphicon-star"></span> Administration <b class="caret"></b></a>
<ul class="dropdown-menu" aria-labelledby="dropAdmin" role="menu">
<li role="presentation"><a href="users.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-user"></span> Users</a></li>
<li role="presentation"><a href="groups.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-tower"></span> Groups</a></li>
<li class="divider" role="presentation"></li>
<li role="presentation"><a href="repos.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-share"></span> Repository</a></li>
<li role="presentation"><a href="cats.html" tabindex="-1" role="menuitem"><span class="glyphicon glyphicon-tags"></span> Categories</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a id="dropOptions" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"><span class="glyphicon glyphicon-wrench"></span> Options <b class="caret"></b></a>
<ul class="dropdown-menu" aria-labelledby="dropOptions" role="menu">
<li role="presentation"><a href="#" tabindex="-1" role="menuitem" data-toggle="modal" data-target="#themeDialog" id="changeTheme"><span class="glyphicon glyphicon-camera"></span> Bootfresco Theme</a></li>
</ul>
</li>
<li><a href="index.html"><span class="glyphicon glyphicon-log-out"></span> Sign out</a></li>
</ul>
<form class="navbar-form navbar-right">
<div class="form-group" style="margin-top: 4px">
<label class="sr-only" for="keyword">Keyword</label>
<input type="text" class="form-control input-sm" id="keyword" placeholder="Enter Search keyword" />
</div>
</form>
</div>
</div>
</div>
<div class="container">
<div id="msg"></div>
<div class="page-header"><h1><span class="glyphicon glyphicon-tag"></span> Category Browser</h1></div>
<ol class="breadcrumb"></ol>
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4">
<div class="panel panel-info" id="categories"></div>
</div>
<div class="col-xs-8 col-sm-8 col-md-8">
<div class="btn-toolbar">
<button type="button" class="btn btn-success btn-sm" data-toggle="modal" data-keyboard="false" data-backdrop="static" data-target="#createCategoryDialog" id="btnCreateCat"><span class="glyphicon glyphicon-plus"></span> Create a Sub-Category</button>
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-keyboard="false" data-backdrop="static" data-target="#editCategoryDialog" id="btnEditCat"><span class="glyphicon glyphicon-edit"></span> Edit Category</button>
<button type="button" class="btn btn-danger btn-sm" id="btnDeleteCat"><span class="glyphicon glyphicon-remove"></span> Delete this Category</button>
</div>
<div class="panel panel-warning" style="margin-top: 2px" id="catFiles">
<div class="panel-heading"><span class="glyphicon glyphicon-file"></span> Files</div>
<div class="table-responsive"><table class="table table-striped table-hover"><tbody id="fileList"></tbody></table></div>
</div>
</div>
</div>
</div>
</div>
<div id="footer"></div>
<script>
$(document).ready(function () {
loadStyle();
$('#btnCreateCategory').on('click', function () {
$.fn.categories.methods.manageCategory(sessionStorage.currCategory, "C");
});
$('#btnEditCategory').on('click', function () {
$.fn.categories.methods.manageCategory(sessionStorage.currCategory, "E");
});
$('#btnDeleteCat').on ('click', function () {
if (confirm("Are you sure to Delete this Category?\nThis action is non-reversible and this will delete all the sub-categories also."))
{
$.fn.categories.methods.manageCategory(sessionStorage.currCategory, "D");
}
});
$('#createCategoryDialog').on('show.bs.modal', function (e) {
$('#catName').val('');
})
$('#btnApplyTheme').click(function () {
applyStyle();
});
$('#categories').categories({
});
});
</script>
</body>
</html>