Commit e8ce957c authored by unknown's avatar unknown

some opgrades of interactivities

parent e4c2afe6
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1"
width="700"
height="400"
ub:resizable="false">
<name>Choisir</name>
<author href="http://www.getuniboard.com"
email="info@mnemis.com">Mnemis SA</author>
<description>Choisir widget</description>
<content src="index.html"/>
</widget>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/basic.css"/>
<script type="text/javascript" src="scripts/jquery-1.6.2.min.js"></script>
<script src="scripts/jquery.disable.text.select.js" type="text/javascript"></script>
<script src="scripts/languages.js" type="text/javascript"></script>
<script type="text/javascript" src="scripts/blackYellow.js"></script>
<script type="text/javascript">
$(document).ready(function(){
init();
});
</script>
</head>
<body>
</body>
</html>
/**
* .disableTextSelect - Disable Text Select Plugin
*
* Version: 1.1
* Updated: 2007-11-28
*
* Used to stop users from selecting text
*
* Copyright (c) 2007 James Dempster (letssurf@gmail.com, http://www.jdempster.com/category/jquery/disabletextselect/)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
**/
/**
* Requirements:
* - jQuery (John Resig, http://www.jquery.com/)
**/
(function($) {
if ($.browser.mozilla) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : 'none'
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : ''
});
});
};
} else if ($.browser.msie) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('selectstart.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('selectstart.disableTextSelect');
});
};
} else {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('mousedown.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('mousedown.disableTextSelect');
});
};
}
})(jQuery);
\ No newline at end of file
var sankoreLang = {
"en":{
"edit": "Edit",
"display":"Display",
"add":"Add",
"enter_data":"Enter data:",
"enter_result":"Enter result:",
"ok":"Ok",
"cancel":"Cancel"
},
"ru":{
"edit": "Изменить",
"display":"Показать",
"add":"Добавить",
"enter_data":"Введите вопрос:",
"enter_result":"Введите ответ:",
"ok":"Ок",
"cancel":"Отмена"
},
"fr":{
"edit": "Modifier",
"display":"Afficher",
"add":"Ajouter",
"enter_data":"Entrer les données:",
"enter_result":"Entrez le résultat:",
"ok":"Ok",
"cancel":"Annuler"
}
};
...@@ -208,7 +208,7 @@ function modeEdit() ...@@ -208,7 +208,7 @@ function modeEdit()
// if no sankore api, insert ok button // if no sankore api, insert ok button
if( !isSankore ) if( !isSankore )
{ {
$( "#mp_setup" ).empty().append( '<input type="button" value="OK">' ); $( "#mp_setup" ).empty().append( '<input type="button" value="View">' );
$( "#mp_setup input:button" ).click( function(){ $( "#mp_setup input:button" ).click( function(){
modeView(); modeView();
}); });
......
...@@ -236,7 +236,7 @@ function modeEdit() ...@@ -236,7 +236,7 @@ function modeEdit()
// if no sankore api, insert ok button // if no sankore api, insert ok button
if( !isSankore ) if( !isSankore )
{ {
$( "#mp_setup" ).empty().append( '<input type="button" value="OK">' ); $( "#mp_setup" ).empty().append( '<input type="button" value="View">' );
$( "#mp_setup input:button" ).click( function(){ $( "#mp_setup input:button" ).click( function(){
modeView(); modeView();
}); });
...@@ -249,9 +249,11 @@ $(window).mouseout(function(){ ...@@ -249,9 +249,11 @@ $(window).mouseout(function(){
if(window.sankore){ if(window.sankore){
var str = ""; var str = "";
$( "#mp_word .letter" ).each( function(){ $( "#mp_word .letter" ).each( function(){
str += $(this).text(); str += $(this).text() + "*";
}); });
str = str.substr(0, str.length - 1);
sankore.setPreference("currentOrdWords", str); sankore.setPreference("currentOrdWords", str);
sankore.setPreference("rightOrdWords", word); sankore.setPreference("rightOrdWords", word);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment