Changeset 502

Show
Ignore:
Timestamp:
01/15/06 03:15:34 (3 years ago)
Author:
therve@gmail.com
Message:

Change 'typeof' calls style

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/branches/scriptaculous/MochiKit/DragAndDrop.js

    r501 r502  
    114114            this.options._containers = []; 
    115115            var containment = this.options.containment; 
    116             if ((typeof containment == 'object') && 
     116            if ((typeof(containment) == 'object') && 
    117117                (containment.constructor == Array)) { 
    118118                MochiKit.Iter.forEach(containment, function (c) { 
     
    312312        this.element = MochiKit.DOM.getElement(element); 
    313313 
    314         if (options.handle && (typeof options.handle == 'string')) { 
     314        if (options.handle && (typeof(options.handle) == 'string')) { 
    315315            this.handle = MochiKit.DOM.getElementsByTagAndClassName(null, 
    316316                                       options.handle, this.element)[0]; 
     
    441441 
    442442        var revert = this.options.revert; 
    443         if (revert && typeof revert == 'function') { 
     443        if (revert && typeof(revert) == 'function') { 
    444444            revert = revert(this.element); 
    445445        } 
     
    492492 
    493493        if (this.options.snap) { 
    494             if (typeof this.options.snap == 'function') { 
     494            if (typeof(this.options.snap) == 'function') { 
    495495                p = this.options.snap(p[0], p[1]); 
    496496            } else { 
  • mochikit/branches/scriptaculous/MochiKit/Effects.js

    r501 r502  
    3434    multiple: function (element, effect, options) { 
    3535        var elements; 
    36         if (((typeof element == 'object') || 
    37              (typeof element == 'function')) && 
     36        if (((typeof(element) == 'object') || 
     37             (typeof(element) == 'function')) && 
    3838            (element.length)) { 
    3939            elements = element; 
     
    115115        var timestamp = new Date().getTime(); 
    116116 
    117         var position = (typeof effect.options.queue == 'string') ? 
     117        var position = (typeof(effect.options.queue) == 'string') ? 
    118118            effect.options.queue : effect.options.queue.position; 
    119119 
     
    170170    instances: new Array(), 
    171171    get: function (queueName) { 
    172         if (typeof queueName != 'string') { 
     172        if (typeof(queueName) != 'string') { 
    173173            return queueName; 
    174174        } 
     
    207207        this.event('beforeStart'); 
    208208        if (!this.options.sync) { 
    209             Effect.Queues.get(typeof this.options.queue == 'string' ? 
     209            Effect.Queues.get(typeof(this.options.queue) == 'string' ? 
    210210                'global' : this.options.queue.scope).add(this); 
    211211        } 
     
    259259    cancel: function () { 
    260260        if (!this.options.sync) { 
    261             Effect.Queues.get(typeof this.options.queue == 'string' ? 
     261            Effect.Queues.get(typeof(this.options.queue) == 'string' ? 
    262262                'global' : this.options.queue.scope).remove(this); 
    263263        } 
  • mochikit/branches/scriptaculous/MochiKit/New.js

    r501 r502  
    635635    dispatch: function (callback, request, transport, json) { 
    636636        MochiKit.Iter.forEach(this.responders, function (responder) { 
    637             if (responder[callback] && typeof responder[callback] == 'function') { 
     637            if (responder[callback] &&  
     638                typeof(responder[callback]) == 'function') { 
    638639                try { 
    639640                    responder[callback].apply(responder, [request, transport, json]);