|
|
|
|
(function(exports){
var AppEvent = {
id: "AppEventPromotionWrap",
init: function(){
if(this.getEl()){
window.albumViewer = function(){}
}
this.initEvent();
},
getEl: function(){
return this._el = this._el || daum.$(this.id);
},
initEvent: function(){
var handler = function(evt){
daum.Event.stopEvent(evt);
if(CAFEAPP.CAFE_ENCRYPT_LOGIN_USERID == ""){
alert("이벤트에 참여하기 위해서 먼저 로그인 하셔야 합니다.");
var reffer = "http://cafe.daum.net/enka6300/D7cf/21852";
top.location.href = "http://login.daum.net/accounts/loginform.do?url="+encodeURIComponent(reffer)+"&category=cafe&t__nil_navi=login";
return;
}
var targetEl = daum.Event.getElement(evt);
this.showLayer(targetEl.href);
}.bindAsEventListener(this);
daum.$$("a.app_event", this.getEl()).each(function(el){
daum.Event.addEvent(el, "click", handler);
});
},
showLayer: function(url){
daum.$("appEventLayer").src = url;
daum.cafe.widget.Blinder.show("appEventLayer", null, null, true);
},
hideLayer: function(){
daum.cafe.widget.Blinder.hide("appEventLayer");
daum.$("appEventLayer").src = "";
}
}
AppEvent.init();
exports.closeAppEventLayer = function(){
AppEvent.hideLayer();
}
})(window);
|
|
|
|
| |
댓글 19