1// Functions for buttons on the tool bar are defined here 2Ext.onReady(function(){ 3 4 var category = new Ext.form.ComboBox({ 5 triggerAction: 'all', 6 transform:'category', 7 width:211 8 }); 9 category.setEditable(false); 10 11 var start_month = new Ext.form.ComboBox({ 12 triggerAction: 'all', 13 transform:'smonth', 14 width:95 15 }); 16 start_month.setEditable(false); 17 18 var start_day = new Ext.form.ComboBox({ 19 triggerAction: 'all', 20 transform:'sday', 21 width:45 22 }); 23 start_day.setEditable(false); 24 25 var start_year = new Ext.form.ComboBox({ 26 triggerAction: 'all', 27 transform:'syear', 28 width:65 29 }); 30 start_year.setEditable(false); 31 32 var end_month = new Ext.form.ComboBox({ 33 triggerAction: 'all', 34 transform:'emonth', 35 width:95 36 }); 37 end_month.setEditable(false); 38 39 var end_day = new Ext.form.ComboBox({ 40 triggerAction: 'all', 41 transform:'eday', 42 width:45 43 }); 44 end_day.setEditable(false); 45 46 var end_year = new Ext.form.ComboBox({ 47 triggerAction: 'all', 48 transform:'eyear', 49 width:65 50 }); 51 end_year.setEditable(false); 52 53 var field = new Ext.form.TextField({ 54 width:211 55 }); 56 field.applyTo('freekey'); 57 58 /*Ext.get('helpbutton').on('click', function(input){ 59 var helpHtml = document.getElementById("helptext").innerHTML; 60 Ext.MessageBox.alert('Help',helpHtml); 61 });*/ 62}); 63 64/** 65 * SUMMARY: This function is created to replace the old PDCSearchDOI.jsp 66 * 1. ask pdcsearch.jsp page to check whether user pass a dpi_id in its url or not; 67 * 2. if yes, call the parameterRequestHandler() javascript function; 68 * 3. the parameterRequestHandler check the doi_id parameter, active the result tab, tell it to display the record (using quick search.ccin controller), and then switch the display from the search tab to result tab; 69 * 4. if no, parameterRequestHandler will do nothing, and then load the default interface. 70 * 5. since we register the DOI link with pdcsearchDOI.jsp page, I simple change that page to redirect all traffic to pdcsearch.jsp 71 * @author Yunwei Dong 72 * @version 4.1.0 73 * @since 4.1.0; SPRING3.1; Java6 74 */ 75function parameterRequestHandler(doi_id) { 76 clearSearch(getActiveMapNumber()); 77 78 if (typeof doi_id != undefined && doi_id !=null && doi_id !='null') 79 { 80 81 layout.getRegion('east').getTabs().enableTab("results_div"); 82 var pgLink = "./quickSearch.ccin?id="+doi_id+"&name=1"; 83 document.getElementById("results").src= pgLink; 84 layout.getRegion('east').getTabs().activate("results_div"); 85 86 } 87} 88 89// Ensure when expand a frame, map is always at the center 90function expandRegion(region) { 91 var n = getActiveMapNumber(); 92 (layout.getRegion(region)).expand(null); 93 maps[n].setCenter(maps[n].getCenter(), 4); 94} 95 96// Collapse or expand the search and results frames together 97function toggleRegion() { 98 var n = getActiveMapNumber(); 99 /*if (layout.getRegion('south').collapsed == true) { 100 (layout.getRegion('south')).expand(null); 101 } else if (layout.getRegion('south').collapsed == false) { 102 (layout.getRegion('south')).collapse(); 103 } */ 104 if (layout.getRegion('east').collapsed == true) { 105 (layout.getRegion('east')).expand(null); 106 } else if (layout.getRegion('east').collapsed == false) { 107 (layout.getRegion('east')).collapse(); 108 } 109 maps[n].setCenter(maps[n].getCenter(), maps[n].getZoom()); 110}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.