[PATCH 11 of 19] autocomplete: remove redundant specification of responseSchema
Thomas De Schampheleire
patrickdepinguin at gmail.com
Tue Jun 30 16:43:21 EDT 2015
# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1435679709 -7200
# Tue Jun 30 17:55:09 2015 +0200
# Node ID 00a21b2c96879db000cb598df11d9671766869c2
# Parent 3d214cd2fdd8b6c24cd147127283a3ffe7bdc0de
autocomplete: remove redundant specification of responseSchema
YAHOO.util.DataSource.responseSchema determines which fields from the data
source are returned upon requests. In the case of user/group autocompletion,
the data source is a static JavaScript array containing only the relevant
fields. When not specifying a responseSchema, all fields of the selected
entry are returned, which is fine (in fact, the responseSchema currently
specified just mentions all fields, redundantly).
diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js
--- a/kallithea/public/js/base.js
+++ b/kallithea/public/js/base.js
@@ -1237,15 +1237,9 @@ var _MembersAutoComplete = function (div
// DataScheme for members
var memberDS = new YAHOO.util.FunctionDataSource(matchAll);
- memberDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname", "grname", "grmembers", "gravatar_lnk", "gravatar_size"]
- };
// DataScheme for owner
var ownerDS = new YAHOO.util.FunctionDataSource(matchUsers);
- ownerDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname", "gravatar_lnk", "gravatar_size"]
- };
// Instantiate AutoComplete for perms
var membersAC = new YAHOO.widget.AutoComplete(divid, cont, memberDS);
@@ -1301,10 +1295,6 @@ var MentionsAutoComplete = function (div
// DataScheme for owner
var ownerDS = new YAHOO.util.FunctionDataSource(matchUsers);
- ownerDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname", "gravatar_lnk", "gravatar_size"]
- };
-
// Instantiate AutoComplete for mentions
var ownerAC = new YAHOO.widget.AutoComplete(divid, cont, ownerDS);
ownerAC.useShadow = false;
@@ -1436,10 +1426,6 @@ var PullRequestAutoComplete = function (
// DataScheme for owner
var ownerDS = new YAHOO.util.FunctionDataSource(matchUsers);
- ownerDS.responseSchema = {
- fields: ["id", "fname", "lname", "nname", "gravatar_lnk", "gravatar_size"]
- };
-
// Instantiate AutoComplete for mentions
var reviewerAC = new YAHOO.widget.AutoComplete(divid, cont, ownerDS);
reviewerAC.useShadow = false;
More information about the kallithea-general
mailing list