summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorView.js
blob: 1093c7626ff2672ab3b7adfb3030c063e5654328 (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
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 })
	},

	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)
	},

})