Commits

Richard Stephens committed dd4336a

Comments (0)

Files changed (2)

auiplugin/src/main/resources/experimental/js/atlassian/restfultable/restfultable.editrow.js

                 this.model = new this._modelClass();
             }
 
+            this.fieldFocusSelector = options.fieldFocusSelector;
+
             this.bind(this._events.CANCEL, function () {
                 this.disabled = true;
             })
             this.enable();
 
             if (name) {
-                $focus = this.$el.find(":input[type!=hidden][name=" + name + "], #" + name + ", .ajs-restfultable-input-" + name);
+                $focus = this.$el.find(this.fieldFocusSelector(name));
             } else {
 
                 $error = this.$el.find(this.classNames.ERROR + ":first");

auiplugin/src/main/resources/experimental/js/atlassian/restfultable/restfultable.js

                         columns: this.options.columns,
                         isUpdateMode: true,
                         allowReorder: this.options.allowReorder,
+                        fieldFocusSelector: this.options.fieldFocusSelector,
                         model: row.model,
                         cancelAccessKey: this.options.cancelAccessKey,
                         submitAccessKey: this.options.submitAccessKey
                     model: options.model || AJS.RestfulTable.EntryModel
                 }),
                 allowReorder: false,
+                fieldFocusSelector: function(name) {
+                    return ":input[name=" + name + "], #" + name;
+                },
                 loadingMsg: options.loadingMsg || AJS.I18n.getText("aui.words.loading")
             }
         }