Last active
April 10, 2016 15:34
-
-
Save amuhororo/2b34042e40f7e457c51856fe6946a91e to your computer and use it in GitHub Desktop.
[link]改造・・・。call対応にしてみるテスト。何でもできそうなリンクにしてみた。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tyrano.plugin.kag.tag.link={ | |
pm:{ | |
target:null, | |
storage:null, | |
name:"", | |
exp : "", | |
role : "", | |
call : "", | |
auto_next:"yes" | |
}, | |
start:function(pm){ | |
var that=this; | |
var j_span = this.kag.setMessageCurrentSpan(); | |
$.setName(j_span, pm.name); | |
//$(".message_inner").css("z-index","9999"); | |
j_span.css("cursor","pointer"); | |
(function(){ | |
var _target=pm.target; | |
var _storage=pm.storage; | |
that.kag.event.addEventElement({ | |
"tag":"link", | |
"j_target":j_span, | |
"pm":pm | |
}); | |
that.setEvent(j_span,pm) | |
})(); | |
this.kag.ftag.nextOrder() | |
}, | |
setEvent:function(j_span,pm){ | |
var that = TYRANO; | |
var _target=pm.target; | |
var _storage=pm.storage; | |
var _pm = pm; | |
var preexp = that.kag.embScript(pm.preexp); | |
j_span.bind("click",function(e){ | |
if (_pm.exp != "") { | |
that.kag.embScript(_pm.exp, preexp); | |
} | |
if(_pm.role != ""){ | |
if (that.kag.layer.layer_event.css("display") == "none") { | |
return false; | |
} | |
if (that.kag.stat.is_strong_stop == true) { | |
return false; | |
} | |
switch(_pm.role) { | |
case "comment": | |
that.kag.menu.showComent(); | |
break; | |
} | |
}else if(pm.call!=""){ | |
var stack_pm = that.kag.getStack("call"); //最新のコールスタックを取得 | |
if(stack_pm==null){ | |
if(that.kag.stat.is_strong_stop == true){ | |
_pm.auto_next = "stop"; | |
}else{ | |
} | |
that.kag.ftag.startTag("call", _pm); | |
}else{ | |
that.kag.log("callスタックが残っている場合、fixボタンは反応しません"); | |
that.kag.log(stack_pm); | |
return false; | |
} | |
} | |
else{ | |
TYRANO.kag.ftag.nextOrderWithLabel(_target,_storage); | |
TYRANO.kag.layer.showEventLayer() | |
} | |
}); | |
j_span.css("cursor","pointer") | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment