diff --git a/assets/js/main.js b/assets/js/main.js index f5fcd8c..0f25c59 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -300,7 +300,13 @@ // Prevent clicks from inside article from bubbling. $this.on('click', function(event) { - event.stopPropagation(); + if (!("jugaad" in event.target.dataset)) { + // data attribute doesn't exist + event.stopPropagation(); + } + else{ + event.stopPropagation(); + } }); }); diff --git a/images/transparent_logo.png b/images/transparent_logo.png new file mode 100644 index 0000000..56fca57 Binary files /dev/null and b/images/transparent_logo.png differ diff --git a/images/transparent_logo_white.png b/images/transparent_logo_white.png new file mode 100644 index 0000000..deffb86 Binary files /dev/null and b/images/transparent_logo_white.png differ diff --git a/index.html b/index.html index 6a74c45..caafdea 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,8 @@
-

Intro

@@ -99,13 +100,19 @@
-
+

Projects

This is some random text which will be replaced with much more creative introduction to the Project List

-
-
+
+
+
+ +
@@ -120,7 +127,7 @@
-
+

Apply

@@ -149,8 +156,15 @@
- - + + +
+
+ + +
+
+

Applicant List

+ +
+

Text

+

This is bold and this is strong. This is italic and this is + emphasized. + This is superscript text and this is subscript text. + This is underlined and this is code: for (;;) { ... }. Finally, this is a link.

+
+

Heading Level 2

+

Heading Level 3

+

Heading Level 4

+
Heading Level 5
+
Heading Level 6
+
+

Blockquote

+
Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus + euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis + iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem + ipsum dolor sit amet nullam adipiscing eu felis.
+

Preformatted

+
+						i = 0;
+							while (!deck.isInOrder()) {
+								print 'Iteration ' + i;
+								deck.shuffle();
+								i++;
+							}
+
+							print 'It took ' + i + ' iterations to sort the deck.';
+						
+					
+
+ +
+

Lists

+ +

Unordered

+
    +
  • Dolor pulvinar etiam.
  • +
  • Sagittis adipiscing.
  • +
  • Felis enim feugiat.
  • +
+ +

Alternate

+
    +
  • Dolor pulvinar etiam.
  • +
  • Sagittis adipiscing.
  • +
  • Felis enim feugiat.
  • +
+ +

Ordered

+
    +
  1. Dolor pulvinar etiam.
  2. +
  3. Etiam vel felis viverra.
  4. +
  5. Felis enim feugiat.
  6. +
  7. Dolor pulvinar etiam.
  8. +
  9. Etiam vel felis lorem.
  10. +
  11. Felis enim et feugiat.
  12. +
+

Icons

+ + +

Actions

+ + +
+ +
+

Table

+

Default

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+
+ +

Alternate

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+
+
+ +
+

Buttons

+ + + +
    +
  • Disabled
  • +
  • Disabled
  • +
+
+ +
+

Form

+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
    +
  • +
  • +
+ +
+ +
+ +
@@ -9552,36 +9818,79 @@ print 'It took ' + i + ' iterations to sort the deck.'; /*async function loadRIBC() { floCloudAPI.requestObjectData('RIBC', options = { senderIDs: false, receiverID: "FMeiptdJNtYQEtzyYAVNP8fjsDJ1i4EPfE", application: 'RIBC' }) }*/ + function validateEmail(mail) { + if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) { + return (true) + } + alert("You have entered an invalid email address!") + return (false) + } + + function validatePhonenumber(inputtxt) { + var phoneno = /^\d{10}$/; + if ((inputtxt.value.match(phoneno))) { + return true; + } + else { + alert("You have entered an invalid phone number!"); + return false; + } + } async function fetchInternApplicants() { let applicants = await floCloudAPI.requestGeneralData('test') - debugger; } //Handler for Applicant form submission document.getElementById('applicationform').addEventListener('submit', (ev) => { ev.preventDefault() + aname = document.getElementById('name').value + aname = aname.replace(/\s+/g, ' ') + aname = aname.trim() + if (aname == '') { + alert('You have entered an invalid name!') + } + aemail = document.getElementById('email').value + aemail = aemail.replace(/\s+/g, ' ') + aemail = aemail.trim() + if (!validateEmail(aemail)) { + return + } + acollege = document.getElementById('college').value + acollege = acollege.replace(/\s+/g, ' ') + acollege = acollege.trim() + if (acollege == '') { + alert('You have entered an invalid college!') + return + } + acourse = document.getElementById('course').value + adob = document.getElementById('dob').value + awhatsapp = document.getElementById('whatsapp').value - afloid = document.getElementById('floid').value + + afloid = myFloID + + aproject = document.getElementById('formprojectlist').value let detailsObj = { - 'name' : aname, - 'email' : aemail, - 'college' : acollege, - 'course' : acourse, - 'dob' : adob, - 'whatsapp' : awhatsapp + 'name': aname, + 'email': aemail, + 'college': acollege, + 'course': acourse, + 'dob': adob, + 'whatsapp': awhatsapp, + 'project': aproject } let mainObj = {} mainObj[afloid] = detailsObj - floCloudAPI.sendGeneralData(JSON.stringify(mainObj), 'test1') - document.getElementById('resetform').click() + floCloudAPI.sendGeneralData(JSON.stringify(mainObj), 'test2') + document.getElementById('resetform').click() }) @@ -9598,36 +9907,88 @@ print 'It took ' + i + ' iterations to sort the deck.'; console.log(result) alert(`Welcome FLO_ID: ${myFloID}`) + document.getElementById('floid').value = myFloID + //App functions.... /*loadRIBC() - .then(loadres => { - - + .then(loadres => { }) */ let ribcAppdata = floCloudAPI.requestObjectData('RIBC', options = { senderIDs: false, receiverID: "FMeiptdJNtYQEtzyYAVNP8fjsDJ1i4EPfE", application: 'RIBC' }) - let ribcGendata = floCloudAPI.requestGeneralData('test') + let ribcGendata = floCloudAPI.requestGeneralData('test2') Promise.all([ribcAppdata, ribcGendata]).then((values) => { console.log("Hey I'm here, the promises just got resolved") console.log(values) + + // Project list related operations let projectDetails = floGlobals.appObjects.RIBC.projectDetails let projectDetailsKeys = Object.keys(projectDetails) let projectlistContainer = document.getElementById('projectlist') - + let formprojectlistContainer = document.getElementById('formprojectlist') for (let i = 0; i < projectDetailsKeys.length; i++) { - newHtml = `

${projectDetails[projectDetailsKeys[i]].projectName}

+ newHtml = `
+ + +

${projectDetails[projectDetailsKeys[i]].projectDescription}

` - projectlistContainer.innerHTML = projectlistContainer.innerHTML + newHtml + + applicationformHtml = `` + formprojectlistContainer.innerHTML = formprojectlistContainer.innerHTML + applicationformHtml + } + + document.getElementById('projectactionlist').style.display = 'flex' + + // User list related operations + let applicantsArray = floGlobals.generalData['{"application":"TEST_MODE","type":"test2"}'] + let applicantsIDarray = [] + for (let i = 0; i < applicantsArray.length; i++) { + applicantsIDarray.push(applicantsArray[i]['sender']) + } + + + if (applicantsIDarray.includes(myFloID)) { + window.isApplicant = true + window.applicantProjects = [] + for (let i = 0; i < applicantsArray.length; i++) { + if (myFloID == applicantsArray[i]['sender']) { + var temp = JSON.parse(applicantsArray[i]['message']) + applicantProjects.push(temp[myFloID]['project']) + + // force user to not change his details if he already exists + if (i == 0) { + document.getElementById('name').value = temp[myFloID]['name'] + document.getElementById('name').readOnly = true + document.getElementById('email').value = temp[myFloID]['email'] + document.getElementById('email').readOnly = true + document.getElementById('college').value = temp[myFloID]['college'] + document.getElementById('college').readOnly = true + document.getElementById('course').value = temp[myFloID]['course'] + document.getElementById('course').readOnly = true + document.getElementById('dob').value = temp[myFloID]['dob'] + document.getElementById('dob').readOnly = true + document.getElementById('whatsapp').value = temp[myFloID]['whatsapp'] + document.getElementById('whatsapp').readOnly = true + } + } + } + } + else { + window.isApplicant = false } }); }).catch(error => console.error(error)) } + + function checkboxBehaviour() { + console.log('I just clicked a checkbox') + } +