Changeset 2170


Ignore:
Timestamp:
Feb 9, 2012, 5:16:45 PM (11 years ago)
Author:
work@…
Message:
  • updated study compare look and feel and inline comments
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/generic/AjaxController.groovy

    r2160 r2170  
    2222
    2323        /**
    24          * Get all unique species (for accessible studies)
     24         * Get all unique species in the system
    2525         */
    2626        def uniqueSpecies = {
     
    3838        }
    3939
     40        /**
     41         * Get all unique event template names for the studies the user can read
     42         */
    4043        def uniqueEventTemplateNames = {
    4144                def user        = authenticationService.getLoggedInUser()
     
    6568        }
    6669
     70        /**
     71         * Get all unique sampling event template names for the studies the user can read
     72         */
    6773        def uniqueSamplingEventTemplateNames = {
    6874                def user        = authenticationService.getLoggedInUser()
     
    9298        }
    9399
     100        /**
     101         * return the number of studies the user can read based on criteria
     102         */
    94103        def studyCount = {
    95104                def user        = authenticationService.getLoggedInUser()
     
    111120        }
    112121
     122        /**
     123         * return the studies the user can read based on criteria
     124         */
    113125        def studies = {
    114126                def studies = ajaxService.getStudiesByCriteriaForCurrentUser(params)
  • trunk/grails-app/views/studyCompare/index.gsp

    r2149 r2170  
    1717        <g:if env="development">
    1818        <link rel="stylesheet" href="${resource(dir: 'css', file: 'ajaxflow.css')}"/>
     19        <link rel="stylesheet" href="${resource(dir: 'css', file: 'studyCompare.css')}"/>
    1920        </g:if><g:else>
    2021        <link rel="stylesheet" href="${resource(dir: 'css', file: 'ajaxflow.min.css')}"/>
     22        <link rel="stylesheet" href="${resource(dir: 'css', file: 'studyCompare.min.css')}"/>
    2123        </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>
    4124</head>
    4225<body>
  • trunk/grails-app/views/studyCompare/pages/_page_one.gsp

    r2160 r2170  
    1616var criteria = {};
    1717
     18handleCheckEvent();
     19
    1820function handleCheckEvent(event) {
    1921        var check = $(event);
     
    3133        }
    3234
     35        // count number of matches
     36        $('#matchedStudies').html('').addClass('waitForLoad');
    3337        $.getJSON(
    3438                baseUrl + "/ajax/studyCount",
    3539                criteria,
    3640                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');
    3842                }
    3943        );
    4044
     45        // fetch matched studies
     46        $('#studyOverview').html('').addClass('waitForLoad').removeClass('waitForLoad');
    4147        $.getJSON(
    4248                baseUrl + "/ajax/studies",
     
    5965</div>
    6066<div id="matchedStudies"></div>
    61 <div id="studyOverview" style="margin-top:20px;border: 1px solid blue;"></div>
     67<div id="studyOverview"></div>
    6268
    6369</af:page>
Note: See TracChangeset for help on using the changeset viewer.