UnitIndex.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. MWF.xApplication.Attendance = MWF.xApplication.Attendance || {};
  2. MWF.require("MWF.xAction.org.express.RestActions", null,false);
  3. MWF.xDesktop.requireApp("Attendance", "lp."+MWF.language, null, false);
  4. MWF.xDesktop.requireApp("Attendance", "Common", null, false);
  5. MWF.xApplication.Attendance.UnitIndex = new Class({
  6. Extends: MWF.widget.Common,
  7. Implements: [Options, Events],
  8. options: {
  9. "style": "default"
  10. },
  11. statusColor : {
  12. "normal" : "#9acd32", //绿色,正常
  13. "levelAsked":"#4f94cd", //蓝色,请假
  14. "late":"#fede03", //黄色,迟到
  15. //"leaveEarly":"#fe8d03", //橙色,早退
  16. "noSign":"#ee807f", //粉红色,未签到
  17. "lackOfTime" : "#dec674",//工时不足人次
  18. "abNormalDuty" : "#fedcbd"//异常打卡人次
  19. },
  20. initialize: function(node, app, actions, options){
  21. this.setOptions(options);
  22. this.app = app;
  23. this.lp = app.lp;
  24. this.path = "../x_component_Attendance/$UnitIndex/";
  25. this.cssPath = "../x_component_Attendance/$UnitIndex/"+this.options.style+"/css.wcss";
  26. this._loadCss();
  27. this.actions = actions;
  28. this.node = $(node);
  29. this.setDate();
  30. this.today = new Date();
  31. this.userName = layout.desktop.session.user.distinguishedName;
  32. this.data = {};
  33. },
  34. setDate : function( date ){
  35. this.date = date || new Date();
  36. this.year = this.date.getFullYear().toString();
  37. var month = this.date.getMonth()+1;
  38. this.month = month.toString().length == 2 ? month : "0"+month;
  39. },
  40. reload: function(){
  41. this.node.empty();
  42. this.load();
  43. },
  44. load: function(){
  45. this.loadTitleNode();
  46. this.loadContent();
  47. },
  48. loadTitleNode : function(){
  49. var text = this.date.format(this.app.lp.dateFormatMonth);
  50. this.titleNode = new Element("div.titleNode",{
  51. "styles" : this.css.titleNode
  52. }).inject(this.node);
  53. this.titleLeftArrowNode = new Element("div",{
  54. "styles" : this.css.titleLeftArrowNode
  55. }).inject(this.titleNode);
  56. this.titleTextNode = new Element("div",{
  57. "styles" : this.css.titleTextNode,
  58. "text" : text
  59. }).inject(this.titleNode);
  60. this.titleRightArrowNode = new Element("div",{
  61. "styles" : this.css.titleRightArrowNode
  62. }).inject(this.titleNode);
  63. this.titleLeftArrowNode.addEvents({
  64. "mouseover": function(){this.titleLeftArrowNode.setStyles(this.css.titleLeftArrowNode_over);}.bind(this),
  65. "mouseout": function(){this.titleLeftArrowNode.setStyles(this.css.titleLeftArrowNode);}.bind(this),
  66. "mousedown": function(){this.titleLeftArrowNode.setStyles(this.css.titleLeftArrowNode_down);}.bind(this),
  67. "mouseup": function(){this.titleLeftArrowNode.setStyles(this.css.titleLeftArrowNode_over);}.bind(this),
  68. "click": function(){this.changeMonthPrev();}.bind(this)
  69. });
  70. this.titleRightArrowNode.addEvents({
  71. "mouseover": function(){this.titleRightArrowNode.setStyles(this.css.titleRightArrowNode_over);}.bind(this),
  72. "mouseout": function(){this.titleRightArrowNode.setStyles(this.css.titleRightArrowNode);}.bind(this),
  73. "mousedown": function(){this.titleRightArrowNode.setStyles(this.css.titleRightArrowNode_down);}.bind(this),
  74. "mouseup": function(){this.titleRightArrowNode.setStyles(this.css.titleRightArrowNode_over);}.bind(this),
  75. "click": function(){this.changeMonthNext();}.bind(this)
  76. });
  77. this.titleTextNode.addEvents({
  78. "mouseover": function(){this.titleTextNode.setStyles(this.css.titleTextNode_over);}.bind(this),
  79. "mouseout": function(){this.titleTextNode.setStyles(this.css.titleTextNode);}.bind(this),
  80. "mousedown": function(){this.titleTextNode.setStyles(this.css.titleTextNode_down);}.bind(this),
  81. "mouseup": function(){this.titleTextNode.setStyles(this.css.titleTextNode_over);}.bind(this),
  82. "click": function(){this.changeMonthSelect();}.bind(this)
  83. });
  84. this.loadUnitNode();
  85. },
  86. changeMonthPrev: function(){
  87. this.date.decrement("month", 1);
  88. this.setDate( this.date );
  89. var text = this.date.format(this.app.lp.dateFormatMonth);
  90. this.titleTextNode.set("text", text);
  91. this.reloadContent();
  92. },
  93. changeMonthNext: function(){
  94. this.date.increment("month", 1);
  95. this.setDate( this.date );
  96. var text = this.date.format(this.app.lp.dateFormatMonth);
  97. this.titleTextNode.set("text", text);
  98. this.reloadContent();
  99. },
  100. changeMonthSelect: function(){
  101. if (!this.monthSelector) this.createMonthSelector();
  102. this.monthSelector.show();
  103. },
  104. createMonthSelector: function(){
  105. this.monthSelector = new MWF.xApplication.Attendance.MonthSelector(this.date, this);
  106. },
  107. changeMonthTo: function(d){
  108. this.setDate( d )
  109. var text = this.date.format(this.app.lp.dateFormatMonth);
  110. this.titleTextNode.set("text", text);
  111. this.reloadContent();
  112. },
  113. changeUnitTo : function( d ){
  114. this.unit = d;
  115. this.titleUnitActionTextNode.set("text", d.split("@")[0]);
  116. this.reloadContent();
  117. },
  118. loadUnitNode: function(){
  119. this.listUnitWithPerson( function( unit ){
  120. this.unit = unit;
  121. this.units = [];
  122. var flag = true;
  123. if( this.app.isTopUnitManager() ){
  124. var data = {"unitList": this.app.getNameFlag( this.app.manageTopUnits )};
  125. this.app.orgActions.listUnitSubDirect( function( json ){
  126. json.data.each(function( d ){
  127. this.units.push( d.distinguishedName )
  128. }.bind(this))
  129. }.bind(this), null , data, false )
  130. }else if( this.app.isUnitManager() ){
  131. this.units = this.app.manageUnits;
  132. }
  133. this.unit = this.units[0] || this.unit;
  134. if( this.units.length > 1 ){ //(this.units.length==1 && this.units[0]!=this.unit )
  135. this.titleUnitAreaNode = new Element("div.titleUnitAreaNode",{
  136. "styles" : this.css.titleUnitAreaNode
  137. }).inject(this.titleNode)
  138. this.titleUnitActionNode = new Element("div",{
  139. "styles" : this.css.titleUnitActionNode
  140. }).inject(this.titleUnitAreaNode)
  141. this.titleUnitActionTextNode = new Element("div",{
  142. "styles" : this.css.titleUnitActionTextNode,
  143. "text" : this.unit.split("@")[0]
  144. }).inject(this.titleUnitActionNode);
  145. this.titleUnitActionIconNode = new Element("div",{
  146. "styles" : this.css.titleUnitActionIconNode
  147. }).inject(this.titleUnitActionNode);
  148. this.titleUnitActionNode.addEvents({
  149. "mouseover": function(){
  150. this.titleUnitActionTextNode.setStyles(this.css.titleUnitActionTextNode_over);
  151. this.titleUnitActionIconNode.setStyles(this.css.titleUnitActionIconNode_over);
  152. }.bind(this),
  153. "mouseout": function(){
  154. this.titleUnitActionTextNode.setStyles(this.css.titleUnitActionTextNode);
  155. this.titleUnitActionIconNode.setStyles(this.css.titleUnitActionIconNode);
  156. }.bind(this),
  157. "click" : function( ev ){
  158. this.switchUnit( ev.target );
  159. ev.stopPropagation();
  160. }.bind(this)
  161. })
  162. }else{
  163. this.titleUnitNode = new Element("div",{
  164. "styles" : this.css.titleUnitNode,
  165. "text" : this.unit.split("@")[0]
  166. }).inject(this.titleNode);
  167. }
  168. }.bind(this) )
  169. },
  170. listUnitWithPerson : function( callback ){
  171. var data = {"personList": this.app.getNameFlag(this.userName)};
  172. this.app.orgActions.listUnitWithPerson( function( json ){
  173. if( json.data.length > 0 ){
  174. if(callback)callback( json.data[0].distinguishedName );
  175. }else{
  176. if(callback)callback();
  177. }
  178. }.bind(this), null, data , false )
  179. },
  180. switchUnit : function( el ){
  181. var _self = this;
  182. var node = this.titleUnitListNode;
  183. var parentNode = el.getParent();
  184. if(node){
  185. if( node.getStyle("display") == "block" ){
  186. node.setStyle("display","none");
  187. }else{
  188. node.setStyle("display","block");
  189. node.position({
  190. relativeTo: this.titleUnitActionNode,
  191. position: 'bottomCenter',
  192. edge: 'upperCenter'
  193. });
  194. }
  195. }else{
  196. node = this.titleUnitListNode = new Element("div",{
  197. "styles" : this.css.titleUnitListNode
  198. }).inject(this.node);
  199. this.app.content.addEvent("click",function(){
  200. _self.titleUnitListNode.setStyle("display","none");
  201. });
  202. this.units.each(function( d ){
  203. var dNode = new Element("div",{
  204. "text" : d.split('@')[0],
  205. "styles" : this.css.titleUnitSelectNode
  206. }).inject(node);
  207. dNode.store("unit", d );
  208. dNode.addEvents({
  209. "mouseover" : function(){ this.setStyles(_self.css.titleUnitSelectNode_over); },
  210. "mouseout" : function(){ this.setStyles(_self.css.titleUnitSelectNode); },
  211. "click" : function(e){
  212. _self.titleUnitListNode.setStyle("display","none");
  213. this.setStyles(_self.css.titleUnitSelectNode);
  214. _self.changeUnitTo( this.retrieve("unit") );
  215. e.stopPropagation();
  216. }
  217. })
  218. }.bind(this));
  219. node.position({
  220. relativeTo: this.titleUnitActionNode,
  221. position: 'bottomCenter',
  222. edge: 'upperCenter'
  223. });
  224. }
  225. },
  226. reloadContent : function(){
  227. this.pieChartArea.empty();
  228. this.barChartArea.empty();
  229. this.lineChartArea.empty();
  230. this.loadData(function(){
  231. this.loadStatusColorNode();
  232. this.loadPieChart();
  233. this.loadBarChart();
  234. }.bind(this));
  235. this.loadDetail();
  236. },
  237. loadContent : function(){
  238. this.loadContentNode();
  239. this.loadData(function(){
  240. this.loadStatusColorNode();
  241. this.loadPieChart();
  242. this.loadBarChart();
  243. }.bind(this))
  244. this.loadDetail();
  245. this.setNodeScroll();
  246. this.setContentSize();
  247. },
  248. reloadChart : function(){
  249. this.pieChartArea.empty();
  250. this.barChartArea.empty();
  251. this.lineChartArea.empty();
  252. this.loadPieChart();
  253. this.loadBarChart();
  254. },
  255. loadContentNode: function(){
  256. this.elementContentNode = new Element("div.elementContentNode", {
  257. "styles": this.css.elementContentNode
  258. }).inject(this.node);
  259. this.app.addEvent("resize", function(){
  260. this.setContentSize();
  261. this.reloadChart();
  262. }.bind(this));
  263. this.elementContentListNode = new Element("div.elementContentListNode", {
  264. "styles": this.css.elementContentListNode
  265. }).inject(this.elementContentNode);
  266. this.topContentArea = new Element("div.topContentArea",{
  267. "styles" : this.css.topContentArea
  268. }).inject(this.elementContentListNode)
  269. this.pieChartArea = new Element("div.pieChartArea",{
  270. "styles" : this.css.pieChartArea
  271. }).inject(this.topContentArea)
  272. this.statusColorArea = new Element("div.statusColorArea",{
  273. "styles" : this.css.statusColorArea
  274. }).inject(this.topContentArea)
  275. this.barChartArea = new Element("div.barChartArea",{
  276. "styles" : this.css.barChartArea
  277. }).inject(this.topContentArea)
  278. this.middleContentArea = new Element("div.middleContentArea",{
  279. "styles" : this.css.middleContentArea
  280. }).inject(this.elementContentListNode)
  281. this.lineChartArea = new Element("div.lineChartArea",{
  282. "styles" : this.css.lineChartArea
  283. }).inject(this.middleContentArea)
  284. this.bottomContentArea = new Element("div.middleContentArea",{
  285. "styles" : this.css.bottomContentArea
  286. }).inject(this.elementContentListNode)
  287. this.detailArea = new Element("div.lineChartArea",{
  288. "styles" : this.css.detailArea
  289. }).inject(this.bottomContentArea)
  290. },
  291. loadData : function( callback, unit, year, month, async ){
  292. if( !unit )unit = this.unit;
  293. if( !year )year = this.year;
  294. if( !month )month = this.month;
  295. if( this.data[ unit + year + month ] ) {
  296. if(callback)callback();
  297. }else{
  298. this.actions.listStaticMonthUnitSum( unit, year, month, function( json ){
  299. var d = json.data || {};
  300. var data = this.data[ unit + year + month ] = {};
  301. var totals = data.totalData = {
  302. levelAsked : d.onSelfHolidayCount || 0,
  303. noSign : d.absenceDayCount || 0,
  304. lackOfTime : d.lackOfTimeCount || 0,
  305. abNormalDuty : d.abNormalDutyCount || 0,
  306. late : d.lateCount ? d.lateCount : 0,
  307. //leaveEarly : d.leaveEarlyCount ? d.leaveEarlyCount/2 : 0,
  308. normal : d.onDutyEmployeeCount || 0
  309. }
  310. var total = 0;
  311. for( var n in totals ){
  312. total += totals[n];
  313. }
  314. data.rateData = {
  315. levelAsked : (!totals.levelAsked || !total) ? 0 : ((totals.levelAsked/total * 100).toFixed(2) + "%"),
  316. noSign : (!totals.noSign || !total) ? 0 : ((totals.noSign/total * 100).toFixed(2) + "%"),
  317. lackOfTime : (!totals.lackOfTime || !total) ? 0 : ((totals.lackOfTime/total * 100).toFixed(2) + "%"),
  318. abNormalDuty : (!totals.abNormalDuty || !total) ? 0 : ((totals.abNormalDuty/total * 100).toFixed(2) + "%"),
  319. late : (!totals.late || !total) ? 0 : ((totals.late/total * 100).toFixed(2) + "%"),
  320. //leaveEarly : (!totals.leaveEarly || !total) ? 0 : ((totals.leaveEarly/total* 100).toFixed(2) + "%"),
  321. normal : (!totals.normal || !total) ? 0 : ((totals.normal/total* 100).toFixed(2) + "%")
  322. }
  323. if(callback)callback();
  324. }.bind(this), null, async )
  325. }
  326. },
  327. loadStatusColorNode : function(){
  328. this.statusColorArea.empty();
  329. this.statusColorTable = new Element("table",{
  330. "styles" : this.css.statusColorTable
  331. }).inject(this.statusColorArea)
  332. var totalData = this.data[ this.unit+this.year + this.month].totalData;
  333. var rateData = this.data[ this.unit+this.year + this.month].rateData;
  334. for(var status in this.statusColor){
  335. var tr = new Element("tr",{
  336. "styles" : this.css.statusColorTr
  337. }).inject(this.statusColorTable)
  338. var td = new Element("td",{
  339. "styles" : this.css.statusColorTd
  340. }).inject(tr)
  341. td.setStyle("background-color",this.statusColor[status]);
  342. var tr = new Element("tr",{
  343. "styles" : this.css.statusTextTr
  344. }).inject(this.statusColorTable)
  345. var td = new Element("td",{
  346. "styles" : this.css.statusTextTd,
  347. "text" : this.lp[status] +totalData[status]+ this.lp.day +"("+rateData[status]+")"
  348. }).inject(tr)
  349. }
  350. },
  351. loadPieChart : function(){
  352. //this.pieChartTitle = new Element("div.pieChartTitle",{
  353. // "styles" : this.css.pieChartTitle,
  354. // "text" : this.lp.index.pieChart
  355. //}).inject(this.pieChartArea)
  356. this.pieChartNode = new Element("div.pieChartNode",{
  357. "styles" : this.css.pieChartNode
  358. }).inject(this.pieChartArea)
  359. var data = this.data[this.unit+ this.year + this.month].totalData;
  360. this.pieChart = new MWF.xApplication.Attendance.Echarts(this.pieChartNode, this, data);
  361. this.pieChart.loadUnitPieChart();
  362. },
  363. loadBarChart : function(){
  364. this.barChartNode = new Element("div.barChartNode",{
  365. "styles" : this.css.barChartNode
  366. }).inject(this.barChartArea);
  367. var date = new Date( this.date.getFullYear() , this.date.getMonth(), this.date.getDate() );
  368. date.decrement("month", 1);
  369. var year_1 = date.getFullYear().toString();
  370. var month_1 = date.format( this.lp.dateFormatOnlyMonth );
  371. var data_1 = this.data[ this.unit + year_1 + month_1 ];
  372. date.decrement("month", 1);
  373. var year_2 = date.getFullYear().toString();
  374. var month_2 = date.format( this.lp.dateFormatOnlyMonth );
  375. var data_2 = this.data[ this.unit + year_2 + month_2 ];
  376. if( !data_1 ){
  377. this.loadData( null, this.unit, year_1, month_1, false )
  378. }
  379. if( !data_2 ){
  380. this.loadData( null, this.unit, year_2, month_2, false)
  381. }
  382. var d = [{
  383. year : year_2,
  384. month : month_2,
  385. data : this.data[this.unit+ year_2 + month_2].totalData
  386. },{
  387. year : year_1,
  388. month : month_1,
  389. data : this.data[this.unit+ year_1 + month_1].totalData
  390. },{
  391. year : this.year,
  392. month : this.month,
  393. data : this.data[this.unit+ this.year + this.month].totalData
  394. }];
  395. this.barChart = new MWF.xApplication.Attendance.Echarts(this.barChartNode, this, d );
  396. this.barChart.loadUnitBarChart();
  397. },
  398. loadDetail : function(){
  399. this.detailArea.empty();
  400. this.detailNode = new Element("div",{
  401. "styles" : this.css.detailNode
  402. }).inject(this.detailArea);
  403. this.detailTitleNode = new Element("div",{
  404. "styles" : this.css.detailTitleNode,
  405. "text" : this.lp.attendanceStatisic
  406. }).inject(this.detailNode)
  407. var table = new Element("table", {
  408. "width" : "100%", "border" : "0", "cellpadding" : "5", "cellspacing" : "0", "styles" : this.css.table, "class" : "editTable"
  409. }).inject( this.detailNode );
  410. var tr = new Element("tr", { "styles" : this.css.listHeadNode }).inject(table);
  411. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.name }).inject(tr);
  412. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.onDutyTimes }).inject(tr);
  413. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.offDutyTimes }).inject(tr);
  414. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.onDutyDayCount }).inject(tr);
  415. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.onSelfHolidayCount }).inject(tr);
  416. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.absenceDayCount }).inject(tr);
  417. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.lateTimes }).inject(tr);
  418. //var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.leaveEarlyTimes }).inject(tr);
  419. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.lackOfTimeCount }).inject(tr);
  420. var td = new Element("td", { "styles" : this.css.tableTitle, "text" : this.lp.abNormalDutyCount }).inject(tr);
  421. this.actions.listStaticMonthPersonByUnitNested(this.unit, this.year, this.month, function( json ){
  422. var data = json.data || [];
  423. data.sort( function(a, b){
  424. return b.onDutyDayCount - a.onDutyDayCount;
  425. })
  426. data.each(function( d ){
  427. var tr = new Element("tr").inject(table);
  428. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.employeeName.split("@")[0] }).inject(tr);
  429. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.onDutyTimes }).inject(tr);
  430. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.offDutyTimes }).inject(tr);
  431. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.onDutyDayCount }).inject(tr);
  432. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.onSelfHolidayCount }).inject(tr);
  433. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.absenceDayCount }).inject(tr);
  434. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.lateTimes }).inject(tr);
  435. //var td = new Element("td", { "styles" : this.css.tableValue , "text": d.leaveEarlyTimes }).inject(tr);
  436. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.lackOfTimeCount }).inject(tr);
  437. var td = new Element("td", { "styles" : this.css.tableValue , "text": d.abNormalDutyCount }).inject(tr);
  438. }.bind(this))
  439. }.bind(this))
  440. },
  441. listDetailFilterUser :function( callback, name, year, month ){
  442. //{'q_empName':'林玲','q_year':'2016','q_month':'03'}
  443. var filter = {};
  444. if( name )filter.q_empName = name;
  445. if( year )filter.q_year = year;
  446. if( month )filter.q_month = month.toString().length == 2 ? month : "0"+month;
  447. this.actions.listDetailFilterUser( filter, function(json){
  448. if( callback )callback(json.data);
  449. }.bind(this))
  450. },
  451. setContentSize: function(){
  452. var toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : {"x":0,"y":0};
  453. var titlebarSize = this.titleNode ? this.titleNode.getSize() : {"x":0,"y":0};
  454. var nodeSize = this.node.getSize();
  455. var pt = this.elementContentNode.getStyle("padding-top").toFloat();
  456. var pb = this.elementContentNode.getStyle("padding-bottom").toFloat();
  457. //var filterSize = this.filterNode.getSize();
  458. var filterConditionSize = this.filterConditionNode ? this.filterConditionNode.getSize() : {"x":0,"y":0};
  459. var height = nodeSize.y-toolbarSize.y-pt-pb-filterConditionSize.y-titlebarSize.y-10;
  460. this.elementContentNode.setStyle("height", ""+height+"px");
  461. },
  462. setNodeScroll: function(){
  463. var _self = this;
  464. MWF.require("MWF.widget.ScrollBar", function(){
  465. new MWF.widget.ScrollBar(this.elementContentNode, {
  466. "indent": false,"style":"xApp_TaskList", "where": "before", "distance": 30, "friction": 4, "axis": {"x": false, "y": true},
  467. "onScroll": function(y){
  468. }
  469. });
  470. }.bind(this));
  471. }
  472. });