Coder Social home page Coder Social logo

laplasianin / angular-jqueryquerybuilder Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 10.0 366 KB

Angular directive for popular jquery plugin "jQuery query builder" (see https://github.com/mistic100/jQuery-QueryBuilder)

License: MIT License

JavaScript 23.78% CoffeeScript 76.22%

angular-jqueryquerybuilder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular-jqueryquerybuilder's Issues

Error: ng:areq Bad Argument

thnks for ur response before, well i'm trying to import my table rows into ur filter object but this doesnt work for me, could u help me out to inject the template querybuilder with my owns filters and rebuild the queryBuiler with the querys i need

i used this function but it didnt work

$scope.build = function(){
if($scope.fields){
for(var i = 0; i<$scope.fields.length; i++){
if($scope.fields.value_type == 'number'){
$scope.builder.options.filters.id = $scope.fields[i].src
$scope.builder.options.filters.name = $scope.fields[i].name
$scope.builder.options.filters.type = $scope.fields[i].value_type
}
}
}
};

        $scope.builder = {
            options: {
                filters: [{
                    id: 'name',
                    label: 'Name',
                    type: 'integer'
                }]
            },
            builder: {}
        };

How to use this with angular-cli

Hi,
I've tried importing this into my angular-cli project, but I don't know how to import the module. What would the correct way be?

I've installed it, now looking to import it.

Pass the newRules object when emitting QueryBuilderValueChanged event

Is there any reason for which emitting QueryBuilderValueChanged can't pass the newRules object?


                viewToModelNotificator = function() {
                    return $($element).on('afterUpdateRuleValue.queryBuilder    afterUpdateRuleFilter.queryBuilder afterUpdateRuleOperator.queryBuilder afterUpdateGroupCondition.queryBuilder afterReset.queryBuilder              afterMove.queryBuilder afterSetFilters.queryBuilder         afterInvert.queryBuilder afterDeleteRule.queryBuilder         afterDeleteGroup.queryBuilder', function() {
                        var newRules;
                        newRules = $element[0].queryBuilder.getRules();
                        if ((!angular.equals(newRules, $scope.options.rules)) && ((newRules != null ? newRules.condition : void 0) || (newRules != null ? newRules.rules : void 0))) {
                            return $scope.$emit("QueryBuilderValueChanged", newRules);
                        }
                    });

API methods

Is there any possibility to call queryBuilder methods such as addFilter() using the builder object?

Trying to do something like this:

ctrl.ruleEditor = {
                options: {
                    ...
                },
                builder: {}
            };

ctrl.ruleEditor.builder.addFilter(...);

How to use chosen or any other plugin?

I try specifying plugin in the filters object, but it fails with a console error:
Uncaught TypeError: $inputs[filter.plugin] is not a function in query-builder.js. Could you share an example of how to use chosen plugin?

{"id" : item , "label" : item, "input": "select",multiple: 'true',
						plugin: 'chosen-selectpicker', values : ['AB','CD','EF']}

I used the documentation here. https://querybuilder.js.org/plugins.html
Do I need to call $('#builder').queryBuilder() with any parameters for chosen to work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.