@ -8,7 +8,9 @@ var sankoreLang = {
reload : "Recharger" ,
slate : "Bois" ,
pad : "Pad" ,
none : "Aucun"
none : "Aucun" ,
help : "Aide" ,
help _content : "Ceci est un exemple de contenu de l'aide ..."
} ;
//main function
@ -18,6 +20,8 @@ function start(){
$ ( "#wgt_edit" ) . text ( sankoreLang . edit ) ;
$ ( "#wgt_name" ) . text ( sankoreLang . wgt _name ) ;
$ ( "#wgt_reload" ) . text ( sankoreLang . reload ) ;
$ ( "#wgt_help" ) . text ( sankoreLang . help ) ;
$ ( "#help" ) . html ( sankoreLang . help _content ) ;
$ ( ".style_select option[value='1']" ) . text ( sankoreLang . slate ) ;
$ ( ".style_select option[value='2']" ) . text ( sankoreLang . pad ) ;
$ ( ".style_select option[value='3']" ) . text ( sankoreLang . none ) ;
@ -46,6 +50,21 @@ function start(){
}
}
$ ( "#wgt_help" ) . click ( function ( ) {
var tmp = $ ( this ) ;
if ( $ ( this ) . hasClass ( "open" ) ) {
$ ( "#help" ) . slideUp ( "100" , function ( ) {
tmp . removeClass ( "open" ) ;
$ ( "#data" ) . show ( ) ;
} ) ;
} else {
$ ( "#data" ) . hide ( ) ;
$ ( "#help" ) . slideDown ( "100" , function ( ) {
tmp . addClass ( "open" ) ;
} ) ;
}
} ) ;
$ ( "#wgt_reload" ) . click ( function ( ) {
if ( $ ( "#wgt_display" ) . hasClass ( "selected" ) ) {
$ ( "#wgt_edit" ) . trigger ( "click" ) ;
@ -382,7 +401,7 @@ function importData(data){
for ( var j in data [ i ] . imgs ) {
var img _block = $ ( "<div class='img_block img_gray' style='text-align: center;'>" ) ;
var img = $ ( "<img src='../../" + data [ i ] . imgs [ j ] . link + "' style='display: inline;'>" ) ;
img . height ( data [ i ] . imgs [ j ] . ht ) . width ( data [ i ] . imgs [ j ] . wd ) ;
img . height ( data [ i ] . imgs [ j ] . ht ) ;
if ( ( 120 - data [ i ] . imgs [ j ] . ht ) > 0 )
img . css ( "margin" , ( 120 - data [ i ] . imgs [ j ] . ht ) / 2 + "px 0" ) ;
var hidden _input = $ ( "<input type='hidden'>" ) . val ( data [ i ] . imgs [ j ] . value ) ;
@ -473,7 +492,7 @@ function importData(data){
for ( j in data [ i ] . imgs ) {
img _block = $ ( "<div class='img_block img_gray' style='text-align: center;'>" ) ;
img = $ ( "<img src='../../" + data [ i ] . imgs [ j ] . link + "' style='display: inline;'>" ) ;
img . height ( data [ i ] . imgs [ j ] . ht ) . width ( data [ i ] . imgs [ j ] . wd ) ;
img . height ( data [ i ] . imgs [ j ] . ht ) ;
if ( ( 120 - data [ i ] . imgs [ j ] . ht ) > 0 )
img . css ( "margin" , ( 120 - data [ i ] . imgs [ j ] . ht ) / 2 + "px 0" ) ;
hidden _input = $ ( "<input type='hidden'>" ) . val ( data [ i ] . imgs [ j ] . value ) ;
@ -741,6 +760,7 @@ function changeStyle(val){
$ ( ".b_bottom_left" ) . removeClass ( "bbl_pad" ) . removeClass ( "without_back" ) ;
$ ( ".b_bottom_center" ) . removeClass ( "bbc_pad" ) . removeClass ( "without_back" ) ;
$ ( "#wgt_reload" ) . removeClass ( "pad_color" ) . removeClass ( "pad_reload" ) ;
$ ( "#wgt_help" ) . removeClass ( "pad_color" ) . removeClass ( "pad_help" ) ;
$ ( "#wgt_edit" ) . removeClass ( "pad_color" ) . removeClass ( "pad_edit" ) ;
$ ( "#wgt_display" ) . removeClass ( "pad_color" ) . removeClass ( "pad_edit" ) ;
$ ( "#wgt_name" ) . removeClass ( "pad_color" ) ;
@ -757,6 +777,7 @@ function changeStyle(val){
$ ( ".b_bottom_left" ) . addClass ( "bbl_pad" ) . removeClass ( "without_back" ) ;
$ ( ".b_bottom_center" ) . addClass ( "bbc_pad" ) . removeClass ( "without_back" ) ;
$ ( "#wgt_reload" ) . addClass ( "pad_color" ) . addClass ( "pad_reload" ) ;
$ ( "#wgt_help" ) . addClass ( "pad_color" ) . addClass ( "pad_help" ) ;
$ ( "#wgt_edit" ) . addClass ( "pad_color" ) . addClass ( "pad_edit" ) ;
$ ( "#wgt_display" ) . addClass ( "pad_color" ) . addClass ( "pad_edit" ) ;
$ ( "#wgt_name" ) . addClass ( "pad_color" ) ;
@ -772,6 +793,7 @@ function changeStyle(val){
$ ( ".b_bottom_right" ) . addClass ( "without_back" ) . removeClass ( "bbr_pad" ) ;
$ ( ".b_bottom_left" ) . addClass ( "without_back" ) . removeClass ( "bbl_pad" ) ;
$ ( ".b_bottom_center" ) . addClass ( "without_back" ) . removeClass ( "bbc_pad" ) ;
$ ( "#wgt_help" ) . addClass ( "pad_color" ) . addClass ( "pad_help" ) ;
$ ( "#wgt_reload" ) . addClass ( "pad_color" ) . addClass ( "pad_reload" ) ;
$ ( "#wgt_edit" ) . addClass ( "pad_color" ) . addClass ( "pad_edit" ) ;
$ ( "#wgt_display" ) . addClass ( "pad_color" ) . addClass ( "pad_edit" ) ;