<commit_before>var _ = require('underscore');
var $ = require('jquery'),
	Backbone = require('backbone'),
	loadingTemplate = require('../templates/loading.tpl'),
	template = require('../templates/strategyEdit.tpl');
var config = require('../conf');

Backbone.$ = $;

var StrategyForm = require('./_FormStrategy');

exports = module.exports = Backbone.View.extend({

	el: '#content',
	
	compiled: _.template(template),

	initialize: function(options) {
		this.symbol = options.symbol;
		this.on('load', this.load, this);
	},

	load: function() {
		var that = this;
		this.loaded = true;
		this.strategyForm = new StrategyForm({symbol: this.symbol});
		this.strategyForm.success = function(){

		};
		this.strategyForm.model.on('change',this.render,this);
		// this.render();
	},

	render: function() {
		if (!this.loaded) {
			this.$el.html(loadingTemplate());
		} else {
			// this.$el.html(template({model:this.strategyForm.model.toJSON()}));
			this.$el.html(this.compiled({model:this.strategyForm.model.toJSON()}));
		}
		return this;
	},
});<commit_msg>update stock project.<commit_after>var _ = require('underscore');
var $ = require('jquery'),
	Backbone = require('backbone'),
	loadingTemplate = require('../templates/loading.tpl'),
	template = require('../templates/strategyEdit.tpl');
var config = require('../conf');

Backbone.$ = $;

var StrategyForm = require('./_FormStrategy');

exports = module.exports = Backbone.View.extend({

	el: '#content',
	
	// compiled: _.template(template),

	initialize: function(options) {
		this.symbol = options.symbol;
		this.on('load', this.load, this);
	},

	load: function() {
		var that = this;
		this.loaded = true;
		this.strategyForm = new StrategyForm({symbol: this.symbol});
		this.strategyForm.success = function(){

		};
		this.strategyForm.model.on('change',this.render,this);
		// this.render();
	},

	render: function() {
		if (!this.loaded) {
			this.$el.html(loadingTemplate());
		} else {
			this.$el.html(template({model:this.strategyForm.model.toJSON()}));
			// this.$el.html(this.compiled({model:this.strategyForm.model.toJSON()}));
		}
		return this;
	},
});
{'fraction_non_alphanumeric': 0.1971764705882353, 'fraction_numerical': 0.0, 'mean_word_length': 4.355163727959698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1078776', 'n_tokens_mistral': 745, 'n_tokens_neox': 691, 'n_words': 114}