removed bug with select2 scroll point.

pull/46/head
Nils Kenneweg 12 years ago
parent 65f2067b7f
commit a814562227
  1. 7
      public/javascripts/openproject.js
  2. 7
      public/javascripts/select2.js

@ -35,7 +35,7 @@ window.OpenProject = (function ($) {
}
parents.push(project);
currentLevel = project.level;
project.project = project
project.project = project;
project.hname = OpenProject.Helpers.hname(project.name, project.level);
project.parents = parents.slice(0, -1); // make sure to pass a clone
project.tokens = OpenProject.Helpers.Search.tokenize(project.name);
@ -211,7 +211,7 @@ window.OpenProject = (function ($) {
};
return function (result, container, query) {
var real_name = result.text || (result.project && result.project.name)
var real_name = result.text || (result.project && result.project.name);
jQuery(container).attr("title", real_name);
if (query.sterm === undefined) {
@ -302,7 +302,7 @@ window.OpenProject = (function ($) {
var savedPreviousResult;
var addUnmatchedAndSelectedParents = function (projects, matches, previousMatchId) {
var i, project, result = [], selected_choices = (this.element.val() === "" ? [] : this.element.val().split(",").map(function (e) {
var result = [], selected_choices = (this.element.val() === "" ? [] : this.element.val().split(",").map(function (e) {
return parseInt(e, 10);
}));
@ -312,7 +312,6 @@ window.OpenProject = (function ($) {
}
var previousParents, previousResult;
var unmatchedParents = [];
var parents = match.project.parents.clone();
match.disabled = false;

@ -1316,7 +1316,7 @@ the specific language governing permissions and limitations under the Apache Lic
self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});
self.postprocessResults(data);
self.postprocessResults(data, false, false);
if (data.more===true) {
more.detach().appendTo(results).text(self.opts.formatLoadMore(page+1));
@ -1846,7 +1846,7 @@ the specific language governing permissions and limitations under the Apache Lic
},
// single
postprocessResults: function (data, initial) {
postprocessResults: function (data, initial, noHighlightUpdate) {
var selected = 0, self = this, showSearchInput = true;
// find the selected element in the result list
@ -1860,7 +1860,8 @@ the specific language governing permissions and limitations under the Apache Lic
// and highlight it
this.highlight(selected);
if (noHighlightUpdate !== false)
this.highlight(selected);
// hide the search box if this is the first we got the results and there are a few of them

Loading…
Cancel
Save