in event callbacks, use this., not data._element
This commit is contained in:
parent
7f05af7380
commit
102d8dce41
1 changed files with 14 additions and 14 deletions
|
@ -471,12 +471,12 @@ Ox.Filter = function(options, self) {
|
|||
}];
|
||||
renderConditions();
|
||||
triggerChangeEvent();
|
||||
} else if (data._element.parent().data('subposition') == -1) {
|
||||
removeCondition(data._element.parent().data('position'));
|
||||
} else if (this.$element.parent().data('subposition') == -1) {
|
||||
removeCondition(this.$element.parent().data('position'));
|
||||
} else {
|
||||
removeCondition(
|
||||
data._element.parent().data('position'),
|
||||
data._element.parent().data('subposition')
|
||||
this.$element.parent().data('position'),
|
||||
this.$element.parent().data('subposition')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -490,13 +490,13 @@ Ox.Filter = function(options, self) {
|
|||
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
|
||||
.bindEvent({
|
||||
click: function(data) {
|
||||
Ox.Log('Form', 'add...', data, data._element.parent().data('position'), data._element.parent().data('subposition'))
|
||||
if (data._element.parent().data('subposition') == -1) {
|
||||
addCondition(data._element.parent().data('position') + 1);
|
||||
Ox.Log('Form', 'add...', data, this.$element.parent().data('position'), this.$element.parent().data('subposition'))
|
||||
if (this.$element.parent().data('subposition') == -1) {
|
||||
addCondition(this.$element.parent().data('position') + 1);
|
||||
} else {
|
||||
addCondition(
|
||||
data._element.parent().data('position'),
|
||||
data._element.parent().data('subposition') + 1
|
||||
this.$element.parent().data('position'),
|
||||
this.$element.parent().data('subposition') + 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ Ox.Filter = function(options, self) {
|
|||
.css({margin: '0 0 0 4px'})
|
||||
.bindEvent({
|
||||
click: function(data) {
|
||||
addCondition(data._element.parent().data('position') + 1, -1, true)
|
||||
addCondition(this.$element.parent().data('position') + 1, -1, true)
|
||||
}
|
||||
})
|
||||
] : []);
|
||||
|
@ -544,7 +544,7 @@ Ox.Filter = function(options, self) {
|
|||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
var $element = data._element.parent();
|
||||
var $element = this.$element.parent();
|
||||
changeConditionKey(
|
||||
$element.data('position'),
|
||||
$element.data('subposition'),
|
||||
|
@ -568,7 +568,7 @@ Ox.Filter = function(options, self) {
|
|||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
var $element = data._element.parent();
|
||||
var $element = this.$element.parent();
|
||||
changeConditionOperator(
|
||||
$element.data('position'),
|
||||
$element.data('subposition'),
|
||||
|
@ -595,7 +595,7 @@ Ox.Filter = function(options, self) {
|
|||
submit: change
|
||||
});
|
||||
function change(data) {
|
||||
var $element = data._element.parent();
|
||||
var $element = this.$element.parent();
|
||||
changeConditionValue(
|
||||
$element.data('position'),
|
||||
$element.data('subposition'),
|
||||
|
@ -645,7 +645,7 @@ Ox.Filter = function(options, self) {
|
|||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
var $element = data._element.parent().parent();
|
||||
var $element = this.$element.parent().parent();
|
||||
changeGroupOperator(
|
||||
$element.data('position'),
|
||||
data.value
|
||||
|
|
Loading…
Reference in a new issue