mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Fix #1732 inconsistent 'target' attribute in popup menus
This commit is contained in:
parent
865e83a46a
commit
856f2af743
5 changed files with 22 additions and 19 deletions
|
|
@ -215,20 +215,23 @@
|
|||
var classText = 'class="' + (classname ? classname : (act ? (act + ' ') : ''));
|
||||
var styleText = "";
|
||||
var click_str = "";
|
||||
var matches = [];
|
||||
/* if(icon) styleText = " style=\"background-image:url('"+icon+"')\" "; */
|
||||
switch(target) {
|
||||
case "popup" :
|
||||
click_str = 'onclick="popopen(this.href, \''+target+'\'); return false;"';
|
||||
classText += 'popup ';
|
||||
break;
|
||||
case "javascript" :
|
||||
click_str = 'onclick="'+url+'; return false; "';
|
||||
classText += 'script ';
|
||||
url='#';
|
||||
break;
|
||||
default :
|
||||
click_str = 'target="_blank"';
|
||||
break;
|
||||
if (target === 'popup') {
|
||||
click_str = 'onclick="popopen(this.href, \''+target+'\'); return false;"';
|
||||
classText += 'popup ';
|
||||
} else if (target === 'javascript') {
|
||||
click_str = 'onclick="'+url+'; return false; "';
|
||||
classText += 'javascript ';
|
||||
url = '#';
|
||||
} else if (target.match(/^_(self|blank|parent|top)$/)) {
|
||||
click_str = 'target="' + target + '"';
|
||||
classText += 'frame_' + target + ' ';
|
||||
} else if (matches = target.match(/^i?frame:([a-zA-Z0-9_]+)$/)) {
|
||||
click_str = 'target="' + matches[1] + '"';
|
||||
classText += 'frame_' + matches[1] + ' ';
|
||||
} else {
|
||||
click_str = 'target="_blank"';
|
||||
}
|
||||
classText = classText.trim() + '" ';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue