diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-04 02:14:14 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-04 02:14:14 -0400 |
commit | be0900e97a8b0ae58ecca6e8a94d792aaac79c84 (patch) | |
tree | 714168021244949c9a3fbb78cbdb2f9162c8896e | |
parent | 34f36e2357a868c9034718fd8fed5450fe01d0a8 (diff) | |
download | askbot-be0900e97a8b0ae58ecca6e8a94d792aaac79c84.tar.gz askbot-be0900e97a8b0ae58ecca6e8a94d792aaac79c84.tar.bz2 askbot-be0900e97a8b0ae58ecca6e8a94d792aaac79c84.zip |
removed uses of preloadData for the autocompleter
-rw-r--r-- | askbot/media/js/group_messaging.js | 1 | ||||
-rw-r--r-- | askbot/media/js/live_search.js | 1 | ||||
-rw-r--r-- | askbot/media/js/post.js | 5 | ||||
-rw-r--r-- | askbot/media/js/tag_selector.js | 1 | ||||
-rw-r--r-- | askbot/media/js/user.js | 1 | ||||
-rw-r--r-- | askbot/media/js/utils.js | 3 | ||||
-rw-r--r-- | askbot/templates/macros.html | 1 |
7 files changed, 3 insertions, 10 deletions
diff --git a/askbot/media/js/group_messaging.js b/askbot/media/js/group_messaging.js index 30519f1f..add50425 100644 --- a/askbot/media/js/group_messaging.js +++ b/askbot/media/js/group_messaging.js @@ -309,7 +309,6 @@ NewThreadComposer.prototype.createDom = function() { var usersAc = new AutoCompleter({ url: '/get-users-info/',//askbot['urls']['get_users_info'], - preloadData: false, minChars: 1, useCache: true, matchInside: true, diff --git a/askbot/media/js/live_search.js b/askbot/media/js/live_search.js index e238a13f..b744e69e 100644 --- a/askbot/media/js/live_search.js +++ b/askbot/media/js/live_search.js @@ -420,7 +420,6 @@ FullTextSearch.prototype.activateTagSearchInput = function() { var me = this; var ac = new AutoCompleter({ url: askbot['urls']['get_tag_list'], - preloadData: true, minChars: 1, useCache: true, matchInside: true, diff --git a/askbot/media/js/post.js b/askbot/media/js/post.js index 5b9bf4ee..1fb1203f 100644 --- a/askbot/media/js/post.js +++ b/askbot/media/js/post.js @@ -1243,7 +1243,6 @@ var questionRetagger = function(){ //populate input var tagAc = new AutoCompleter({ url: askbot['urls']['get_tag_list'], - preloadData: true, minChars: 1, useCache: true, matchInside: true, @@ -3033,7 +3032,6 @@ TagEditor.prototype.decorate = function(element) { me.clearNewTagInput(); } }, - preloadData: true, minChars: 1, useCache: true, matchInside: true, @@ -4034,7 +4032,6 @@ $(document).ready(function() { var fakeUserAc = new AutoCompleter({ url: '/get-users-info/',//askbot['urls']['get_users_info'], - preloadData: true, promptText: gettext('User name:'), minChars: 1, useCache: true, @@ -4056,7 +4053,6 @@ $(document).ready(function() { if (groupsInput.length === 1) { var groupsAc = new AutoCompleter({ url: askbot['urls']['getGroupsList'], - preloadData: true, promptText: gettext('Group name:'), minChars: 1, useCache: false, @@ -4070,7 +4066,6 @@ $(document).ready(function() { if (usersInput.length === 1) { var usersAc = new AutoCompleter({ url: '/get-users-info/', - preloadData: true, promptText: gettext('User name:'), minChars: 1, useCache: false, diff --git a/askbot/media/js/tag_selector.js b/askbot/media/js/tag_selector.js index c1ccd691..dfc8a29a 100644 --- a/askbot/media/js/tag_selector.js +++ b/askbot/media/js/tag_selector.js @@ -372,7 +372,6 @@ function pickedTags(){ setupTagFilterControl('email'); var ac = new AutoCompleter({ url: askbot['urls']['get_tag_list'], - preloadData: true, minChars: 1, useCache: true, matchInside: true, diff --git a/askbot/media/js/user.js b/askbot/media/js/user.js index 2fd1195b..251ee004 100644 --- a/askbot/media/js/user.js +++ b/askbot/media/js/user.js @@ -950,7 +950,6 @@ GroupAdderWidget.prototype.decorate = function(element){ var groupsAc = new AutoCompleter({ url: askbot['urls']['getGroupsList'], - preloadData: true, minChars: 1, useCache: false, matchInside: false, diff --git a/askbot/media/js/utils.js b/askbot/media/js/utils.js index e03412cc..516c1ebf 100644 --- a/askbot/media/js/utils.js +++ b/askbot/media/js/utils.js @@ -2843,6 +2843,9 @@ AutoCompleter.prototype.isContentChar = function(symbol){ * autocompletable word */ AutoCompleter.prototype.getValue = function(){ + if (this._element === undefined) { + return ''; + } var sel = this._element.getSelection(); var text = this._element.val(); var pos = sel.start;//estimated start diff --git a/askbot/templates/macros.html b/askbot/templates/macros.html index 29f88621..2d345940 100644 --- a/askbot/templates/macros.html +++ b/askbot/templates/macros.html @@ -539,7 +539,6 @@ for the purposes of the AJAX comment editor #} {%- macro tag_autocomplete_js(id = '#id_tags') -%} var tagAc = new AutoCompleter({ url: '{% url "get_tag_list" %}', - preloadData: true, minChars: 1, useCache: true, matchInside: true, |