install page: links to check the sound

This commit is contained in:
Evgeny Gryaznov 2011-02-27 01:54:27 +01:00
parent 40655b8a47
commit df590adf81
7 changed files with 78 additions and 26 deletions

View File

@ -787,6 +787,16 @@ table.awaiting td.visitor {
margin-left: 2em;
}
#check-nv, #check-nm {
color: #2f7599;
text-decoration: none;
}
#check-nv:hover, #check-nm:hover {
text-decoration: underline;
}
/* chat */
.message {

View File

@ -31,6 +31,7 @@ $page = array(
$page['done'] = array();
$page['nextstep'] = false;
$page['nextnotice'] = false;
$page['soundcheck'] = false;
$errors = array();
function check_webimroot()
@ -143,6 +144,16 @@ function check_columns($link)
return true;
}
function check_sound() {
global $page;
$page['soundcheck'] = true;
$page['done'][] = getlocal2("install.5.text", array(
"<a id='check-nv' href='javascript:void(0)'>".getlocal("install.5.newvisitor")."</a>",
"<a id='check-nm' href='javascript:void(0)'>".getlocal("install.5.newmessage")."</a>"
));
}
function check_status()
{
global $page, $webimroot, $settings, $dbversion;
@ -171,6 +182,8 @@ function check_status()
return;
}
check_sound();
$page['done'][] = getlocal("installed.message");
$page['nextstep'] = getlocal("installed.login_link");

View File

@ -0,0 +1 @@
pr.ir({'a#check-nv':function(vh){vh.onclick=function(){ys(wroot+'/sounds/new_user.wav');} ;} ,'a#check-nm':function(vh){vh.onclick=function(){ys(wroot+'/sounds/new_message.wav')} ;} } );

View File

@ -11,6 +11,7 @@
<arg value="${obfuscator.location}/chat.js"/>
<arg value="${obfuscator.location}/users.js"/>
<arg value="${obfuscator.location}/brws.js"/>
<arg value="${obfuscator.location}/soundcheck.js"/>
<arg value="d=${webim.location}"/>
<!-- <arg value="debug"/> -->
<!-- <arg value="debugnames"/> -->

View File

@ -0,0 +1,12 @@
Behaviour.register({
'a#check-nv' : function(el) {
el.onclick = function() {
playSound(wroot + '/sounds/new_user.wav');
};
},
'a#check-nm' : function(el) {
el.onclick = function() {
playSound(wroot + '/sounds/new_message.wav')
};
}
});

View File

@ -174,6 +174,9 @@ install.3.tables_exist=Requred tables are created.
install.4.create=Update tables
install.4.done=Tables structure is up to date.
install.4.notice=Structure of your tables should be adjusted for new version of Messenger.
install.5.text=Click to check the sound: {0} and {1}
install.5.newmessage=New Message
install.5.newvisitor=New Visitor
install.connection.error=Could not connect, please check server settings in config.php. Error: {0}
install.done=Completed:
install.err.back=Resvole problem and try again. Press <a>back</a> to return to wizard.

View File

@ -25,6 +25,18 @@ if(isset($page) && isset($page['localeLinks'])) {
$page['title'] = getlocal("install.title");
$page['fixedwrap'] = true;
function tpl_header() { global $page, $webimroot, $jsver;
if($page['soundcheck']) {
?>
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/<?php echo $jsver ?>/common.js"></script>
<script type="text/javascript" language="javascript"><!--
var wroot ="<?php echo $webimroot ?>";
//--></script>
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/<?php echo $jsver ?>/soundcheck.js"></script>
<?php
}
}
function tpl_content() { global $page, $webimroot, $errors;
?>
<?php echo getlocal("install.message") ?>