[BluetoothChat] updated BluetoothChat sources tizen_2.2 2.2.1_release
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Fri, 18 Oct 2013 14:18:49 +0000 (16:18 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Fri, 18 Oct 2013 14:18:49 +0000 (16:18 +0200)
Change-Id: I835a83bd9554174e84f0d161f38e89328be88311

js/app.ui.events.js
js/app.ui.js

index f9ae99f..781c779 100644 (file)
@@ -166,6 +166,9 @@ function UiEvents(parent) {
                        $('#ui-mySend').on('click', function (event) {
                                event.stopPropagation();
                                var message = $('#text').val();
+                               if (message.length === 0) {
+                                       return;
+                               }
                                $('#text').val('');
                                self.ui.disableSendButton();
                                app.sendMessage(message);
index 9bd9d99..9e4f7cc 100644 (file)
@@ -192,13 +192,9 @@ function Ui(callback) {
                },
 
                disableSendButton: function Ui_disableSendButton() {
-                       setTimeout( function() {
-                               $('#ui-mySend')
-                                       .css({'pointer-events': 'none', 'color': '#bbb'})
-                                       .addClass('ui-disabled');
-                               },
-                               0
-                       );
+                       $('#ui-mySend')
+                               .css({'pointer-events': 'none', 'color': '#bbb'})
+                               .addClass('ui-disabled');
                },
 
                checkSendButtonState: function Ui_checkSendButtonState() {