Lines Matching refs:options
28 // in the options parameter, e.g.:
43 baseInitialize: function(element, update, options) {
53 this.setOptions(options);
55 this.options = options || {};
57 this.options.paramName = this.options.paramName || this.element.name;
58 this.options.tokens = this.options.tokens || [];
59 this.options.frequency = this.options.frequency || 0.4;
60 this.options.minChars = this.options.minChars || 1;
61 this.options.onShow = this.options.onShow ||
72 this.options.onHide = this.options.onHide ||
75 if(typeof(this.options.tokens) == 'string')
76 this.options.tokens = new Array(this.options.tokens);
89 if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
112 if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
117 if(this.options.indicator) Element.show(this.options.indicator);
121 if(this.options.indicator) Element.hide(this.options.indicator);
159 setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
235 if (this.options.updateElement) {
236 this.options.updateElement(selectedElement);
240 if (this.options.select) {
241 var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
242 if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
258 if (this.options.afterUpdateElement)
259 this.options.afterUpdateElement(this.element, selectedElement);
283 if(this.entryCount==1 && this.options.autoSelect) {
299 if(this.getToken().length>=this.options.minChars) {
321 for (var i=0; i<this.options.tokens.length; i++) {
322 var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);
332 initialize: function(element, update, url, options) {
333 this.baseInitialize(element, update, options);
334 this.options.asynchronous = true;
335 this.options.onComplete = this.onComplete.bind(this);
336 this.options.defaultParams = this.options.parameters || null;
341 entry = encodeURIComponent(this.options.paramName) + '=' +
344 this.options.parameters = this.options.callback ?
345 this.options.callback(this.element, entry) : entry;
347 if(this.options.defaultParams)
348 this.options.parameters += '&' + this.options.defaultParams;
350 new Ajax.Request(this.url, this.options);
360 // inject an array of autocompletion options into the page, rather
366 // is the options block.
368 // Extra local autocompletion options:
391 // In that case, the other options above will not apply unless
396 initialize: function(element, update, array, options) {
397 this.baseInitialize(element, update, options);
398 this.options.array = array;
402 this.updateChoices(this.options.selector(this));
405 setOptions: function(options) {
406 this.options = Object.extend({
418 for (var i = 0; i < instance.options.array.length &&
419 ret.length < instance.options.choices ; i++) {
421 var elem = instance.options.array[i];
422 var foundPos = instance.options.ignoreCase ?
431 } else if (entry.length >= instance.options.partialChars &&
432 instance.options.partialSearch && foundPos != -1) {
433 if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
441 foundPos = instance.options.ignoreCase ?
448 ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
451 }, options || {});
471 initialize: function(element, url, options) {
475 this.options = Object.extend({
486 new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
505 }, options || {});
507 if(!this.options.formId && this.element.id) {
508 this.options.formId = this.element.id + "-inplaceeditor";
509 if ($(this.options.formId)) {
511 this.options.formId = null;
515 if (this.options.externalControl) {
516 this.options.externalControl = $(this.options.externalControl);
524 this.element.title = this.options.clickToEditText;
532 if (this.options.externalControl) {
533 Event.observe(this.options.externalControl, 'click', this.onclickListener);
534 Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
535 Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
543 if (this.options.externalControl) {
544 Element.hide(this.options.externalControl);
549 if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
558 this.form.id = this.options.formId;
559 Element.addClassName(this.form, this.options.formClassName)
564 if (this.options.textarea) {
569 if (this.options.okButton) {
572 okButton.value = this.options.okText;
577 if (this.options.cancelLink) {
580 cancelLink.appendChild(document.createTextNode(this.options.cancelText));
587 if (!this.options.handleLineBreaks) return false;
595 if(this.options.loadTextURL) {
596 text = this.options.loadingText;
603 if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
604 this.options.textarea = false;
608 textField.name = this.options.paramName;
610 textField.style.backgroundColor = this.options.highlightcolor;
612 var size = this.options.size || this.options.cols || 0;
614 if (this.options.submitOnBlur)
618 this.options.textarea = true;
621 textArea.name = this.options.paramName;
623 textArea.rows = this.options.rows;
624 textArea.cols = this.options.cols || 40;
626 if (this.options.submitOnBlur)
631 if(this.options.loadTextURL) {
640 Element.addClassName(this.form, this.options.loadingClassName);
643 this.options.loadTextURL,
647 }, this.options.ajaxOptions)
651 Element.removeClassName(this.form, this.options.loadingClassName);
662 this.options.onFailure(transport);
679 if (this.options.evalScripts) {
682 parameters: this.options.callback(form, value),
687 }, this.options.ajaxOptions));
694 parameters: this.options.callback(form, value),
697 }, this.options.ajaxOptions));
713 this.element.innerHTML = this.options.savingText;
714 Element.addClassName(this.element, this.options.savingClassName);
726 this.element.style.backgroundColor = this.options.highlightcolor;
730 Element.addClassName(this.element, this.options.hoverClassName)
733 if (this.options.backgroundColor) {
736 Element.removeClassName(this.element, this.options.hoverClassName)
739 startcolor: this.options.highlightcolor,
740 endcolor: this.options.highlightendcolor,
745 Element.removeClassName(this.element, this.options.savingClassName);
750 if (this.options.externalControl) {
751 Element.show(this.options.externalControl);
760 this.options.onComplete.bind(this)(transport, this.element);
772 if (this.options.externalControl) {
773 Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
774 Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
775 Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
786 var collection = this.options.collection || [];
791 if((typeof this.options.value == 'undefined') &&
793 if(this.options.value==optionTag.value) optionTag.selected = true;
801 if(this.options.loadTextURL) this.loadExternalText();
803 this.options.callback = function(form, value) {