This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create our form | |
var myForm = new glow.forms.Form("#fmcustomer") | |
var myForm = glow.lang.trim("txtCompany","txtForename","txtSurname2) | |
// add tests for First Name | |
.addTests( | |
"txtCompany", | |
["required", { | |
on: "change submit", | |
message: "Please tell us your company name" | |
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glow.ready(function() { | |
var myPanel = new glow.widgets.Panel("#formPanel"); | |
//display panel | |
myPanel.show(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getItemIndex(elm) { | |
var siblings = elm.slice(0,1).parent().children(), | |
i = siblings.length; | |
while(i--) { | |
if (siblings[i] == elm[0]) { | |
return i; | |
} | |
} | |
return -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.test, .test2 { | |
width: 200px; | |
height: 200px; | |
background: green; | |
border-radius: 500px; | |
position: relative; | |
transition: all 2s linear; | |
left: 0; | |
margin: 0 0 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assertOkResponse(response) { | |
if (response.type === 'opaque' || response.status === 200) { | |
return response; | |
} | |
throw Error("Bad response: " + response.status); | |
} | |
fetch(url, {'mode': 'cors'}).then(assertOkResponse).then(function(response) { | |
// cache | |
}).catch(function(err) { |