mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
more fixes
This commit is contained in:
@ -130,14 +130,14 @@ export function test_parse_ShouldParseBooleanPropertiesIgnoreCaseInverted() {
|
|||||||
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||||
};
|
};
|
||||||
|
|
||||||
export function test_parse_ShouldParsePlatofmrSpecificProperties() {
|
export function test_parse_ShouldParsePlatformSpecificProperties() {
|
||||||
var p = <page.Page>builder.parse("<Page><TextField ios:editable='False' android:editable='True' /></Page>");
|
var p = <page.Page>builder.parse("<Page><TextField ios:editable='False' android:editable='True' /></Page>");
|
||||||
var tf = <textFieldModule.TextField>p.content;
|
var tf = <textFieldModule.TextField>p.content;
|
||||||
|
|
||||||
if(platform.device.os === platform.platformNames.ios) {
|
if (platform.device.os === platform.platformNames.ios) {
|
||||||
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||||
} else {
|
} else {
|
||||||
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,12 +77,14 @@ export function getComponentModule(elementName: string, namespace: string, attri
|
|||||||
|
|
||||||
var attrValue = <string>attributes[attr];
|
var attrValue = <string>attributes[attr];
|
||||||
|
|
||||||
if (attr.indexOf(":") !== -1){
|
if (attr.indexOf(":") !== -1) {
|
||||||
var platformName = attr.split(":")[0].trim();
|
var platformName = attr.split(":")[0].trim();
|
||||||
if(platformName.toLowerCase() !== platform.device.os.toLowerCase()) {
|
if (platformName.toLowerCase() === platform.device.os.toLowerCase()) {
|
||||||
continue;
|
attr = attr.split(":")[1].trim();
|
||||||
}
|
} else {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (attr.indexOf(".") !== -1) {
|
if (attr.indexOf(".") !== -1) {
|
||||||
var subObj = instance;
|
var subObj = instance;
|
||||||
|
Reference in New Issue
Block a user