function initSearchModal() {

  $(uiSearchModal).modal({
    dimmerSettings: {opacity: uiModalOpacity},
    observeChanges: true,
    onShow: function() {
      //load modal with prior query results

      //check if modal already has query results loaded
      if ($(".cmi-search-list > h3").length === 0) {
        showSavedQuery();
      }
    }
  });

  $(uiOpenSearchModal).on("click", (e) => {
    e.preventDefault();
    $(uiSearchModal).modal("show");
  });

  //Search Submit
  $(uiSearchForm).submit(function(e) {
    e.preventDefault();
    var searchSource = $(uiSearchSource).text();
    var searchString = $(uiSearchString).val();

    //ignore and return if search string is empty
    if (searchString.length === 0) {
      return;
    }

    //console.log("Search requested: source: %s, string: %s", searchSource, searchString);
    displaySearchMessage(SEARCHING, searchSource, searchString);

    //run search
    search(searchString);
  });

}
/*
  Initialize support for search modal window available
  on all pages
*/
Initialize support for search modal window available
on all pages
Initialize support for search modal window available on all pages
function initSearchModal() {
  $(uiSearchModal).modal({
    dimmerSettings: {opacity: uiModalOpacity},
    observeChanges: true,
    onShow: function() {
      if ($(".cmi-search-list > h3").length === 0) {
        showSavedQuery();
      }
    }
  });
  $(uiOpenSearchModal).on("click", (e) => {
    e.preventDefault();
    $(uiSearchModal).modal("show");
  });
  $(uiSearchForm).submit(function(e) {
    e.preventDefault();
    var searchSource = $(uiSearchSource).text();
    var searchString = $(uiSearchString).val();
    if (searchString.length === 0) {
      return;
    }
    displaySearchMessage(SEARCHING, searchSource, searchString);
    search(searchString);
  });
}
function initSearchModal ( ) { $ ( uiSearchModal ) . modal ( { dimmerSettings : { opacity : uiModalOpacity } , observeChanges : true , onShow : function ( ) { if ( $ ( ".cmi-search-list > h3" ) . length === 0 ) { showSavedQuery ( ) ; } } } ) ; $ ( uiOpenSearchModal ) . on ( "click" , ( e ) => { e . preventDefault ( ) ; $ ( uiSearchModal ) . modal ( "show" ) ; } ) ; $ ( uiSearchForm ) . submit ( function ( e ) { e . preventDefault ( ) ; var searchSource = $ ( uiSearchSource ) . text ( ) ; var searchString = $ ( uiSearchString ) . val ( ) ; if ( searchString . length === 0 ) { return ; } displaySearchMessage ( SEARCHING , searchSource , searchString ) ; search ( searchString ) ; } ) ; }
Initialize support for search modal window available
on all pages
Initialize support for search modal window available on all pages
//load modal with prior query results //check if modal already has query results loaded //Search Submit //ignore and return if search string is empty //console.log("Search requested: source: %s, string: %s", searchSource, searchString); //run search