Bug 348612, [newwidget] support input[type=xsd:integer] for xul, p=surkov, r=me+doron

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-08-30 15:16:06 +00:00
Родитель 301bc07795
Коммит 5d48d57e06
2 изменённых файлов: 231 добавлений и 0 удалений

Просмотреть файл

@ -308,6 +308,184 @@
</binding>
<!-- INPUT: <NUMBER> -->
<binding id="xformswidget-input-number-base"
extends="#xformswidget-input-base">
<implementation>
<constructor>
var changeHandler = {
xfcontrol: this,
handleEvent: function(aEvent) {
if (aEvent.currentTarget == aEvent.originalTarget) {
this.xfcontrol.updateInstanceData(true);
}
}
};
this.control.control.addEventListener("change", changeHandler, false);
</constructor>
</implementation>
</binding>
<!-- INPUT: type="xsd:integer" -->
<binding id="xformswidget-input-integer"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="Number.MIN_VALUE" max="Number.MAX_VALUE"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:nonPositiveInteger" -->
<binding id="xformswidget-input-nonPositiveInteger"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="Number.MIN_VALUE" max="0"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:negativeInteger" -->
<binding id="xformswidget-input-negativeInteger"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="Number.MIN_VALUE" max="-1"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:long" -->
<binding id="xformswidget-input-long"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="-9223372036854775807" max="9223372036854775807"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:int" -->
<binding id="xformswidget-input-int"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="-2147483647" max="2147483647"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:short" -->
<binding id="xformswidget-input-short"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="-32767" max="32767"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:byte" -->
<binding id="xformswidget-input-byte"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="-127" max="127"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:nonNegativeInteger" -->
<binding id="xformswidget-input-nonNegativeInteger"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="0" max="Number.MAX_VALUE"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:unsignedLong" -->
<binding id="xformswidget-input-unsignedLong"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="0" max="18446744073709551615"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:unsignedInt" -->
<binding id="xformswidget-input-unsignedInt"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="0" max="4294967295"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:unsignedShort" -->
<binding id="xformswidget-input-unsignedShort"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="0" max="65535"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:unsignedByte" -->
<binding id="xformswidget-input-unsignedByte"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="0" max="255"/>
<children/>
</content>
</binding>
<!-- INPUT: type="xsd:positiveInteger" -->
<binding id="xformswidget-input-positiveInteger"
extends="#xformswidget-input-number-base">
<content>
<children includes="label"/>
<xul:textbox type="number" class="xf-value" anonid="control"
xbl:inherits="accesskey" flex="1"
min="1" max="Number.MAX_VALUE"/>
<children/>
</content>
</binding>
<!-- SECRET: <DEFAULT> -->
<binding id="xformswidget-secret"
extends="#xformswidget-input-base">

Просмотреть файл

@ -288,6 +288,59 @@ html|*:root input[mozType|type="http://www.w3.org/2001/XMLSchema#gDay"] {
-moz-binding: url('chrome://xforms/content/input-xhtml.xml#xformswidget-input-day');
}
/* input type="xsd:integer" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#integer"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-integer');
}
/* input type="xsd:nonPositiveInteger" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#nonPositiveInteger"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-nonPositiveInteger');
}
/* input type="xsd:negativeInteger" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#negativeInteger"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-negativeInteger');
}
/* input type="xsd:long" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#long"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-long');
}
/* input type="xsd:int" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#int"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-int');
}
/* input type="xsd:short" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#short"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-short');
}
/* input type="xsd:byte" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#byte"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-byte');
}
/* input type="xsd:nonNegativeInteger" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-nonNegativeInteger');
}
/* input type="xsd:unsignedLong" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#unsignedLong"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-unsignedLong');
}
/* input type="xsd:unsignedInt" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#unsignedInt"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-unsignedInt');
}
/* input type="xsd:unsignedShort" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#unsignedShort"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-unsignedShort');
}
/* input type="xsd:unsignedByte" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#unsignedByte"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-unsignedByte');
}
/* input type="xsd:positiveInteger" */
xul|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#positiveInteger"] {
-moz-binding: url('chrome://xforms/content/input-xul.xml#xformswidget-input-positiveInteger');
}
html|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#base64Binary"],
html|*:root input[mozType|typelist~="http://www.w3.org/2001/XMLSchema#hexBinary"],
html|*:root secret[mozType|typelist~="http://www.w3.org/2001/XMLSchema#base64Binary"],