Issue 2107 remove mobile JS error on the mobile page, and adjust captcha window position on the mobile page.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10812 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2012-07-01 01:49:33 +00:00
parent fd51714310
commit 628542f474
3 changed files with 8 additions and 4 deletions

View file

@ -10,6 +10,8 @@
if(!class_exists('AddonCaptcha'))
{
// On the mobile mode, XE Core does not load jquery as normal.
Context::loadFile(array('./common/js/jquery.min.js','head', NULL,-100000),true);
class AddonCaptcha
{
var $addon_info;
@ -55,7 +57,7 @@
}
} else {
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
Context::loadFile(array('./addons/captcha/captcha.js', 'body', '', null), true);
Context::loadFile(array('./addons/captcha/captcha.min.js', 'body', '', null), true);
}
}
@ -287,7 +289,7 @@
$this->createKeyword();
$swfURL = getUrl().'addons/captcha/swf/play.swf';
Context::unloadFile('./addons/captcha/captcha.js');
Context::unloadFile('./addons/captcha/captcha.min.js');
Context::loadFile(array('./addons/captcha/inline_captcha.js','body'));
global $lang;

View file

@ -80,7 +80,9 @@ var calledArgs = null;
captchaXE = $('<div id="captcha_layer" style="position:fixed; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
var $div = $('<div style="z-index:1000;position:absolute; width:310px; margin:-105px 0 0 -105px; top:50%; left:50%; background:#fff; border:3px solid #ccc;">'+
var top_left = 'margin:-105px 0 0 -105px; top:50%; left:50%;';
if(screen.width<480) { top_left = ''; }
var $div = $('<div style="z-index:1000;position:absolute; width:310px;' + top_left + ' background:#fff; border:3px solid #ccc;">'+
'<form method="post" action="">'+
'<div style="position:relative; margin:25px 20px 15px 20px">'+
'<img src="about:blank" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="display:block; width:240px; height:50px; border:1px solid #b0b0b0" />'+

File diff suppressed because one or more lines are too long