uidesigner/com.nokia.sdt.series60.componentlibrary/components/controls/CCoeControlBase.js
author fturovic <frank.turovich@nokia.com>
Thu, 25 Feb 2010 12:00:19 -0600
changeset 1024 48b401835d0a
parent 0 fb279309251b
permissions -rw-r--r--
synched 2.5 and 3.0 pages

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


include("../settingsListLibrary.js")

function CCoeControlBaseEventInfo() {
}

/** Only return a subset of events when a control is in a setting item list */
CCoeControlBaseEventInfo.prototype.getEventGroups = function(instance) {
	if (isSettingItemList(instance.parent))
		return ["SettingsList"];
	else if (instance.parent.attributes["is-transient-object"] == "true")
		return []; // no events
	else
		return ["CCoeControl"];
}

/** Only return a subset of events when a control is in a setting item list */
CCoeControlBaseEventInfo.prototype.getDefaultEventName = function(instance) {
	if (isSettingItemList(instance.parent))
		return "editingStopped";
	else
		return null;	// select component default
}