How to use jquery-querybuilder - 2 common examples

To help you get started, we’ve selected a few jquery-querybuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NREL / api-umbrella / src / api-umbrella / admin-ui / app / components / stats / query-form.js View on Github external
import 'daterangepicker';

import $ from 'jquery';
import Component from '@ember/component';
import I18n from 'i18n-js';
import QueryBuilder from 'jQuery-QueryBuilder';
import forEach from 'lodash-es/forEach';
import { inject } from '@ember/service';
import moment from 'moment-timezone';
// eslint-disable-next-line ember/no-observers
import { observer } from '@ember/object';

QueryBuilder.define('filter-description', function() {
  this.on('afterUpdateRuleFilter afterUpdateRuleOperator', function(e, rule) {
    let $b = rule.$el.find('button.filter-description');
    const description = e.builder.getFilterDescription(rule.filter, rule);

    if(!description) {
      $b.hide();
    } else {
      if($b.length === 0) {
        $b = $('<button class="btn btn-sm btn-info filter-description btn-tooltip tooltip-trigger" type="button"><i class="fas fa-question-circle"></i></button>');
        $b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
      } else {
        $b.css('display', '');
      }

      $b.attr('data-tippy-content', description);
    }
github NREL / api-umbrella / src / api-umbrella / admin-ui / app / components / stats / query-form.js View on Github external
this.on('afterUpdateRuleFilter afterUpdateRuleOperator', function(e, rule) {
    let $b = rule.$el.find('button.filter-description');
    const description = e.builder.getFilterDescription(rule.filter, rule);

    if(!description) {
      $b.hide();
    } else {
      if($b.length === 0) {
        $b = $('<button class="btn btn-sm btn-info filter-description btn-tooltip tooltip-trigger" type="button"><i class="fas fa-question-circle"></i></button>');
        $b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
      } else {
        $b.css('display', '');
      }

      $b.attr('data-tippy-content', description);
    }
  });
});

jquery-querybuilder

security holding package

Unknown
Latest version published 3 years ago

Package Health Score

16 / 100
Full package analysis

Popular jquery-querybuilder functions

Similar packages