scratch – Diff between revs 121 and 125
?pathlinks?
Rev 121 | Rev 125 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | <!DOCTYPE html> |
1 | <!DOCTYPE html> |
|
2 | <html lang="en"> |
2 | <html lang="en" ng-app="scratch"> |
|
3 | <head> |
3 | <head> |
|
4 | <meta charset="utf-8"> |
4 | <meta charset="utf-8"> |
|
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
7 | <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
7 | <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
|
Line 13... | Line 13... | |||
13 | |
13 | |
|
14 | <!-- Bootstrap core CSS --> |
14 | <!-- Bootstrap core CSS --> |
|
15 | <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> |
15 | <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> |
|
16 | <!-- Font Awesome --> |
16 | <!-- Font Awesome --> |
|
17 | <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> |
- | ||
18 | |
17 | <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> |
|
19 | <!-- DropZone --> |
18 | <!-- DropZone --> |
|
- | 19 | <link href="bower_components/dropzone/dist/min/dropzone.min.css" rel="stylesheet"> |
||
- | 20 | <!-- TagsInput --> |
||
Line 20... | Line 21... | |||
20 | <link href="bower_components/dropzone/dist/min/dropzone.min.css" rel="stylesheet"> |
21 | <link href="bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" rel="stylesheet"> |
|
21 | |
22 | |
|
Line 22... | Line 23... | |||
22 | <!-- Site-wide style CCS --> |
23 | <!-- Site-wide style CCS --> |
|
23 | <link href="css/style.css" rel="stylesheet"> |
24 | <link href="css/style.css" rel="stylesheet"> |
|
- | 25 | |
||
- | 26 | <!-- Local style --> |
||
- | 27 | <link href="css/files/style.css" rel="stylesheet"> |
||
24 | |
28 | |
|
Line 25... | Line 29... | |||
25 | <!-- Local style --> |
29 | <!-- Scratch Angular Includes --> |
|
- | 30 | <ng-include src="'html/scratch-head-last.html'"></ng-include> |
||
- | 31 | </head> |
||
- | 32 | |
||
Line 26... | Line 33... | |||
26 | <link href="css/files/style.css" rel="stylesheet"> |
33 | <body> |
|
27 | </head> |
34 | |
|
28 | |
35 | <!-- Scratch Angular Includes --> |
|
29 | <body> |
36 | <ng-include src="'html/scratch-body-first.html'"></ng-include> |
|
Line 99... | Line 106... | |||
99 | <input id="deleteURL" type="text" class="form-control" readonly> |
106 | <input id="deleteURL" type="text" class="form-control" readonly> |
|
100 | <span class="input-group-btn"> |
107 | <span class="input-group-btn"> |
|
101 | <button id="btn-clipboard-delete" class="btn btn-default" type="button"><i class="glyphicon glyphicon-paperclip"></i></button> |
108 | <button id="btn-clipboard-delete" class="btn btn-default" type="button"><i class="glyphicon glyphicon-paperclip"></i></button> |
|
102 | </span> |
109 | </span> |
|
103 | </div> |
110 | </div> |
|
- | 111 | <div class="input-group"> |
||
- | 112 | <select id="tags" multiple class="form-control bootstrap-tagsinput"></select> |
||
- | 113 | </div> |
||
104 | <strong class="error text-danger" data-dz-errormessage></strong> |
114 | <strong class="error text-danger" data-dz-errormessage></strong> |
|
105 | </div> |
115 | </div> |
|
106 | <div> |
116 | <div> |
|
107 | <p class="size" data-dz-size></p> |
117 | <p class="size" data-dz-size></p> |
|
108 | <div id="progress" class="progress active" role="progressbar"> |
118 | <div id="progress" class="progress active" role="progressbar"> |
|
Line 143... | Line 153... | |||
143 | </div> |
153 | </div> |
|
144 | </div> |
154 | </div> |
|
Line 145... | Line 155... | |||
145 | |
155 | |
|
146 | <!-- jQuery --> |
156 | <!-- jQuery --> |
|
- | 157 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
||
- | 158 | <!-- Angular JS --> |
||
147 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
159 | <script src="bower_components/angular/angular.min.js"></script> |
|
148 | <!-- BootStrap --> |
160 | <!-- BootStrap --> |
|
149 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
161 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
|
150 | <!-- DropZone --> |
162 | <!-- DropZone --> |
|
151 | <script src="bower_components/dropzone/dist/min/dropzone.min.js"></script> |
163 | <script src="bower_components/dropzone/dist/min/dropzone.min.js"></script> |
|
152 | <!-- Clipboard --> |
164 | <!-- Clipboard --> |
|
- | 165 | <script src="bower_components/clipboard/dist/clipboard.min.js"></script> |
||
- | 166 | <!-- TagsInput --> |
||
- | 167 | <script src="bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script> |
||
- | 168 | <!-- Angular Initialization. --> |
||
- | 169 | <script> |
||
- | 170 | var app = angular.module('scratch', []); |
||
153 | <script src="bower_components/clipboard/dist/clipboard.min.js"></script> |
171 | </script> |
|
154 | <script> |
172 | <script> |
|
155 | $(document).ready(() => { |
173 | $(document).ready(() => { |
|
156 | $.get('session.php').then((token) => { |
174 | $.get('session.php').then((token) => { |
|
157 | // Get the template HTML and remove it from the doument |
175 | // Get the template HTML and remove it from the doument |
|
Line 185... | Line 203... | |||
185 | }).on('addedfile', (file) => { |
203 | }).on('addedfile', (file) => { |
|
186 | // Hookup the start button |
204 | // Hookup the start button |
|
187 | file.previewElement.querySelector(".start").onclick = () => { |
205 | file.previewElement.querySelector(".start").onclick = () => { |
|
188 | myDropzone.enqueueFile(file); |
206 | myDropzone.enqueueFile(file); |
|
189 | }; |
207 | }; |
|
- | 208 | |
||
- | 209 | // Set the ID of the tags input. |
||
- | 210 | const tagsBoxID = '_' + Math |
||
- | 211 | .random() |
||
- | 212 | .toString(36) |
||
- | 213 | .substr(2, 9); |
||
- | 214 | |
||
- | 215 | file |
||
- | 216 | .previewElement |
||
- | 217 | .querySelector("#tags") |
||
- | 218 | .setAttribute('id', tagsBoxID); |
||
- | 219 | |
||
- | 220 | $('#' + tagsBoxID).tagsinput('refresh'); |
||
- | 221 | //$('input').tagsInput('refresh'); |
||
- | 222 | |
||
190 | }).on('totaluploadprogress', (progress) => { |
223 | }).on('totaluploadprogress', (progress) => { |
|
191 | document |
224 | document |
|
192 | .querySelector('#total-progress .progress-bar') |
225 | .querySelector('#total-progress .progress-bar') |
|
193 | .style |
226 | .style |
|
194 | .width = progress + "%"; |
227 | .width = progress + "%"; |