diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js
index 4fe884223..7a3176804 100644
--- a/apps/common/main/lib/component/Button.js
+++ b/apps/common/main/lib/component/Button.js
@@ -487,12 +487,12 @@ define([
this.caption = caption;
if (this.rendered) {
- var captionNode = this.cmpEl.find('button:first > .caption').andSelf().filter('button > .caption');
+ var captionNode = this.cmpEl.find('button:first > .caption').addBack().filter('button > .caption');
if (captionNode.length > 0) {
captionNode.text(caption);
} else {
- this.cmpEl.find('button:first').andSelf().filter('button').text(caption);
+ this.cmpEl.find('button:first').addBack().filter('button').text(caption);
}
}
}
diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js
index 90b51aeaa..5aa890434 100644
--- a/apps/common/main/lib/component/DataView.js
+++ b/apps/common/main/lib/component/DataView.js
@@ -297,7 +297,7 @@ define([
if (_.isUndefined(this.scroller) && this.allowScrollbar) {
this.scroller = new Common.UI.Scroller({
- el: $(this.el).find('.inner').andSelf().filter('.inner'),
+ el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : 40,
wheelSpeed: 10
@@ -394,7 +394,7 @@ define([
});
if (view) {
- var innerEl = $(this.el).find('.inner').andSelf().filter('.inner');
+ var innerEl = $(this.el).find('.inner').addBack().filter('.inner');
if (this.groups && this.groups.length > 0) {
var group = this.groups.findWhere({id: record.get('group')});
@@ -452,7 +452,7 @@ define([
}
if (this.store.length < 1 && this.emptyText.length > 0)
- $(this.el).find('.inner').andSelf().filter('.inner').append('
');
+ $(this.el).find('.inner').addBack().filter('.inner').append('');
_.each(this.dataViewItems, function(item) {
this.stopListening(item);
@@ -464,7 +464,7 @@ define([
if (this.allowScrollbar) {
this.scroller = new Common.UI.Scroller({
- el: $(this.el).find('.inner').andSelf().filter('.inner'),
+ el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : 40,
wheelSpeed: 10
@@ -487,7 +487,7 @@ define([
view.stopListening();
if (this.store.length < 1 && this.emptyText.length > 0) {
- var el = $(this.el).find('.inner').andSelf().filter('.inner');
+ var el = $(this.el).find('.inner').addBack().filter('.inner');
if ( el.find('.empty-text').length<=0 )
el.append('');
}
@@ -653,7 +653,7 @@ define([
attachKeyEvents: function() {
if (this.enableKeyEvents && this.handleSelect) {
- var el = $(this.el).find('.inner').andSelf().filter('.inner');
+ var el = $(this.el).find('.inner').addBack().filter('.inner');
el.addClass('canfocused');
el.attr('tabindex', '0');
el.on((this.parentMenu && this.useBSKeydown) ? 'dataview:keydown' : 'keydown', _.bind(this.onKeyDown, this));
@@ -673,7 +673,7 @@ define([
setDisabled: function(disabled) {
this.disabled = disabled;
- $(this.el).find('.inner').andSelf().filter('.inner').toggleClass('disabled', disabled);
+ $(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
},
isDisabled: function() {
@@ -688,7 +688,7 @@ define([
var menuRoot = (this.parentMenu.cmpEl.attr('role') === 'menu')
? this.parentMenu.cmpEl
: this.parentMenu.cmpEl.find('[role=menu]'),
- innerEl = $(this.el).find('.inner').andSelf().filter('.inner'),
+ innerEl = $(this.el).find('.inner').addBack().filter('.inner'),
docH = Common.Utils.innerHeight(),
menuH = menuRoot.outerHeight(),
top = parseInt(menuRoot.css('top'));
diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js
index 6c44ba7ae..faf1c662a 100644
--- a/apps/common/main/lib/component/InputField.js
+++ b/apps/common/main/lib/component/InputField.js
@@ -150,7 +150,7 @@ define([
if (!me.rendered) {
var el = this.cmpEl;
- this._input = this.cmpEl.find('input').andSelf().filter('input');
+ this._input = this.cmpEl.find('input').addBack().filter('input');
if (this.editable) {
this._input.on('blur', _.bind(this.onInputChanged, this));
diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index 5ee828a96..8cba972e8 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -695,7 +695,7 @@ define([
hide_mask = true;
mask.attr('counter', parseInt(mask.attr('counter'))-1);
- if (this.$lastmodal.size() > 0) {
+ if (this.$lastmodal.length > 0) {
this.$lastmodal.removeClass('dethrone');
hide_mask = !(this.$lastmodal.hasClass('modal') && this.$lastmodal.is(':visible'));
}
@@ -736,7 +736,7 @@ define([
hide_mask = true;
mask.attr('counter', parseInt(mask.attr('counter'))-1);
- if (this.$lastmodal.size() > 0) {
+ if (this.$lastmodal.length > 0) {
this.$lastmodal.removeClass('dethrone');
hide_mask = !(this.$lastmodal.hasClass('modal') && this.$lastmodal.is(':visible'));
}
diff --git a/apps/common/main/lib/extend/Bootstrap.js b/apps/common/main/lib/extend/Bootstrap.js
index 62ce6b868..dc9498a60 100755
--- a/apps/common/main/lib/extend/Bootstrap.js
+++ b/apps/common/main/lib/extend/Bootstrap.js
@@ -81,8 +81,8 @@ function patchDropDownKeyDown(e) {
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) {
$items = $('[role=menu] li.dropdown-submenu.over:visible', $parent);
- if ($items.size()) {
- $items.eq($items.size()-1).removeClass('over');
+ if ($items.length) {
+ $items.eq($items.length-1).removeClass('over');
return false;
} else if ($parent.hasClass('dropdown-submenu') && $parent.hasClass('over')) {
$parent.removeClass('over');
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index ffe757087..50867def2 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -202,13 +202,13 @@ define([
me.api.asc_enableKeyEvents(false);
},
'modal:close': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}
},
'modal:hide': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index 76575790f..23b696f40 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -192,13 +192,13 @@ define([
me.api.asc_enableKeyEvents(false);
},
'modal:close': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}
},
'modal:hide': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index 2448521e6..849449290 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -202,13 +202,13 @@ define([
me.api.asc_enableKeyEvents(false);
},
'modal:close': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}
},
'modal:hide': function(dlg) {
- if (dlg && dlg.$lastmodal && dlg.$lastmodal.size() < 1) {
+ if (dlg && dlg.$lastmodal && dlg.$lastmodal.length < 1) {
me.isModalShowed = false;
me.api.asc_enableKeyEvents(true);
}