test loading icon
This commit is contained in:
parent
d106ad3371
commit
085a68073e
|
@ -656,10 +656,10 @@ BEGIN mainPanel
|
||||||
|
|
||||||
'previewBox': function() {
|
'previewBox': function() {
|
||||||
var id = 'previewBox';
|
var id = 'previewBox';
|
||||||
var c = app.$ui[id] = new Ox.Element({
|
var c = app.$ui[id] = new Ox.ItfPreview({
|
||||||
id: id
|
id: id
|
||||||
});
|
});
|
||||||
c.html("previews here");
|
c.$content.html("previews here");
|
||||||
return c;
|
return c;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -855,23 +855,28 @@ Ox.ItfList = function(options, self) {
|
||||||
var self = self || {};
|
var self = self || {};
|
||||||
var that = new Ox.TextList(options, self);
|
var that = new Ox.TextList(options, self);
|
||||||
that.bindEvent("select", function(e, data) {
|
that.bindEvent("select", function(e, data) {
|
||||||
|
app.$ui.previewBox.$loading.start();
|
||||||
|
// debugger;
|
||||||
app.api.preview({
|
app.api.preview({
|
||||||
model: options.model,
|
model: options.model,
|
||||||
module: options.module,
|
module: options.module,
|
||||||
id: data.ids[0]
|
id: data.ids[0]
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
// alert(JSON.stringify(response.data.data));
|
// alert(JSON.stringify(response.data.data));
|
||||||
|
app.$ui.previewBox.$loading.stop();
|
||||||
var html = $.tmpl(response['template'], response['data']);
|
var html = $.tmpl(response['template'], response['data']);
|
||||||
app.$ui.previewBox.html(html);
|
app.$ui.previewBox.$content.html(html);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
that.bindEvent("open", function(e, data) {
|
that.bindEvent("open", function(e, data) {
|
||||||
// alert(JSON.stringify(data));
|
// alert(JSON.stringify(data));
|
||||||
|
app.$ui.previewBox.$loading.start();
|
||||||
app.api.info({
|
app.api.info({
|
||||||
model: options.model,
|
model: options.model,
|
||||||
module: options.module,
|
module: options.module,
|
||||||
id: data.ids[0]
|
id: data.ids[0]
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
|
app.$ui.previewBox.$loading.stop();
|
||||||
var html = $.tmpl(response['template'], response['data']);
|
var html = $.tmpl(response['template'], response['data']);
|
||||||
// alert(html);
|
// alert(html);
|
||||||
var d = new Ox.Dialog({
|
var d = new Ox.Dialog({
|
||||||
|
@ -904,6 +909,13 @@ Ox.ItfCalendar = function(options, self) {
|
||||||
return that;
|
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 = {};
|
ITF.templates = {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user