|
|
@ -43,11 +43,10 @@ BI.Navigation = BI.inherit(BI.Widget, { |
|
|
|
return self.showIndex + v; |
|
|
|
return self.showIndex + v; |
|
|
|
}, |
|
|
|
}, |
|
|
|
cardCreator: function (v) { |
|
|
|
cardCreator: function (v) { |
|
|
|
BI.Widget.pushContext(self); |
|
|
|
BI.Widget.execWithContext(self, function () { |
|
|
|
var card = o.cardCreator(v); |
|
|
|
self.cardMap[v] = o.cardCreator(v); |
|
|
|
BI.Widget.popContext(); |
|
|
|
}); |
|
|
|
self.cardMap[v] = card; |
|
|
|
return self.cardMap[v]; |
|
|
|
return card; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
afterCardCreated: BI.bind(this.afterCardCreated, this), |
|
|
|
afterCardCreated: BI.bind(this.afterCardCreated, this), |
|
|
|
afterCardShow: BI.bind(this.afterCardShow, this), |
|
|
|
afterCardShow: BI.bind(this.afterCardShow, this), |
|
|
@ -104,12 +103,12 @@ BI.Navigation = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_assertCard: function (v) { |
|
|
|
_assertCard: function (v) { |
|
|
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
if (!this.layout.isCardExisted(v)) { |
|
|
|
if (!this.layout.isCardExisted(v)) { |
|
|
|
BI.Widget.pushContext(this); |
|
|
|
BI.Widget.execWithContext(self, function () { |
|
|
|
var card = this.options.cardCreator(v); |
|
|
|
self.cardMap[v] = o.cardCreator(v); |
|
|
|
BI.Widget.popContext(); |
|
|
|
}); |
|
|
|
this.cardMap[v] = card; |
|
|
|
this.layout.addCardByName(v, this.cardMap[v]); |
|
|
|
this.layout.addCardByName(v, card); |
|
|
|
|
|
|
|
this.afterCardCreated(v); |
|
|
|
this.afterCardCreated(v); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|