forked from simogeo/Filemanager
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
182 lines (163 loc) · 8.55 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>File Manager</title>
<style type="text/css">
#loading-wrap {
position:fixed;
height:100%;
width:100%;
overflow:hidden;
top:0;
left:0;
display:block;
background: white url(./images/wait30trans.gif) no-repeat center center;
z-index:999;
}
</style>
<!-- CSS dynamically added using 'config.options.theme' defined in config file -->
</head>
<body>
<div id="loading-wrap" data-bind="visible: loading"><!-- loading wrapper / removed when loaded --></div>
<div>
<div id="uploader" method="post">
<div class="pull-left">
<h6 data-bind="text: language.current_folder + currentFolder().path()"></h6>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" data-bind="click: goLevelUp, visible: notHome"><span class="glyphicon glyphicon-level-up"></span></button>
<button type="button" class="btn btn-default" data-bind="click: goHome, visible: notHome"><span class="glyphicon glyphicon-home"></span></button>
<button type="button" class="btn btn-default" data-bind="click: function (){currentView('uploads');}, visible: canUpload"><span class="glyphicon glyphicon-upload"> {{language.upload}}</span></button>
<button type="button" class="btn btn-default" data-bind="click: currentFolder().createFolder"><span class="glyphicon glyphicon-folder-open"></span> {{language.new_folder}}</button>
<button type="button" data-bind="title: language.list_view, click: switchViews" class="btn btn-default"><span data-bind="css: mainSubViewButtonClass"></span></button>
</div>
<div class="clearfix"></div>
</div>
<div id="splitter">
<div>
<div id="tree2" data-bind="fancytree: currentFolder, browseToItem: browseToItem">
</div>
</div>
<div id="fileinfo">
<div class="btn-group">
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-alphabet"
data-toggle="tooltip" data-placement="top" title="Name Ascending"
data-bind="click: function (){sortedBy('nameAsc');}, css: { active: sortedBy() === 'nameAsc' }"></button>
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-alphabet-alt"
data-toggle="tooltip" data-placement="top" title="Name Descending"
data-bind="click: function (){sortedBy('nameDesc');}, css: { active: sortedBy() === 'nameDesc' }"></button>
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-order"
data-toggle="tooltip" data-placement="top" title="Size Ascending"
data-bind="click: function (){sortedBy('sizeAsc');}, css: { active: sortedBy() === 'sizeAsc' }"></button>
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-order-alt"
data-toggle="tooltip" data-placement="top" title="Size Descending"
data-bind="click: function (){sortedBy('sizeDesc');}, css: { active: sortedBy() === 'sizeDesc' }"></button>
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-attributes"
data-toggle="tooltip" data-placement="top" title="Date Ascending"
data-bind="click: function (){sortedBy('dateAsc');}, css: { active: sortedBy() === 'dateAsc' }"></button>
<button type="button" class="btn btn-default glyphicon glyphicon-sort-by-attributes-alt"
data-toggle="tooltip" data-placement="top" title="Date Descending"
data-bind="click: function (){sortedBy('dateDesc');}, css: { active: sortedBy() === 'dateDesc' }"></button>
</div>
<div data-bind="template: {name: mainView, afterRender: afterRender}">
</div>
</div>
</div>
<div id="footer">
<div class="pull-left">
<p data-bind="text: language.version + config.version"></p>
</div>
<div class="pull-right">
<a data-bind="attr: {href: config.url}" id="link-to-project"></a>
<div id="folder-info">
<span id="items-counter" data-bind="with: currentFolder">{{itemCount}}</span> {{language.items}} - {{language.size}} : <span id="items-size">{{currentFolder().itemSize | sizeInKb:10}}</span>
</div>
</div>
<div class="clearfix"></div>
</div>
<script type="text/html" id="uploads-template">
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone"></form>
</script>
<script type="text/html" id="grid-template">
<div class="container-fluid">
<div class="row" data-bind="with: currentFolder">
<div id="contents" class="" data-bind="foreach: {data: sortedItems, as: 'item'}">
<div class="col-xs-12 col-sm-4 col-md-3 col-lg-2 col-fix grid-border text-center" data-bind="click: $root.browseToItem, contextMenu: menu">
<img width="64" data-bind="attr: {src: getIconUrl, alt: getIconUrl, dataPath: getIconUrl}"/>
<p class="text-center" data-bind="text: item.filename"></p>
</div>
</div>
</div>
</div>
</script>
<script type="text/html" id="list-template">
<table class="table" data-bind="with: currentFolder">
<thead>
<tr>
<th>{{$root.language.name}}</th>
<!--<th>{{$root.language.dimensions}}</th>-->
<th>{{$root.language.size}}</th>
<th>{{$root.language.modified}}</th>
</tr>
</thead>
<tbody data-bind="foreach: {data: sortedItems, as: 'item'}">
<tr class="cap_select cap_download cap_rename cap_delete cap_replace" data-bind="click: $root.browseToItem, contextMenu: menu">
<td><span data-bind="css: item.isDirectory() ? 'glyphicon glyphicon-folder-close' : 'glyphicon glyphicon-file'"> {{item.filename}}</span> </td>
<!--<td>{{item.properties().height}}x{{item.properties().width}}</td>-->
<td>{{item.properties().size | sizeInKb:10}}</td>
<td>{{item.properties().dateModified}}</td>
</tr>
</tbody>
</table>
</script>
<script type="text/html" id="main-template">
<div data-bind="template: {name: mainSubView}"></div>
</script>
<script type="text/html" id="details-template">
<div class="text-center" data-bind="with: currentFolder().currentItem">
<div data-bind="template: {name: templateName}"></div>
<div>
<button class="btn" data-bind="click: selectMe, visible: $root.canSelect">{{$root.language.select}}</button>
<button class="btn" data-bind="click: download, visible: canDownload">{{$root.language.download}}</button>
<button class="btn" data-bind="click: rename, visible: $root.canRename">{{$root.language.rename}}</button>
<button class="btn" data-bind="click: move, visible: $root.canMove">{{$root.language.move}}</button>
<button class="btn" data-bind="click: removeMe, visible: $root.canDelete">{{$root.language.del}}</button>
<!--<button class="btn" data-bind="click: replaceMe, visible: canReplace" id="replaceMe">{{$root.language.replace}}</button>-->
<form id="my-replace-dropzone" style="display: none;" class="dropzone"></form>
<h1 class="h1">{{filename}}</h1>
<!--<div id="tools"></div>-->
</div>
<dl>
<!--<dt>{{$root.language.dimensions}}</dt>-->
<!--<dd>{{properties().height}}x{{properties().width}}</dd>-->
<dt>{{$root.language.created}}</dt>
<dd>{{properties().dateCreated}}</dd>
<dt>{{$root.language.modified}}</dt>
<dd>{{properties().dateModified}}</dd>
<dt>{{$root.language.size}}</dt>
<dd>{{properties().size | sizeInKb:10}}</dd>
</dl>
</div>
</script>
<script type="text/html" id="image-template">
<img id="detailImage" data-bind="attr: {src: getDownloadUrl, alt: getDownloadUrl}, visible: isImageFile" class="img-thumbnail center-block">
</script>
<script type="text/html" id="video-player-template">
<video data-bind="attr: {width: $root.config.videos.videosPlayerWidth, height: $root.config.videos.videosPlayerHeight, src: getDownloadUrl}" controls='controls'>
<img data-bind="attr: {src: getPreviewUrl}" />
</video>
</script>
<script type="text/html" id="audio-player-template">
<audio data-bind="attr: {src: getDownloadUrl}" controls='controls'>
<img data-bind="attr: {src: getPreviewUrl}" />
</audio>
</script>
<script type="text/html" id="pdf-viewer-template">
</script>
<script type="text/javascript" src="filemanager.js"></script>
</div>
</body>
</html>