org.symbian.tools.wrttools/projecttemplates/WRTKit/WRTKit.js
author Eugene Ostroukhov <eugeneo@symbian.org>
Tue, 16 Mar 2010 18:01:11 -0700
changeset 273 b1f63c2c240c
parent 211 7b148352159e
permissions -rw-r--r--
Bug 2072 - Update .js files with EPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
210
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     1
/**
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     2
 * Copyright (c) 2009-2010 Symbian Foundation and/or its subsidiary(-ies).
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     3
 * All rights reserved.
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     4
 * This component and the accompanying materials are made available
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     5
 * under the terms of the License "Eclipse Public License v1.0"
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     6
 * which accompanies this distribution, and is available
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     8
 *
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
     9
 * Initial Contributors:
273
b1f63c2c240c Bug 2072 - Update .js files with EPL
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 211
diff changeset
    10
 * Nokia Corporation - initial contribution.
b1f63c2c240c Bug 2072 - Update .js files with EPL
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 211
diff changeset
    11
 * 
210
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
    12
 * Contributors:
273
b1f63c2c240c Bug 2072 - Update .js files with EPL
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 211
diff changeset
    13
 * 
b1f63c2c240c Bug 2072 - Update .js files with EPL
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 211
diff changeset
    14
 * Description:
b1f63c2c240c Bug 2072 - Update .js files with EPL
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 211
diff changeset
    15
 * 
210
0f7abfd6ae62 Fixed bug 2072: update .js files with EPL
tasneems@symbian.org
parents: 73
diff changeset
    16
 */
73
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    17
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    18
///////////////////////////////////////////////////////////////////////////////
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    19
// This script includes the WRTKit for use in a widget.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    20
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    21
// WRTKit version (major.minor.revision, e.g. 1.0.0).
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    22
var WRTKIT_VERSION_MAJOR = 1;
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    23
var WRTKIT_VERSION_MINOR = 0;
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    24
var WRTKIT_VERSION_REVISION = 0;
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    25
var WRTKIT_RESOURCE_DIRECTORY = "WRTKit/Resources/";
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    26
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    27
// Include util script files.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    28
includeScript("WRTKit/Utils/Logger.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    29
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    30
// Include UI visual definition.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    31
includeStyleSheet("WRTKit/Resources/UI.css");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    32
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    33
// Include all UI toolkit script files.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    34
var UI_NO_INIT_ID = "UI_NO_INIT_ID";
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    35
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    36
includeScript("WRTKit/UI/UIInit.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    37
includeScript("WRTKit/UI/UIElement.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    38
includeScript("WRTKit/UI/Scrollbar.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    39
includeScript("WRTKit/UI/NotificationPopup.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    40
includeScript("WRTKit/UI/UIManager.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    41
includeScript("WRTKit/UI/View.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    42
includeScript("WRTKit/UI/ListView.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    43
includeScript("WRTKit/UI/Control.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    44
includeScript("WRTKit/UI/Separator.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    45
includeScript("WRTKit/UI/Label.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    46
includeScript("WRTKit/UI/ContentPanel.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    47
includeScript("WRTKit/UI/TextEntryControl.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    48
includeScript("WRTKit/UI/TextField.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    49
includeScript("WRTKit/UI/TextArea.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    50
includeScript("WRTKit/UI/SelectionControl.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    51
includeScript("WRTKit/UI/SelectionMenu.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    52
includeScript("WRTKit/UI/SelectionList.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    53
includeScript("WRTKit/UI/ActionControl.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    54
includeScript("WRTKit/UI/FormButton.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    55
includeScript("WRTKit/UI/NavigationButton.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    56
includeScript("WRTKit/UI/Ajax.js");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    57
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    58
// Includes a script file by writing a script tag.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    59
function includeScript(src) {
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    60
    document.write("<script type=\"text/javascript\" src=\"" + src + "\"></script>");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    61
}
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    62
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    63
// Includes a style sheet by writing a style tag.
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    64
function includeStyleSheet(src) {
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    65
    document.write("<style type=\"text/css\"> @import url(\"" +  src + "\"); </style>");
c56c874eef47 Added WRTKit
tasneems@symbian.org
parents:
diff changeset
    66
}