test loading icon

This commit is contained in:
sanj 2011-01-11 22:37:10 +05:30
parent d106ad3371
commit 085a68073e

View File

@ -656,10 +656,10 @@ BEGIN mainPanel
'previewBox': function() {
var id = 'previewBox';
var c = app.$ui[id] = new Ox.Element({
var c = app.$ui[id] = new Ox.ItfPreview({
id: id
});
c.html("previews here");
c.$content.html("previews here");
return c;
},
@ -855,23 +855,28 @@ Ox.ItfList = function(options, self) {
var self = self || {};
var that = new Ox.TextList(options, self);
that.bindEvent("select", function(e, data) {
app.$ui.previewBox.$loading.start();
// debugger;
app.api.preview({
model: options.model,
module: options.module,
id: data.ids[0]
}, function(response) {
// alert(JSON.stringify(response.data.data));
app.$ui.previewBox.$loading.stop();
var html = $.tmpl(response['template'], response['data']);
app.$ui.previewBox.html(html);
app.$ui.previewBox.$content.html(html);
});
});
that.bindEvent("open", function(e, data) {
// alert(JSON.stringify(data));
app.$ui.previewBox.$loading.start();
app.api.info({
model: options.model,
module: options.module,
id: data.ids[0]
}, function(response) {
app.$ui.previewBox.$loading.stop();
var html = $.tmpl(response['template'], response['data']);
// alert(html);
var d = new Ox.Dialog({
@ -904,6 +909,13 @@ Ox.ItfCalendar = function(options, self) {
return that;
}
Ox.ItfPreview = function(options, self) {
var self = self || {};
var that = new Ox.Element(options, self);
that.$content = new Ox.Element().appendTo(that);
that.$loading = new Ox.LoadingIcon().appendTo(that);
return that;
}
ITF.templates = {};