Search widget now activate on hover. Restored click activation to all drop downs and the search widget, so things should still work OK on touch screens/mobile devices.

This commit is contained in:
chouseknecht 2013-09-20 15:20:25 -04:00
parent 50ebe9d165
commit c47168dce2
3 changed files with 18 additions and 7 deletions

View File

@ -472,7 +472,7 @@ legend {
http://stackoverflow.com/questions/8878033/how-to-make-twitter-bootstrap-menu-dropdown-on-hover-rather-than-click
*/
.dropdown-toggle:hover .dropdown-menu, .dropdown:hover .dropdown-menu {
display: block;
display: block;
}
.dropdown-menu li:hover {

View File

@ -858,12 +858,13 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "<div class=\"dropdown\">\n";
for (var itm in navigation) {
if (navigation[itm].active) {
html += "<a href=\"\" class=\"toggle\">" +
navigation[itm].label + " <i class=\"icon-chevron-sign-down\"></i></a>";
html += "<a href=\"\" class=\"toggle\" ";
html += "data-toggle=\"dropdown\" ";
html += ">" + navigation[itm].label + " <i class=\"icon-chevron-sign-down\"></i></a>";
break;
}
}
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
html += "<ul class=\"dropdown-menu pull-right\" role=\"menu\">\n";
for (var itm in navigation) {
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
navigation[itm].href + "\" ";

View File

@ -205,6 +205,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += (field['class']) ? field['class'] : 'btn-default btn-xs';
html += "\" ";
html += (field.ngDisabled) ? "ng-disabled=\"" + field.ngDisabled + "\" " : "";
html += "data-toggle=\"dropdown\" ";
html += ">";
html += (field.icon) ? Icon(field.icon) : "";
html += field.label;
@ -420,15 +421,24 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += "<div class=\"input-group";
html += (useMini) ? " input-group-sm" : " input-group-sm";
html += "\">\n";
html += "<div class=\"input-group-btn\">\n";
html += "<div class=\"input-group-btn dropdown\">\n";
// Use standard button on mobile
html += "<button type=\"button\" ";
html += "id=\"search_field_ddown\" ";
html += "class=\"btn ";
html += "dropdown-toggle\" data-toggle=\"dropdown\" "
html += "dropdown-toggle\" data-toggle=\"dropdown\"";
html += ">\n";
html += "<span ng-bind=\"" + iterator + "SearchFieldLabel\"></span>\n";
html += "<span class=\"caret\"></span>\n";
html += "</button>\n";
// Use link and hover activation on desktop
//html += "<a href=\"\" id=\"search_field_ddown\" class=\"btn btn-default visible-lg\">";
//html += "<span ng-bind=\"" + iterator + "SearchFieldLabel\"></span>\n";
//html += "<span class=\"caret\"></span>\n";
//html += "</a>\n";
html += "<ul class=\"dropdown-menu\" id=\"" + iterator + "SearchDropdown\">\n";
for ( var fld in form.fields) {
@ -449,7 +459,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += "\" ng-model=\"" + iterator + "SearchValue\" ng-change=\"search('" + iterator +
"')\" placeholder=\"Search\" type=\"text\" >\n";
html += "<div class=\"input-group-btn\">\n";
html += "<div class=\"input-group-btn dropdown\">\n";
html += "<button type=\"button\" ";
html += "id=\"search_option_ddown\" ";
html += "ng-hide=\"" + iterator + "SelectShow || " + iterator + "HideSearchType || " + iterator + "InputHide\" class=\"btn ";