$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;$. editable . addInputType ( 'datepicker' , {
element : function ( settings , original ) {
var input = $ ( '<input />' ) . datepicker ( settings. datepicker ) ;
$ ( this ) . append ( input ) ;
return ( input ) ;
} , plugin : function ( settings , original ) {
/* Workaround for missing parentNode in IE */
var form = this ;
$ ( 'input' , this )
. trigger ( 'change' )
. bind ( 'change' , function ( ) {
$ ( form ) . submit ( ) ;
} )
. click ( ) ;
}
} ) ;
- $. editable . addInputType ( 'wymeditor' , {
- element : function ( settings , original ) {
- var text = $ ( '<textarea />' ) ;
- var btn = $ ( '<input type = "submit" id = "upd" class = "wymupdate" value = "OK" />' ) ;
- if ( settings. rows ) {
- text. attr ( 'rows' , settings. rows ) ;
- } else {
- text. height ( settings. height ) ;
- }
- if ( settings. cols ) {
- text. attr ( 'cols' , settings. cols ) ;
- } else {
- text. width ( settings. width ) ;
- }
- $ ( this ) . append ( text ) ;
- $ ( this ) . append ( btn ) ;
- return ( text ) ;
- } , plugin : function ( settings , original ) {
- var form = this ;
- $ ( 'textarea' , this ) . wymeditor ( settings. wymeditor ) ;
- }
- } ) ;
- $ ( 'div.textarea' ) . editable ( 'http: //pim/save_elem.php' , { type : 'wymeditor' } ) ;
- $ ( 'div.date' ) . editable ( 'http: //pim/save_elem.php' ,
- {
- type : 'datepicker' ,
- datepicker : { dateFormat : 'yy-mm-dd' , changeYear : true }
- } ) ;
'http://pim/save_elem.php'
is the address of the handler.Source: https://habr.com/ru/post/54529/
All Articles