comments for docs
This commit is contained in:
@@ -115,7 +115,7 @@ To create your own input you should inherit from this class.
|
||||
|
||||
Abstract.defaults = {
|
||||
/**
|
||||
HTML template of input
|
||||
HTML template of input. Normally you should not change it.
|
||||
|
||||
@property tpl
|
||||
@type string
|
||||
@@ -127,7 +127,7 @@ To create your own input you should inherit from this class.
|
||||
|
||||
@property inputclass
|
||||
@type string
|
||||
@default 'span2'
|
||||
@default span2
|
||||
**/
|
||||
inputclass: 'span2',
|
||||
/**
|
||||
|
@@ -1,7 +1,25 @@
|
||||
/**
|
||||
* date
|
||||
* based on fork: https://github.com/vitalets/bootstrap-datepicker
|
||||
*/
|
||||
Bootstrap-datepicker.
|
||||
Description and examples: http://vitalets.github.com/bootstrap-datepicker.
|
||||
For localization you can include js file from here: https://github.com/eternicode/bootstrap-datepicker/tree/master/js/locales
|
||||
|
||||
@class date
|
||||
@extends abstract
|
||||
@example
|
||||
<a href="#" id="dob" data-type="date" data-pk="1" data-url="post.php" data-original-title="Select date">15/05/1984</a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#dob').editable({
|
||||
format: 'yyyy-mm-dd',
|
||||
viewformat: 'dd/mm/yyyy',
|
||||
datepicker: {
|
||||
weekStart: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
var Date = function (options) {
|
||||
@@ -68,15 +86,50 @@
|
||||
});
|
||||
|
||||
Date.defaults = $.extend({}, $.fn.editableform.types.abstract.defaults, {
|
||||
/**
|
||||
@property tpl
|
||||
@default <div style="float: left; padding: 0; margin: 0 0 9px 0"></div>
|
||||
**/
|
||||
tpl:'<div style="float: left; padding: 0; margin: 0 0 9px 0"></div>',
|
||||
/**
|
||||
@property inputclass
|
||||
@default well
|
||||
**/
|
||||
inputclass: 'well',
|
||||
format:'yyyy-mm-dd', //format used for sending to server and converting from value
|
||||
viewformat: null, //used for display date in element
|
||||
//special options
|
||||
weekStart: 0,
|
||||
startView: 0,
|
||||
/**
|
||||
Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br>
|
||||
Possible tokens are: <code>d, dd, m, mm, yy, yyyy</code>
|
||||
|
||||
@property format
|
||||
@type string
|
||||
@default yyyy-mm-dd
|
||||
**/
|
||||
format:'yyyy-mm-dd',
|
||||
/**
|
||||
Format used for displaying date. Also applied when converting date from element's text on init.
|
||||
If not specified equals to <code>format</code>
|
||||
|
||||
@property viewformat
|
||||
@type string
|
||||
@default null
|
||||
**/
|
||||
viewformat: null,
|
||||
/**
|
||||
Configuration of datepicker.
|
||||
Full list of options: http://vitalets.github.com/bootstrap-datepicker
|
||||
|
||||
@property datepicker
|
||||
@type object
|
||||
@default {
|
||||
weekStart: 0,
|
||||
startView: 0,
|
||||
autoclose: false
|
||||
}
|
||||
**/
|
||||
datepicker:{
|
||||
autoclose:false
|
||||
weekStart: 0,
|
||||
startView: 0,
|
||||
autoclose: false
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -1,9 +1,24 @@
|
||||
/**
|
||||
jQuery UI Datepicker
|
||||
Note: you can not use both date and dateui on the same page.
|
||||
jQuery UI Datepicker.
|
||||
Description and examples: http://jqueryui.com/datepicker.
|
||||
Do not use it together with bootstrap-datepicker.
|
||||
|
||||
@class dateui
|
||||
@extends abstract
|
||||
@example
|
||||
<a href="#" id="dob" data-type="date" data-pk="1" data-url="post.php" data-original-title="Select date">15/05/1984</a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#dob').editable({
|
||||
format: 'yyyy-mm-dd',
|
||||
viewformat: 'dd/mm/yyyy',
|
||||
datepicker: {
|
||||
firstDay: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
@@ -101,7 +116,7 @@ Note: you can not use both date and dateui on the same page.
|
||||
inputclass: '',
|
||||
/**
|
||||
Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br>
|
||||
Full <a href="http://docs.jquery.com/UI/Datepicker/formatDate">list of tokens</a>.
|
||||
Full list of tokens: http://docs.jquery.com/UI/Datepicker/formatDate
|
||||
|
||||
@property format
|
||||
@type string
|
||||
@@ -109,7 +124,8 @@ Note: you can not use both date and dateui on the same page.
|
||||
**/
|
||||
format:'yyyy-mm-dd',
|
||||
/**
|
||||
Format used for displaying date. If not specified equals to <code>format</code>
|
||||
Format used for displaying date. Also applied when converting date from element's text on init.
|
||||
If not specified equals to <code>format</code>
|
||||
|
||||
@property viewformat
|
||||
@type string
|
||||
@@ -119,7 +135,7 @@ Note: you can not use both date and dateui on the same page.
|
||||
|
||||
/**
|
||||
Configuration of datepicker.
|
||||
Full list of <a href="http://api.jqueryui.com/datepicker">possible options</a>.
|
||||
Full list of options: http://api.jqueryui.com/datepicker
|
||||
|
||||
@property datepicker
|
||||
@type object
|
||||
|
@@ -1,8 +1,23 @@
|
||||
/**
|
||||
Select input
|
||||
Select (dropdown) input
|
||||
|
||||
@class select
|
||||
@extends abstract
|
||||
@example
|
||||
<a href="#" id="status" data-type="select" data-pk="1" data-url="post.php" data-original-title="Select status"></a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#status').editable({
|
||||
value: 2,
|
||||
source: [
|
||||
{value: 1, text: 'Active'},
|
||||
{value: 2, text: 'Blocked'},
|
||||
{value: 3, text: 'Deleted'}
|
||||
]
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
@@ -31,7 +46,7 @@ Select input
|
||||
},
|
||||
|
||||
html2value: function (html) {
|
||||
return null; //it's not good idea to set value by text for SELECT. better set NULL
|
||||
return null; //it's not good idea to set value by text for SELECT. Better set NULL
|
||||
},
|
||||
|
||||
value2html: function (value, element) {
|
||||
@@ -229,8 +244,6 @@ Select input
|
||||
@property source
|
||||
@type string|array|object
|
||||
@default null
|
||||
@example
|
||||
source: 'groups.php'
|
||||
**/
|
||||
source:null,
|
||||
/**
|
||||
@@ -253,4 +266,4 @@ Select input
|
||||
|
||||
$.fn.editableform.types.select = Select;
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
|
@@ -3,6 +3,16 @@ Text input
|
||||
|
||||
@class text
|
||||
@extends abstract
|
||||
@example
|
||||
<a href="#" id="username" data-type="text" data-pk="1">awesome</a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#username').editable({
|
||||
url: 'post.php',
|
||||
title: 'Enter username'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
var Text = function (options) {
|
||||
|
@@ -3,7 +3,16 @@ Textarea input
|
||||
|
||||
@class textarea
|
||||
@extends abstract
|
||||
@module inputs
|
||||
@example
|
||||
<a href="#" id="comments" data-type="textarea" data-pk="1">awesome comment!</a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#comments').editable({
|
||||
url: 'post.php',
|
||||
title: 'Enter comments'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
@@ -64,7 +73,7 @@ Textarea input
|
||||
tpl:'<textarea rows="8"></textarea>',
|
||||
/**
|
||||
@property inputclass
|
||||
@default 'span3'
|
||||
@default span3
|
||||
**/
|
||||
inputclass:'span3',
|
||||
/**
|
||||
|
Reference in New Issue
Block a user