Changeset - e4721f7ba042
[Not reviewed]
default
0 1 0
Takumi IINO - 11 years ago 2014-11-29 08:31:09
trot.thunder@gmail.com
javascripts: plain javascript version q_filter without YAHOO.namespace
1 file changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -559,10 +559,18 @@ var _close_tooltip = function(e){
 
 * @param display_element function that takes current node from nodes and
 
 *    does hide or show based on the node
 
 */
 
var q_filter = function(target, $nodes, display_element) {
 
var q_filter = (function() {
 
    var _namespace = {};
 
    var namespace = function (target) {
 
        if (!(target in _namespace)) {
 
            _namespace[target] = {};
 
        }
 
        return _namespace[target];
 
    };
 
    return function (target, $nodes, display_element) {
 
    var $nodes = $nodes;
 
    var $q_filter_field = $('#' + target);
 
    var F = YAHOO.namespace(target);
 
        var F = namespace(target);
 

	
 
    $q_filter_field.keyup(function (e) {
 
        clearTimeout(F.filterTimeout);
 
@@ -595,7 +603,8 @@ var q_filter = function(target, $nodes, 
 
        $('#repo_count').html(showing);
 
        /* FIXME: don't hardcode */
 
    }
 
};
 
    }
 
})();
 

	
 
/* return jQuery expression with a tr with body in 3rd column and class cls and id named after the body */
 
var _table_tr = function(cls, body){
0 comments (0 inline, 0 general)