Index: trunk/extensions/Wikidata/OmegaWiki/suggest.js |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | |
45 | 45 | suggestText = document.getElementById(suggestPrefix + "text"); |
46 | 46 | suggestText.className = "suggest-loading"; |
| 47 | + var suggestTextVal = suggestText.value ; // we copy the value to compare it later to the current value |
47 | 48 | |
48 | 49 | var suggestAttributesLevel = document.getElementById(suggestPrefix + "parameter-level"); |
49 | 50 | var suggestDefinedMeaningId = document.getElementById(suggestPrefix + "parameter-definedMeaningId"); |
— | — | @@ -56,12 +57,12 @@ |
57 | 58 | |
58 | 59 | URL = |
59 | 60 | wgScript + |
60 | | - '?title=Special:Suggest&search-text=' + encodeURI(suggestText.value) + |
| 61 | + '?title=Special:Suggest&search-text=' + encodeURI(suggestTextVal) + |
61 | 62 | '&prefix=' + encodeURI(suggestPrefix) + |
62 | 63 | '&query=' + encodeURI(suggestQuery) + |
63 | 64 | '&offset=' + encodeURI(suggestOffset) + |
64 | 65 | '&dataset='+dataSet; |
65 | | - |
| 66 | + |
66 | 67 | if (suggestAttributesLevel != null) |
67 | 68 | URL = URL + '&attributesLevel=' + encodeURI(suggestAttributesLevel.value); |
68 | 69 | |