ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-11258. Expression textarea: Should not allow sorting for input field.(xiwang)
Date Wed, 20 May 2015 18:02:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d1e4b6b01 -> ef5929ec9


AMBARI-11258. Expression textarea: Should not allow sorting for input field.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ef5929ec
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ef5929ec
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ef5929ec

Branch: refs/heads/trunk
Commit: ef5929ec9d7717ee5bec1f84139673cddd06421e
Parents: d1e4b6b
Author: Xi Wang <xiwang@apache.org>
Authored: Tue May 19 18:03:01 2015 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Wed May 20 11:02:09 2015 -0700

----------------------------------------------------------------------
 .../views/main/service/widgets/create/expression_view.js    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef5929ec/ambari-web/app/views/main/service/widgets/create/expression_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/widgets/create/expression_view.js b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index 25c39b3..9a2e31a 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -128,7 +128,7 @@ App.WidgetWizardExpressionView = Em.View.extend({
     this.propertyDidChange('expression');
     Em.run.next(function () {
       $(self.get('element')).find('.metric-field').sortable({
-        items: "> div",
+        items: "> .metric-instance",
         tolerance: "pointer",
         scroll: false,
         update: function () {
@@ -396,7 +396,12 @@ App.InputCursorTextfieldView = Ember.TextField.extend({
   },
 
   focusCursor: function () {
-    Em.run.next( function() { $('.add-item-input .ember-text-field').focus(); });
+    var self = this;
+    Em.run.next( function() {
+      if (self.$()) {
+        self.$().focus();
+      }
+    });
   }.observes('parentView.expression.data.length'),
 
   focusOut: function(evt) {


Mime
View raw message