Changeset c60e4da in indico


Ignore:
Timestamp:
04/23/12 14:39:56 (13 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
61ed1b
Parents:
9ca792
git-author:
Claude Bossy <claude.bossy@…> (02/21/12 17:04:08)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (04/23/12 14:39:56)
Message:

[IMP] Added a tag in the search to precise where it will search

Location:
indico
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/pages/search.py

    r2e1528 rc60e4da  
    2727        params['confId'] = None 
    2828        params['categId'] = self._target.getId() 
     29        params['categName'] = self._target.getTitle() 
    2930 
    3031    def _getNavigationDrawer(self): 
  • indico/MaKaC/webinterface/tpls/Search.tpl

    r8d9874d rc60e4da  
    3333 
    3434% if categId: 
    35   <input type="hidden" name="categId" value="${ categId }"/> 
     35  <input type="hidden" id="categId" name="categId" value="${ categId }"/> 
    3636% endif 
    3737% if confId: 
     
    4040 
    4141 
    42  
    43 <div> 
    44   <input style="width: 300px; height:20px; font-size:17px; vertical-align: middle;" type="text" name="p" value="${ p }" /> 
    45   <input type="submit" value="${ _('Search')}" style="vertical-align: middle;"/> 
    46 </div> 
     42<div id="UISearch"> 
     43    <div id="searchControls"> 
     44        <div class="yellowButton searchButton" id="searchButton2"> 
     45            <input style="background-color: transparent;" class="button" type="submit" value="${ _('Search')}" onclick="javascript: return verifyForm();" id="searchSubmit"/> 
     46        </div> 
     47        <div style="background: white; padding: 2px;"> 
     48            <input style="background-color: transparent; margin-top: -1px;" type="text" id="searchText2" name="p" value="${ p }"/> 
     49        </div> 
     50    </div> 
     51</div> 
     52 
    4753<div style="padding-top: 4px;"><span id="advancedOptionsText"><span class='fakeLink' onclick='toogleAdvancedOptions()'>${_("Show advanced options") }</span></span></div> 
    4854<div id="advancedOptions" style="overflow: hidden; visibility: hidden;"> 
     
    175181} 
    176182 
     183function hideCategory2() 
     184{ 
     185    $('#categId').attr('value', 0); 
     186    $('#cross2').fadeOut(); 
     187    $('#inCategory2').fadeOut(); 
     188} 
     189 
    177190IndicoUI.executeOnLoad(function(){ 
    178191 
     
    200213startDate.set('${ startDate }'); 
    201214endDate.set('${ endDate }'); 
     215 
     216var box = $('<div id="cross2" class="searchCategoryCross" onclick="hideCategory2()">x</div>'+ 
     217        '<div id="inCategory2" class="searchCategory">in ${categName}</div>'); 
     218if ($('#categId').attr('value')!=0){ 
     219$('#searchText2').before(box); 
     220} 
     221 
    202222}); 
    203223 
  • indico/MaKaC/webinterface/tpls/SearchBox.tpl

    rc0de5a rc60e4da  
    66            <input style="background-color: transparent;" class="button" type="submit" value="${ _('Search')}" onclick="javascript: return verifyForm();" id="searchSubmit"/> 
    77        </div> 
    8     <div style="background: white; padding: 2px;"> 
    9       <div id="yoo" class="${ moreOptionsClass }" onclick="javascript:return expandMenu(this);"></div> 
    10       <input style="background-color: transparent; margin-top: -1px;" type="text" id="searchText" name="p" /> 
    11         </div> 
     8        <div style="background: white; padding: 2px;"> 
     9        <div id="yoo" class="${ moreOptionsClass }" onclick="javascript:return expandMenu(this);"></div> 
     10        <input style="background-color: transparent; margin-top: -1px;" type="text" id="searchText" name="p" /> 
    1211    </div> 
     12</div> 
    1313 
    1414    <div id="extraOptions"> 
     
    8282} 
    8383 
     84function hideCategory() 
     85{ 
     86    $('#searchCategId').attr('value', 0); 
     87    $('#cross1').fadeOut(); 
     88    $("#inCategory1").fadeOut(); 
     89} 
     90 
    8491function resetForm() 
    8592{ 
     
    118125         intelligentSearchBox.draw() 
    119126     ); 
     127 
     128  var box = $('<div id="cross1" class="searchCategoryCross" onclick="hideCategory()">x</div>'+ 
     129          '<div id="inCategory1" class="searchCategory">in ${categName}</div>'); 
     130  if ($('#searchCategId').attr('value')!=0){ 
     131      $('#yoo').after(box); 
     132  } 
     133 
    120134}); 
     135 
    121136</script> 
  • indico/MaKaC/webinterface/wcomponents.py

    r1d80ec rc60e4da  
    3232from MaKaC.common.db import DBMgr 
    3333import MaKaC.conference as conference 
     34from MaKaC.conference import CategoryManager 
    3435import MaKaC.user as user 
    3536import MaKaC.schedule as schedule 
     
    65886589        return vars 
    65896590 
    6590     def getHTML(self, params=None): 
    6591         minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 
    6592         if minfo.getRoomBookingModuleActive(): 
    6593             return WTemplated.getHTML(self, params) 
    6594         else: 
    6595             return _("The Room Booking module is disabled") 
    6596  
    6597  
    65986591 
    65996592class WRoomBookingAdminLocation( WTemplated ): 
     
    67166709        vars = WBaseSearchBox.getVars( self ) 
    67176710        vars["categId"] = self._categId 
     6711        vars["categName"] = CategoryManager().getById(self._categId).getTitle() 
    67186712        vars['moreOptionsClass'] = self._moreOptionsClass 
    67196713        return vars 
  • indico/htdocs/css/Default.css

    rbd98e1 rc60e4da  
    22472247div#UISearchBox #searchControls 
    22482248{ 
    2249     width: 250px; 
     2249    width: 350px; 
    22502250    border: 1px solid #888; 
    22512251    height: 21px; 
     
    22632263div#UISearchBox #searchText 
    22642264{ 
    2265     width: 130px; 
     2265    width: 160px; 
    22662266} 
    22672267 
     
    23082308} 
    23092309 
     2310div#UISearch 
     2311{ 
     2312    position:relative; 
     2313    border: none; 
     2314    font-size: 13px; 
     2315    z-index: 1; 
     2316} 
     2317 
     2318div#UISearch .searchButton 
     2319{ 
     2320    float:right; 
     2321    border-left: 1px solid #888; 
     2322    width: auto; 
     2323} 
     2324 
     2325div#UISearch #searchText 
     2326{ 
     2327    width: 130px; 
     2328} 
     2329 
     2330div#UISearch #searchControls 
     2331{ 
     2332    width: 350px; 
     2333    border: 1px solid #888; 
     2334    height: 21px; 
     2335    overflow: hidden; 
     2336    background-color: white; 
     2337} 
     2338 
     2339div#UISearch #searchControls input 
     2340{ 
     2341    border: 0; 
     2342    color: black; 
     2343    font-weight: normal; 
     2344} 
     2345 
     2346.searchCategory 
     2347{ 
     2348    background-color: #9AA0FE; 
     2349    border-radius: 2px; 
     2350    font-weight:normal; 
     2351    color: #FFFFFF; 
     2352    vertical-align: middle; 
     2353    margin-right: -2px; 
     2354    padding-right: 5px; 
     2355    padding-left:5px; 
     2356    height: 17px; 
     2357    float: right; 
     2358    cursor: pointer; 
     2359    max-width: 75px; 
     2360    overflow: hidden; 
     2361    white-space: nowrap; 
     2362    text-overflow: ellipsis; 
     2363} 
     2364 
     2365.searchCategoryCross 
     2366{ 
     2367    background-color: #9AA0FE; 
     2368    font-weight: bold; 
     2369    border-radius: 2px; 
     2370    color: #FFFFFF; 
     2371    vertical-align: middle; 
     2372    margin-right: 2px; 
     2373    padding-left: 5px; 
     2374    padding-right: 5px; 
     2375    height: 17px; 
     2376    float: right; 
     2377    cursor: pointer; 
     2378} 
    23102379 
    23112380.arrowExpandIcon 
Note: See TracChangeset for help on using the changeset viewer.