ACE WSK Client Pages
Quick search template
script.js
?
style.css
?
theme.css
?
index.html
Preview
Download
!function() { Ace.el('#demo').ace('form', { // Please changed to 'public' once you go LIVE. server: 'public', // Please update with the AuthKey provided to you by an Account Manager. authkey: '52ab62e8-f9fc-4986-8a4e-dc10573c21bd', pages: [ {fields: ['HighestLevelOfEducation', 'DegreeLevel', 'Program', 'Concentration', 'PostalCode']}, {fields: 'auto-skip'} ], fields: { 'HighestLevelOfEducation': { field_type: 'Select' }, 'DegreeLevel': { label: 'Desired Degree Level', field_type: 'Select', placeholder: '-- Select Degree Level --' }, 'Program': { depend_combine: true }, 'Concentration': { label: 'Subject of Interest', placeholder: '-- Select Subject --' }, 'PostalCode': { placeholder: '-- Enter Zip --', label: 'Zip Code', mask: '99999' } }, // Settings for "results" method. // This is simplified usage of `form.ace('results', settings)` results: { // Auto attach and fetch results after form was successfully submitted attach: 'auto', settings: { pagerShow: true, pagerEnabled: true, pagerCycle: true, form: { message_submitted: '
School submitted!
', settings: { hide_predefined: true } } } } }).on('ace-attached-results', function (e, form, results) { // .ace results method called as child from parent form instance results.on('ace-initialized', function(e, results) { form.destroy(); // Make school description expandable resultsExpandedInfoInit(results); // Implement our own pager UI animation // with auto attaching form on page change resultsPagerUpdate(results, 'init'); }).on('ace-attached-form', function(e, results, resultform, result) { resultform.on('ace-initialized', function(e, resultform) { // Add new action to form only we have some school form submitted formNotInterestedActionInit(resultform); }).on('ace-submitted', function(e, resultform) { formNotInterestedActionInit(); }); }).on('ace-pager-changed', function(e, results, pager) { resultsPagerUpdate(results, 'change'); }); }); function resultsPagerUpdate(results, mode) { var width, current; if (results.length) { current = results.item(results.pager.current); width = results.wrpr.clientWidth; if (mode === 'init') { window.addEventListener('resize', function() { resultsPagerUpdate(results, 'resize'); }) } if (mode !== 'change') { _traverseResults(results, function(item) { item.holder().parentNode.style.width = width + 'px'; }); } if (mode !== 'init') { results.pager.wrpr.style.width = (results.pager.total+1) * width + 'px'; results.pager.wrpr.style.left = -current.holder().parentNode.offsetLeft + 'px'; } if (mode !== 'resize') { current.attachForm(); } } } function resultsExpandedInfoInit(results) { _traverseResults(results, function(item, listener) { var expand_link = results.dom.create('
School Information
Hide School Information
'); expand_link.addEventListener('click', listener); results.dom.after(expand_link, results.dom.get('.ace-result-title', item.holder())); }, function(e) { e.preventDefault(); this.hasAttribute('expanded') ? this.removeAttribute('expanded') : this.setAttribute('expanded', ''); }); } var _formNotInterestedAction; function formNotInterestedActionInit(form) { if (!form) { _formNotInterestedAction = true; return; } if (!_formNotInterestedAction) { return; } var link = form.dom.create('
Not Interested
'); link.addEventListener('click', function(e) { e.preventDefault(); if (confirm('Not Interested action initiated. Reload window?')) { window.location.reload(); } }); form.dom.prepend(link, form.dom.get('.ace-form-actions', form.wrpr)); } function _traverseResults(results, cb, arg1) { var all = results.all(); while (all.length) { cb(all.pop(), arg1); } } }();
/* Result pager own animation functionality */ .ace-results-wrapper { overflow: hidden; } .ace-results-wrapper > .ace-pager-enabled { -webkit-transition: left 0.5s ease; transition: left 0.5s ease; left: 0; width: 9999999px; /* dynamic, will override on page change */ } .ace-results-wrapper > .ace-pager-enabled > .ace-pager-page { float: left; display: block; height: 500px; overflow: hidden; } .ace-results-wrapper > .ace-pager-enabled > .ace-pager-page-current { height: auto; overflow: visible; } /* Result expandable description functionality */ .expandable-link { display: inline-block; margin-top: 1em; border-bottom-style: dotted; border-bottom-width: 1px; text-decoration: none; } .expandable-link:hover, .expandable-link:focus { border: 0; } .expandable-link * { cursor: pointer; display: none; } .expandable-link :first-child, .expandable-link[expanded] * { display: inline; } .expandable-link[expanded] :first-child { display: none; } .expandable-link + .ace-result-description { max-height: 0; opacity: 0; -webkit-transition: all .5s ease-in-out; transition: all .5s ease-in-out; overflow: hidden; clear: both; } .expandable-link[expanded] + .ace-result-description { max-height: none; opacity: 1; }
.ace-container { font-size: 1em; line-height: 1.6em; color: #222; background: #fff; } .ace-container + .ace-container { margin-top: 1em; } /* form page layout styling */ .ace-form-page { padding: 1em 0; margin: 0; border: 0; } .ace-form-page-title { padding: 0 1.5em; margin-bottom: 1em; font-size: 1.4em; line-height: 2em; color: #333; border-bottom: 1px solid #eee; } .ace-field-no-controls .ace-field-title { width: auto; } .ace-result { margin: 0.5em 0; padding: 1em 1.5em; } .ace-result .ace-form-container { margin-top: 1em; } .ace-result .ace-form-page, .ace-form-actions { border-top: 2px solid #eee; } .ace-results-actions { border-bottom: 2px solid #eee; } .ace-form-actions, .ace-results-actions { background-color: #f5f5f5; padding: 1em 1.5em; text-align: right; } .ace-result-actions .ace-action { margin: 1em 0.5em 1em 0; } /* form fields styling */ .ace-field-title { float: left; width: 38%; padding-top: 0.35em; text-align: right; } .ace-field-controls { margin: 0 20% 0 40%; } .ace-field-wrapper { margin: 0.5em 0; } /* field item for checkboxes and radios */ .ace-field-item { padding-left: 22px; display: block; line-height: 145%; } .ace-field-item > * { vertical-align: middle; } .ace-field-item:first-child { padding-top: .4em; } /* controls styling */ .ace-field-controls .ace-control { margin: 0; border-radius: 0; font: inherit; color: inherit; } .ace-field-controls .ace-control-select, .ace-field-controls .ace-control-text, .ace-field-controls .ace-control-textarea { height: 2.2em; padding: .37em .3em .3em .4em; line-height: 1.35; } .ace-field-controls .ace-field-value { padding: .37em .3em .3em .4em; display: inline-block; } .ace-field-controls .ace-control-select { text-transform: none; max-width: 100%; } .ace-field-controls .ace-control-text, .ace-field-controls .ace-control-textarea { padding-left: .6em; padding-right: .6em; } .ace-field-controls .ace-control-select, .ace-field-controls .ace-control-text, .ace-field-controls .ace-control-textarea { width: 100%; border: 1px solid #aaa; background-color: #fff; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .ace-field-controls .ace-control-textarea { height: auto; } .ace-field-controls .ace-control[disabled], .ace-field-controls .ace-control[readonly] { background-color: #eee; opacity: 1; } .ace-field-controls .ace-control[disabled] { cursor: not-allowed; } /* radio or checkbox styling */ .ace-field-controls .ace-control-radio, .ace-field-controls .ace-control-checkbox { padding: 0; line-height: normal; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; display: inline-block; margin: -0.1em 0.2em 0 -22px; } /* controls focus */ .ace-field-controls .ace-control-select:focus, .ace-field-controls .ace-control-text:focus, .ace-field-controls .ace-control-textarea:focus { border-color: #66afe9; color: inherit; outline: 0; } .ace-field-controls .ace-control-radio:focus, .ace-field-controls .ace-control-checkbox:focus { outline: thin dotted; outline-offset: -2px; } /* mozilla outline remove */ .ace-field-controls .ace-control-select:-moz-focusring { color: transparent; text-shadow: 0 0 0 #000;; } /* .ace-field-required .ace-control-select .ace-placeholder { display: none!important; }*/ /* field placeholders */ .ace-field-controls .ace-control-text::-moz-placeholder, .ace-field-controls .ace-control-textarea::-moz-placeholder { color: #999; opacity: 1; } .ace-field-controls .ace-control-text:-ms-input-placeholder, .ace-field-controls .ace-control-textarea:-ms-input-placeholder { color: #999; } .ace-field-controls .ace-control-text::-webkit-input-placeholder, .ace-field-controls .ace-control-textarea::-webkit-input-placeholder { color: #999; } .ace-field-controls .ace-control-text:focus::-webkit-input-placeholder, .ace-field-controls .ace-control-textarea:focus::-webkit-input-placeholder { color: transparent!important; } .ace-field-controls .ace-control-select option, .ace-field-controls .ace-control-select optgroup { color: #222; } .ace-field-controls .ace-control-select.ace-control-empty, .ace-field-controls .ace-control-select .ace-placeholder { color: #999; } /* field validation messages styling */ .ace-validation-message { color: #C44102; margin-bottom: 0; vertical-align: middle; } .ace-field-validation-error .ace-control, .ace-field-validation-error .ace-field-item-label { color: #C44102; border-color: #C44102; } .ace-field-validation-error .ace-control:focus { border-color: #C44102; } /* asterisk for required fields */ .ace-required { color: #EF5003; } /* select controls customize */ .ace-field-controls .ace-control-select::-ms-expand { display: none; } .ace-ua-ie-lte9 + .ace-form .ace-control-select { background-position: -100px top; padding-right: .4em; } .ace-field-controls .ace-control-select { padding-right: 1.7em; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url('data:image/gif;base64,R0lGODlhCQAFAIABAFVVVf///yH5BAEAAAEALAAAAAAJAAUAAAIKhH+BGYoNGWxgFgA7'); background-repeat: no-repeat; background-position: right 0.5em top 55%; } /* result styling */ .ace-result-index { display: inline-block; font-size: 2.2em; margin: 0 1% 0 0; width: 5%; font-family: serif; font-weight: bold; vertical-align: middle; } .ace-result-index:after { content: '.'; } .ace-result-logo { display: inline-block; width: 33%; margin: 0 1% 0 0; vertical-align: middle; } .ace-result-logo img { max-width: 100%; } .ace-result-title { text-align: right; font-family: serif; font-style: italic; display: inline-block; font-size: 2em; line-height: 120%; width: 60%; vertical-align: middle; } .ace-result-description { margin: 1em 0 0 0; } .ace-result-processed { background-color: #e9fcdd } .ace-result .ace-form-container { background-color: #fbfbfb; } /* action button styling */ .ace-action { margin: 0 0 0 0.5em; } .ace-action, .ace-action:link { cursor: pointer; display: inline-block; text-decoration: none; padding: 0.5em 1.5em; vertical-align: middle; background-color: #fff; color: #337ab7; border: 1px solid #eee; } .ace-action:hover, .ace-action:focus { color: #222; background-color: #f5f5f5; } /* form submit button styling */ .ace-action-form-submit, .ace-action-form-submit:link { color: #fff; background-color: #549fdd; border-color: #549fdd; } .ace-action-form-submit:hover, .ace-action-form-submit:focus { background-color: #5594d3; } /* messages styling */ .ace-message { padding: 0.5em 1em; margin-bottom: 0.5em; border: 1px solid #bce8f1; color: #31708f; background-color: #d9edf7; } .ace-message-error { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .ace-message .ace-action { vertical-align: baseline; padding: 0 1em; } /* busy marker styling */ .ace-busy { background-color: #fff; } .ace-busy span { text-transform: lowercase; font-size: 10px; color: #555; } .ace-busy span:before { content: ' '; display: inline-block; vertical-align: middle; width: 20px; height: 20px; margin: 0 6px 2px 0; background-color: #333; border-radius: 100%; -webkit-animation: sk-scaleout 1.0s infinite ease-in-out; animation: sk-scaleout 1.0s infinite ease-in-out; } @-webkit-keyframes sk-scaleout { 0% { -webkit-transform: scale(0) } 100% { -webkit-transform: scale(1.0); opacity: 0; } } @keyframes sk-scaleout { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1.0); transform: scale(1.0); opacity: 0; } } .ace-zip-container.ace-field-controls .ace-busy { background: transparent; } .ace-zip-container.ace-field-controls .ace-busy span:before { right: 0; margin: 0; position: absolute; } .ace-container.ace-zip-container.ace-field-controls .ace-busy span { top: 0.5em; right: 0.5em; margin: 0; text-indent: 9999px; overflow: hidden; }
Quick search template