summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorView.js
blob: 8422619253626ec6ede9f58a31a0ae28f3dbeef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var EditorView = View.extend({
	el: "#editorView",
	
	projecttAction: "/api/projects/",
	layoutAction: "/api/layouts/",

	events: {
	},
	
	initialize: function(){
		this.toolbar = new EditorToolbar ({ parent: this })
		this.settings = new EditorSettings ({ parent: this })
		this.mediaViewer = new MediaViewer ({ parent: this })
		this.mediaUpload = new MediaUpload ({ parent: this })
		this.wallpaperPicker = new WallpaperPicker ({ parent: this })
		this.lightControl = new LightControl ({ parent: this })
	},

	load: function(name){
	},
	
	loadLayout: function(layout){
		layout = sanitize(layout)
		$.get(this.layoutAction + layout, $.proxy(this.ready, this))
	},
	
	ready: function(data){
		$("#map").hide()
		this.settings.loadLayout(data)
	},

})