each box gets its own loading icon
This commit is contained in:
parent
085a68073e
commit
e685fb4ef4
|
@ -730,6 +730,7 @@ Ox.ItfBox = function(options, self) {
|
||||||
|
|
||||||
var $buttons = new Ox.Element().appendTo($title).css({'position': 'absolute', 'top': '1px', 'right': '1px'});
|
var $buttons = new Ox.Element().appendTo($title).css({'position': 'absolute', 'top': '1px', 'right': '1px'});
|
||||||
|
|
||||||
|
that.$loading = new Ox.LoadingIcon().appendTo($buttons);
|
||||||
var $infoBtn = new Ox.Button({
|
var $infoBtn = new Ox.Button({
|
||||||
id: options.id + "InfoBtn",
|
id: options.id + "InfoBtn",
|
||||||
style: 'symbold',
|
style: 'symbold',
|
||||||
|
@ -814,6 +815,7 @@ Ox.ItfBox = function(options, self) {
|
||||||
return app.api.find(getQueryParams(data), callback)
|
return app.api.find(getQueryParams(data), callback)
|
||||||
},
|
},
|
||||||
'id': options.id + 'List',
|
'id': options.id + 'List',
|
||||||
|
'boxId': options.id,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -855,7 +857,7 @@ 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();
|
app.$ui[options.boxId].$loading.start();
|
||||||
// debugger;
|
// debugger;
|
||||||
app.api.preview({
|
app.api.preview({
|
||||||
model: options.model,
|
model: options.model,
|
||||||
|
@ -863,20 +865,20 @@ Ox.ItfList = function(options, self) {
|
||||||
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();
|
app.$ui[options.boxId].$loading.stop();
|
||||||
var html = $.tmpl(response['template'], response['data']);
|
var html = $.tmpl(response['template'], response['data']);
|
||||||
app.$ui.previewBox.$content.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.$ui[options.boxId].$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();
|
app.$ui[options.boxId].$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({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user