using a helper object works, as object properties cannot be accesses

before the object has been initialized.
This commit is contained in:
Manuel Friedli 2014-06-26 08:08:06 +02:00
parent 0d90b3dd76
commit 10c07a05cf
2 changed files with 22 additions and 17 deletions

View File

@ -12,10 +12,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var helper = {
"es_isch": {1:[1,2,4,5,6,7]}
};
var layout = {
"version": 2,
"helper": {1:[1,2,4,5,6,7]},
"language": 'Bärndütsch (test)',
"permanent": this.helper,
"permanent": helper.es_isch,
};
helper = undefined;
window._uhr.languages['de_CH_TEST'] = layout;

View File

@ -12,8 +12,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var layout = {
"version": 2,
var h = {
"_es_isch": {1:[1,2,4,5,6,7]},
"_genau": {3:[7,8,9,10,11]},
"_ab": {4:[4,5]},
@ -23,6 +22,9 @@ var layout = {
"_10": {2:[9,10,11]},
"_15": {2:[1,2,3,4,5,6]},
"_20": {3:[1,2,3,4,5,6]},
};
var layout = {
"version": 2,
"language": 'Bärndütsch (nöi)',
"letters": [
'ESKISCHAFÜF',
@ -36,21 +38,21 @@ var layout = {
'ZÄNIERBEUFI',
'ZWÜUFINAUHR'
],
"permanent": this._es_isch,
"permanent": h._es_isch,
"minutes": {
"0": this._genau,
"0": h._genau,
"1": {},
"5": [this._5, this._ab],
"10": [this._10, this._ab],
"15": [this._15, this._ab],
"20": [this._20, this._ab],
"25": [this._5, this._vor, this._haubi],
"30": [this._haubi],
"35": [this._5, this._ab, this._haubi],
"40": [this._20, this._vor],
"45": [this._15, this._vor],
"50": [this._10, this._vor],
"55": [this._5, this._vor]
"5": [h._5, h._ab],
"10": [h._10, h._ab],
"15": [h._15, h._ab],
"20": [h._20, h._ab],
"25": [h._5, h._vor, h._haubi],
"30": [h._haubi],
"35": [h._5, h._ab, h._haubi],
"40": [h._20, h._vor],
"45": [h._15, h._vor],
"50": [h._10, h._vor],
"55": [h._5, h._vor]
},
"hours": {
"0": {10:[1,2,3,4,5,6]},