Volume transparency bars #5076 widget.changeTheme should not record an Undo entry in the Undo/Redo stack #4982 Event when source price scale is changed #4884 Time value in shape creating #4878 Price axis icons don't change after applyOverrides #4865 Cannot disable bottom toolbar timezone menu via "timezone_menu" property #4836 Showleftaxis is not valid on the mobile #4828 Fix TypeScript typings for onVisibleRangeChanged method #4802 Invalid on Mobile: 'paneProperties.legendProperties.showBarChange': false, #4797 API to attach an indicator to a particular price scale #4788 saveLoadAdapter is stringified #4776 Changing price scale of the study via changePriceScale method doesn't applies immediately #4774 Broker Config Order Market not visible #4765 [Bug] In the trading mask changing price doesn't update pips #4761 Maximize chart button #4744 Custom study plot color has no effect #4740 Moving average on seconds (createStudy) #4730 [Bug] BUY button get enable after clicking on both pips fields #4718 Overrides are not applied when defaults button is pressed #4706 Trading Terminal passes parentOrderId object while modifying the order #4705 Watermark settings are not saved to LocalStorage #4681 tvWidget.activeChart().resolution() return randomly "D" or "1D" for the daily time-frame #4630 cannot override default background color #4621 Bring to front operation is unavailable in 1.16 #4611 New style of pane buttons #4608 New mobile friendly style of the legend #4607 Centered Zoom with Ctrl #4606 TERMINAL: Apply Date Range to all charts in layout if Sync Interval is enabled #4605 Updated style of the measure tool #4604 New style of indicator loading status #4603 New measure styles #4602 Adaptive drawings dialogs #4600 Allow createStudy use undo #4590 Crosshair only on long press on mobile #4574 saveChartToServer does not call the callbacks if !autoSaveNeeded #4573 How to get current theme? #4534 getAllShapes returns trend_line instead of 'extended' #4507 hideMarksOnBar in v1.15 #4506 Trend_angle is not returned via getAllShapes #4498 How to disable vertical scrolling on the mobile side #4483 Add support for holidays and exchange working days in session spec #4467 closePopupsAndDialogs : The screenshot popup is not being closed #4438 Redirect on TV homepage after mouse click release #4423 setBodyFont of position line tool doesn't work correctly #4353 subscribe('drawing_event') click is not working #4302 "Eraser" and "dot" cursors doesn't work on IE11 #4238 zOrder for shapes with saved layout #4219 Errors/warning in console after load chart #4196 Main series API #4169 Scrolling to the top - href=“#” #4136 Tracking mode #4111 Order line drag with middle mouse button doesn't trigger onMove #4084 There are no values or na in the legend of the additional symbol (compare/add) until hover the cursor on the chart #4058 closePopupsAndDialogs doesn't work for new indicators dialog #4051 toolbar_bg doesn't affect top toolbar #3998 Check if symbol sync is enabled #3997 DOM bottom buttons are missing tooltips #3979 Question about D or 1D resolution #3861 Twitter intent button Android app #3732 Avoid chart appending storage version and "study_templates or charts" to chartStorageAPI #3702 unexpected study id by assigning studies_access option #3630 Drawing shape on indicator/study #3408 Top header in fullscreen? #2610 Allow to modify end date of long/short position tool #2381 Chart can scroll with mouse movement but no button pressed down #1908 Adaptive design for Properties dialog #862
5 lines
13 KiB
JavaScript
5 lines
13 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["editobjectdialog"],{KFNk:function(t,e,i){},Kqsj:function(t,e,i){"use strict";(function(t){function o(t,e,i){this._source=t,this._model=e,this._undoCheckpoint=i}var a,n,r,s,l,p,c,d,u,h;i("jgM0"),i("KFNk"),i("pay7"),i("ohga"),a=i("Ss5c").LineDataSource,n=i("GVHu").Study,r=i("qJq3").Series,s=i("fgLi").DataSource,l=i("FQhm"),p=i("bR4N").bindPopupMenu,c=i("QloM"),d=i("GAqT").TVOldDialogs,u=i("PC8g").trackEvent,h=i("CW80").isLineTool,i("PVgW"),o.prototype.hide=function(t){d.destroy(this._dialogTitle,{undoChanges:!!t})},o.prototype._onDestroy=function(t,e){var i,o,a=(e||{}).undoChanges;$(window).unbind("keyup.hidePropertyDialog"),a?(i=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow)&&this._model.undoToCheckpoint(i):this._source.hasAlert.value()&&(o=this._source,setTimeout(function(){o.localAndServerAlersMismatch&&o.synchronizeAlert(!0)})),this._undoCheckpointOnShow&&delete this._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},o.prototype.isVisible=function(){return this._dialog&&this._dialog.is(":visible")},o.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},o.prototype.switchTab=function(t,e){var i,o;if(this._tabs)return i=null,t?t=t.valueOf():null===t&&(t=void 0),"string"==typeof t&&$.each(this._tabs,function(e,o){if(o.name===t)return i=o,!1}),"object"==typeof t&&$.each(this._tabs,function(e,o){if(t===o||$(o.labelObject).is(t)||$(o.wrapperObject).is(t))return i=o,!1}),i||(i=this._tabs[~~t]),!!i&&($.each(this._tabs,function(t,e){var o=e===i;$(e.wrapperObject)[o?"show":"hide"](),$(e.labelObject)[o?"addClass":"removeClass"]("active")}),e&&(o=this.activeTabSettingsName())&&TVSettings.setValue(o,i.name),this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0)},o.prototype.makeScrollable=function(t){var e=t.wrapperObject,i=$(t.objects[0]),o=i.width();e.css({height:$(window).height()/1.4,overflow:"auto"}),i.css("width",o+20),t.isScrollable=!0},o.prototype.appendToTab=function(t,e,i,o,a,n){var r,s;$(t).is("table")&&!$(t).find("tr").size()||(this._tabs||(this._tabs=[]),$.each(this._tabs,function(t,i){if(i.name===e)return r=t,!1}),void 0===r&&(this._tabs.push({name:e,localizedName:$.t(e),objects:$(),displayPriority:0,defaultOpen:0,isButton:!!a,callback:a?n||function(){}:null}),r=this._tabs.length-1),(s=this._tabs[r]).objects=s.objects.add(t),s.displayPriority=Math.max(s.displayPriority||0,i||0),s.defaultOpen=Math.max(s.defaultOpen||0,o||0))},o.prototype.insertTabs=function(){function t(t){a&&a.toLowerCase()===t.name.toLowerCase()&&(t.defaultOpen=Math.max(~~t.defaultOpen,c.TabOpenFrom.UserSave)),(!i||~~i.defaultOpen<~~t.defaultOpen)&&(i=t),t.labelObject=$('<a href="#" class="properties-tabs-label tv-tabs__tab"></a>').text(t.localizedName).appendTo(e._tabContainer),t.labelObject.on("mousedown",function(t){function i(t){var e;n=n||(e=t,Math.abs(o-e.pageX)>5||Math.abs(a-e.pageY)>5)}var o=t.pageX,a=t.pageY,n=!1,r=this
|
|
;$(r).on("mousemove",i),$(r).one("mouseup",function(){n||e.switchTab(r,!0),$(r).off("mousemove",i)})});var o=$('<div class="main-properties"></div>');t.wrapperObject=$().add(o),t.objects.each(function(e,i){var a=$(i);a.is("table")?(a.data("layout-separated")&&(t.wrapperObject=t.wrapperObject.add('<div class="properties-separator"></div>').add(o=$('<div class="main-properties"></div>')),a.removeData("layout-separated")),o.append(a),a.children("tbody").each(function(e,a){if(0!==e&&$(a).data("layout-separated")){t.wrapperObject=t.wrapperObject.add('<div class="properties-separator"></div>').add(o=$('<div class="main-properties"></div>'));var n=$(i).clone(!0,!1).appendTo(o);n.children().remove(),n.append(a),$(a).removeData("layout-separated")}})):o.append(a)}),t.wrapperObject.appendTo(e._container)}var e,i,o,a;this._tabs&&(this._tabs.sort(function(t,e){return(e.displayPriority||0)-(t.displayPriority||0)}),e=this,i=null,(o=this.activeTabSettingsName())&&(a=TVSettings.getValue(o)),$.each(this._tabs,function(i,o){var a;o.isButton?((a=o).labelObject=$('<a href="#" class="properties-tabs-label tv-tabs__tab"></a>').text(a.localizedName).appendTo(e._tabContainer),a.labelObject.bind("click",a.callback)):t(o)}),this.switchTab(i))},o.prototype.activeTabSettingsName=function(){var t=this._source;if(t)return t instanceof r?"properties_dialog.active_tab.chart":t instanceof a?"properties_dialog.active_tab.drawing":t instanceof n?"properties_dialog.active_tab.study":void 0},o.prototype.show=function(e){function o(t,e){g.hide(!!e)}var b,f,_,y,g,m,T,v,w,P,C,S,O,k,D,x,j,I,N,L,B,V,R,F,A;if(t.enabled("property_pages")&&(b=i("kSsA"),f=(e=e||{}).onWidget||!1,_=null,TradingView.isInherited(this._source.constructor,r)&&(_="series-properties-dialog",u("GUI","Series Properties")),TradingView.isInherited(this._source.constructor,n)&&(_="indicator-properties-dialog",y=!this._source.isPine()||this._source.isStandardPine()?this._source.metaInfo().description:"Custom Pine",u("GUI","Study Properties",y)),h(this._source)&&(_="drawing-properties-dialog",u("GUI","Drawing Properties",this._source.name())),TradingView.isInherited(this._source.constructor,s)&&(g=this,this._model.selectionMacro(function(t){t.addSourceToSelection(g._source)})),m=b.createStudyStrategyPropertyPage(this._source,this._model),T=b.createInputsPropertyPage(this._source,this._model),v=b.createStylesPropertyPage(this._source,this._model),w=b.createVisibilitiesPropertyPage(this._source,this._model),P=b.createDisplayPropertyPage(this._source,this._model),T&&!T.widget().is(":empty")||v||m))return g=this,C=null!==T,S=this._source.title(),O=e.ownerDocument||this._model._chartWidget.widget().prop("ownerDocument"),k=d.createDialog(S,{hideTitle:!0,dragHandle:".properties-tabs",ownerDocument:O}).attr("data-dialog-type",_),D=k.find("._tv-dialog-content"),x=$('<div class="properties-tabs tv-tabs"></div>').appendTo(D),j=[],I=400,this._tabs=j,this._dialog=k,this._dialogTitle=S,this._container=D,this._tabContainer=x,this._undoCheckpointOnShow=this._model.createUndoCheckpoint(),
|
|
k.on("destroy",function(t,e){e=e||{};T&&T.destroy(),m&&m.destroy(),v&&v.destroy(),P&&P.destroy(),w&&w.destroy(),$("select",D).each(function(){$(this).selectbox("detach")}),g._onDestroy(t,e)}),!this._model.readOnly()&&m&&m.widget().each(function(t,e){var i,o,a=+$(e).data("layout-tab-priority");isNaN(a)&&(a=c.TabPriority.Properties),i=~~$(e).data("layout-tab-open"),void 0===(o=$(e).data("layout-tab"))&&(o=c.TabNames.properties),g.appendToTab(e,o,a,i)}),this._model.readOnly()||!C||T.widget().is(":empty")||T.widget().each(function(t,e){var o,a,n=i("n3Kh"),r=T instanceof n,s=+$(e).data("layout-tab-priority");TradingView.isNaN(s)&&(s=r?c.TabPriority.Coordinates:c.TabPriority.Inputs),o=~~$(e).data("layout-tab-open"),void 0===(a=$(e).data("layout-tab"))&&(a=r?c.TabNames.coordinates:c.TabNames.inputs),g.appendToTab(e,a,s,o)}),v&&v.widget().each(function(t,e){var o,a,n,r=+$(e).data("layout-tab-priority");TradingView.isNaN(r)&&(r=c.TabPriority.Style),o=~~$(e).data("layout-tab-open"),a=i("Yc1q"),!o&&v instanceof a&&(o=c.TabOpenFrom.Default),void 0===(n=$(e).data("layout-tab"))&&(n=c.TabNames.style),g.appendToTab(e,n,r,o)}),P&&P.widget().each(function(t,e){var i,o,a=+$(e).data("layout-tab-priority");TradingView.isNaN(a)&&(a=c.TabPriority.Display),i=~~$(e).data("layout-tab-open"),void 0===(o=$(e).data("layout-tab"))&&(o=c.TabNames.properties),g.appendToTab(e,o,a,i)}),w&&w.widget().each(function(t,e){g.appendToTab(e,c.TabNames.visibility,c.TabPriority.Display,!1)}),this._source instanceof n&&!!this._source.metaInfo().pine&&this._source.metaInfo(),this.insertTabs(),this._helpItemRequired()&&this._createHelp(),B=110,$(".js-dialog").each(function(){var t=parseInt($(this).css("z-index"),10);t>B&&(B=t)}),k.css("z-index",B),N=$('<div class="main-properties main-properties-aftertabs"></div>').appendTo(D),L=$('<div class="dialog-buttons">').appendTo(N),V=function(){w&&w.loadData(),T&&T.loadData()},(!f||window.is_authenticated)&&v&&"function"==typeof v.createTemplateButton&&t.enabled("linetoolpropertieswidget_template_button")?g._templateButton=v.createTemplateButton({popupZIndex:B,defaultsCallback:e.onResetToDefault,loadTemplateCallback:V}).addClass("tv-left").appendTo(L):TradingView.isInherited(this._source.constructor,n)?(R=[{title:$.t("Reset Settings"),action:e.onResetToDefault},{title:$.t("Save As Default"),action:function(){g._source.properties().saveDefaults()}}],(F=$('<a href="#" class="_tv-button tv-left">'+$.t("Defaults")+'<span class="icon-dropdown"></span></a>')).on("click",function(t){t.preventDefault();var e=$(this);e.is(".active")||e.trigger("button-popup",[R,!0])}).appendTo(L),p(F,null,{direction:"down",event:"button-popup",notCloseOnButtons:!0,zIndex:B})):$('<a class="_tv-button tv-left">'+$.t("Defaults")+"</a>").appendTo(L).click(e.onResetToDefault),$('<a class="_tv-button ok">'+$.t("OK")+"</a>").appendTo(L).click(function(){g.hide()}),$('<a class="_tv-button cancel">'+$.t("Cancel")+"</a>").appendTo(L).on("click",function(t){o(0,!0)}),k.find("._tv-dialog-title a").on("click",o),
|
|
$(window).bind("keyup.hidePropertyDialog",function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&(g._templateButton&&g._templateButton.trigger("hide-popup"),g.hide())}),$("select",D).each(function(){var t=$(this),e="tv-select-container dialog";t.hasClass("tv-select-container-fontsize")&&(e+=" tv-select-container-fontsize"),t.selectbox({speed:100,classHolder:e})}),$('input[type="text"]',D).addClass("tv-text-input inset dialog"),$("input.ticker",D).TVTicker(),k.css("min-width",I+"px"),d.applyHandlers(k,e),A={top:($(window).height()-k.height())/2,left:($(window).width()-k.width())/2},v&&"function"==typeof v.dialogPosition&&(A=v.dialogPosition(A,k)||A),d.positionDialog(k,A),window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide(),l.emit("edit_object_dialog",{objectType:this._source===this._model.mainSeries()?"mainSeries":this._source instanceof a?"drawing":this._source instanceof n?"study":"other",scriptTitle:this._source.title()}),k},o.prototype._helpItemRequired=function(){return this._source._metaInfo&&!!this._source._metaInfo.helpURL},o.prototype._createHelp=function(){var t=$('<a class="help" href="#" target="_blank" title="'+$.t("Help")+'"></a>');t.attr("href",this._source._metaInfo.helpURL),this._tabContainer.prepend(t)},o.prototype.dialogWidget=function(){return this._dialog},e.EditObjectDialog=o}).call(this,i("Kxc7"))},Yc1q:function(t,e,i){"use strict";function o(t){function e(e,i,o){t.call(this,e,i,o),this._linetool=o}return inherit(e,t),e.prototype.applyTemplate=function(t){this.model().applyLineToolTemplate(this._linetool,t,"Apply Drawing Template"),this.loadData()},e}function a(t,e,i){r.call(this,t,e),this._linetool=i}var n=i("DxCR"),r=n.PropertyPage,s=n.ColorBinding,l=i("jNEI").addColorPicker;inherit(a,r),a.prototype.createOneColorForAllLinesWidget=function(){var t=$("<td class='colorpicker-cell'>");return this.bindControl(new s(l(t),this._linetool.properties().collectibleColors,!0,this.model(),"Change All Lines Color",0)),{label:$("<td>"+$.t("Use one color")+"</td>"),editor:t}},a.prototype.addOneColorPropertyWidget=function(t){var e=this.createOneColorForAllLinesWidget(),i=$("<tr>");i.append($("<td>")).append(e.label).append(e.editor),i.appendTo(t)},(a=o(a)).createTemplatesPropertyPage=o,t.exports=a},n3Kh:function(t,e,i){"use strict";function o(t,e,i){n.call(this,t,e),this._linetool=i,this.prepareLayout()}var a=i("DxCR"),n=a.PropertyPage,r=a.GreateTransformer,s=a.LessTransformer,l=a.ToIntTransformer,p=a.SimpleStringBinder;i("PVgW"),inherit(o,n),o.BarIndexPastLimit=-5e4,o.BarIndexFutureLimit=15e3,o.prototype.bindBarIndex=function(t,e,i,a){var n=[l(t.value()),r(o.BarIndexPastLimit),s(o.BarIndexFutureLimit)];this.bindControl(this.createStringBinder(e,t,n,!0,i,a))},o.prototype.createPriceEditor=function(t){var e,i,o,a=this._linetool,n=a.ownerSource().formatter(),r=function(t){return n.format(t)},s=function(t){var e=n.parse(t);if(e.res)return null!=e.price?e.price:e.value},l=$("<input type='text'>");return l.TVTicker({step:n._minMove/n._priceScale||1,formatter:r,parser:s}),
|
|
t&&(e=[function(e){var i=s(e);return void 0===i?t.value():i}],i="Change "+a.title()+" point price",(o=this.createStringBinder(l,t,e,!1,this.model(),i)).addFormatter(function(t){return n.format(t)}),this.bindControl(o)),l},o.prototype._createPointRow=function(t,e,i){var o,a,n,r,s=$("<tr>"),l=$("<td>");return l.html($.t("Price")+i),l.appendTo(s),(o=$("<td>")).appendTo(s),this.createPriceEditor(e.price).appendTo(o),(a=$("<td>")).html($.t("Bar #")),a.appendTo(s),(n=$("<td>")).appendTo(s),(r=$("<input type='text'>")).appendTo(n),r.addClass("ticker"),this.bindBarIndex(e.bar,r,this.model(),"Change "+this._linetool.title()+" point bar index"),s},o.prototype.prepareLayoutForTable=function(t){var e,i,o,a,n=this._linetool.points(),r=n.length;for(e=0;e<n.length;e++)i=n[e],(o=this._linetool.properties().points[e])&&(a=e||r>1?" "+(e+1):"",this._createPointRow(i,o,a).appendTo(t))},o.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},o.prototype.widget=function(){return this._table},o.prototype.createStringBinder=function(t,e,i,o,a,n){return new p(t,e,i,o,a,n)},t.exports=o},ohga:function(t,e,i){}}]); |