0.6.0 • Published 11 years ago

diaglit v0.6.0

Weekly downloads
28
License
-
Repository
-
Last release
11 years ago

diaglit (Dialog builder based on twitter-bootstrap)

Feature

  • Multiple tab
  • Built in controls
    • input of type hidden, text, time, date, datetime, password, email, range, number
    • textarea
    • select
    • ...
  • Pluggable custom controls
  • Dialog initializazion

Dependencies

Use

  • include <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"> in your html
  • 		var diaglit =require('diaglit'), //require diaglit
    			dialog = diaglit({...});
    
    		dialog.$dialog.modal('show')
* Example object description ```
	{
		"tabs":{
			"tab1" : {
				"label" : "Tab 1",
				"fields":[
					{
						"name": "title",
						"type": "text",
						"placeholder": "Insert name here",
						"label": "Character name"
					},
					{
						"name": "characterClass",
						"type": "text",
						"label": "class"
					},
					{
						"name": "level",
						"type": "number",
						"max": 30,
						"min":1,
						"value": 1
					}			]
			}
		},
		"title": "Properties"
	}
  • Configurable submit function
	dialog = diaglit({...}, {
		onSubmit : function(){...}
	});

shortcut: dialog = diaglit({...}, function(){})

  • Data initialization
    	```
    	dialog = diaglit({...}, {
    		data: {
    			field_name1: 'value1',
    			field_name2: 12
    		}		
    	});
    	```
  • Custom controls ` var controls = require('diaglit.controls'); controls'custom' = function(field,data){ ... return some DOM }

    	var	dialog = require('diaglit')({
    		....
    		"fields" : [
    			{
    				type : "custom",
    				name : "custom name"
    			}
    		]
    	})
0.6.0

11 years ago

0.5.1

11 years ago

0.5.0

11 years ago

0.4.1

12 years ago

0.4.0

12 years ago

0.2.0

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago