Skip to content
Permalink
Browse files

Replace $.global with Globalize, update Spinner to use it. Related de…

…mos currently broken due to previous changes.
  • Loading branch information
jzaefferer committed Aug 10, 2011
1 parent bb79b41 commit 56e9cd71190a65c73023d6a631f7fd37c40f4167
@@ -6,9 +6,9 @@
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script src="../../external/jquery.global.js"></script>
<script src="../../external/jquery.global.de-DE.js"></script>
<script src="../../external/jquery.global.ja-JP.js"></script>
<script src="../../external/globalize.js"></script>
<script src="../../external/globalize.culture.de-DE.js"></script>
<script src="../../external/globalize.culture.ja-JP.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -18,7 +18,7 @@
$(function() {
$( "#currency" ).change(function() {
var current = $( "#spinner" ).spinner( "value" );
$.global.preferCulture( $(this).val() );
Globalize.culture( $(this).val() );
$( "#spinner" ).spinner( "value", current );
});

@@ -28,7 +28,7 @@
step: 25,
start: 1000,
numberFormat: "C"
});
});
});
</script>
</head>
@@ -42,7 +42,7 @@
<option value="en-US">US $</option>
<option value="de-DE">EUR €</option>
<option value="ja-JP">YEN ¥</option>
</select>
</select>
</p>
<p>
<label for="spinner">Amount to donate:</label>
@@ -6,9 +6,9 @@
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script src="../../external/jquery.global.js"></script>
<script src="../../external/jquery.global.de-DE.js"></script>
<script src="../../external/jquery.global.ja-JP.js"></script>
<script src="../../external/globalize.js"></script>
<script src="../../external/globalize.culture.de-DE.js"></script>
<script src="../../external/globalize.culture.ja-JP.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -19,11 +19,11 @@
$( "#spinner" ).spinner({
step: 0.01,
numberFormat: "n"
});
});

$( "#culture" ).change(function() {
var current = $( "#spinner" ).spinner( "value" );
$.global.preferCulture( $(this).val() );
Globalize.culture( $(this).val() );
$( "#spinner" ).spinner( "value", current );
});
});
@@ -6,8 +6,8 @@
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script src="../../external/jquery.global.js"></script>
<script src="../../external/jquery.global.de-DE.js"></script>
<script src="../../external/globalize.js"></script>
<script src="../../external/globalize.culture.de-DE.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -24,13 +24,13 @@

_parse: function( value ) {
if ( typeof value === "string" ) {
return +$.global.parseDate( value );
return +Globalize.parseDate( value );
}
return value;
},

_format: function() {
this.element.val( $.global.format( new Date(this.options.value), "t" ) );
this.element.val( Globalize.format( new Date(this.options.value), "t" ) );
}
});

@@ -39,7 +39,7 @@

$( "#culture" ).change(function() {
var current = $( "#spinner" ).timespinner( "value" );
$.global.preferCulture( $(this).val() );
Globalize.culture( $(this).val() );
$( "#spinner" ).timespinner( "value", current );
});
});
@@ -0,0 +1,81 @@
/*
* Globalize Culture de-DE
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need to be fixed in the generator
*/

(function( window, undefined ) {

var Globalize;

if ( typeof require !== "undefined"
&& typeof exports !== "undefined"
&& typeof module !== "undefined" ) {
// Assume CommonJS
Globalize = require( "globalize" );
} else {
// Global variable
Globalize = window.Globalize;
}

Globalize.addCultureInfo( "de-DE", "default", {
name: "de-DE",
englishName: "German (Germany)",
nativeName: "Deutsch (Deutschland)",
language: "de",
numberFormat: {
",": ".",
".": ",",
NaN: "n. def.",
negativeInfinity: "-unendlich",
positiveInfinity: "+unendlich",
percent: {
pattern: ["-n%","n%"],
",": ".",
".": ","
},
currency: {
pattern: ["-n $","n $"],
",": ".",
".": ",",
symbol: "€"
}
},
calendars: {
standard: {
"/": ".",
firstDay: 1,
days: {
names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
},
months: {
names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
},
AM: null,
PM: null,
eras: [{"name":"n. Chr.","start":null,"offset":0}],
patterns: {
d: "dd.MM.yyyy",
D: "dddd, d. MMMM yyyy",
t: "HH:mm",
T: "HH:mm:ss",
f: "dddd, d. MMMM yyyy HH:mm",
F: "dddd, d. MMMM yyyy HH:mm:ss",
M: "dd MMMM",
Y: "MMMM yyyy"
}
}
}
});

}( this ));
@@ -0,0 +1,100 @@
/*
* Globalize Culture ja-JP
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need to be fixed in the generator
*/

(function( window, undefined ) {

var Globalize;

if ( typeof require !== "undefined"
&& typeof exports !== "undefined"
&& typeof module !== "undefined" ) {
// Assume CommonJS
Globalize = require( "globalize" );
} else {
// Global variable
Globalize = window.Globalize;
}

Globalize.addCultureInfo( "ja-JP", "default", {
name: "ja-JP",
englishName: "Japanese (Japan)",
nativeName: "日本語 (日本)",
language: "ja",
numberFormat: {
NaN: "NaN (非数値)",
negativeInfinity: "-∞",
positiveInfinity: "+∞",
percent: {
pattern: ["-n%","n%"]
},
currency: {
pattern: ["-$n","$n"],
decimals: 0,
symbol: "¥"
}
},
calendars: {
standard: {
days: {
names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
namesAbbr: ["日","月","火","水","木","金","土"],
namesShort: ["日","月","火","水","木","金","土"]
},
months: {
names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
},
AM: ["午前","午前","午前"],
PM: ["午後","午後","午後"],
eras: [{"name":"西暦","start":null,"offset":0}],
patterns: {
d: "yyyy/MM/dd",
D: "yyyy'年'M'月'd'日'",
t: "H:mm",
T: "H:mm:ss",
f: "yyyy'年'M'月'd'日' H:mm",
F: "yyyy'年'M'月'd'日' H:mm:ss",
M: "M'月'd'日'",
Y: "yyyy'年'M'月'"
}
},
Japanese: {
name: "Japanese",
days: {
names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
namesAbbr: ["日","月","火","水","木","金","土"],
namesShort: ["日","月","火","水","木","金","土"]
},
months: {
names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
},
AM: ["午前","午前","午前"],
PM: ["午後","午後","午後"],
eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
twoDigitYearMax: 99,
patterns: {
d: "gg y/M/d",
D: "gg y'年'M'月'd'日'",
t: "H:mm",
T: "H:mm:ss",
f: "gg y'年'M'月'd'日' H:mm",
F: "gg y'年'M'月'd'日' H:mm:ss",
M: "M'月'd'日'",
Y: "gg y'年'M'月'"
}
}
}
});

}( this ));

0 comments on commit 56e9cd7

Please sign in to comment.
You can’t perform that action at this time.