コード例 #1
0
function init(image, count, title, toggle, selected, onClick) {
	$.title.text = Conversion.toString(title);
	//	if (toggle) {
	if (selected) {
		$.title.color = $.title.egColorSelected;
	} else {
		$.title.color = $.title.egColorUnSelected;
	}
	//	}
	if (image) {
		if (selected) {
			$.image.image = Images.getImage(image + '_ACTIVE', 'floatoption');
		} else {
			$.image.image = Images.getImage(image, 'floatoption');
		}
	}
	$.optionView.onClick = onClick;
}
コード例 #2
0
ファイル: rowBase.js プロジェクト: amwinsauto/firstProject
exports.setOnClickAction = function(row, item, update) {
	if (item.onClick) {
		row.hasChild = true;
		if (OS_ANDROID) {
			row.rightImage = Images.getImage('ARROW_RIGHT', 'core');
		}
		row.onClick = {
			type : 'listclick',
			caller : row.caller,
			geolocation : item.geolocation,
			request : {
				action : 'onClick',
				type : 'listitem',
				listitem : {
					name : item.name,
					onClick : item.onClick
				}
			}
		};
	} else if (!update) {
		row.hasChild = false;
	}
};
コード例 #3
0
ファイル: menu.js プロジェクト: amwinsauto/firstProject
if (data.name) {
	name = data.name.toString();
}

if (data.title) {
	title = Conversion.substituteAll(data.title, data.titleSubst);
}

if (data.image) {
	icon = data.image;
} else if (data.icon) {
	icon = data.icon;
}

if (icon) {
	icon = Images.getImage(icon, 'toolbar');
}

if (data.disabled === true || data.enabled === false) {
	enabled = false;
}


if (data.geolocation) {
	geolocation = true;
}

var attr = {
	title : title ? title : 'no title',
	groupId : 1 // Application Menus
};