Giter Site home page Giter Site logo

fabien / logiform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lqez/logiform

0.0 3.0 0.0 394 KB

Creates a MongoDB-alike query string from a sequence of complex conditions, vice versa.

Home Page: http://lqez.github.io/logiform

License: MIT License

CSS 1.09% HTML 11.35% JavaScript 87.56%

logiform's Introduction

Logiform

Logiform creates a MongoDB-like query string from a sequence of complex logical form, vice versa.

Demo site

http://lqez.github.io/logiform/

Install

bower install logiform

Or clone logiform source from its repository.

How to use

Install logiform and add below codes into the <head> section of your HTML page.

<script src="logiform.js"></script>
<link rel="stylesheet" href="logiform.css">

And activate it!

$("#foobar").logiform();

Options

Customizing logiform via plugin settings, like below.

$("#foobar").logiform({
    'liveUpdate': true,
    'prettify': false,

    'width': {
        'logicalOperator': "100px",
        'comparisonOperator': "200px"
    },

    'onUpdate': function () {
        // Blahblah
    }
});
  • target

    • Set an target element of logiform. If you leave this null, logiform will be displayed beside the element.
    • default : null
  • prettify

    • Bake JSON string with indent and linefeed.
    • default : false
  • liveUpdate

    • Update JSON string everytime when you changed.
    • default : false
  • hideOriginal

    • Hide source element. (textarea, input...)
    • default : true
  • onUpdate

    • Logifom will call this callback function after updating conditions.
    • default : null
  • width

    • Set width of each item.
    • width.logicalOperator : '80px'
    • width.field : '200px'
    • width.comparisonOperator : '100px'
    • width.value : '200px'
  • text

    • Set title of each buttons or operators.
    • add-condition : '+ Condition'
    • add-condition-group : '+ Group'
    • remove-condition : '-'
    • remove-condition-group : 'Remove'
    • $eq : 'AND'
    • $gt: '> Greater than'
  • For more,

License

Logiform is distributed under MIT License. See LICENSE file.

logiform's People

Contributors

lqez avatar yoloseem avatar

Watchers

Fabien Franzen avatar James Cloos avatar  avatar

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.