using a helper object works, as object properties cannot be accesses
before the object has been initialized.
This commit is contained in:
		
							parent
							
								
									0d90b3dd76
								
							
						
					
					
						commit
						10c07a05cf
					
				
					 2 changed files with 22 additions and 17 deletions
				
			
		|  | @ -12,10 +12,13 @@ GNU General Public License for more details. | ||||||
| You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License | ||||||
| along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 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 = { | var layout = { | ||||||
| 	"version": 2, | 	"version": 2, | ||||||
| 	"helper": {1:[1,2,4,5,6,7]}, |  | ||||||
| 	"language": 'Bärndütsch (test)', | 	"language": 'Bärndütsch (test)', | ||||||
| 	"permanent": this.helper, | 	"permanent": helper.es_isch, | ||||||
| }; | }; | ||||||
|  | helper = undefined; | ||||||
| window._uhr.languages['de_CH_TEST'] = layout; | window._uhr.languages['de_CH_TEST'] = layout; | ||||||
|  |  | ||||||
|  | @ -12,8 +12,7 @@ GNU General Public License for more details. | ||||||
| You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License | ||||||
| along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | ||||||
| */ | */ | ||||||
| var layout = { | var h = { | ||||||
| 	"version": 2, |  | ||||||
| 	"_es_isch": {1:[1,2,4,5,6,7]}, | 	"_es_isch": {1:[1,2,4,5,6,7]}, | ||||||
| 	"_genau": {3:[7,8,9,10,11]}, | 	"_genau": {3:[7,8,9,10,11]}, | ||||||
| 	"_ab": {4:[4,5]}, | 	"_ab": {4:[4,5]}, | ||||||
|  | @ -23,6 +22,9 @@ var layout = { | ||||||
| 	"_10": {2:[9,10,11]}, | 	"_10": {2:[9,10,11]}, | ||||||
| 	"_15": {2:[1,2,3,4,5,6]}, | 	"_15": {2:[1,2,3,4,5,6]}, | ||||||
| 	"_20": {3:[1,2,3,4,5,6]}, | 	"_20": {3:[1,2,3,4,5,6]}, | ||||||
|  | }; | ||||||
|  | var layout = { | ||||||
|  | 	"version": 2, | ||||||
| 	"language": 'Bärndütsch (nöi)', | 	"language": 'Bärndütsch (nöi)', | ||||||
| 	"letters": [ | 	"letters": [ | ||||||
| 		'ESKISCHAFÜF', | 		'ESKISCHAFÜF', | ||||||
|  | @ -36,21 +38,21 @@ var layout = { | ||||||
| 		'ZÄNIERBEUFI', | 		'ZÄNIERBEUFI', | ||||||
| 		'ZWÜUFINAUHR' | 		'ZWÜUFINAUHR' | ||||||
| 		], | 		], | ||||||
| 	"permanent": this._es_isch, | 	"permanent": h._es_isch, | ||||||
| 	"minutes": { | 	"minutes": { | ||||||
| 		"0": this._genau, | 		"0": h._genau, | ||||||
| 		"1": {}, | 		"1": {}, | ||||||
| 		"5": [this._5, this._ab], | 		"5": [h._5, h._ab], | ||||||
| 		"10": [this._10, this._ab], | 		"10": [h._10, h._ab], | ||||||
| 		"15": [this._15, this._ab], | 		"15": [h._15, h._ab], | ||||||
| 		"20": [this._20, this._ab], | 		"20": [h._20, h._ab], | ||||||
| 		"25": [this._5, this._vor, this._haubi], | 		"25": [h._5, h._vor, h._haubi], | ||||||
| 		"30": [this._haubi], | 		"30": [h._haubi], | ||||||
| 		"35": [this._5, this._ab, this._haubi], | 		"35": [h._5, h._ab, h._haubi], | ||||||
| 		"40": [this._20, this._vor], | 		"40": [h._20, h._vor], | ||||||
| 		"45": [this._15, this._vor], | 		"45": [h._15, h._vor], | ||||||
| 		"50": [this._10, this._vor], | 		"50": [h._10, h._vor], | ||||||
| 		"55": [this._5, this._vor] | 		"55": [h._5, h._vor] | ||||||
| 	}, | 	}, | ||||||
| 	"hours": { | 	"hours": { | ||||||
| 		"0": {10:[1,2,3,4,5,6]}, | 		"0": {10:[1,2,3,4,5,6]}, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue