Changeset 7544

Show
Ignore:
Timestamp:
03/24/09 13:30:56 (16 months ago)
Author:
josowski
Message:

Removing date functionality from PLoS templates

References #1225, also removing some config file changes that inadvertanly got commited in r7543

Location:
head/ambra/webapp/src/main
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/search/action/SearchAction.java

    r7543 r7544  
    270270          cal.add(Calendar.MONTH, -3); 
    271271        } 
     272        if ("6months".equals(dateTypeSelect)) { 
     273          cal.add(Calendar.MONTH, -6); 
     274        } 
    272275 
    273276        synchronized(luceneDateFormat) { 
  • head/ambra/webapp/src/main/resources/ehcache.xml

    r7543 r7544  
    116116            properties="peerDiscovery=automatic, 
    117117                        multicastGroupAddress=230.0.0.1, 
    118                         multicastGroupPort=6666"/> 
     118                        multicastGroupPort=4446"/> 
    119119 
    120120 
  • head/ambra/webapp/src/main/resources/freemarker.properties

    r7543 r7544  
    2222template_exception_handler=rethrow  
    2323time_zone="UTC" 
    24 template_update_delay=0 
     24template_update_delay=600 
    2525localized_lookup=false 
    2626cache_storage=strong:350, soft 
  • head/ambra/webapp/src/main/webapp/javascript/advsearch.js

    r7543 r7544  
    5858    ambra.advsearch.liAuthNmesOpts = dojo.byId(ambra.advsearch.Config.idLiAuthNmesOpts); 
    5959 
    60     // dates section... 
    61     var slct = dojo.byId(ambra.advsearch.Config.idPublishDate); 
    62     var showDates = (slct.options[slct.selectedIndex].value == 'range'); 
    63     dojo.byId(ambra.advsearch.Config.idPubDateOptions).style.display = showDates ? '' : 'none'; 
    64     dojo.connect(dojo.byId(ambra.advsearch.Config.idPublishDate), "onchange", ambra.advsearch.onChangePublishDate); 
    65  
    66     // date part comment cue event bindings... 
    67     dojo.connect(dojo.byId('startDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); 
    68     dojo.connect(dojo.byId('endDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); 
    69  
     60 
     61    //Manage date entry section, but only if is defined 
     62    if (dojo.byId(ambra.advsearch.Config.idPubDateOptions) != null) { 
     63      var slct = dojo.byId(ambra.advsearch.Config.idPublishDate); 
     64      var showDates = (slct.options[slct.selectedIndex].value == 'range'); 
     65      dojo.byId(ambra.advsearch.Config.idPubDateOptions).style.display = showDates ? '' : 'none'; 
     66      dojo.connect(dojo.byId(ambra.advsearch.Config.idPublishDate), "onchange", ambra.advsearch.onChangePublishDate); 
     67 
     68      // date part comment cue event bindings... 
     69      dojo.connect(dojo.byId('startDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); 
     70      dojo.connect(dojo.byId('endDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); 
     71    } 
    7072 
    7173    // subject categories section... 
     
    8890    ambra.advsearch.explodeAuthNames(); 
    8991 
    90     //  Prime the startDate and endDate pop-up calendars... 
    91     Calendar.setup({ 
    92       inputField     :    "startDateId",    // id of the input field 
    93       ifFormat       :    "%Y-%m-%d",       // format of the input field 
    94       step           :    1                // show all years in drop-down boxes (instead of every other year as default) 
    95     }); 
    96     Calendar.setup({ 
    97       inputField     :    "endDateId",      // id of the input field 
    98       ifFormat       :    "%Y-%m-%d",       // format of the input field 
    99       step           :    1                // show all years in drop-down boxes (instead of every other year as default) 
    100     }); 
     92    //Prime the startDate and endDate pop-up calendars only if they are defined  
     93    if (dojo.byId(ambra.advsearch.Config.idPubDateOptions) != null) { 
     94      Calendar.setup({ 
     95        inputField     :    "startDateId",    // id of the input field 
     96        ifFormat       :    "%Y-%m-%d",       // format of the input field 
     97        step           :    1                // show all years in drop-down boxes (instead of every other year as default) 
     98      }); 
     99      Calendar.setup({ 
     100        inputField     :    "endDateId",      // id of the input field 
     101        ifFormat       :    "%Y-%m-%d",       // format of the input field 
     102        step           :    1                // show all years in drop-down boxes (instead of every other year as default) 
     103      }); 
     104    } 
    101105  }, 
    102106 
  • head/ambra/webapp/src/main/webapp/search/searchStart.ftl

    r7446 r7544  
    22  $HeadURL::                                                                            $ 
    33  $Id$ 
    4    
     4 
    55  Copyright (c) 2007-2009 by Topaz, Inc. 
    66  http://topazproject.org 
    7    
     7 
    88  Licensed under the Apache License, Version 2.0 (the "License"); 
    99  you may not use this file except in compliance with the License. 
    1010  You may obtain a copy of the License at 
    11    
     11 
    1212  http://www.apache.org/licenses/LICENSE-2.0 
    13    
     13 
    1414  Unless required by applicable law or agreed to in writing, software 
    1515  distributed under the License is distributed on an "AS IS" BASIS, 
     
    2424<#macro chkdlist tstr strlist><#list strlist as str><#if tstr == str>${checkedstr}</#if></#list></#macro> 
    2525<!-- begin : advanced search form --> 
    26 <div id="content" class="search">   
     26<div id="content" class="search"> 
    2727  <!-- begin : right-hand column --> 
    2828  <div id="rhc"> 
     
    4848          <li class="btnWrap"><input type="submit" id="button-find" value="Go"/></li> 
    4949        </ol> 
    50       </form>               
     50      </form> 
    5151    </div>--> 
    5252  </div> 
     
    5858    <p>Search the full text of all issues of <em>${currentJournalName}</em></p> 
    5959    <@s.url id="advSearchURL" includeParams="none" namespace="/search" action="advancedSearch" /> 
    60     <form id="advSearchForm" name="advSearchForm" onsubmit="return true;" action="${advSearchURL}"  
     60    <form id="advSearchForm" name="advSearchForm" onsubmit="return true;" action="${advSearchURL}" 
    6161          method="post" enctype="multipart/form-data" class="advSearch" title="Advanced Search"> 
    6262      <fieldset id="author"> 
    63          
    64          
     63 
     64 
    6565        <legend><span>Search by Author</span></legend> 
    6666        <ol id="as_ol_an"> 
     
    7676              <ol> 
    7777                <#if ((authorNameOp!"") == "any") || ((authorNameOp!"") == "")> 
    78                   <#assign anyChecked = checkedstr>  
    79                   <#assign allChecked = "">  
     78                  <#assign anyChecked = checkedstr> 
     79                  <#assign allChecked = ""> 
    8080                <#elseif (authorNameOp!"") == "all"> 
    81                   <#assign anyChecked = "">  
    82                   <#assign allChecked = checkedstr>  
     81                  <#assign anyChecked = ""> 
     82                  <#assign allChecked = checkedstr> 
    8383                </#if> 
    8484                <li><label><input type="radio" name="authorNameOp" value="any" ${anyChecked} /> <em>Any</em> of these authors</label></li> 
     
    130130                <option value="month" <@slctd tstr="month" str=(dateTypeSelect!"")/>>Past month</option> 
    131131                <option value="3months" <@slctd tstr="3months" str=(dateTypeSelect!"")/>>Past 3 months</option> 
    132                 <option value="range" <@slctd tstr="range" str=(dateTypeSelect!"")/>>Specify a date range...</option> 
     132                <option value="6months" <@slctd tstr="6months" str=(dateTypeSelect!"")/>>Past 6 months</option> 
     133                <#--Commenting out due to bug with Mulgara search 
     134                option value="range" <@slctd tstr="range" str=(dateTypeSelect!"")/>>Specify a date range...</option--> 
    133135              </select> 
    134136            </span> 
    135137          </li> 
    136           <li id="pubDateOptions" class="options" style="display:none;"> 
     138          <#-- 
     139            Commenting out due to bug with Mulgara search 
     140            <li id="pubDateOptions" class="options" style="display:none;"> 
    137141            <fieldset> 
    138142              <legend>Published between: </legend> 
     
    146150            </fieldset> 
    147151          </li> 
     152          --> 
    148153        </ol> 
    149154      </fieldset> 
     
    175180              </ul> 
    176181<#else> 
    177 There are no subjects in the system.  
     182There are no subjects in the system. 
    178183</#if> 
    179184            </fieldset>