appscms-tools-theme 2.2.0 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/calculators/en/biology-calc/bulb-spacing.json +79 -1
- data/_data/calculators/en/biology-calc/cat-chocolate-toxicity.json +53 -1
- data/_data/calculators/en/chemistry-calc/activation-energy.json +45 -1
- data/_data/feature/en/allele-frequency.json +242 -242
- data/_data/feature/en/batch-conversion.json +78 -0
- data/_data/feature/en/compress-pdf.json +11 -5
- data/_data/feature/en/theframe.json +64 -57
- data/_data/photo-categories.json +10 -10
- data/_includes/batch-conversion.html +70 -0
- data/_includes/custom-head.html +57 -1
- data/_includes/monumetric/ads.html +57 -57
- data/_includes/monumetric/profitablecpmgate.html +51 -51
- data/_layouts/batch.html +97 -0
- data/_layouts/calculator.html +69 -69
- data/_layouts/frame.html +128 -128
- data/assets/css/batch.css +423 -0
- data/assets/css/calculators.css +40 -40
- data/assets/css/frame.css +431 -435
- data/assets/images/add-image.png +0 -0
- data/assets/images/add.png +0 -0
- data/assets/images/cloud-computing.png +0 -0
- data/assets/images/convert.png +0 -0
- data/assets/images/download.png +0 -0
- data/assets/images/file.png +0 -0
- data/assets/images/safeimagekit. (2).png +0 -0
- data/assets/images/safeimagekit. (3).png +0 -0
- data/assets/images/safeimagekit..png +0 -0
- data/assets/images/safeimagekit.png +0 -0
- data/assets/images/spinner.gif +0 -0
- data/assets/images/trust.svg +1 -0
- data/assets/images/vectorpaint.svg +6 -0
- data/assets/js/ads.js +8 -8
- data/assets/js/append-div.js +10 -10
- data/assets/js/batch.js +190 -0
- data/assets/js/frame.js +251 -228
- data/assets/js/photo-effects.json +55 -55
- data/assets/js/testing-batch.js +36 -0
- data/assets/js/theme.js +11 -11
- metadata +26 -7
data/assets/js/frame.js
CHANGED
@@ -1,228 +1,251 @@
|
|
1
|
-
const getScript = document.currentScript
|
2
|
-
const pageTool = getScript.dataset.tool
|
3
|
-
const lang = getScript.dataset.lang
|
4
|
-
const inputBox = document.querySelector('#Inputbox')
|
5
|
-
const fileDropBox = document.querySelector('.custom-box')
|
6
|
-
const cropModal = document.querySelector('.crop-image-modal-container')
|
7
|
-
const workspace = document.getElementById('workspace')
|
8
|
-
const canvasPanel = document.getElementById('canvas-panel')
|
9
|
-
const download = document.querySelector('#download-button')
|
10
|
-
const form = document.querySelector('#effect-form')
|
11
|
-
let files = []
|
12
|
-
let cropWidth = null
|
13
|
-
let cropHeight = null
|
14
|
-
let cropper = null
|
15
|
-
let cropInputWidth = null
|
16
|
-
let index = 0
|
17
|
-
let cropInputHeight = null
|
18
|
-
let image = null
|
19
|
-
const showLoader = () => {
|
20
|
-
showLoading()
|
21
|
-
}
|
22
|
-
const closeLoader = () => {}
|
23
|
-
const clickInput = (e) => {
|
24
|
-
console.log(`#file-${e.dataset.index}`)
|
25
|
-
document.querySelector(`#file-${e.dataset.index}`).click()
|
26
|
-
}
|
27
|
-
let featureData = null
|
28
|
-
|
29
|
-
fetch('/assets/js/photo-effects.json')
|
30
|
-
.then((response) => response.json())
|
31
|
-
.then((data) => {
|
32
|
-
featureData = data.find((i) => i.name === form.dataset.featureName)
|
33
|
-
console.log(featureData)
|
34
|
-
})
|
35
|
-
const fileOnChange = (e) => {
|
36
|
-
index = Number(e.dataset.index)
|
37
|
-
let reader = new FileReader()
|
38
|
-
reader.
|
39
|
-
|
40
|
-
if (cropper === null) {
|
41
|
-
cropImage(event.target.result, e.id)
|
42
|
-
} else {
|
43
|
-
updateCropper(event.target.result, e.id)
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
return new Promise((resolve, reject) => {
|
57
|
-
let image = document.createElement('img')
|
58
|
-
image.src = files[indexValue]
|
59
|
-
image.onload = () => {
|
60
|
-
image.width = Number(item.width)
|
61
|
-
image.height = Number(item.height)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
image
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
ctx.
|
83
|
-
|
84
|
-
//
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
//
|
92
|
-
ctx.
|
93
|
-
|
94
|
-
//
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
img
|
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
|
-
document.querySelector('
|
210
|
-
|
211
|
-
|
212
|
-
const
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
1
|
+
const getScript = document.currentScript
|
2
|
+
const pageTool = getScript.dataset.tool
|
3
|
+
const lang = getScript.dataset.lang
|
4
|
+
const inputBox = document.querySelector('#Inputbox')
|
5
|
+
const fileDropBox = document.querySelector('.custom-box')
|
6
|
+
const cropModal = document.querySelector('.crop-image-modal-container')
|
7
|
+
const workspace = document.getElementById('workspace')
|
8
|
+
const canvasPanel = document.getElementById('canvas-panel')
|
9
|
+
const download = document.querySelector('#download-button')
|
10
|
+
const form = document.querySelector('#effect-form')
|
11
|
+
let files = []
|
12
|
+
let cropWidth = null
|
13
|
+
let cropHeight = null
|
14
|
+
let cropper = null
|
15
|
+
let cropInputWidth = null
|
16
|
+
let index = 0
|
17
|
+
let cropInputHeight = null
|
18
|
+
let image = null
|
19
|
+
const showLoader = () => {
|
20
|
+
showLoading()
|
21
|
+
}
|
22
|
+
const closeLoader = () => { }
|
23
|
+
const clickInput = (e) => {
|
24
|
+
console.log(`#file-${e.dataset.index}`)
|
25
|
+
document.querySelector(`#file-${e.dataset.index}`).click()
|
26
|
+
}
|
27
|
+
let featureData = null
|
28
|
+
|
29
|
+
fetch('/assets/js/photo-effects.json')
|
30
|
+
.then((response) => response.json())
|
31
|
+
.then((data) => {
|
32
|
+
featureData = data.find((i) => i.name === form.dataset.featureName)
|
33
|
+
console.log(featureData)
|
34
|
+
})
|
35
|
+
const fileOnChange = (e) => {
|
36
|
+
index = Number(e.dataset.index)
|
37
|
+
let reader = new FileReader()
|
38
|
+
reader.onload = (event) => {
|
39
|
+
cropModal.style.display = 'flex'
|
40
|
+
if (cropper === null) {
|
41
|
+
cropImage(event.target.result, e.id)
|
42
|
+
} else {
|
43
|
+
updateCropper(event.target.result, e.id)
|
44
|
+
}
|
45
|
+
}
|
46
|
+
reader.readAsDataURL(e.files[0])
|
47
|
+
}
|
48
|
+
const closeModal = () => {
|
49
|
+
cropModal.style.display = 'none'
|
50
|
+
}
|
51
|
+
form.addEventListener('submit', (e) => {
|
52
|
+
e.preventDefault()
|
53
|
+
drawImage()
|
54
|
+
})
|
55
|
+
const drawInputImage = (ctx, item, indexValue, canvas, image) => {
|
56
|
+
return new Promise((resolve, reject) => {
|
57
|
+
let image = document.createElement('img')
|
58
|
+
image.src = files[indexValue]
|
59
|
+
image.onload = () => {
|
60
|
+
image.width = Number(item.width)
|
61
|
+
image.height = Number(item.height)
|
62
|
+
if (item.filter) {
|
63
|
+
ctx.filter = item.filter
|
64
|
+
}
|
65
|
+
ctx.drawImage(
|
66
|
+
image,
|
67
|
+
Number(item.x),
|
68
|
+
Number(item.y),
|
69
|
+
image.width,
|
70
|
+
image.height
|
71
|
+
)
|
72
|
+
if (item.rotate) {
|
73
|
+
drawRotated(item.rotate, ctx, canvas, image, item)
|
74
|
+
}
|
75
|
+
resolve()
|
76
|
+
}
|
77
|
+
})
|
78
|
+
}
|
79
|
+
|
80
|
+
const drawRotated = (degrees, ctx, canvas, image, item) => {
|
81
|
+
console.log(image)
|
82
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
83
|
+
|
84
|
+
// save the unrotatedctx of the canvas so we can restore it later
|
85
|
+
// the alternative is to untranslate & unrotate after drawing
|
86
|
+
ctx.save()
|
87
|
+
|
88
|
+
// move to the center of the canvas
|
89
|
+
ctx.translate(item.x, item.y)
|
90
|
+
|
91
|
+
// rotate the canvas to the specified degrees
|
92
|
+
ctx.rotate((degrees * Math.PI) / 180)
|
93
|
+
|
94
|
+
// draw the image
|
95
|
+
// since thectx is rotated, the image will be rotated also
|
96
|
+
ctx.drawImage(image, -image.width / 2, -image.width / 2)
|
97
|
+
|
98
|
+
// we’re done with the rotating so restore the unrotatedctx
|
99
|
+
ctx.restore()
|
100
|
+
}
|
101
|
+
const drawImage = () => {
|
102
|
+
let img = new Image()
|
103
|
+
img.src = featureData.effectImagePath
|
104
|
+
var canvas = document.createElement('canvas')
|
105
|
+
var ctx = canvas.getContext('2d')
|
106
|
+
img.onload = () => {
|
107
|
+
canvas.width = img.width
|
108
|
+
canvas.height = img.height
|
109
|
+
Promise.all(
|
110
|
+
featureData.elements.map((item, indexValue) => {
|
111
|
+
if (item.type === 'image') {
|
112
|
+
return new Promise((resolve, reject) => {
|
113
|
+
drawInputImage(ctx, item, indexValue, canvas).then(() => {
|
114
|
+
resolve()
|
115
|
+
})
|
116
|
+
})
|
117
|
+
}
|
118
|
+
})
|
119
|
+
).then(() => {
|
120
|
+
ctx.filter = 'none'
|
121
|
+
ctx.drawImage(img, 0, 0, canvas.width, canvas.height)
|
122
|
+
featureData.elements.map((item, indexValue) => {
|
123
|
+
if (item.type === 'text') {
|
124
|
+
let myFont = new FontFace(item.font, `url(${item.fontPath})`)
|
125
|
+
myFont.load().then(function (font) {
|
126
|
+
document.fonts.add(font)
|
127
|
+
ctx.font = `${item.fontSize}px ${item.font}`
|
128
|
+
if (item.shadowColor) {
|
129
|
+
ctx.shadowColor = `${item.shadowColor}`
|
130
|
+
}
|
131
|
+
console.log(item)
|
132
|
+
console.log((item.rotate * Math.PI) / 180)
|
133
|
+
if (item.rotate) {
|
134
|
+
ctx.rotate((item.rotate * Math.PI) / 180)
|
135
|
+
}
|
136
|
+
if (item.shadowOffsetX) {
|
137
|
+
ctx.shadowOffsetX = 3
|
138
|
+
}
|
139
|
+
if (item.shadowOffsetY) {
|
140
|
+
ctx.shadowOffsetY = 3
|
141
|
+
}
|
142
|
+
if (item.shadowBlur) {
|
143
|
+
ctx.shadowBlur = 2
|
144
|
+
}
|
145
|
+
ctx.textAlign = 'center'
|
146
|
+
ctx.fillStyle = `${item.color}`
|
147
|
+
ctx.save()
|
148
|
+
ctx.fillText(
|
149
|
+
document.querySelector(`#${item.id}`).value,
|
150
|
+
item.x,
|
151
|
+
item.y
|
152
|
+
)
|
153
|
+
ctx.restore()
|
154
|
+
})
|
155
|
+
}
|
156
|
+
if (item.type === 'rectangle') {
|
157
|
+
}
|
158
|
+
})
|
159
|
+
canvasPanel.innerHTML = ''
|
160
|
+
canvasPanel.appendChild(canvas)
|
161
|
+
workspace.style.display = 'block'
|
162
|
+
})
|
163
|
+
}
|
164
|
+
}
|
165
|
+
const cropImage = (result, id) => {
|
166
|
+
let image = new Image()
|
167
|
+
image.onload = () => {
|
168
|
+
let img = document.createElement('img')
|
169
|
+
img.src = result
|
170
|
+
img.id = 'image'
|
171
|
+
document.querySelector('.crop-image-modal-body').appendChild(img)
|
172
|
+
cropper = new Cropper(img, {
|
173
|
+
viewMode: 3,
|
174
|
+
ready() {
|
175
|
+
console.log(id)
|
176
|
+
let find = featureData.elements.find((i) => i.id === id)
|
177
|
+
console.log(find)
|
178
|
+
cropper.setAspectRatio(Number(find.width) / Number(find.height))
|
179
|
+
cropModal.style.display = 'flex'
|
180
|
+
this.cropper.crop()
|
181
|
+
},
|
182
|
+
crop(event) {
|
183
|
+
cropWidth = Math.round(event.detail.width)
|
184
|
+
cropHeight = Math.round(event.detail.height)
|
185
|
+
},
|
186
|
+
})
|
187
|
+
}
|
188
|
+
image.src = result
|
189
|
+
}
|
190
|
+
const updateCropper = (result, id) => {
|
191
|
+
cropper.destroy()
|
192
|
+
document.querySelector('.crop-image-modal-body').innerHTML = ''
|
193
|
+
cropImage(result, id)
|
194
|
+
}
|
195
|
+
document.querySelector('#crop').addEventListener('click', () => {
|
196
|
+
let cropperImg = cropper
|
197
|
+
.getCroppedCanvas({
|
198
|
+
width: cropWidth,
|
199
|
+
height: cropHeight,
|
200
|
+
})
|
201
|
+
.toDataURL()
|
202
|
+
files[index - 1] = cropperImg
|
203
|
+
cropModal.style.display = 'none'
|
204
|
+
})
|
205
|
+
let inputFile = ''
|
206
|
+
const handleFile = (file) => {
|
207
|
+
cropModal.style.display = 'flex'
|
208
|
+
document.querySelector('#file-loader').style.display = 'flex'
|
209
|
+
document.querySelector('.file-input').style.display = 'none'
|
210
|
+
inputFile = file
|
211
|
+
if (file) {
|
212
|
+
const reader = new FileReader()
|
213
|
+
reader.onload = (e) => {
|
214
|
+
if (e.target.result) {
|
215
|
+
cropImage(e.target.result)
|
216
|
+
}
|
217
|
+
}
|
218
|
+
reader.readAsDataURL(file)
|
219
|
+
}
|
220
|
+
}
|
221
|
+
const showLoading = () => {
|
222
|
+
document.querySelector('#file-loader').style.display = 'flex'
|
223
|
+
document.querySelector('.file-input').style.display = 'none'
|
224
|
+
}
|
225
|
+
const stopLoading = () => {
|
226
|
+
fileDropBox.style.display = 'none'
|
227
|
+
}
|
228
|
+
download.addEventListener('click', () => {
|
229
|
+
let canvas = document.querySelector('canvas')
|
230
|
+
let url = canvas.toDataURL(`image/png`)
|
231
|
+
let a = document.createElement('a')
|
232
|
+
a.href = url
|
233
|
+
a.download = `safeimagekit-border-image.${inputFile.type.split('/')[1]}`
|
234
|
+
document.body.appendChild(a)
|
235
|
+
a.click()
|
236
|
+
if (lang === 'en') {
|
237
|
+
window.location.href = `/download?tool=${pageTool}`
|
238
|
+
} else {
|
239
|
+
window.location.href = `/${lang}/download?tool=${pageTool}`
|
240
|
+
}
|
241
|
+
})
|
242
|
+
|
243
|
+
//
|
244
|
+
// fonts
|
245
|
+
// font rotation
|
246
|
+
// font position
|
247
|
+
// font transform
|
248
|
+
|
249
|
+
//images
|
250
|
+
//image rotation
|
251
|
+
// image rectangle with text
|
@@ -1,56 +1,56 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"name": "together_forever",
|
4
|
-
"effectImagePath": "/assets/images/together_forever.png",
|
5
|
-
"elements": [
|
6
|
-
{
|
7
|
-
"type": "image",
|
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
|
-
"id": "text-2",
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"color": "red",
|
49
|
-
"fontFamily": "Calligraphy",
|
50
|
-
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
51
|
-
"fontWeight": "bold",
|
52
|
-
"fontSize": 50
|
53
|
-
}
|
54
|
-
]
|
55
|
-
}
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "together_forever",
|
4
|
+
"effectImagePath": "/assets/images/together_forever.png",
|
5
|
+
"elements": [
|
6
|
+
{
|
7
|
+
"type": "image",
|
8
|
+
"filter": "",
|
9
|
+
"perspective": "",
|
10
|
+
"height": 300,
|
11
|
+
"width": 300,
|
12
|
+
"x": 200,
|
13
|
+
"y": 200,
|
14
|
+
"id": "file-1"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"label": "",
|
18
|
+
"id": "text-1",
|
19
|
+
"type": "text",
|
20
|
+
"x": "100",
|
21
|
+
"rotate": 0,
|
22
|
+
"y": "100",
|
23
|
+
"color": "red",
|
24
|
+
"fontFamily": "Calligraphy",
|
25
|
+
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
26
|
+
"fontWeight": "bold",
|
27
|
+
"fontSize": 50
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"type": "image",
|
31
|
+
"imagePath": "",
|
32
|
+
"filter": "grayscale(100%)",
|
33
|
+
"perspective": "",
|
34
|
+
"rotate": 40,
|
35
|
+
"height": 300,
|
36
|
+
"width": 300,
|
37
|
+
"x": 100,
|
38
|
+
"y": 200,
|
39
|
+
"id": "file-3"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"label": "",
|
43
|
+
"id": "text-2",
|
44
|
+
"type": "text",
|
45
|
+
"x": "200",
|
46
|
+
"y": "200",
|
47
|
+
"rotate": 40,
|
48
|
+
"color": "red",
|
49
|
+
"fontFamily": "Calligraphy",
|
50
|
+
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
51
|
+
"fontWeight": "bold",
|
52
|
+
"fontSize": 50
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
56
|
]
|
@@ -0,0 +1,36 @@
|
|
1
|
+
const batchConversion = async (file, indexValue) => {
|
2
|
+
return new Promise((resolve, reject) => {
|
3
|
+
if (file) {
|
4
|
+
const reader = new FileReader()
|
5
|
+
reader.readAsDataURL(file)
|
6
|
+
reader.onload = (e) => {
|
7
|
+
if (e.target.result) {
|
8
|
+
let image = new Image()
|
9
|
+
let canvas = document.createElement('canvas')
|
10
|
+
canvas.setAttribute('id', 'canvas-img')
|
11
|
+
let ctx = canvas.getContext('2d')
|
12
|
+
image.onload = () => {
|
13
|
+
canvas.width = image.width
|
14
|
+
canvas.height = image.height
|
15
|
+
// counter.innerHTML = e.target.value + "%"
|
16
|
+
let filters = document.querySelector('#applyFilter')
|
17
|
+
if (filters.getAttribute('data-filter') === "opacity") {
|
18
|
+
ctx.globalAlpha = filters.value
|
19
|
+
ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
|
20
|
+
resolve([indexValue, canvas.toDataURL('image/png'), "image"])
|
21
|
+
} else {
|
22
|
+
ctx.filter = filters.getAttribute('data-filter') + '(' + filters.value + filters.getAttribute('data-scale') + ') '
|
23
|
+
ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
|
24
|
+
resolve([indexValue, canvas.toDataURL('image/png'), "image"])
|
25
|
+
}
|
26
|
+
|
27
|
+
}
|
28
|
+
image.src = e.target.result
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
})
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
|
data/assets/js/theme.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
$(document).ready(function () {
|
2
|
-
var safuiAlert = $('#safeui-alert')
|
3
|
-
if (safuiAlert) {
|
4
|
-
safuiAlert
|
5
|
-
.first()
|
6
|
-
.delay(10000)
|
7
|
-
.slideUp(1000, function () {
|
8
|
-
$(this).remove()
|
9
|
-
})
|
10
|
-
}
|
11
|
-
})
|
1
|
+
$(document).ready(function () {
|
2
|
+
var safuiAlert = $('#safeui-alert')
|
3
|
+
if (safuiAlert) {
|
4
|
+
safuiAlert
|
5
|
+
.first()
|
6
|
+
.delay(10000)
|
7
|
+
.slideUp(1000, function () {
|
8
|
+
$(this).remove()
|
9
|
+
})
|
10
|
+
}
|
11
|
+
})
|