Changeset 433 for branches


Ignore:
Timestamp:
03/04/14 03:33:08 (6 years ago)
Author:
jls17
Message:
  • added placeholder support to the filter control
Location:
branches/work_304/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/work_304/doc/DocMain.cpp

    r429 r433  
    19091909} 
    19101910 
    1911 string CDocMain::CreateStandardFilterControl(const string &inputControlId) 
     1911string CDocMain::CreateStandardFilterControl(const string &inputControlId, const string &htmlPlaceHolder) 
    19121912{ 
    19131913        stringstream content; 
    1914         content << "<span class='clearable'><label for='" << inputControlId << "'>Filter: </label><input id='" << inputControlId << "' class='data_field' type='text' /></span>"; 
     1914        content << "<span class='clearable'><label for='" << inputControlId << "'>Filter: </label><input id='" << inputControlId << "' class='data_field' type='text' "; 
     1915        if (!htmlPlaceHolder.empty()) { content << "placeholder='" << htmlPlaceHolder << "'"; } 
     1916        content << "/></span>"; 
    19151917        return content.str(); 
    19161918} 
     
    19201922        stringstream content;    
    19211923        content << "<div>"  
    1922                 << CreateStandardFilterControl("formFilter") << " &nbsp;&nbsp;&nbsp; " 
     1924                << CreateStandardFilterControl("formFilter", "search by name or id") << " &nbsp;&nbsp;&nbsp; " 
    19231925                << "<span class='multiFilter' id='multiFilter'>Restrict results to: " 
    19241926                << "<input id='typeFilterRegular' type='checkbox' value='1'/><label for='typeFilterRegular'>&nbsp;Regular</label>" 
  • branches/work_304/doc/DocMain.h

    r426 r433  
    7373        static string ShortMenu(string curCharacter, const CPageParams &curPage, std::vector<int>& objCountPerLetter); 
    7474         
    75         static string CreateStandardFilterControl(const string &inputControlId); 
     75        static string CreateStandardFilterControl(const string &inputControlId, const string &htmlPlaceHolder = "search by name"); 
    7676        static string CreateSchemaFilterControl(); 
    7777        static string CreateActlinkFilterControl(); 
Note: See TracChangeset for help on using the changeset viewer.