Changeset - e975e1d41059
[Not reviewed]
Bradley M. Kuhn - 12 years ago 2014-07-03 01:03:29
bkuhn@sfconservancy.org
rhodecode.js: workaround missing unknown autocomplete textboxKeyUpEvent

It was introduced in the YUI update in 5143b8df576c and used for @mention handling.
1 file changed with 5 insertions and 14 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -1373,7 +1373,6 @@ var MentionsAutoComplete = function (div
 

	
 
    if(ownerAC.itemSelectEvent){
 
        ownerAC.itemSelectEvent.subscribe(function (sType, aArgs) {
 

	
 
            var myAC = aArgs[0]; // reference back to the AC instance
 
            var elLI = aArgs[1]; // reference to the selected LI element
 
            var oData = aArgs[2]; // object literal of selected item's result data
 
@@ -1427,12 +1426,10 @@ var MentionsAutoComplete = function (div
 
        return [null, null];
 
    };
 

	
 
    if (ownerAC.textboxKeyUpEvent){
 
        ownerAC.textboxKeyUpEvent.subscribe(function(type, args){
 

	
 
            var ac_obj = args[0];
 
            var currentMessage = args[1];
 
            var currentCaretPosition = args[0]._elTextbox.selectionStart;
 
    $divid = $('#'+divid);
 
    $divid.keyup(function(e){
 
            var currentMessage = $divid.val();
 
            var currentCaretPosition = $divid[0].selectionStart;
 

	
 
            var unam = ownerAC.get_mention(currentMessage, currentCaretPosition);
 
            var curr_search = null;
 
@@ -1442,13 +1439,7 @@ var MentionsAutoComplete = function (div
 

	
 
            ownerAC.dataSource.chunks = unam[1];
 
            ownerAC.dataSource.mentionQuery = curr_search;
 

	
 
        })
 
    }
 
    return {
 
        ownerDS: ownerDS,
 
        ownerAC: ownerAC,
 
    };
 
        });
 
}
 

	
 
var addReviewMember = function(id,fname,lname,nname,gravatar_link){
0 comments (0 inline, 0 general)