fix showbuttons passing to input options
This commit is contained in:
parent
b38f872302
commit
72f964a7cc
@ -189,7 +189,10 @@ To create your own input you can inherit from this class.
|
|||||||
inputclass: 'input-medium',
|
inputclass: 'input-medium',
|
||||||
//scope for external methods (e.g. source defined as function)
|
//scope for external methods (e.g. source defined as function)
|
||||||
//for internal use only
|
//for internal use only
|
||||||
scope: null
|
scope: null,
|
||||||
|
|
||||||
|
//need to re-declare showbuttons here to get it's value from common config (passed only options existing in defaults)
|
||||||
|
showbuttons: true
|
||||||
};
|
};
|
||||||
|
|
||||||
$.extend($.fn.editabletypes, {abstractinput: AbstractInput});
|
$.extend($.fn.editabletypes, {abstractinput: AbstractInput});
|
||||||
|
@ -109,7 +109,7 @@ $(function(){
|
|||||||
this.$input.data('datepicker').date = null;
|
this.$input.data('datepicker').date = null;
|
||||||
this.$input.find('.active').removeClass('active');
|
this.$input.find('.active').removeClass('active');
|
||||||
if(!this.options.showbuttons) {
|
if(!this.options.showbuttons) {
|
||||||
this.$input.closest('form').submit();
|
this.$input.closest('form').submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ $(function(){
|
|||||||
activate: function() {
|
activate: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
this.$input.data('datetimepicker').date = null;
|
this.$input.data('datetimepicker').date = null;
|
||||||
this.$input.find('.active').removeClass('active');
|
this.$input.find('.active').removeClass('active');
|
||||||
if(!this.options.showbuttons) {
|
if(!this.options.showbuttons) {
|
||||||
|
@ -152,7 +152,8 @@ $(function () {
|
|||||||
var d = '15.05.1984',
|
var d = '15.05.1984',
|
||||||
e = $('<a href="#" data-type="date" data-pk="1" data-url="post-date-clear.php">'+d+'</a>').appendTo(fx).editable({
|
e = $('<a href="#" data-type="date" data-pk="1" data-url="post-date-clear.php">'+d+'</a>').appendTo(fx).editable({
|
||||||
format: f,
|
format: f,
|
||||||
clear: 'abc'
|
clear: 'abc',
|
||||||
|
showbuttons: true
|
||||||
});
|
});
|
||||||
|
|
||||||
$.mockjax({
|
$.mockjax({
|
||||||
@ -177,6 +178,7 @@ $(function () {
|
|||||||
//click clear
|
//click clear
|
||||||
clear.click();
|
clear.click();
|
||||||
ok(!p.find('td.day.active').length, 'no active day');
|
ok(!p.find('td.day.active').length, 'no active day');
|
||||||
|
ok(p.find('.datepicker').is(':visible'), 'datepicker still visible');
|
||||||
|
|
||||||
p.find('form').submit();
|
p.find('form').submit();
|
||||||
|
|
||||||
|
@ -166,7 +166,8 @@ $(function () {
|
|||||||
var d = '15.05.1984 16:40',
|
var d = '15.05.1984 16:40',
|
||||||
e = $('<a href="#" data-type="datetime" data-pk="1" data-url="post-datetime-clear.php">'+d+'</a>').appendTo(fx).editable({
|
e = $('<a href="#" data-type="datetime" data-pk="1" data-url="post-datetime-clear.php">'+d+'</a>').appendTo(fx).editable({
|
||||||
format: f,
|
format: f,
|
||||||
clear: 'abc'
|
clear: 'abc',
|
||||||
|
showbuttons: true
|
||||||
});
|
});
|
||||||
|
|
||||||
$.mockjax({
|
$.mockjax({
|
||||||
@ -191,6 +192,7 @@ $(function () {
|
|||||||
//click clear
|
//click clear
|
||||||
clear.click();
|
clear.click();
|
||||||
ok(!p.find('td.day.active').length, 'no active day');
|
ok(!p.find('td.day.active').length, 'no active day');
|
||||||
|
ok(p.find('.datetimepicker').is(':visible'), 'datetimepicker still visible');
|
||||||
|
|
||||||
p.find('form').submit();
|
p.find('form').submit();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user