Changeset 338 for branches


Ignore:
Timestamp:
10/10/13 16:27:05 (6 years ago)
Author:
jls17
Message:
  • removed clear button from filter functionality, because it didn't work cross-browser w/o heavy changes to css/html
  • escape key could be used to clear the search-term for now
Location:
branches/work_304
Files:
2 edited

Legend:

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

    r337 r338  
    567567        stringstream outputStrm; 
    568568        AllFieldsJson(outputStrm); 
    569         outputStrm << "<div><span class='clearable'><input type=\"text\" class='data_field' id=\"fieldNameFilter\"/><button class='icon_clear'>x</button></span><button id=\"execFieldFilter\">Filter</button></div>" << endl; 
     569        outputStrm << "<div><span class='clearable'><input type=\"text\" class='data_field' id=\"fieldNameFilter\"/><button id=\"execFieldFilter\">Filter</button></div>" << endl; 
    570570        outputStrm << CWebUtil::ImageTag("doc.gif", rootLevel) << "<span id='fieldListFilterResultCount'></span>" << tbl.NumRows() << " fields (" << CWebUtil::Link("data", CPageParams(PAGE_SCHEMA_FIELDS_CSV, &this->schema), "", rootLevel) << ")" << endl; 
    571571        outputStrm << "<div id=\"result\"></div>"; 
  • branches/work_304/res/schema_page.js

    r337 r338  
    33    $('#MainObjectTabCtrl div[id^="tab"]').addClass("inner-tab"); 
    44}); 
    5  
    6 function showHideClearButton(obj) { 
    7         var visible = $(obj).val().length ? 1 : 0 ; 
    8         return $(obj).next('.icon_clear').stop().fadeTo(300,visible); 
    9 } 
    105 
    116$('document').ready(function() { 
     
    1611        window.location.hash = ui.tab.hash; 
    1712    }); 
    18     $(".clearable").on('propertychange keyup input paste', 'input.data_field', function(){ 
    19                 showHideClearButton(this).stopTime().oneTime(300, function() { 
    20             $("#execFieldFilter").click(); 
    21         }); 
    22         }).on('click', '.icon_clear', function() { 
    23                 $(this).delay(300).fadeTo(300,0).prev('input').val('').focus().stopTime().oneTime(300, function() { 
    24             $("#execFieldFilter").click(); 
     13    $(".clearable").on('propertychange keyup input paste', 'input.data_field', function(e){ 
     14        if (e.keyCode == 27 /*Escape-Key*/) { $(this).val(''); } 
     15        $(this).stopTime().oneTime(300, function() { 
     16           $("#execFieldFilter").click(); 
    2517        }); 
    2618        }); 
     
    4941    }); 
    5042        if ($("#fieldNameFilter").val() != "") { 
    51                 showHideClearButton($("#fieldNameFilter")); 
    5243                $("#execFieldFilter").click(); 
    5344        } 
Note: See TracChangeset for help on using the changeset viewer.