0.7 released

This commit is contained in:
rlagutin
2014-05-29 13:23:44 +04:00
parent 1f07c702c8
commit 1730c6fc40
20 changed files with 6476 additions and 5231 deletions

View File

@@ -7,7 +7,7 @@ if (window.TradingView) {
var TradingView = {
version: function() {
return 0.6;
return "0.7";
},
gEl : function(id) {
@@ -80,7 +80,8 @@ var TradingView = {
enabledStudies: options.enabled_studies || [],
enabledDrawings: options.enabled_drawings || [],
disabledDrawings: options.disabled_drawings || [],
savedData: options.savedData || undefined
savedData: options.savedData || undefined,
locale: options.locale
};
if (options.news && options.news.length){
@@ -151,6 +152,7 @@ TradingView.widget.prototype = {
'&enabledStudies='+ encodeURIComponent(JSON.stringify(this.options.enabledStudies)) +
'&enabledDrawings='+ encodeURIComponent(JSON.stringify(this.options.enabledDrawings)) +
'&disabledDrawings='+ encodeURIComponent(JSON.stringify(this.options.disabledDrawings)) +
'&locale='+ encodeURIComponent(this.options.locale) +
(this.options.timezone ? '&timezone='+encodeURIComponent(this.options.timezone) : '');
if (!!this.options.savedData) {
@@ -218,6 +220,10 @@ TradingView.widget.prototype = {
widget.parentNode.removeChild(widget);
},
onAutoSaveNeeded : function(callback) {
this.postMessage.on('onAutoSaveNeeded', callback);
},
save : function(callback) {
this.postMessage.on('onChartSaved', callback);
this.postMessage.post(this._messageTarget(), 'saveChart', {});