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));
|
||||
};
|
||||
|
||||
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 tf = <textFieldModule.TextField>p.content;
|
||||
|
||||
if(platform.device.os === platform.platformNames.ios) {
|
||||
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||
} else {
|
||||
if (platform.device.os === platform.platformNames.ios) {
|
||||
TKUnit.assert(tf.editable === false, "Expected result: false; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||
} else {
|
||||
TKUnit.assert(tf.editable === true, "Expected result: true; Actual result: " + tf.editable + "; type: " + typeof (tf.editable));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -77,9 +77,11 @@ export function getComponentModule(elementName: string, namespace: string, attri
|
||||
|
||||
var attrValue = <string>attributes[attr];
|
||||
|
||||
if (attr.indexOf(":") !== -1){
|
||||
if (attr.indexOf(":") !== -1) {
|
||||
var platformName = attr.split(":")[0].trim();
|
||||
if(platformName.toLowerCase() !== platform.device.os.toLowerCase()) {
|
||||
if (platformName.toLowerCase() === platform.device.os.toLowerCase()) {
|
||||
attr = attr.split(":")[1].trim();
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user