App Database

google.load(‘visualization’, ‘1.0’, {packages:[‘controls’]}); #fd_main p {font: 13px/16px Arial; margin-bottom:10px !important; padding:0;} #fd_main h4 {font-family:Arial; font-weight:bold; text-transform:uppercase;text-align:left; padding:0 0 5px 0; margin:0;} #fd_main label {font: bold 13px/24px Arial; padding: 0 5px 0 0; float:left; vertical-align: middle;} #fd_main input, textarea, select, button {font: 13px/16px Arial; color:#959595; vertical-align: middle;} .fd_note{font-family:Arial;color:#5E5E5E; font-size:.8em; border:none; padding:0;} div.search_widget{background:#E1E1E1;background:-webkit-gradient(linear,left top, left bottom,from(#FFF),to(#E1E1E1));background:-webkit-linear-gradient(top,#FFF,#E1E1E1);background:-moz-linear-gradient(top,#FFF,#E1E1E1);background:-ms-linear-gradient(top,#FFF,#E1E1E1);background:-o-linear-gradient(top,#FFF,#E1E1E1);border:2px solid #E1E1E1;padding:20px;-moz-border-radius:10px;-webkit-border-radius:10px; margin-bottom:20px;} div.control{margin-bottom: 15px; color:black;height:26px;} div.chart1{float: left;} .header {background-color: #5B5B5B; color: #FFFFFF; font-family:Arial, sans-serif; text-align:left; font-size:0.8em; text-transform:uppercase; font-weight:600; letter-spacing:1px; line-height:1.4em; border:none;} .row { background-color: #FFFFFF; color: #3F3F3F; font-family:inherit; font-size:0.9em;} .oddRow { background-color: #F5F5F5; color: #3F3F3F; font-family:inherit; text-align:left; font-size:0.9em;} .hoverRow { background-color: #CDCDCD; font-family:inherit; text-align:left; font-size:0.9em; } .selectedRow { background-color: #DCDCDC; color: #3F3F3F; text-align: center; font-family:inherit; text-align:left; font-size:0.9em; } .cell, table {padding:2px;border:none;} .headCell {padding:0;} .goog-menu {font-family:Arial;} .goog-menuitem-content {color: #3F3F3F;} .goog-menuitem-highlight,.goog-menuitem-hover {background-color: #F0F0F0;border-color: #F0F0F0;} .goog-menu-button-focused .goog-menu-button-outer-box,.goog-menu-button-focused .goog-menu-button-inner-box {border-color: #B1B1B1; margin} .goog-menu-button-inner-box {font: 13px/18px Arial, sans-serif; margin:2px 0; padding:0 5px;} .goog-menu-button-hover .goog-menu-button-outer-box,.goog-menu-button-hover .goog-menu-button-inner-box {border-color: #B1B1B1!important;} .goog-menu-button-active,.goog-menu-button-open {background-color: #F0F0F0;border-color: #B1B1B1;background-position: bottom left} .goog-menu-button-focused .goog-menu-button-outer-box,.goog-menu-button-focused .goog-menu-button-inner-box {border-color: #B1B1B1} .google-visualization-controls-slider-horizontal {border: 0px; background-color: #DBDBDB; border-radius: 5px; -moz-border-radius: 5px; outline:none; height:8px;} .google-visualization-controls-slider-thumb {background-color: #616161; border: none;width: 12px; height: 12px; } .google-visualization-controls-slider-horizontal .google-visualization-controls-slider-handle {height: 8px;} .google-visualization-controls-slider-horizontal .google-visualization-controls-slider-thumb {top: -2px; left-margin: 8px; border-radius: 2px; -moz-border-radius: 2px;} .google-visualization-controls-slider-handle {background-color: #616161; opacity: .6; height: 4px} .google-visualization-controls-rangefilter-thumblabel {font: 13px/24px Arial; color: #3F3F3F;padding: 0 0.5em} #page-loader { position: absolute; top: 0; bottom: 0%; left: 0; right: 0%; background-color: white; z-index: 99; display: none; text-align: center; width: 100%; padding-top: 25px; } $.extend({ getUrlVars: function(){ var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf(‘?’) + 1).split(‘&’); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }, getUrlVar: function(name){ return $.getUrlVars()[name]; } }); anyquery = false; fdnq = decodeURIComponent($.getUrlVar(‘fdnq’)); fdop = decodeURIComponent($.getUrlVar(‘fdop’)); fdtq = decodeURIComponent($.getUrlVar(‘fdtq’)); fdall = decodeURIComponent($.getUrlVar(‘fdall’)); if (fdall != ‘undefined’) { fdall = true; } else { fdall = false; }; if (fdtq != ‘undefined’ || fdnq != ‘undefined’ || fdall == true) { anyquery = true; google.setOnLoadCallback(drawVisualization()); } else { fdtq = ‘Enter case-sensitive text’; fdnq = ‘Enter a number’; }; function drawVisualization() { var search_url = ‘https://spreadsheets.google.com/a/google.com/tq?key=0Asi5Z6EiRyKDdE9SVHpJcE9jbjQ3Tl84VnhFTVJ2WGc#gid=0&#8217;; if (fdtq == ‘undefined’) { fdtq = ”; }; if (fdnq == ‘undefined’) { fdnq = ”; }; if (fdall) { var querystring = “select *”; } else { var querystring = “select A,B,C,D,E where “; if (fdtq != ” && fdnq == ” ) { querystring = querystring + “E like ‘%” + fdtq + “%'”; } else if (fdtq == ” && fdnq != ” ) { querystring = querystring + “E” + fdop + fdnq; } else { querystring = querystring + “E like ‘%” + fdtq + “%'” + ” and ” + “E” + fdop + fdnq; }; }; querystring = encodeURIComponent(querystring); search_url = search_url + “&tq=” + querystring; search_url = search_url.replace(/#&tq/,’&tq’); var query = new google.visualization.Query(search_url); query.send(handleQueryResponse); } function handleQueryResponse(response) { if (response.isError()) { console.log(‘Error in query: ‘ + response.getMessage() + ‘ ‘ + response.getDetailedMessage()); return; } var data = response.getDataTable(); var control1_use = new google.visualization.ControlWrapper({‘controlType’: ‘StringFilter’,’containerId’: ‘control1′,’options’: {‘filterColumnLabel’: ”, ‘matchType’:’any’, ‘ui’: {‘label’:’Search for Subject Area’, ‘cssClass’ : ‘custom-stringfilter’, ‘allowMultiple’: false,’allowTyping’: false}}}); var control2_use = new google.visualization.ControlWrapper({‘controlType’: ‘StringFilter’,’containerId’: ‘control2′,’options’: {‘filterColumnLabel’: ”, ‘matchType’:’any’, ‘ui’: {‘label’:’Search for a grade range’,’cssClass’ : ‘custom-stringfilter’, ‘allowMultiple’: false,’allowTyping’: false}}}); var classes = {headerRow: ‘header’, tableRow: ‘row’, hoverTableRow: ‘hoverRow’, oddTableRow: ‘oddRow’, selectedTableRow:’selectedRow’, tableCell:’cell’, headderCell:’headCell’ }; var table = new google.visualization.ChartWrapper({ ‘chartType’: ‘Table’, ‘containerId’: ‘chart1’, ‘options’: {‘height’: ‘400px’, ‘cssClassNames’: classes, ‘width’: ‘600px’,’allowHtml’:’true’ } }); var dashboard = new google.visualization.Dashboard(document.getElementById(‘dashboard’)). bind([control1_use , control2_use ], [table ]). draw(data); $(‘div#dashboard’).show(); };

Explore your results

Instructions: Use the filter(s) below to customize your search results. Use the tool above to perform a new search.

Click on a column label to resort the table.

Fetching data… Thank you for waiting.

Searches with a large number of results may take longer to load.

if (anyquery == false) { $(‘div#dashboard’).hide(); }; $(‘input#search_text’).val(fdtq); $(‘input#range_num’).val(fdnq); function changeSearchButton1() { document.getElementById(‘submit_button’).value = ‘SEARCH’; }; function fd_refresh() { var fdop = $(‘#sheet_op’).val(); var fdnq = $(‘#range_num’).val(); var fdtq = $(‘#search_text’).val(); var sURL = window.location.href; sURL = sURL.replace(/(fdtq=.*&|fdtq=.*$)/gi,”); sURL = sURL.replace(/(fdnq=.*&|fdnq=.*$)/gi,”); sURL = sURL.replace(/(fdop=.*&|fdop=.*$)/gi,”); sURL = sURL.replace(/(fdall=.*&|fdall=.*$)/gi,”); sURL = sURL.replace(/&$/,”); var qs = ”; var found = sURL.search(‘\\?’); if (found == -1) { qs = “?”; }; if (fdnq == “Enter a number”) {fdnq = ”}; if (fdtq == “Enter case-sensitive text”) {fdtq = ”}; if (fdnq == ” && fdtq == ”) { var allrecs = true; }; if (allrecs) { qs = qs + “fdall=true” ; } else { qs = qs + “&fdop=” + encodeURIComponent(fdop) + “&fdnq=” + encodeURIComponent(fdnq) + “&fdtq=” + encodeURIComponent(fdtq); }; sURL = sURL + qs; window.location.replace(sURL); } $(document).ready(function(){ $(‘input#range_num’).focus(function() { if($(this).val() == ‘Enter a number’) $(this).val(”); }).blur(function() { if( $(this).val() == ”) $(this).val(‘Enter a number’); }); $(‘input#search_text’).focus(function() { if($(this).val() == ‘Enter case-sensitive text’) $(this).val(”); }).blur(function() { if( $(this).val() == ”) $(this).val(‘Enter case-sensitive text’); }); if (anyquery == false) { document.getElementById(‘submit_button’).value=’SEE ALL RECORDS’;} else{ document.getElementById(‘submit_button’).value=’SEARCH’; }; });

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s