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();
|
renderConditions();
|
||||||
triggerChangeEvent();
|
triggerChangeEvent();
|
||||||
} else if (data._element.parent().data('subposition') == -1) {
|
} else if (this.$element.parent().data('subposition') == -1) {
|
||||||
removeCondition(data._element.parent().data('position'));
|
removeCondition(this.$element.parent().data('position'));
|
||||||
} else {
|
} else {
|
||||||
removeCondition(
|
removeCondition(
|
||||||
data._element.parent().data('position'),
|
this.$element.parent().data('position'),
|
||||||
data._element.parent().data('subposition')
|
this.$element.parent().data('subposition')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,13 +490,13 @@ Ox.Filter = function(options, self) {
|
||||||
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
|
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function(data) {
|
click: function(data) {
|
||||||
Ox.Log('Form', 'add...', data, data._element.parent().data('position'), data._element.parent().data('subposition'))
|
Ox.Log('Form', 'add...', data, this.$element.parent().data('position'), this.$element.parent().data('subposition'))
|
||||||
if (data._element.parent().data('subposition') == -1) {
|
if (this.$element.parent().data('subposition') == -1) {
|
||||||
addCondition(data._element.parent().data('position') + 1);
|
addCondition(this.$element.parent().data('position') + 1);
|
||||||
} else {
|
} else {
|
||||||
addCondition(
|
addCondition(
|
||||||
data._element.parent().data('position'),
|
this.$element.parent().data('position'),
|
||||||
data._element.parent().data('subposition') + 1
|
this.$element.parent().data('subposition') + 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ Ox.Filter = function(options, self) {
|
||||||
.css({margin: '0 0 0 4px'})
|
.css({margin: '0 0 0 4px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function(data) {
|
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({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var $element = data._element.parent();
|
var $element = this.$element.parent();
|
||||||
changeConditionKey(
|
changeConditionKey(
|
||||||
$element.data('position'),
|
$element.data('position'),
|
||||||
$element.data('subposition'),
|
$element.data('subposition'),
|
||||||
|
@ -568,7 +568,7 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var $element = data._element.parent();
|
var $element = this.$element.parent();
|
||||||
changeConditionOperator(
|
changeConditionOperator(
|
||||||
$element.data('position'),
|
$element.data('position'),
|
||||||
$element.data('subposition'),
|
$element.data('subposition'),
|
||||||
|
@ -595,7 +595,7 @@ Ox.Filter = function(options, self) {
|
||||||
submit: change
|
submit: change
|
||||||
});
|
});
|
||||||
function change(data) {
|
function change(data) {
|
||||||
var $element = data._element.parent();
|
var $element = this.$element.parent();
|
||||||
changeConditionValue(
|
changeConditionValue(
|
||||||
$element.data('position'),
|
$element.data('position'),
|
||||||
$element.data('subposition'),
|
$element.data('subposition'),
|
||||||
|
@ -645,7 +645,7 @@ Ox.Filter = function(options, self) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var $element = data._element.parent().parent();
|
var $element = this.$element.parent().parent();
|
||||||
changeGroupOperator(
|
changeGroupOperator(
|
||||||
$element.data('position'),
|
$element.data('position'),
|
||||||
data.value
|
data.value
|
||||||
|
|
Loading…
Reference in a new issue