kcc-gem-theme 1.59.37 → 1.60.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/theme_hash.yml +1 -1
- data/_includes/accordion.html +3 -3
- data/_includes/contacts-tan.html +3 -3
- data/_includes/emergency-alerts.html +16 -1
- data/_includes/nav-landing.html +1 -1
- data/_layouts/default-core.html +2 -4
- data/assets/js/theme/alerts/alerts.js +1 -2
- data/assets/js/theme/alerts/campusAlertsSheetsAPI.js +14 -12
- data/assets/js/theme/{emergency → alerts}/createAlertsHtml.js +0 -0
- data/assets/js/theme/{emergency → alerts}/parseMarkdownToHTML.js +0 -0
- data/assets/js/theme/dist/alerts.bundle.js +1 -1
- data/assets/js/theme/dist/kcc-mega-nav.bundle.js +1 -1
- data/assets/js/theme/dist/kcc-nav.bundle.js +1 -1
- data/assets/js/theme/dist/kcc-theme-landing.bundle.js +1 -1
- data/assets/js/theme/dist/kcc-theme.bundle.js +1 -1
- metadata +4 -11
- data/assets/js/theme/alerts/createCampusAlertsHtml.js +0 -166
- data/assets/js/theme/alerts/gapi.js +0 -17
- data/assets/js/theme/alerts/trackAlertsCloseClicks.js +0 -26
- data/assets/js/theme/dist/kcc-alerts.bundle.js +0 -1
- data/assets/js/theme/emergency/alerts.js +0 -5
- data/assets/js/theme/emergency/campusAlertsSheetsAPI.js +0 -41
- data/assets/js/theme/emergency/simpleSetSheetParameters.js +0 -23
@@ -1,41 +0,0 @@
|
|
1
|
-
import setSheetParameters from './simpleSetSheetParameters.js';
|
2
|
-
import createAlertsHtml from './createAlertsHtml.js';
|
3
|
-
|
4
|
-
const SHEET_KEY = '1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs';
|
5
|
-
const SHEET_TAB_NAME = 'Alerts';
|
6
|
-
const EMERGENCY_ALERT_DIV_ID = 'emergencyAlerts'
|
7
|
-
|
8
|
-
function start() {
|
9
|
-
if ( ! document.getElementById(EMERGENCY_ALERT_DIV_ID) )
|
10
|
-
return;
|
11
|
-
|
12
|
-
//var t0 = performance.now();
|
13
|
-
init();
|
14
|
-
//var t1 = performance.now();
|
15
|
-
//console.info("Call to 'init' took " + (t1 - t0) + " milliseconds.");
|
16
|
-
}
|
17
|
-
|
18
|
-
function init() {
|
19
|
-
const params = {
|
20
|
-
'apiKey': 'AIzaSyCEBsbXfFcdbkASlg-PodD1rT_Fe3Nw62A',
|
21
|
-
'discoveryDocs': ['https://www.googleapis.com/discovery/v1/apis/sheets/v4/rest']
|
22
|
-
};
|
23
|
-
const sheetParams = setSheetParameters(SHEET_KEY, SHEET_TAB_NAME);
|
24
|
-
|
25
|
-
gapi.client.init(params).then(function() { // Executes an API request, and returns a Promise.
|
26
|
-
function execute() {
|
27
|
-
return gapi.client.sheets.spreadsheets.values.get(sheetParams)
|
28
|
-
.then(function(response) {
|
29
|
-
createAlertsHtml(response);
|
30
|
-
},
|
31
|
-
function(err) {
|
32
|
-
console.error("Execute error", err);
|
33
|
-
});
|
34
|
-
}
|
35
|
-
execute();
|
36
|
-
});
|
37
|
-
}
|
38
|
-
// Loads the JavaScript client library and invokes `start` afterwards.
|
39
|
-
// Usage:
|
40
|
-
// gapi.load('client', start);
|
41
|
-
export default start;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
function setId(params, i) {
|
2
|
-
return params.spreadsheetId = i;
|
3
|
-
}
|
4
|
-
|
5
|
-
function setRange(params, r) {
|
6
|
-
return params.range = r;
|
7
|
-
}
|
8
|
-
|
9
|
-
function setSheetParameters(key, tab) {
|
10
|
-
let sheetParams = {};
|
11
|
-
|
12
|
-
setId(sheetParams, key);
|
13
|
-
setRange(sheetParams, tab);
|
14
|
-
return sheetParams;
|
15
|
-
}
|
16
|
-
//
|
17
|
-
// USAGE:
|
18
|
-
// const SHEET_KEY = '1spDfZUVLeEE5n0OFvbXl2FSJD_RmS0dSPc7CSGr1TjI'; // Long string from the URL of the Google Sheet
|
19
|
-
// const TAB_NAME = 'Scholarships Count' // Name as it appears on the "tab" of the desired sheet. Usually "Sheet1", "Sheet2", etc. if not renamed.
|
20
|
-
//
|
21
|
-
// const sheetParams = setSheetParameters(SHEET_KEY, TAB_NAME);
|
22
|
-
//
|
23
|
-
export default setSheetParameters;
|