Skip to content
Browse files

Removed the automatic select all when focusing the search field.

  • Loading branch information...
1 parent 631f274 commit f7a391eb1a867988da076f69153bbfde7903c324 @Ibmurai committed Apr 30, 2012
Showing with 13 additions and 19 deletions.
  1. +13 −19 web/scripts/vigu.toolbar.js
View
32 web/scripts/vigu.toolbar.js
@@ -15,10 +15,10 @@ Vigu.Toolbar = (function($) {
return {
/**
* Create the toolbar
- *
+ *
* @param {jQuery} Dom node
* @param {String} Title in the menu
- *
+ *
* @return undefined
*/
setup : function(node , title) {
@@ -30,34 +30,28 @@ Vigu.Toolbar = (function($) {
},
/**
* Render the toolbar
- *
+ *
* @return undefined
*/
render : function () {
},
/**
* Get search field
- *
+ *
* @param {jQuery} node Node
- *
+ *
* @return {undefiend}
*/
addSearch : function(node) {
$('<input type="text">')
.attr('name', 'search')
.addClass('ui-corner-all')
.keypress(function(event) {
- if ( event.which == 13 ) {
- event.preventDefault();
- Vigu.Grid.parameters.path = $('input[name="search"]').val();
- Vigu.Grid.reload();
- }
- })
- .click(function(){
- this.select();
- })
- .focus(function(){
- this.select();
+ if ( event.which == 13 ) {
+ event.preventDefault();
+ Vigu.Grid.parameters.path = $('input[name="search"]').val();
+ Vigu.Grid.reload();
+ }
})
.appendTo(node);
$('<button>')
@@ -66,19 +60,19 @@ Vigu.Toolbar = (function($) {
Vigu.Grid.parameters.path = '';
$('input[name="search"]').val('');
Vigu.Grid.reload();
- })
+ })
.appendTo(node).button();
$('<button>')
.text('Reload')
.click(function(){
Vigu.Grid.reload();
- })
+ })
.appendTo(node).button();
$('<button>')
.text('Auto Reload')
.click(function(){
Vigu.Grid.autoRefresh();
- })
+ })
.appendTo(node).button();
}
};

0 comments on commit f7a391e

Please sign in to comment.
Something went wrong with that request. Please try again.