appscms-tools-theme 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab262b7915008e88c23d27902315a577bd32840bb8910957cff1ec1de08b9734
4
- data.tar.gz: 3f5bf7d712de8f742203517d2eeb9002d0631b355bd20b7f2a034470b588f606
3
+ metadata.gz: 8efe6c2dbc8448ea2df3e29fb4d086a52b0f6f3c0fc98fd5d7b0a0b5ec8124e0
4
+ data.tar.gz: 76a4f3d836b4dcccf2d7812e4f24b3e72d168163af9daf3655550ee7d6b11154
5
5
  SHA512:
6
- metadata.gz: b80f31bd5c19f29a35a34fcc9ccf85667ee775fcff4dd2fce809f1810188dfaea2a637a958d9e1b212b90be17e48ded964fd63c299200cfbffdeae6f8dbe0fa8
7
- data.tar.gz: 47ce43dd715ed372399646b2ca5c796a6ef2568531b61a7a8b73ea0fbccb18173850f0ed0961f6628d06ac1e2ff6aa704e51ba44235d250bb5218db15628b3e2
6
+ metadata.gz: 4e1e89be63a852e0b58053bfdb17e8122868cbd8573c36ffc04102551f8a061661c771bedd99cb2fc58db44d5aefb59ee489c0b22dd2ac9d6f647d044803a708
7
+ data.tar.gz: a5877f35e7af60f9f5d5dba2dc9e185fc847b6ceca60651bd619d0f2d00124d027a5c7333513e95747f1fcdef8a8165e40a75fadc9ca34a6aceab65cfe5baeda
@@ -0,0 +1,154 @@
1
+ ---
2
+ ---
3
+
4
+ const addScripts=()=>{
5
+ const scripts=document.getElementsByTagName('script')
6
+ const check= Array.from(scripts).find(item=>item.src==='https://www.dropbox.com/static/api/2/dropins.js')
7
+ if(!check){
8
+ const dropboxscript = document.createElement('script')
9
+ dropboxscript.src = 'https://www.dropbox.com/static/api/2/dropins.js'
10
+ dropboxscript.dataset.appKey = '{{site.dropboxapikey}}'
11
+ dropboxscript.id='dropboxjs'
12
+ document.head.append(dropboxscript)
13
+ }
14
+ const checkgooglescript= Array.from(scripts).find(item=>item.src==='https://apis.google.com/js/api.js')
15
+ if(!checkgooglescript){
16
+ const googlescript = document.createElement('script')
17
+ googlescript.src = 'https://apis.google.com/js/api.js'
18
+ document.head.append(googlescript)
19
+ }
20
+ }
21
+ const developerKey = '{{site.developerKey}}'
22
+ const clientId ='{{site.clientId}}'
23
+ const appId = '{{site.appId}}'
24
+ const scope = [
25
+ 'https://www.googleapis.com/auth/drive.file',
26
+ 'https://www.googleapis.com/auth/drive.appdata',
27
+ ]
28
+ let pickerApiLoaded = false
29
+ let oauthToken
30
+ const loadPicker = (mimeTypes) => {
31
+ gapi.load('auth', { callback: onAuthApiLoad })
32
+ gapi.load('picker', { callback: onPickerApiLoad })
33
+ }
34
+ const onAuthApiLoad = () => {
35
+ window.gapi.auth.authorize(
36
+ {
37
+ client_id: clientId,
38
+ scope: scope,
39
+ immediate: false,
40
+ },
41
+ handleAuthResult
42
+ )
43
+ }
44
+ let onPickerApiLoad = () => {
45
+ pickerApiLoaded = true
46
+ createPicker()
47
+ }
48
+ const handleAuthResult = (authResult) => {
49
+ if (authResult && !authResult.error) {
50
+ oauthToken = authResult.access_token
51
+ createPicker()
52
+ }
53
+ }
54
+ const createPicker = () => {
55
+ if (pickerApiLoaded && oauthToken) {
56
+ const view = new google.picker.View(google.picker.ViewId.DOCS)
57
+ view.setMimeTypes(mimeTypes)
58
+ const picker = new google.picker.PickerBuilder()
59
+ .enableFeature(google.picker.Feature.NAV_HIDDEN)
60
+ .enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
61
+ .setAppId(appId)
62
+ .setOAuthToken(oauthToken)
63
+ .addView(view)
64
+ .addView(new google.picker.DocsUploadView())
65
+ .setDeveloperKey(developerKey)
66
+ .setCallback(pickerCallback)
67
+ .build()
68
+ picker.setVisible(true)
69
+ }
70
+ }
71
+ const pickerCallback = async (data) => {
72
+ if (data.action == google.picker.Action.PICKED) {
73
+ showLoader()
74
+ const res = await fetch(
75
+ `https://www.googleapis.com/drive/v3/files/${data.docs[0].id}?alt=media`,
76
+ {
77
+ headers: {
78
+ Authorization: `Bearer ${oauthToken}`,
79
+ },
80
+ }
81
+ ).then((res) => res.blob())
82
+ let metadata = {
83
+ type: data.docs[0].mimeType,
84
+ }
85
+ let file = new File([res], data.docs[0].name, metadata)
86
+ closeLoader()
87
+ getFile(file)
88
+ }
89
+ }
90
+ function chooseFromDropbox(filemimes) {
91
+ Dropbox.choose({
92
+ success: async (files) => {
93
+ if (files.length < 0) {
94
+ return
95
+ }
96
+ var file = files[0]
97
+ const url = new URL(file.link)
98
+ showLoader()
99
+ const response = await fetch(url).then((res) => res.blob())
100
+ let metadata = {
101
+ type: response.type,
102
+ }
103
+ let newFile = new File([response], file.name, metadata)
104
+ closeLoader()
105
+ getDropBoxFile(newFile)
106
+ },
107
+ cancel: function () {},
108
+ linkType: 'direct',
109
+ multiselect: false,
110
+ extensions: [...filemimes],
111
+ folderselect: false,
112
+ })
113
+ }
114
+
115
+ const fileupload=(file)=>{
116
+ gapi.load('auth', {'callback': onAuthLoad});
117
+ }
118
+ const onAuthLoad=()=> {
119
+ window.gapi.auth.authorize(
120
+ {
121
+ 'client_id': clientId,
122
+ 'scope': scope,
123
+ 'immediate': false
124
+ },
125
+ handleAuth);
126
+ }
127
+ const handleAuth=(authResult)=> {
128
+ if (authResult && !authResult.error) {
129
+ showuploadloading()
130
+ var formData = new FormData();
131
+ const fileToUpload = file
132
+ var metadata = {
133
+ name: fileToUpload.name,
134
+ mimeType: fileToUpload.type
135
+ };
136
+ formData.append( "metadata", new Blob( [JSON.stringify( metadata )], {type: "application/json"} ));
137
+ formData.append( "file", fileToUpload );
138
+ fetch( "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", {
139
+ method: "POST",
140
+ headers: new Headers({ "Authorization": "Bearer " + gapi.auth.getToken().access_token }),
141
+ body: formData
142
+ }).then( function( response ){
143
+ stopuploadloading()
144
+ return response.json();
145
+
146
+ }).then( function( value ){
147
+ stopuploadloading()
148
+ showmessage()
149
+ });
150
+ }
151
+ }
152
+
153
+
154
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-06 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -291,9 +291,8 @@ files:
291
291
  - assets/images/rating.png
292
292
  - assets/instagram.svg
293
293
  - assets/js/TopScroll.js
294
- - assets/js/files/en/jpg.json
295
- - assets/js/files/en/png.json
296
294
  - assets/js/googledrive.js
295
+ - assets/js/googledriveinput.js
297
296
  - assets/js/manifest.json
298
297
  - assets/js/multiselect.js
299
298
  - assets/linkdin.svg
@@ -1,153 +0,0 @@
1
- {
2
- "Format": "Jpg file",
3
- "ShortName": "Jpg",
4
- "FullName": "Jpge",
5
- "Category": "Image",
6
- "Pros": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
7
- "Cons": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
8
- "CreatedbyName": "jpg",
9
- "CreatedbyLink": "jpg",
10
- "CreatedInYear": "2021",
11
- "BasicInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
12
- "DetailedInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
13
- "Softwaresused": [
14
- {
15
- "platform": "Windows",
16
- "softwares": [
17
- {
18
- "name": "Adobe Audition CC 2021",
19
- "link": "/",
20
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
21
- "type": "free"
22
- },
23
- {
24
- "name": "Adobe Audition CC 2021",
25
- "link": "/",
26
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
27
- "type": "paid"
28
- },
29
- {
30
- "name": "Adobe Audition CC 2021",
31
- "link": "/",
32
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
33
- "type": "freemium"
34
- }
35
- ]
36
- },
37
- {
38
- "platform": "Windows",
39
- "softwares": [
40
- {
41
- "name": "Adobe Audition CC 2021",
42
- "link": "/",
43
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
44
- "type": "free"
45
- },
46
- {
47
- "name": "Adobe Audition CC 2021",
48
- "link": "/",
49
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
50
- "type": "paid"
51
- },
52
- {
53
- "name": "Adobe Audition CC 2021",
54
- "link": "/",
55
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
56
- "type": "freemium"
57
- }
58
- ]
59
- },
60
- {
61
- "platform": "Windows",
62
- "softwares": [
63
- {
64
- "name": "Adobe Audition CC 2021",
65
- "link": "/",
66
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
67
- "type": "free"
68
- },
69
- {
70
- "name": "Adobe Audition CC 2021",
71
- "link": "/",
72
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
73
- "type": "paid"
74
- },
75
- {
76
- "name": "Adobe Audition CC 2021",
77
- "link": "/",
78
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
79
- "type": "freemium"
80
- }
81
- ]
82
- },
83
- {
84
- "platform": "Windows",
85
- "softwares": [
86
- {
87
- "name": "Adobe Audition CC 2021",
88
- "link": "/",
89
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
90
- "type": "free"
91
- },
92
- {
93
- "name": "Adobe Audition CC 2021",
94
- "link": "/",
95
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
96
- "type": "paid"
97
- },
98
- {
99
- "name": "Adobe Audition CC 2021",
100
- "link": "/",
101
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
102
- "type": "freemium"
103
- }
104
- ]
105
- },
106
- {
107
- "platform": "Windows",
108
- "softwares": [
109
- {
110
- "name": "Adobe Audition CC 2021",
111
- "link": "/",
112
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
113
- "type": "free"
114
- },
115
- {
116
- "name": "Adobe Audition CC 2021",
117
- "link": "/",
118
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
119
- "type": "paid"
120
- },
121
- {
122
- "name": "Adobe Audition CC 2021",
123
- "link": "/",
124
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
125
- "type": "freemium"
126
- }
127
- ]
128
- },
129
- {
130
- "platform": "Android",
131
- "softwares": [
132
- {
133
- "name": "Google",
134
- "link": "/",
135
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
136
- "type": "free"
137
- },
138
- {
139
- "name": "Apple",
140
- "link": "/",
141
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
142
- "type": "paid"
143
- },
144
- {
145
- "name": "Adobe Audition CC 2021",
146
- "link": "/",
147
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
148
- "type": "premium"
149
- }
150
- ]
151
- }
152
- ]
153
- }
@@ -1,61 +0,0 @@
1
- {
2
- "Format": "Png File",
3
- "ShortName": "Png",
4
- "FullName": "Png",
5
- "Category": "Png",
6
- "Pros": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
7
- "Cons": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
8
- "CreatedbyName": "Png",
9
- "CreatedbyLink": "Png",
10
- "CreatedInYear": "2021",
11
- "BasicInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
12
- "DetailedInformation": "OXPS i.e. XML XML Description Definition File is the latest version of XPS file format developed by Microsoft and Ecma international in 2006. With PDF of Adobe Inc., XPS is a compact text format designed to maintain the integrity of the document. This file format is widely used in Windows8. Windows8 provides built-in applications that can be used to open and view documents in .oxps file format. Older versions of Windows do not have built-in tools and do not support OXPS file format. There are third-party softwares that help open an OXPS file.",
13
- "Softwaresused": [
14
- {
15
- "platform": "Windows",
16
- "softwares": [
17
- {
18
- "name": "Adobe Audition CC 2021",
19
- "link": "/",
20
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
21
- "type": "free"
22
- },
23
- {
24
- "name": "Adobe Audition CC 2021",
25
- "link": "/",
26
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
27
- "type": "paid"
28
- },
29
- {
30
- "name": "Adobe Audition CC 2021",
31
- "link": "/",
32
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
33
- "type": "freemium"
34
- }
35
- ]
36
- },
37
- {
38
- "platform": "Android",
39
- "softwares": [
40
- {
41
- "name": "Google",
42
- "link": "/",
43
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
44
- "type": "free"
45
- },
46
- {
47
- "name": "Apple",
48
- "link": "/",
49
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
50
- "type": "paid"
51
- },
52
- {
53
- "name": "Adobe Audition CC 2021",
54
- "link": "/",
55
- "image": "https://cdn.fileinfo.com/img/icons/apps/128/mplayer_mplayer.png",
56
- "type": "premium"
57
- }
58
- ]
59
- }
60
- ]
61
- }