aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/index.html
diff options
context:
space:
mode:
authorJohannes Zellner <johannes@cloudron.io>2017-02-07 16:26:17 +0100
committerJohannes Zellner <johannes@cloudron.io>2017-02-07 16:26:19 +0100
commite628921a338684a4bc3f196c5c39beba8b8f9b68 (patch)
treea4112c316e69b4d0a302af23f5bb8f4396c15c30 /frontend/index.html
parent4b6cf0add4f4f89671f4553a9672a01fbb485df1 (diff)
downloadSurfer-e628921a338684a4bc3f196c5c39beba8b8f9b68.tar.gz
Surfer-e628921a338684a4bc3f196c5c39beba8b8f9b68.tar.zst
Surfer-e628921a338684a4bc3f196c5c39beba8b8f9b68.zip
Add rename functionality
This also break backwardscompat since PUT is now POST and PUT is used for renaming
Diffstat (limited to 'frontend/index.html')
-rw-r--r--frontend/index.html35
1 files changed, 31 insertions, 4 deletions
diff --git a/frontend/index.html b/frontend/index.html
index e9775e8..cbbd85e 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -41,7 +41,7 @@
41 </div> 41 </div>
42 <div class="modal-body"> 42 <div class="modal-body">
43 <h5 v-show="deleteData.isFile">Really delete <span style="font-weight: bold;">{{ deleteData.filePath }}</span>?</h5> 43 <h5 v-show="deleteData.isFile">Really delete <span style="font-weight: bold;">{{ deleteData.filePath }}</span>?</h5>
44 <h5 v-show="deleteData.isDirectory">Really delete directory <span style="font-weight: bold;">{{ deleteData.filePath }}</span> and all its content?</h5> 44 <h5 v-show="deleteData.isDirectory">Really delete folder <span style="font-weight: bold;">{{ deleteData.filePath }}</span> and all its content?</h5>
45 </div> 45 </div>
46 <div class="modal-footer"> 46 <div class="modal-footer">
47 <button type="button" class="btn btn-default" data-dismiss="modal">No</button> 47 <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
@@ -51,12 +51,36 @@
51 </div> 51 </div>
52 </div> 52 </div>
53 53
54 <div class="modal fade" tabindex="-1" role="dialog" id="modalRename" v-cloak>
55 <div class="modal-dialog">
56 <div class="modal-content">
57 <div class="modal-header">
58 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
59 <h4 class="modal-title">Rename {{ renameData.entry.filePath }}</h4>
60 </div>
61 <div class="modal-body">
62 <form v-on:submit.prevent="rename(renameData)">
63 <div class="form-group" v-bind:class="{ 'has-error': renameData.error }">
64 <input type="text" class="form-control" v-model="renameData.newFilePath" placeholder="Name" autofocus="true">
65 <label class="control-label">{{ renameData.error }}</label>
66 </div>
67 <button type="submit" style="display: none;"></button>
68 </form>
69 </div>
70 <div class="modal-footer">
71 <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
72 <button type="button" class="btn btn-success" v-on:click="rename(renameData)">Yes</button>
73 </div>
74 </div>
75 </div>
76 </div>
77
54 <div class="modal fade" tabindex="-1" role="dialog" id="modalcreateDirectory" v-cloak> 78 <div class="modal fade" tabindex="-1" role="dialog" id="modalcreateDirectory" v-cloak>
55 <div class="modal-dialog"> 79 <div class="modal-dialog">
56 <div class="modal-content"> 80 <div class="modal-content">
57 <div class="modal-header"> 81 <div class="modal-header">
58 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 82 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
59 <h4 class="modal-title">New Directory Name</h4> 83 <h4 class="modal-title">New directory name</h4>
60 </div> 84 </div>
61 <div class="modal-body"> 85 <div class="modal-body">
62 <form v-on:submit.prevent="createDirectory(createDirectoryData)"> 86 <form v-on:submit.prevent="createDirectory(createDirectoryData)">
@@ -135,7 +159,7 @@
135 <a href="{{ part.link }}">{{ part.name }}</a> 159 <a href="{{ part.link }}">{{ part.name }}</a>
136 </li> 160 </li>
137 <li>{{ pathParts.slice(-1)[0].name }}</li> 161 <li>{{ pathParts.slice(-1)[0].name }}</li>
138 <button class="btn btn-default btn-sm pull-right" v-on:click="createDirectoryAsk()">Create Directory</button> 162 <button class="btn btn-default btn-sm pull-right" v-on:click="createDirectoryAsk()">Create Folder</button>
139 </ol> 163 </ol>
140 </div> 164 </div>
141 <div class="col-lg-12"> 165 <div class="col-lg-12">
@@ -150,6 +174,9 @@
150 </tr> 174 </tr>
151 </thead> 175 </thead>
152 <tbody> 176 <tbody>
177 <tr v-show="entries.length === 0">
178 <th><i>Empty folder</i></th>
179 </tr>
153 <tr v-for="entry in entries" v-on:click="open(entry)" class="hand"> 180 <tr v-for="entry in entries" v-on:click="open(entry)" class="hand">
154 <th> 181 <th>
155 <img v-bind:src="entry.previewUrl" height="48px" width="48px"/> 182 <img v-bind:src="entry.previewUrl" height="48px" width="48px"/>
@@ -159,7 +186,7 @@
159 <th><span v-my-tooltip="foobar" data-toggle="tooltip" title="{{ entry.mtime }}">{{ entry.mtime | prettyDate }}</span></th> 186 <th><span v-my-tooltip="foobar" data-toggle="tooltip" title="{{ entry.mtime }}">{{ entry.mtime | prettyDate }}</span></th>
160 <th style="text-align: right;"> 187 <th style="text-align: right;">
161 <span class="entry-toolbar"> 188 <span class="entry-toolbar">
162 <!-- <button class="btn btn-sm btn-default" v-on:click.stop="renameAsk(entry)" title="Rename"><i class="fa fa-pencil"></i></button> --> 189 <button class="btn btn-sm btn-default" v-on:click.stop="renameAsk(entry)" title="Rename"><i class="fa fa-pencil"></i></button>
163 <button class="btn btn-sm btn-danger" v-on:click.stop="delAsk(entry)" title="Delete"><i class="fa fa-trash"></i></button> 190 <button class="btn btn-sm btn-danger" v-on:click.stop="delAsk(entry)" title="Delete"><i class="fa fa-trash"></i></button>
164 </span> 191 </span>
165 </th> 192 </th>