You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2008/01/19 20:05:43 UTC
svn commit: r613439 -
/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js
Author: weber
Date: Sat Jan 19 11:05:42 2008
New Revision: 613439
URL: http://svn.apache.org/viewvc?rev=613439&view=rev
Log:
(TOBAGO-543) replace prototype with dojo as underlying ajax library
start fixing inputSuggest
Modified:
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js?rev=613439&r1=613438&r2=613439&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/inputSuggest.js Sat Jan 19 11:05:42 2008
@@ -32,37 +32,30 @@
this.store = new Tobago.AutocompleterAjaxStore(this);
+ var input = Tobago.element(elementId);
+ var className = input.className;
+ var width = input.style.width;
+ var height = input.style.height.replace(/\D/g, "");
var combo = new dijit.form.ComboBox({
name: elementId,
autocomplete: false,
store: this.store,
searchAttr: "label",
hasDownArrow: false
- }, Tobago.element(elementId));
-
-
-
- var input = Tobago.element(elementId);
- var table = Tobago.findAnchestorWithTagName(input, "TABLE");
-
- var classes = table.className.split(" ");
- for (var i = 0; i < classes.length; i++) {
- var className = classes[i];
- if (className.indexOf(cssPrefix + "-") == 0) {
- Tobago.removeCssClass(table.id, className);
- Tobago.addCssClass(input.id, className);
- }
- }
+ }, input);
+ var table = Tobago.element("widget_" + elementId);
+ combo.staticClass = table.className.replace("dijitTextBox", className);
+ table.className = combo.staticClass + " dijitTextBox";
+ table.style.width = width;
+ table.style.height = height + "px";
+ input = Tobago.element(elementId);
+ input.className = className;
+ input.style.width = width;
+ input.style.height = (height - 2) + "px";
+ var vdiv = input.parentNode.nextSibling.firstChild;
+ vdiv.style.width = "1px;";
- var width = table.style.width.replace(/\D/g, "");
- width = width;
- var height = table.style.height.replace(/\D/g, "");
- height = height;
- width = width + "px";
- height = height + "px";
- input.style.width = width;
- input.style.height = height;
if (this.required) {
this.setup();