[Dojo-interest] Problems with Preloader in Custom Build dojo.js

5 views
Skip to first unread message

acebuddy

unread,
Feb 29, 2012, 10:26:09 AM2/29/12
to dojo-i...@mail.dojotoolkit.org
Recently, i add a preloader to show the company icon in my dojo.mobile
project.
It works fine with the CDN dojo.js
http://dojo-toolkit.33424.n3.nabble.com/file/n3787623/2012-02-29_231521.png
However if i use my custom build dojo.js .... it works like that
http://dojo-toolkit.33424.n3.nabble.com/file/n3787623/2012-02-29_231700.png

The preloader function is below :

var Preloader =
{
show : function() //Display the Content in the center of the
screen
{
var ps = dojo.position('preloaderContent');
var ws = dojo.window.getBox();
dojo.style("preloaderContent", "top" ,
(ws.h/2-ps.h/2)+"px");
dojo.style("preloaderContent", "left",
(ws.w/2-ps.w/2)+"px");
dojo.style("preloaderContent", "visibility" ,
"visible");
},

hide : function()
{
var hideAction = function() {
dojo.fadeOut(
{
node:"preloader",
duration:700,
onEnd: function() {
dojo.style("preloader", "display", "none");
}
}).play();
}
setTimeout(hideAction, 3000);
}
}

and my customer build include those modules

layers: [
{
name: "dojo.js",
customBase: true,
dependencies: [

"dojo",
"dojo._base.fx",
"dojo._base.html",
"dojo._base.url",
"dojo._base.xhr",
"dojo.data.ItemFileReadStore",
"dojo.date.stamp",
"dojo.data.util.filter",
"dojo.data.util.simpleFetch",
"dojo.data.util.sorter",
"dojo.store.util.QueryResults",
"dojo.store.util.SimpleQueryEngine",
"dojo.dom-geometry",
"dojo.dom-style",
"dojo.fx",
"dojo.parser",
"dojo.ready",
"dojo.regexp",
"dojo.selector.acme",
"dojo.store.Memory",
"dojo.string",
"dojo.window",

"dijit.main",
"dijit.registry",
"dijit._base.manager",
"dijit.form.DataList",
"dijit.form._AutoCompleterMixin",
"dijit.popup",
"dijit.form._FormValueMixin",
"dijit.form._TextBoxMixin",
"dijit.form._ButtonMixin",
"dijit.form._FormWidgetMixin",
"dijit.BackgroundIframe",
"dijit.a11y",
"dijit.form._ComboBoxMenuMixin",
"dijit.form.nls.ComboBox",
"dijit.form._ListBase",
"dijit.form.nls.zh.ComboBox",
"dijit.form.nls.zh-tw.ComboBox",
"dijit.place",

"dojox.mobile",
"dojox.mobile.parser",
"dojox.mobile.compat",
"dojox.mobile._compat",
"dojox.mobile.View",
"dojox.mobile._ListTouchMixin",
"dojox.mobile.scrollable",
"dojox.mobile.ScrollableView",
"dojox.mobile._ScrollableMixin",
"dojox.mobile.TabBar",
"dojox.mobile.TabBarButton",
"dojox.mobile.EdgeToEdgeDataList",
"dojox.mobile._DataListMixin",
"dojox.mobile.Button",
"dojox.mobile.TextBox",
"dojox.mobile.ComboBox",
"dojox.mobile.RoundRect",
"dojox.mobile.IconContainer",
"dojox.mobile.IconItem",
"dojox.mobile._ComboBoxMenu",
"dojox.fx",
"dojox.fx.flip",
"dojox.fx._base"
]
}
],

As i think i miss some modules that needs by dojo.position and
dojo.window.getBox() ?
Any idea ? because i need encapsulated it into the phonegap

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Problems-with-Preloader-in-Custom-Build-dojo-js-tp3787623p3787623.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Reply all
Reply to author
Forward
0 new messages