Changeset 511

Show
Ignore:
Timestamp:
01/16/06 14:12:38 (3 years ago)
Author:
therve@gmail.com
Message:

Small bugs/syntax, ajax editor should work now.

Files:

Legend:

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

    r494 r511  
    441441 
    442442    setOptions: function (options) { 
    443         this.options = Object.extend({ 
     443        this.options = MochiKit.Base.update({ 
    444444            choices: 10, 
    445445            partialSearch: true, 
     
    502502 
    503503***/ 
    504 Field.scrollFreeActivate = function (field) { 
    505     setTimeout(function () { 
    506         Field.activate(field); 
    507     }, 1); 
    508 }; 
    509  
    510 Ajax.InPlaceEditor = function () { 
     504 
     505Ajax.InPlaceEditor = function (element, url, options) { 
    511506    this.__init__(element, url, options); 
    512507}; 
     
    519514        this.element = MochiKit.DOM.getElement(element); 
    520515 
    521         this.options = Object.extend({ 
     516        this.options = MochiKit.Base.update({ 
    522517            okButton: true, 
    523518            okText: 'ok', 
     
    699694        new Ajax.Request( 
    700695            this.options.loadTextURL, 
    701             Object.extend({ 
     696            MochiKit.Base.update({ 
    702697                asynchronous: true, 
    703698                onComplete: MochiKit.Base.bind(this.onLoadedExternalText, this) 
     
    734729        // do this first, sometimes the ajax call returns before we get a 
    735730        // chance to switch on Saving which means this will actually switch on 
    736         // Saving *after* we've left edit mode causing Saving to be 
     731        // Saving *after* we have left edit mode causing Saving to be 
    737732        // displayed indefinitely 
    738733        this.onLoading(); 
     
    745740            }, 
    746741            this.url, 
    747             Object.extend({ 
     742            MochiKit.Base.update({ 
    748743                parameters: this.options.callback(form, value), 
    749744                onComplete: MochiKit.Base.bind(this.onComplete, this), 
  • mochikit/branches/scriptaculous/MochiKit/DragAndDrop.js

    r507 r511  
    200200 
    201201    register: function (draggable) { 
    202         if (this.drags.length == 0) { 
     202        if (this.drags.length === 0) { 
    203203            this.eventMouseUp = MochiKit.DOM.bindAsEventListener( 
    204204                                    this.endDrag, this); 
     
    219219            return d != draggable 
    220220        }, this.drags); 
    221         if (this.drags.length == 0) { 
     221        if (this.drags.length === 0) { 
    222222            MochiKit.Event.stopObserving(document, 'mouseup', 
    223223                                         this.eventMouseUp); 
  • mochikit/branches/scriptaculous/MochiKit/New.js

    r502 r511  
    514514 
    515515        for (var i = 0; i < elements.length; i++) { 
    516             var queryComponent = Form.serializeElement(elements[i]); 
     516            var queryComponent = MochiKit.Form.serializeElement(elements[i]); 
    517517            if (queryComponent) { 
    518518                queryComponents.push(queryComponent); 
     
    527527        var elements = new Array(); 
    528528 
    529         for (tagName in Form.Element.Serializers) { 
     529        for (tagName in MochiKit.Form.Serializers) { 
    530530            var tagElements = form.getElementsByTagName(tagName); 
    531531            for (var j = 0; j < tagElements.length; j++) { 
     
    900900            element.select(); 
    901901        } 
     902    }, 
     903     
     904    scrollFreeActivate: function (field) { 
     905        setTimeout(function () { 
     906            Field.activate(field); 
     907        }, 1); 
    902908    } 
    903909};