some fixes ordre mots

preferencesAboutTextFull
unknown 13 years ago
parent 1347fd7dbc
commit ed81281946
  1. 12
      resources/library/interactivities/Ordre mots.wgt/locales/fr/scripts/template2.js
  2. 12
      resources/library/interactivities/Ordre mots.wgt/locales/ru/scripts/template2.js
  3. 11
      resources/library/interactivities/Ordre mots.wgt/scripts/template2.js
  4. 7
      resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css

@ -47,8 +47,6 @@ if(window.sankore){
word = sankoreLang.example; word = sankoreLang.example;
} }
var doCheckWord = true;
// array of dom elements // array of dom elements
var letters = []; var letters = [];
@ -67,11 +65,14 @@ var widget_padding = 0;
var min_view_width = 400; var min_view_width = 400;
$(document).ready(function(){ $(document).ready(function(){
if(window.sankore){
if(sankore.preference("ord_words_style","")){ if(sankore.preference("ord_words_style","")){
changeStyle(sankore.preference("ord_words_style","")); changeStyle(sankore.preference("ord_words_style",""));
$(".style_select").val(sankore.preference("ord_words_style","")); $(".style_select").val(sankore.preference("ord_words_style",""));
} else } else
changeStyle("3") changeStyle("3")
} else
changeStyle("3")
$("#wgt_display").text(sankoreLang.view); $("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_display, #wgt_edit").click(function(event){ $("#wgt_display, #wgt_edit").click(function(event){
@ -300,7 +301,7 @@ turns the widget into the view mode
function modeView() function modeView()
{ {
if( editMode ){ if( editMode ){
word = $( "#mp_word input:text" ).attr( "value" ); word = $( "#mp_word .wgt_cont" ).val();
} }
wgtState = false; wgtState = false;
@ -360,14 +361,15 @@ function modeEdit()
{ {
editMode = true; editMode = true;
wgtState = true; wgtState = true;
$( "#mp_word").css( "margin-left", 0 ).empty().append('<input value="'+word+'">'); $( "#mp_word").sortable( "destroy" );
$( "#mp_word").css( "margin-left", 0 ).empty().append('<textarea class="wgt_cont">'+word+'</textarea>');
} }
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val());
if($( "#mp_word input:text" ).attr( "value" )) if($( "#mp_word .wgt_cont" ).val())
{ {
modeView(); modeView();
var str = ""; var str = "";

@ -47,8 +47,6 @@ if(window.sankore){
word = sankoreLang.example; word = sankoreLang.example;
} }
var doCheckWord = true;
// array of dom elements // array of dom elements
var letters = []; var letters = [];
@ -67,11 +65,14 @@ var widget_padding = 0;
var min_view_width = 400; var min_view_width = 400;
$(document).ready(function(){ $(document).ready(function(){
if(window.sankore){
if(sankore.preference("ord_words_style","")){ if(sankore.preference("ord_words_style","")){
changeStyle(sankore.preference("ord_words_style","")); changeStyle(sankore.preference("ord_words_style",""));
$(".style_select").val(sankore.preference("ord_words_style","")); $(".style_select").val(sankore.preference("ord_words_style",""));
} else } else
changeStyle("3") changeStyle("3")
} else
changeStyle("3")
$("#wgt_display").text(sankoreLang.view); $("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_display, #wgt_edit").click(function(event){ $("#wgt_display, #wgt_edit").click(function(event){
@ -300,7 +301,7 @@ turns the widget into the view mode
function modeView() function modeView()
{ {
if( editMode ){ if( editMode ){
word = $( "#mp_word input:text" ).attr( "value" ); word = $( "#mp_word .wgt_cont" ).val();
} }
wgtState = false; wgtState = false;
@ -360,14 +361,15 @@ function modeEdit()
{ {
editMode = true; editMode = true;
wgtState = true; wgtState = true;
$( "#mp_word").css( "margin-left", 0 ).empty().append('<input value="'+word+'">'); $( "#mp_word").sortable( "destroy" );
$( "#mp_word").css( "margin-left", 0 ).empty().append('<textarea class="wgt_cont">'+word+'</textarea>');
} }
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val());
if($( "#mp_word input:text" ).attr( "value" )) if($( "#mp_word .wgt_cont" ).val())
{ {
modeView(); modeView();
var str = ""; var str = "";

@ -65,12 +65,14 @@ var widget_padding = 0;
var min_view_width = 400; var min_view_width = 400;
$(document).ready(function(){ $(document).ready(function(){
if(window.sankore) if(window.sankore){
if(sankore.preference("ord_words_style","")){ if(sankore.preference("ord_words_style","")){
changeStyle(sankore.preference("ord_words_style","")); changeStyle(sankore.preference("ord_words_style",""));
$(".style_select").val(sankore.preference("ord_words_style","")); $(".style_select").val(sankore.preference("ord_words_style",""));
} else } else
changeStyle("3") changeStyle("3")
} else
changeStyle("3")
$("#wgt_display").text(sankoreLang.view); $("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_display, #wgt_edit").click(function(event){ $("#wgt_display, #wgt_edit").click(function(event){
@ -299,7 +301,7 @@ turns the widget into the view mode
function modeView() function modeView()
{ {
if( editMode ){ if( editMode ){
word = $( "#mp_word input:text" ).attr( "value" ); word = $( "#mp_word .wgt_cont" ).val();
} }
wgtState = false; wgtState = false;
@ -359,14 +361,15 @@ function modeEdit()
{ {
editMode = true; editMode = true;
wgtState = true; wgtState = true;
$( "#mp_word").css( "margin-left", 0 ).empty().append('<input value="'+word+'">'); $( "#mp_word").sortable( "destroy" );
$( "#mp_word").css( "margin-left", 0 ).empty().append('<textarea class="wgt_cont">'+word+'</textarea>');
} }
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_words_style", $(".style_select").find("option:selected").val());
if($( "#mp_word input:text" ).attr( "value" )) if($( "#mp_word .wgt_cont" ).val())
{ {
modeView(); modeView();
var str = ""; var str = "";

@ -12,7 +12,7 @@ body{
.letter{ .letter{
min-width: 30px; min-width: 30px;
max-width: 500px; max-width: 600px;
height: 40px; height: 40px;
overflow: hidden; overflow: hidden;
border: solid 1px #ccc; border: solid 1px #ccc;
@ -43,11 +43,12 @@ body{
text-align: center; text-align: center;
} }
#mp_word input{ #mp_word .wgt_cont{
font: 32px tahoma; font: 32px tahoma;
letter-spacing: 0.1em; letter-spacing: 0.1em;
width: 98%; width: 98%;
overflow: auto; min-height: 200px;
resize: vertical;
} }
#mp_msg{ #mp_msg{

Loading…
Cancel
Save