Changeset 4937 for trunk/gsdl/src
- Timestamp:
- 2003-07-16T10:38:02+12:00 (21 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r4825 r4937 633 633 634 634 // sets the selection box macros _hselection_, _jselection_, _nselection_ _gselection_, fqfselection_ 635 void queryaction::set_option_macro (const text_t ¯oname, text_t current_value, bool display_single, 635 void queryaction::set_option_macro (const text_t ¯oname, text_t current_value, bool display_single, bool add_js_update, 636 636 const FilterOption_t &option, displayclass &disp) { 637 637 … … 645 645 if (option.validValues.size() < 2) return; 646 646 647 text_t macrovalue = "<select name=\"" + macroname + "\" onChange=\"update"+macroname+"();\">\n"; 647 text_t macrovalue = "<select name=\"" + macroname + "\""; 648 if (add_js_update) { 649 macrovalue += " onChange=\"update"+macroname+"();\""; 650 } 651 macrovalue += ">\n"; 648 652 649 653 if (current_value.empty()) current_value = option.defaultValue; … … 695 699 // _hselection_ and _h2selection_ (Index) 696 700 it = response.filterOptions.find ("Index"); 697 if (it != end) set_option_macro ("h", args["h"], true, (*it).second, disp);698 if (it != end) set_option_macro ("h2", args["h2"], true, (*it).second, disp);701 if (it != end) set_option_macro ("h", args["h"], true, false, (*it).second, disp); 702 if (it != end) set_option_macro ("h2", args["h2"], true,false, (*it).second, disp); 699 703 700 704 // _jselection_ and _j2selection_ (Subcollection) 701 705 it = response.filterOptions.find ("Subcollection"); 702 if (it != end) set_option_macro ("j", args["j"], true, (*it).second, disp);703 if (it != end) set_option_macro ("j2", args["j2"], true, (*it).second, disp);706 if (it != end) set_option_macro ("j", args["j"], true,false, (*it).second, disp); 707 if (it != end) set_option_macro ("j2", args["j2"], true,false, (*it).second, disp); 704 708 705 709 // _nselection_ and _n2selection_ (Language) 706 710 it = response.filterOptions.find ("Language"); 707 if (it != end) set_option_macro ("n", args["n"], true, (*it).second, disp);708 if (it != end) set_option_macro ("n2", args["n2"], true, (*it).second, disp);711 if (it != end) set_option_macro ("n", args["n"], true,false, (*it).second, disp); 712 if (it != end) set_option_macro ("n2", args["n2"], true,false, (*it).second, disp); 709 713 710 714 // _cq2selection_ (CombineQuery) 711 715 it = response.filterOptions.find ("CombineQuery"); 712 if (it != end) set_option_macro ("cq2", args["cq2"], true, (*it).second, disp);716 if (it != end) set_option_macro ("cq2", args["cq2"], true,false, (*it).second, disp); 713 717 714 718 if (args["ct"] == "1") { // mgpp collections … … 716 720 it = response.filterOptions.find("Level"); 717 721 if (it!=end) { 718 set_option_macro("g", args["g"], false, (*it).second, disp);722 set_option_macro("g", args["g"], false, false, (*it).second, disp); 719 723 if (args["qt"]=="1") { // form search 720 724 set_gformselection_macro(args["g"], (*it).second, disp); … … 723 727 // _fqfselection_ field list 724 728 it = response.filterOptions.find("IndexField"); 725 if (it!=end) set_option_macro ("fqf", args["fqf"], true, (*it).second, disp); 729 if (it!=end) { 730 if (args["qt"]=="1") { // form search 731 set_option_macro ("fqf", args["fqf"], true, true, (*it).second, disp); 732 } else { 733 set_option_macro ("fqf", args["fqf"], true, false, (*it).second, disp); 734 } 735 } 726 736 } 727 737 } -
trunk/gsdl/src/recpt/queryaction.h
r4780 r4937 85 85 86 86 virtual void set_option_macro (const text_t ¯oname, text_t current_value, 87 bool display_single, 87 bool display_single, bool add_js_update, 88 88 const FilterOption_t &option, displayclass &disp); 89 89
Note:
See TracChangeset
for help on using the changeset viewer.