Dateiverwaltung für die WebBox
ulrich
2017-03-14 d920b78320312112835e541012b17c54d0b843b3
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
<!DOCTYPE html>
<html>
  <head>
    <title>Dateiverwaltung</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/jslib/codemirror/lib/codemirror.css">    
    <link rel="stylesheet" href="/jslib/codemirror/addon/display/fullscreen.css">        
    <link rel="stylesheet" type="text/css" href="/jslib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/jslib/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="stile.css">
    <script id="tpl-kacheln" type="x-tmpl-mustache">
      {{#files}}          
        <figure class="figure datei-figure text-center text-warning align-top datei-elem">
          {{#mini}}
            <img class="datei" src="{{miniurl}}"  width="60" height="40" />
          {{/mini}}
          {{^mini}}
            <i class="fa {{ typeClass }} fa-3x"></i>
          {{/mini}}        
          <figcaption class="figure-caption dateiname">{{ fileName }}</figcaption>
        </figure>   
      {{/files}}          
    </script>
    <script id="tpl-liste" type="x-tmpl-mustache">
      <table class="table table-hover table-sm table-responsive tableBodyScroll">
        <thead>
          <tr>
            <th colspan="2">Name</th>
            <th>Gr&ouml;&szlig;e</th>
            <th>Art</th>
            <th>ge&auml;ndert</th>
          </tr>
        </thead>
        <tbody>
        {{#files}}
          <tr class="datei-zeile">
            <td class="datei-elem"><i class="fa {{ typeClass }}"></i></td>
            <td class="dateiname">{{ fileName }}</td>
            <td>{{ fr.length }}</td>
            <td>&nbsp;</td>
            <td>{{ fr.lastModified }}</td>
          </tr>
        {{/files}}
        </tbody>
      </table>
    </script>
    <script id="tpl-bcr" type="x-tmpl-mustache">
      {{#files}}
          <a class="breadcrumb-item" rpath="{{ relPath }}" href="#">{{ fName }}</a>
      {{/files}}
    </script>
    <script id="tpl-bcr2" type="x-tmpl-mustache">
      <span class="breadcrumb-item active">{{ fName }}</span>
    </script>
    <script id="tpl-bcr3" type="x-tmpl-mustache">
      <div id="ansicht" class="pull-right align-middle">
        <i class="fa fa-th-list"></i>
      </div>              
    </script>  </head>
  <body>
    <!-- Kopfzeile -->
    <div class="nord">
      
      <div id="menue"> <!-- Menue -->
        <ul class="nav pl-3">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Datei</a>
            <div class="dropdown-menu">
              <a id="newTextFile" class="dropdown-item" href="#">Neuer Text..</a>
              <a id="newDoc" class="dropdown-item" href="#">Neues Dokument..</a>
              <a id="newFolder" class="dropdown-item" href="#">Neuer Ordner..</a>
              <div class="dropdown-divider"></div>
              <a id="editTextFile" class="dropdown-item" href="#">&Ouml;ffnen als Text</a>
              <a id="editDocFile" class="dropdown-item" href="#">&Ouml;ffnen als Dokument</a>
              <div class="dropdown-divider"></div>
              <a id="viewFile" class="dropdown-item" href="#">Ansehen</a>
              <!--<a class="dropdown-item" href="#">Ansehen als Dokument</a>-->
              <div class="dropdown-divider"></div>
              <a id="saveFile" class="dropdown-item" href="#">Speichern</a>
              <a id="saveFileAs" class="dropdown-item" href="#">Speichern unter..</a>
              <div class="dropdown-divider"></div>
              <a id="renameFile" class="dropdown-item" href="#">Umbenennen..</a>
              <div class="dropdown-divider"></div>
              <a id="closeFile" class="dropdown-item" href="#">Schliessen</a>
            </div>
          </li>
          <li class="nav-item dropdown">
            <a id="editMenu" class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Bearbeiten</a>
            <div class="dropdown-menu">
              <a id="m-cut" class="dropdown-item" href="#">Ausschneiden</a>
              <a id="m-copy" class="dropdown-item" href="#">Kopieren</a>
              <a id="m-paste" class="dropdown-item" href="#">Einf&uuml;gen</a>
              <div class="dropdown-divider"></div>
              <a id="m-shrink" class="dropdown-item" href="#">Verkleinern</a>
              <div class="dropdown-divider"></div>
              <a id="m-del" class="dropdown-item" href="#">L&ouml;schen</a>
            </div>
          </li>
          <li class="nav-item dropdown">
            <a id="userMenu" class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Nutzer-ID</a>
            <div class="dropdown-menu">
              <a class="dropdown-item" href="/">Zur Hauptseite der WebBox wechseln</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="/wbx/mng">Apps verwalten</a>
              <a class="dropdown-item" href="/um/ui">Benutzer verwalten</a>
              <a class="dropdown-item disabled" href="/file-cms/ui">Dateien verwalten</a>
              <div class="dropdown-divider"></div>
              <a id="m-test" class="dropdown-item" href="#">Test</a>
              <a id="m-test-2" class="dropdown-item" href="#">Test 2</a>
              <div class="dropdown-divider"></div>
              <a id="logout" class="dropdown-item" href="#">Abmelden</a>
            </div>
          </li>
        </ul>
      </div> <!-- Menue -->
      
    </div>
    <div class="inhalt">
      <!-- westliche Seitenleiste -->
      <div class="west hidden-xs-down">
          <!-- linke Seitenleiste mit Links -->
          <!--
          <nav class="nav flex-column">
            <a class="nav-link active" href="#">Active</a>
            <a class="nav-link" href="#">Link</a>
            <a class="nav-link" href="#">Link</a>
            <a class="nav-link disabled" href="#">Disabled</a>
          </nav> 
          -->
      </div>
      <!-- zentraler Inhaltsbereich -->
      <div class="zentrum">
        
        <!-- Codemirror Start -->
        <div class="code-editor-container pl-3 pr-3 pb-3">
        <div class="codeeditor-space pr-3">
          <textarea class="codeeditor" id="editspace"></textarea>       
        </div>
        </div>
        <!-- Codemirror Ende -->
        <!-- TinyMCE Start -->
        <div id="mce-editor" class="pl-3 pr-3">
          <textarea class="text-editor" id="text-editspace"></textarea>
        </div>        
        <!-- TinyMCE Ende -->
        <!-- Breadcrumb Start -->
        <div id="zentrum_bc" class="zentrum-bc pl-3 pr-3">
          <nav class="breadcrumb" id="bcnav"></nav>             
        </div>
        <!-- Breadcrumb Ende -->
        <!-- Dateikacheln/-liste Start -->
        <div class="zentrum-liste pl-3 pr-3" id="dateien"></div>
        <!-- Dateikacheln Ende -->
        
      </div>
      <!-- oestliche Seitenleiste -->
      <div class="ost"></div>
      
      <!-- Modal -->
      <div class="modal fade" id="saveModal">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 id="saveModalTitle" class="modal-title">Datei speichern</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div id="saveModalBody" class="modal-body">
              <p id="dialogfrage">Dateiname?</p>
              <input class="form-control eingabe" type="text" size="20" maxlength="250" placeholder="Dateiname" name="dateiname" id="dateiname">
            </div>
            <div class="modal-footer">
              <button id="modal_ok" type="button" class="btn btn-primary" data-dismiss="modal">Speichern</button>
              <button id="modal_cancel" type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
            </div>
          </div>
        </div>
      </div> <!-- Modal Ende -->        
      <!-- Modal ok / cancel Start -->
      <div class="modal fade" id="confirmModal">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 id="confirmModalTitle" class="modal-title">L&ouml;schen</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div id="confirmModalBody" class="modal-body">
              <p>Wirklich ...?</p>
            </div>
            <div class="modal-footer">
              <button id="confirmOk" type="button" class="btn btn-danger" data-dismiss="modal">L&ouml;schen</button>
              <button id="confirmClose" type="button" class="btn btn-secondary" data-dismiss="modal">Schliessen</button>
              <button id="confirmCancel" type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
            </div>
          </div>
        </div>
      </div>
      <!-- Modal ok / cancel Ende -->
    </div>
    <!-- Fusszeile -->
    <!--
    <div class="sued">
      Fu&szlig;zeile
    </div>
    -->
    <!-- Skripte -->
    <script src="/jslib/jquery/jquery.min.js"></script>
    <script src="/jslib/codemirror/lib/codemirror.js"></script>
    
    <script src="/jslib/codemirror/mode/javascript/javascript.js"></script>
    <script src="/jslib/codemirror/mode/xml/xml.js"></script>
    <script src="/jslib/codemirror/mode/htmlmixed/htmlmixed.js"></script>
    <script src="/jslib/codemirror/mode/clike/clike.js"></script>
    
    <script src="/jslib/codemirror/addon/display/fullscreen.js"></script>
    <script src="/jslib/tinymce/tinymce.min.js"></script>
    <script src="/jslib/bootstrap/js/bootstrap.min.js"></script>
    <script src="/jslib/mustache/mustache.min.js"></script>
    <script src="ui.js"></script>
    <script type="text/javascript" charset="utf-8">
      //var ui;
      $(document).ready(function() {
        fm_init();
      });
    </script>
  </body>
</html>