Changeset 2170
- Timestamp:
- Feb 9, 2012, 5:16:45 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/generic/AjaxController.groovy
r2160 r2170 22 22 23 23 /** 24 * Get all unique species (for accessible studies)24 * Get all unique species in the system 25 25 */ 26 26 def uniqueSpecies = { … … 38 38 } 39 39 40 /** 41 * Get all unique event template names for the studies the user can read 42 */ 40 43 def uniqueEventTemplateNames = { 41 44 def user = authenticationService.getLoggedInUser() … … 65 68 } 66 69 70 /** 71 * Get all unique sampling event template names for the studies the user can read 72 */ 67 73 def uniqueSamplingEventTemplateNames = { 68 74 def user = authenticationService.getLoggedInUser() … … 92 98 } 93 99 100 /** 101 * return the number of studies the user can read based on criteria 102 */ 94 103 def studyCount = { 95 104 def user = authenticationService.getLoggedInUser() … … 111 120 } 112 121 122 /** 123 * return the studies the user can read based on criteria 124 */ 113 125 def studies = { 114 126 def studies = ajaxService.getStudiesByCriteriaForCurrentUser(params) -
trunk/grails-app/views/studyCompare/index.gsp
r2149 r2170 17 17 <g:if env="development"> 18 18 <link rel="stylesheet" href="${resource(dir: 'css', file: 'ajaxflow.css')}"/> 19 <link rel="stylesheet" href="${resource(dir: 'css', file: 'studyCompare.css')}"/> 19 20 </g:if><g:else> 20 21 <link rel="stylesheet" href="${resource(dir: 'css', file: 'ajaxflow.min.css')}"/> 22 <link rel="stylesheet" href="${resource(dir: 'css', file: 'studyCompare.min.css')}"/> 21 23 </g:else> 22 <style type="text/css">23 .waitForLoad {24 background: url(../images/ajaxflow/ajax-loader.gif) no-repeat center top;25 width: 220px;26 height: 30px;27 }28 .selector {29 display: block;30 }31 .selector .ajax {32 display: inline-block;33 vertical-align: top;34 }35 .selector .ajax .label {36 background-color: blue;37 display: block;38 }39 40 </style>41 24 </head> 42 25 <body> -
trunk/grails-app/views/studyCompare/pages/_page_one.gsp
r2160 r2170 16 16 var criteria = {}; 17 17 18 handleCheckEvent(); 19 18 20 function handleCheckEvent(event) { 19 21 var check = $(event); … … 31 33 } 32 34 35 // count number of matches 36 $('#matchedStudies').html('').addClass('waitForLoad'); 33 37 $.getJSON( 34 38 baseUrl + "/ajax/studyCount", 35 39 criteria, 36 40 function(data) { 37 $('#matchedStudies').html(data.matched+' of '+data.total+' readable studies matched your criteria') ;41 $('#matchedStudies').html(data.matched+' of '+data.total+' readable studies matched your criteria').removeClass('waitForLoad'); 38 42 } 39 43 ); 40 44 45 // fetch matched studies 46 $('#studyOverview').html('').addClass('waitForLoad').removeClass('waitForLoad'); 41 47 $.getJSON( 42 48 baseUrl + "/ajax/studies", … … 59 65 </div> 60 66 <div id="matchedStudies"></div> 61 <div id="studyOverview" style="margin-top:20px;border: 1px solid blue;"></div>67 <div id="studyOverview"></div> 62 68 63 69 </af:page>
Note: See TracChangeset
for help on using the changeset viewer.