summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/builder/BuilderView.js
blob: 9c0f236c039e49966be34637b0c8e1b179f22b4a (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
var BuilderView = View.extend({
	el: "#builderView",
	
	action: "/api/layouts/",

	events: {
	},
	
	initialize: function(){
		this.toolbar = new BuilderToolbar ({ parent: this })
		this.settings = new BuilderSettings ({ parent: this })
	},

	load: function(name){
		if (! name || name == "new") {
			this.isNew = true
			this.ready({})
			return
		}

		$.get(this.action + name, $.proxy(this.ready, this))
	},
	
	ready: function(data){
		this.settings.load(data)
	},

})