mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
1. Add 'xGetElementById' function for compatibility.
2. Add a functionality to create popup window script automatically. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8481 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
26c3fce74f
commit
11815412dc
1 changed files with 20 additions and 0 deletions
|
|
@ -910,6 +910,10 @@ function ucfirst(str) {
|
|||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
function xGetElementById(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
$('.lang_code').each(
|
||||
function()
|
||||
|
|
@ -960,4 +964,20 @@ jQuery(function($){
|
|||
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Create popup windows automatically.
|
||||
* Find anchors that have the '_xe_popup' class, then add popup script to them.
|
||||
*/
|
||||
$('a._xe_popup').click(function(){
|
||||
var $this = $(this), name = $this.attr('name'), href = $this.attr('href'), win;
|
||||
|
||||
if(!name) name = '_xe_popup_'+Math.floor(Math.random()*1000);
|
||||
|
||||
win = window.open(href, name, 'left=10,top=10,width=10,hegiht=10,resizable=no,scrollbars=no,toolbars=no');
|
||||
if(win) win.focus();
|
||||
|
||||
// cancel default action
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue