Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/c6fc4ea7df8b
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:58:47 2012
Кодировка:
allpy: c6fc4ea7df8b

allpy

changeset 878:c6fc4ea7df8b

fix blocks3d/www: add changes forgotten while migrating to Makefile * json-adaptor with self-written function json * download utf8_encode.js, needed by original crc32
author Boris Nagaev <bnagaev@gmail.com>
date Thu, 15 Sep 2011 17:44:53 +0400
parents 353904909f79
children 9687ae44486a
files blocks3d/www/Makefile blocks3d/www/input/index.txt blocks3d/www/input/json-adaptor.js
diffstat 3 files changed, 22 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/blocks3d/www/Makefile	Thu Sep 15 16:27:07 2011 +0400
     1.2 +++ b/blocks3d/www/Makefile	Thu Sep 15 17:44:53 2011 +0400
     1.3 @@ -1,4 +1,4 @@
     1.4 -build: input/conservative_groups.js input/crc32.js input/dechex.js input/json2.js
     1.5 +build: input/conservative_groups.js input/crc32.js input/utf8_encode.js input/dechex.js input/json2.js
     1.6  	mkdir -p output
     1.7  	r2w
     1.8  
     1.9 @@ -14,6 +14,10 @@
    1.10  	wget -O $@ \
    1.11  		http://github.com/kvz/phpjs/raw/master/functions/strings/crc32.js
    1.12  
    1.13 +input/utf8_encode.js:
    1.14 +	wget -O $@ \
    1.15 +		https://raw.github.com/kvz/phpjs/master/functions/xml/utf8_encode.js
    1.16 +
    1.17  input/dechex.js:
    1.18  	wget -O $@ \
    1.19  		https://raw.github.com/kvz/phpjs/master/functions/math/dechex.js
     2.1 --- a/blocks3d/www/input/index.txt	Thu Sep 15 16:27:07 2011 +0400
     2.2 +++ b/blocks3d/www/input/index.txt	Thu Sep 15 17:44:53 2011 +0400
     2.3 @@ -51,8 +51,10 @@
     2.4  
     2.5  {include_minified;/usr/share/javascript/jquery/jquery.min.js}
     2.6  {include_minified;json2.js}
     2.7 +{include_minified;json-adaptor.js}
     2.8  {include_minified;crc32_color.js}
     2.9  {include_minified;crc32.js}
    2.10 +{include_minified;utf8_encode.js}
    2.11  {include_minified;dechex.js}
    2.12  {include_minified;conservative_groups.js}
    2.13  {include_minified;blocks.js}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/blocks3d/www/input/json-adaptor.js	Thu Sep 15 17:44:53 2011 +0400
     3.3 @@ -0,0 +1,15 @@
     3.4 +// JSON
     3.5 +function json(obj7)
     3.6 +{
     3.7 +    if (typeof(obj7) == 'string')
     3.8 +    {
     3.9 +        // decode
    3.10 +        return JSON.parse(obj7);
    3.11 +    }
    3.12 +    else
    3.13 +    {
    3.14 +        // encode
    3.15 +        return JSON.stringify(obj7);
    3.16 +    }
    3.17 +}
    3.18 +