-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (113 loc) · 4.8 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="manifest" href="manifest.json" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="MAKE MY PICTURE">
<meta name="apple-mobile-web-app-status-bar" content="#ff6600" />
<meta name="theme-color" content="#0044aa" />
<link rel="icon" href="/assets/camera.svg">
<title>PICTURE MGMT</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap">
<link rel="stylesheet" href="https://js.arcgis.com/4.27/@arcgis/core/assets/esri/themes/light/main.css">
<link href="index.css" rel="stylesheet">
<!-- we are importing es modules from cdn inside our index.js (for vue, arcgis...) -->
<script src="index.js" type="module"></script>
</head>
<body>
<main id="app" class="has-text-centered">
<div id="title" class="is-size-4 primary-orange">
<img id="header-camera" class="mr-2" src="assets/camera.svg">
<span>PICTURE MGMT</span>
</div>
<div class="columns">
<div class="column">
<div id="map-view" class="ml-2"></div>
<div :class="{ runner: isUploadingPictures }"></div>
</div>
<div class="column" v-show="!isShowingPictures">
<div v-show="currentWorkRecords.length>0" class="is-size-3">{{ currentSiteName }} Work Records</div>
<div v-show="currentWorkRecords.length===0" class="primary-orange">select site to see work records</div>
<ul id="workList">
<li v-for="workRecord in currentWorkRecords"
:key="workRecord.oid"
class="primary-blue box is-clickable"
@click="getPictures(workRecord)">
<div class="tag is-light is-medium is-pulled-left has-text-weight-bold">{{ workRecord.action }}</div>
<div>{{ workRecord.date }} {{ workRecord.time }}</div>
</li>
</ul>
</div>
</div>
<div class="columns" v-show="isShowingPictures">
<div class="column">
<div class="is-size-2 has-text-weight-bold is-pulled-left is-clickable"
@click="isShowingPictures=false">⬅️</div>
<div class="tag is-light is-large has-text-weight-bold">{{ currentWorkRecord.action }}</div>
<div class="is-size-4 has-text-weight-bold">{{ currentWorkRecord.date }} {{ currentWorkRecord.time }}</div>
<form id="upload-form" class="is-pulled-right" v-show="files.length==0">
<div class="upload-file">
<label for="uploadFile" class="file-upload-label">
<img id="upload-btn-icon" src="assets/upload.svg" width="20px">ADD PICTURES
</label>
<input id="uploadFile"
@change="refreshFiles"
type="file"
name="uploadFile"
accept="image/*"
multiple>
</div>
</form>
<div id="selectCount"
class="primary-orange is-size-2"
v-show="files.length>0">{{ files.length }}</div>
<button id="upload-picture-btn"
v-show="files.length>0"
@click="uploadImages"
title="upload a picture">
<b>Upload Selected Pictures</b><br>
<img id="camera-icon" src="assets/upload.svg" width="100px">
</button>
<br>
<button id="clear-picture-btn"
v-show="files.length>0"
@click="clearFiles"
title="clear selected pictures">
<b>CANCEL</b>
</button>
<ul id="fileList">
<li v-for="file in files"
:key="file.name"
class="primary-blue box">{{ file.name }}</li>
</ul>
<div class="is-flex is-flex-wrap-wrap">
<div v-show="currentAttachments.length===0" class="primary-orange ml-4">no pictures available</div>
<div v-for="attachment in currentAttachments" class="box flex-wrap">
<div class="delete is-pulled-right"
@click="deleteAttachment(attachment)"
title="delete this attachment"
style="margin:-12px -12px auto auto"></div>
<div class="is-size-6">{{ attachment.name }}</div>
<img :src="attachment.url"
alt="attachment"
width=128
@click="showBigPicture(attachment.url)">
</div>
</div>
</div>
</div>
<div class="modal" :class="{ 'is-active': isShowingBigPicture }">
<div class="modal-background"></div>
<div class="modal-content">
<p class="image">
<img :src="bigPictureSource" alt="">
</p>
</div>
<button class="modal-close is-large" aria-label="close" @click="isShowingBigPicture=false"></button>
</div>
<div id="snackbar">snack attack</div>
</main>
</body>
</html>