search select text

This commit is contained in:
yuri
2015-07-17 11:48:19 +03:00
parent 2a22b94b95
commit e49cbcad3f
2 changed files with 10 additions and 4 deletions
@@ -17,14 +17,14 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
Espo.define('Views.GlobalSearch.GlobalSearch', 'View', function (Dep) {
return Dep.extend({
template: 'global-search.global-search',
events: {
'keypress #global-search-input': function (e) {
if (e.keyCode == 13) {
@@ -34,10 +34,13 @@ Espo.define('Views.GlobalSearch.GlobalSearch', 'View', function (Dep) {
'click [data-action="search"]': function () {
this.runSearch();
},
'focus #global-search-input': function (e) {
e.currentTarget.select();
}
},
setup: function () {
this.wait(true);
this.getCollectionFactory().create('GlobalSearch', function (collection) {
this.collection = collection;
@@ -134,6 +134,9 @@ Espo.define('Views.Record.Search', 'View', function (Dep) {
this.search();
}
},
'focus input[name="textFilter"]': function (e) {
e.currentTarget.select();
},
'click button[data-action="search"]': function (e) {
this.search();
},