//Copyright © [Year(s)] Nokia Corporation and/or its subsidiary(-ies).
Fp.Menu.Report.Duplicate=Fp.Utils.extendObject(Fp.Menu.Report,{type:"DUPLICATE",reportTextArea:null,charLimit:350,init:function(){this.reportTextArea=Fp.byId("reportDuplicateDetails");this.setupEvents();},setupEvents:function(){new Fp.Utils.Events.addTapEvent({element:Fp.byId("menu-report-button-duplicate"),onEvent:Fp.Utils.bind(this.showPage,this)});new Fp.Utils.Events.addTapEvent({element:Fp.byId("report-duplicate-submit"),onEvent:Fp.Utils.bind(this.post,this)});this.reportTextArea.onkeyup=this.limitCharacters;},showPage:function(){Fp.Pages.showPage({name:Fp.Pages.PAGE.REPORTDUPLICATE});},limitCharacters:function(){if(Fp.Menu.Report.Duplicate.reportTextArea.value.length>Fp.Menu.Report.Duplicate.charLimit){var a=Fp.Menu.Report.Duplicate.reportTextArea.value;Fp.Menu.Report.Duplicate.reportTextArea.value=a.substr(0,Fp.Menu.Report.Duplicate.charLimit);}},post:function(){var a=Fp.Menu.Report.initIncident({reportType:this.type});this.sendIncident(a);}});