418 lines
12 KiB
Plaintext
418 lines
12 KiB
Plaintext
<base href="<%-DOC_BASE_URL%>">
|
|
<meta charset="utf-8"/>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
|
<script src="<%-BASE_URL%>external/sockjs-0.3.min.js"></script>
|
|
<script src="<%-APP_URL%>xcf/ext/xapp-externals.js"></script>
|
|
<script src="<%-BASE_URL%>external/lodash.min.js"></script>
|
|
<script src="<%-BASE_URL%>xibm/ibm/requirejs/require.js"></script>
|
|
<script src="<%-BASE_URL%>external/jquery-1.9.1.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="<%-CSS%>">
|
|
<script>
|
|
require.config({
|
|
urlArgs: "userDirectory=<%-USER_DIRECTORY%>"
|
|
});
|
|
|
|
require.config({
|
|
config: {
|
|
waitSeconds:9999999,
|
|
has: {
|
|
"use-dcl": true
|
|
},
|
|
'delite/theme':{
|
|
theme:'<%-THEME%>'
|
|
},
|
|
"requirejs-dplugins/has": {
|
|
"phone-like-channel": true,
|
|
"tablet-like-channel": true,
|
|
"desktop-like-channel": false
|
|
}
|
|
|
|
},
|
|
baseUrl: "<%-BASE_URL%>xibm/ibm/",
|
|
paths: {
|
|
},
|
|
shim: {
|
|
// Libraries
|
|
lodash: {
|
|
exports: '_'
|
|
}
|
|
},
|
|
packages:[
|
|
{
|
|
name: 'lodash',
|
|
location: './lodash-compat' //points to bower_components/dcl
|
|
},
|
|
{
|
|
name:'xide',
|
|
location:'<%-BASE_URL%>/xide'
|
|
},
|
|
{
|
|
name:'xdeliteful',
|
|
location:'<%-BASE_URL%>xibm/xibm/deliteful'
|
|
},
|
|
{
|
|
name:'xdelite',
|
|
location:'%<%-BASE_URL%>xibm/xibm/delite'
|
|
},
|
|
{
|
|
name:'xblox',
|
|
location:'<%-BASE_URL%>/xblox'
|
|
},
|
|
{
|
|
name:'xdocker',
|
|
location:'<%-BASE_URL%>/xdocker'
|
|
},
|
|
{
|
|
name:'wcDocker',
|
|
location:'<%-BASE_URL%>/wcDocker/src/'
|
|
},
|
|
{
|
|
name:'xapp',
|
|
location:'<%-BASE_URL%>xapp'
|
|
},
|
|
{
|
|
name:'dijit',
|
|
location:'<%-BASE_URL%>dijit'
|
|
},
|
|
{
|
|
name:'dijit',
|
|
location:'<%-BASE_URL%>dijit'
|
|
},
|
|
{
|
|
name:'xwire',
|
|
location:'<%-BASE_URL%>xwire'
|
|
},
|
|
{
|
|
name:'dojo',
|
|
location:'<%-BASE_URL%>dojo'
|
|
},
|
|
{
|
|
name:'dojox',
|
|
location:'<%-BASE_URL%>dojox'
|
|
},
|
|
{
|
|
name:'xdojo',
|
|
location:'<%-BASE_URL%>xdojo'
|
|
},
|
|
{
|
|
name:'xdelite',
|
|
location:'<%-BASE_URL%>xdelite'
|
|
},
|
|
{
|
|
name:'xfile',
|
|
location:'<%-BASE_URL%>xfile'
|
|
},
|
|
{
|
|
name:'xgrid',
|
|
location:'<%-BASE_URL%>xgrid'
|
|
},
|
|
{
|
|
name:'dgrid',
|
|
location:'<%-BASE_URL%>dgrid'
|
|
},
|
|
{
|
|
name:'xnode',
|
|
location:'<%-BASE_URL%>xnode'
|
|
},
|
|
{
|
|
name:'xcf',
|
|
location:'<%-BASE_URL%>xcf'
|
|
},
|
|
{
|
|
name:'dstore',
|
|
location:'<%-BASE_URL%>dstore'
|
|
},
|
|
{
|
|
name:'xaction',
|
|
location:'<%-BASE_URL%>xaction/src'
|
|
},
|
|
{
|
|
name:'xlang',
|
|
location:'<%-BASE_URL%>xlang'
|
|
},
|
|
{
|
|
name:'xlog',
|
|
location:'<%-BASE_URL%>xlog'
|
|
},
|
|
{
|
|
name:'system_drivers',
|
|
location:'<%-VFS_URL%>system_drivers/'
|
|
},
|
|
{
|
|
name:'user_drivers',
|
|
location:'<%-VFS_URL%>user_drivers/'
|
|
},
|
|
{
|
|
name:'nxapp',
|
|
location:'<%-BASE_URL%>/../../../../server/nodejs/nxapp/'
|
|
},
|
|
{
|
|
name:'workspace',
|
|
location:'<%-VFS_URL%>workspace_user/'
|
|
},
|
|
{
|
|
name:'workspace_user',
|
|
location:'<%-VFS_URL%>workspace_user/'
|
|
},
|
|
{
|
|
name:'custom',
|
|
location:'<%-VFS_URL%>workspace_user/lib/custom/'
|
|
}
|
|
|
|
]
|
|
});
|
|
require({
|
|
map:{
|
|
'*':{
|
|
'delite/Container':'../xibm/delite/Container',
|
|
'deliteful/Button':'xdeliteful/Button'
|
|
}
|
|
}
|
|
});
|
|
|
|
// base dependencies needed for VE
|
|
require([
|
|
"dcl/dcl",
|
|
"delite/register",
|
|
"xblox/RunScript",
|
|
"xblox/CSSState",
|
|
"xblox/StyleState",
|
|
"deliteful/Button",
|
|
"deliteful/Slider",
|
|
"deliteful/Combobox",
|
|
"deliteful/Checkbox",
|
|
"deliteful/RadioButton",
|
|
"deliteful/ToggleButton",
|
|
"deliteful/Panel",
|
|
"dojo/dom",
|
|
'dojo/query',
|
|
'dojo/dom-construct',
|
|
'dojo/dom-style',
|
|
'dojo/dom-attr',
|
|
'dojo/_base/html',
|
|
'dojo/Deferred',
|
|
'dojo/_base/lang',
|
|
'xdojo/declare',
|
|
'dojox/html/_base',
|
|
"xide/types/Types",
|
|
"xcf/types/Types",
|
|
"xide/factory/Clients",
|
|
"xide/debug",
|
|
"delite/theme!delite/themes/<%-THEME%>/global.css",
|
|
"requirejs-dplugins/css!Font-Awesome/css/font-awesome.css"
|
|
]);
|
|
</script>
|
|
|
|
<style></style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
/**
|
|
* The document settings
|
|
*/
|
|
var xideveSettings={
|
|
item:{
|
|
path:"<%-FILE%>",
|
|
mount:"<%-MOUNT%>"
|
|
},
|
|
xbloxScripts:[],
|
|
rpcUrl:'<%-RPC_URL%>',
|
|
xFileConfig:{
|
|
RPC_PARAMS: {
|
|
rpcUserField: 'user',
|
|
rpcUserValue: 'e741198e1842408aa660459240d430a6',
|
|
rpcSignatureField: 'sig',
|
|
rpcSignatureToken: 'd39f3441e0f0cbe990c520f897bc84d7',
|
|
rpcFixedParams: {}
|
|
}
|
|
},
|
|
mixins:[
|
|
{
|
|
"declaredClass":'xcf.manager.DriverManager',
|
|
"mixin":{
|
|
"_prefetch":{
|
|
"system_drivers":'%XCF_SYSTEM_DRIVERS%',
|
|
"user_drivers":'%XCF_USER_DRIVERS%'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"declaredClass":'xcf.manager.DeviceManager',
|
|
"mixin":{
|
|
"_prefetch":{
|
|
"system_devices":'%XCF_SYSTEM_DEVICES%',
|
|
"user_devices":'%XCF_USER_DEVICES%'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
declaredClass:'xide.manager.ServerActionBase',
|
|
mixin:{
|
|
serviceUrl:'<%-RPC_URL%>',
|
|
singleton:true
|
|
}
|
|
},
|
|
{
|
|
declaredClass:'xide.manager.ResourceManager',
|
|
mixin: {
|
|
serviceUrl: '<%-RPC_URL%>',
|
|
singleton: true,
|
|
resourceVariables: {
|
|
'VFS_CONFIG':<%-VFS_VARS%>,
|
|
'USER_DIRECTORY':'<%-USER_DIRECTORY%>',
|
|
'VFS_GET_URL':'%VFS_GET_URL%'
|
|
|
|
}
|
|
}
|
|
}
|
|
]
|
|
};
|
|
var appContext = null;
|
|
var runBlox = function(path,id,context,settings){
|
|
appContext.application.runBlox(path,id,context,settings);
|
|
};
|
|
var runx = function(ctx,expression,args){
|
|
var _function = new Function("{" +expression+"; }");
|
|
return _function.call(ctx,args);
|
|
};
|
|
|
|
var runExpression =function(expression,context,args){
|
|
var _function = new Function("{" + expression + "}");
|
|
return _function.apply(context || this, args || {});
|
|
};
|
|
|
|
/**
|
|
* This will resolve the master Dfd
|
|
* @param dfd
|
|
* @param bootStrapper
|
|
* @param context
|
|
* @param settings
|
|
*/
|
|
var startx = function (dfd, bootStrapper, context, settings) {
|
|
console.log('Checkpoint 6. all dependencies loaded');
|
|
appContext = context;
|
|
dfd.resolve({
|
|
bootstrap: bootStrapper,
|
|
context: context,
|
|
settings: settings
|
|
});
|
|
context.init(settings);
|
|
};
|
|
|
|
/**
|
|
* Called usually by the IDE, when resolved
|
|
* @param settings
|
|
* @returns {module:dojo/Deferred}
|
|
*/
|
|
function bootx(settings,Deferred) {
|
|
|
|
console.log('Checkpoint 2. bootx');
|
|
var headDfd = new Deferred();
|
|
require(['xapp/boot','xide/utils'], function (boot,utils) {
|
|
var bootStrap = new boot();
|
|
console.log('Checkpoint 3. xapp/boot ready');
|
|
bootStrap.load().then(function () {
|
|
console.log(' Checkpoint 3.1 xapp/boot load()');
|
|
utils.mixin(settings,xideveSettings);
|
|
bootStrap.start(settings).then(function (ctx) {
|
|
console.log(' Checkpoint 5.2 xapp/boot start',xideveSettings);
|
|
if(xideveSettings.item && xideveSettings.item.path){
|
|
document.title = utils.pathinfo(xideveSettings.item.path).basename;
|
|
}
|
|
startx(headDfd, bootStrap, ctx, xideveSettings);
|
|
if(window.__parent){
|
|
console.error('tell parent');
|
|
window.__parent.ready(ctx);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
return headDfd;
|
|
}
|
|
|
|
require(["requirejs-domready/domReady","requirejs-dplugins/has"], function (ready,has) {
|
|
console.log('Checkpoint 1. domReady');
|
|
has.add('debug', function () {
|
|
return true;
|
|
});
|
|
$('body').addClass('bodyPreview');
|
|
require([
|
|
"dcl/dcl",
|
|
"delite/register",
|
|
"requirejs-dplugins/has",
|
|
"dojo/has",
|
|
"dojo/Deferred",
|
|
"xide/registry",
|
|
"xblox/RunScript",
|
|
"xblox/CSSState",
|
|
"xblox/StyleState",
|
|
"deliteful/Button",
|
|
"deliteful/Slider",
|
|
"deliteful/Combobox",
|
|
"deliteful/Select",
|
|
"deliteful/Checkbox",
|
|
"deliteful/RadioButton",
|
|
"deliteful/Switch",
|
|
"deliteful/ToggleButton",
|
|
"deliteful/ViewStack",
|
|
"xdeliteful/TabBar",
|
|
"xdeliteful/MediaPlayer",
|
|
"xdeliteful/Script",
|
|
"deliteful/Accordion",
|
|
"deliteful/Panel",
|
|
"deliteful/LinearLayout",
|
|
"xide/types/Types",
|
|
"xcf/types/Types",
|
|
"xblox/component"
|
|
|
|
], function (dcl,register,has,dHas,Deferred) {
|
|
|
|
|
|
has.add('use-dcl', function () {
|
|
return true;
|
|
});
|
|
has.add('php', function () {
|
|
return true;
|
|
});
|
|
dHas.add('php', function () {
|
|
return true;
|
|
});
|
|
|
|
dHas.add('drivers', function () {
|
|
return true;
|
|
});
|
|
dHas.add('devices', function () {
|
|
return true;
|
|
});
|
|
|
|
dHas.add('use-dcl', function () {
|
|
return true;
|
|
});
|
|
|
|
dHas.add('ide', function () {
|
|
return false;
|
|
});
|
|
|
|
has.add('ide', function () {
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
dHas.add('debug', function () {
|
|
return true;
|
|
});
|
|
|
|
bootx({
|
|
delegate:null
|
|
},Deferred);
|
|
});
|
|
});
|
|
|
|
</script>
|
|
|