well, at least I am finally able to read some of the source.

I see in the API a binding for the clickToEditText

however in the wonder_inplace.js I see:

if (typeof Ajax != 'undefined' && typeof Ajax.InPlaceEditor != 'undefined') {
  Ajax.InPlaceEditorWithEmptyText = Class.create(Ajax.InPlaceEditor, {
    
    initialize: function($super, element, url, options) {
      var newOptions = Object.extend({
        valueWhenEmpty: 'click to edit...',
        emptyClassName: 'inplaceeditor-empty'
      }, options || {});
      $super(element, url, newOptions);
      this.checkEmpty();
    },
    
    checkEmpty: function() {
      if(this.element.innerHTML.length == 0 && this.options.valueWhenEmpty){
        this.element.appendChild(
            new Element("span", 
{className:this.options.emptyClassName}).update(this.options.valueWhenEmpty)
        );
      }
    },
    
    getText: function($super) {
      if(empty_span = this.element.select("." + 
this.options.emptyClassName).first()) {
        empty_span.remove();
      }
      return $super();
    },
    
    leaveEditMode : function($super, transport) {
      var retval = $super(transport);
      this.checkEmpty();
      return retval;
    }
    
  });
}

which explains why the clickToEditText does nothing. So, is there a way for a 
poor plebe like me to change the clickToEditText without resorting to hacking 
this .js?

Ted
    

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to