How to use drawHeader method in stryker-parent

Best JavaScript code snippet using stryker-parent

banner.js

Source:banner.js Github

copy

Full Screen

1/*2______________________________________________________________________300000_______________00000_____________________________________________40___________________0_________________0________________0______________50___________________0_________________0________________0______________60___________0_______0_________0_______0________________0______________7000___0_00_____000__000__000____0_00__0________________0__0__000______80_____00__0_0_0_____0___0___0_0_00__0_0000___00__0_00__0_0__0_________90_____0_____0__000__0___00000_0_0_____0___0_0__0_00__0_00____000______100_____0_____0_____0_0___0___0_0_0_____0___0_0000_0___0_0_0______0_____1100000_0_____0_0000__0___0___0_0_0_____0000__0__0_0___0_0__0_0000______12*/13var asciiBanner = '______________________________________________________________________00000_______________00000_____________________________________________0___________________0_________________0________________0______________0___________________0_________________0________________0______________0___________0_______0_________0_______0________________0______________000___0_00_____000__000__000____0_00__0________________0__0__000______0_____00__0_0_0_____0___0___0_0_00__0_0000___00__0_00__0_0__0_________0_____0_____0__000__0___00000_0_0_____0___0_0__0_00__0_00____000______0_____0_____0_____0_0___0___0_0_0_____0___0_0000_0___0_0_0______0_____00000_0_____0_0000__0___0___0_0_0_____0000__0__0_0___0_0__0_0000______';14(function($) { 15 $.fn.extend({ 16 //Let the user resize the canvas to the size they want 17 resizeCanvas: function(w, h) { 18 var c = $(this)[0] 19 c.width = w; 20 c.height = h 21 } 22 }) 23 })(jQuery)24function OnReady(){25 // temp crap till I fix this26 var canvasw = 580; var canvash = 104; var imgh = 10; var imgw = 70; var drawheader = []; for(var i = 0; i < imgh*imgw; i++) drawheader[i] = 255; header = [];27 for(var i=0; i<asciiBanner.length; i++) header[i] = asciiBanner[i] == '_' ? 0 : 1;28 var drawheader = new Array();29 var conwayfront = new Array();30 var conwayback = new Array();31 var backbuffer = new Array();32 33 window.drawstate = 0;34 var frame = 0;35 var framerate = 15;36 window.animating = false;37 for( var j = 0; j < imgh; j++ ){38 for( var i = 0; i < imgw; i++ ){39 drawheader[i + j*imgw] = header[i + j*imgw];40 conwayfront[i + j*imgw] = 0;41 conwayback[i + j*imgw] = drawheader[i + j*imgw] > 0 ? 1 : 0;42 }43 }44 45 function draw(){46 var canvas = document.getElementById('headercanvas');47 48 $('#headercanvas').resizeCanvas($('#headercanvas').parent().width(), 104); 49 canvasw = $('#headercanvas').parent().width();50 if (canvas.getContext){51 var ctx = canvas.getContext('2d');52 ctx.fillStyle = 'rgb(17,17,17)';53 ctx.fillRect( 0, 0, canvasw, canvash );54 for( var j = 0; j < imgh; j++ ){55 for( var i = 0; i < imgw; i++ ){56 if( drawheader[i + (j*imgw)] != 0 ){57 var radius = 3*($(window).width() < 600 ? $(window).width()/600 : 1);58 ctx.fillStyle = 'rgb(' + drawheader[i + (j*imgw)] + ',' + drawheader[i + (j*imgw)] + ',' + drawheader[i + (j*imgw)] + ')';59 ctx.beginPath();60 ctx.arc(radius + i*(canvasw/imgw), radius + j*(canvash/imgh), radius, 0, Math.PI*2, true);61 ctx.closePath();62 ctx.fill();63 }64 }65 }66 }67 }68 69 function HeaderReset() {70 drawstate = Math.floor( Math.random() * 4 ) + 1;71 frame = 0;72 if( animating == false ){73 for( var j = 0; j < imgh; j++ ){74 for( var i = 0; i < imgw; i++ ){75 conwayfront[i + j*imgw] = 0;76 conwayback[i + j*imgw] = drawheader[i + j*imgw] > 0 ? 1 : 0;77 }78 }79 animating = true;80 } else animating = false;81 //setTimeout( function(){ animating = false; }, 10000 );82 }83 84 // --- //85 86 var x = Math.floor( Math.random() * imgw );87 var y = Math.floor( Math.random() * imgh );88 var direction = Math.floor( Math.random() * 4 );89 90 // --- //91 92 function GetCell( x, y ){93 if( x < 0 ) x += imgw;94 if( y < 0 ) y += imgh;95 if( x >= imgw ) x -= imgw;96 if( y >= imgh ) y -= imgh;97 return conwayback[x + y*imgw] > 0 ? 1 : 0;98 }99 100 function NumNeighbors( x, y ){101 return GetCell(x+1,y)+GetCell(x-1,y)+GetCell(x,y+1)+GetCell(x,y-1)+GetCell(x+1,y+1)+GetCell(x-1,y-1)+GetCell(x+1,y-1)+GetCell(x-1,y+1);102 }103 104 function FrameCallback(){105 106 switch( animating ? drawstate : 0 ){107 108 case 0:109 for( var j = 0; j < imgh; j++ ){110 for( var i = 0; i < imgw; i++ ){111 if( header[i + j*imgw] > 0 ){112 drawheader[i + j*imgw] += 10;113 if( drawheader[i + j*imgw] > 255 ) drawheader[i + j*imgw] = 255;114 } else {115 drawheader[i + j*imgw] -= 20;116 if( drawheader[i + j*imgw] < 0 ) drawheader[i + j*imgw] = 0;117 }118 }119 } 120 break;121 122 case 1:123 for( var j = 0; j < imgh; j++ ){124 for( var i = 0; i < imgw; i++ ){125 drawheader[i + j*imgw] = Math.floor( Math.random() * 500 ) > 0 ? drawheader[i + j*imgw] : 0;126 }127 }128 break;129 130 // --- //131 case 2:132 for( var j = 0; j < imgh; j++ ){133 for( var i = 0; i < imgw; i++ ){134 if( drawheader[i + j*imgw] >= 0 ) drawheader[i + j*imgw] -= 2;135 }136 }137 drawheader[x + y*imgw] = 255;138 if( frame % ( Math.floor( Math.random() * 2 ) * 2 + 1 ) == 0 ){139 direction += Math.floor( Math.random() * 3 ) - 1;140 if( direction < 0 ) direction = 0;141 if( direction > 3 ) direction = direction % 4;142 }143 switch( direction ){144 case 0:145 y++;146 break;147 148 case 1:149 x++;150 break;151 152 case 2:153 y--;154 break;155 156 case 3:157 x--;158 break;159 }160 if( x >= imgw )x = x % imgw;161 if( y >= imgh )y = y % imgh;162 if( x < 0 ) x = imgw + x;163 if( y < 0 ) y = imgh + y;164 break;165 166 // --- //167 168 case 3:169 if( frame % 10 == 0 ){170 for( var j = 0; j < imgh; j++ ){171 for( var i = 0; i < imgw; i++ ){172 var cell = conwayback[i + j*imgw];173 var nbrs = NumNeighbors( i, j );174 if( nbrs < 2 ) cell = 0;175 if( nbrs > 3 ) cell = 0;176 if( nbrs == 3 ) cell = 1;177 conwayfront[i + j*imgw] = cell;178 }179 }180 for( var j = 0; j < imgh; j++ ){181 for( var i = 0; i < imgw; i++ ){182 conwayback[i + j*imgw] = conwayfront[i + j*imgw];183 }184 }185 }186 for( var j = 0; j < imgh; j++ ){187 for( var i = 0; i < imgw; i++ ){188 if( conwayback[i + j*imgw] > 0 ){189 drawheader[i + j*imgw] += 10;190 if( drawheader[i + j*imgw] > 255 ) drawheader[i + j*imgw] = 255;191 } else {192 drawheader[i + j*imgw] -= 10;193 if( drawheader[i + j*imgw] < 0 ) drawheader[i + j*imgw] = 0;194 }195 }196 }197 break;198 199 // --- //200 case 4:201 for( var j = 0; j < imgh; j++ ){202 for( var i = 0; i < imgw; i++ ){203 backbuffer[i + j*imgw] = drawheader[i + j*imgw];204 }205 }206 for( var i = 0; i < imgw/2; i++ ){207 for( var j = 0; j < imgh; j++ ){208 drawheader[i + (imgw/2) + j*imgw] = backbuffer[i + (imgw/2) - 1 + j*imgw];209 drawheader[(imgw/2) - ( i + 1 ) + j*imgw] = backbuffer[(imgw/2) - i + j*imgw];210 }211 }212 for( var j = 0; j < imgh; j++ ){213 drawheader[imgw/2 + j*imgw] = 0;214 drawheader[imgw/2 + 1 + j*imgw] = 0;215 }216 for( var j = imgh - 1; j > Math.floor( ( Math.random() * Math.random() * imgh ) ); j-- ){217 drawheader[imgw/2 + j*imgw] = 255;218 drawheader[imgw/2 + 1 + j*imgw] = 255;219 }220 break;221 222 // --- //223 case 5:224 for( var j = 0; j < imgh; j++ ){225 for( var i = 0; i < imgw; i++ ){226 var xalpha = Math.sin( (Math.PI * i * frame) / imgw );227 var yalpha = Math.sin( (3 * j * frame ) / imgh );228 var xfad = Math.sin( (Math.PI * i ) / imgw );229 var yfad = Math.sin( (Math.PI * j ) / imgh );230 drawheader[i + j*imgw] = Math.floor( ( xalpha * yalpha * 255 * xfad * yfad ) + ( header[i + j*imgw] / frame ) );231 if( drawheader[i + j*imgw] > 255 ) drawheader[i + j*imgw] = 255;232 }233 }234 break;235 }236 draw();237 setTimeout(FrameCallback, 1000/framerate);238 frame++;239 }240 241 // ---- //242 243 FrameCallback();244 245 // ---- //246 var canvaswidth = 400;247 var canvasheight = 300;248 var mousex = 0;249 var mousey = 0;250 251 var seqmatrix = [];252 253 var displaymatrix = [];254 255 for(var i = 0; i < 16; i++){256 257 seqmatrix[i] = new Array();258 259 displaymatrix[i] = new Array();260 261 for(var j = 0; j < 16; j++){262 263 seqmatrix[i][j] = 0;264 265 displaymatrix[i][j] = 0;266 267 }268 269 }270 271 seqmatrix[0]['name'] = "";272 seqmatrix[1]['name'] = "Kick";273 seqmatrix[2]['name'] = "Snare";274 seqmatrix[3]['name'] = "E4";275 seqmatrix[4]['name'] = "D4";276 seqmatrix[5]['name'] = "C4";277 seqmatrix[6]['name'] = "B4";278 seqmatrix[7]['name'] = "A4";279 seqmatrix[8]['name'] = "G3";280 seqmatrix[9]['name'] = "F3";281 seqmatrix[10]['name'] = "E3";282 seqmatrix[11]['name'] = "D3";283 seqmatrix[12]['name'] = "C3";284 seqmatrix[13]['name'] = "B3";285 seqmatrix[14]['name'] = "A3";286 seqmatrix[15]['name'] = "G2";287 288 seqmatrix[1]['play'] = function(){audiogenerator['kick'].playnote(0.2,0.125);};289 seqmatrix[2]['play'] = function(){audiogenerator['perc'].playnote(0.2,0.125);};290 seqmatrix[3]['play'] = function(){audiogenerator['chimes'].playnote(64,0.1,0.1);};291 seqmatrix[4]['play'] = function(){audiogenerator['chimes'].playnote(62,0.1,0.1);};292 seqmatrix[5]['play'] = function(){audiogenerator['chimes'].playnote(60,0.1,0.1);};293 seqmatrix[6]['play'] = function(){audiogenerator['chimes'].playnote(59,0.1,0.1);};294 seqmatrix[7]['play'] = function(){audiogenerator['chimes'].playnote(58,0.1,0.1);};295 seqmatrix[8]['play'] = function(){audiogenerator['chimes'].playnote(55,0.1,0.1);};296 seqmatrix[9]['play'] = function(){audiogenerator['chimes'].playnote(53,0.1,0.1);};297 seqmatrix[10]['play'] = function(){audiogenerator['chimes'].playnote(52,0.1,0.1);};298 seqmatrix[11]['play'] = function(){audiogenerator['chimes'].playnote(50,0.1,0.1);};299 seqmatrix[12]['play'] = function(){audiogenerator['chimes'].playnote(48,0.1,0.1);};300 seqmatrix[13]['play'] = function(){audiogenerator['chimes'].playnote(47,0.1,0.1);};301 seqmatrix[14]['play'] = function(){audiogenerator['chimes'].playnote(45,0.1,0.1);};302 seqmatrix[15]['play'] = function(){audiogenerator['chimes'].playnote(43,0.1,0.1);};303 304 $('button#reset').click(function(){305 306 for(var i = 0; i < 16; i++){307 308 for(var j = 0; j < 16; j++){309 310 seqmatrix[i][j] = 0;311 312 }313 314 }315 316 });317 318 $('button#preset').click(function(){319 320 for(var i = 0; i < 16; i++){321 322 for(var j = 0; j < 16; j++){323 324 seqmatrix[i][j] = 0;325 326 }327 328 }329 330 seqmatrix[1][0] = 1;331 seqmatrix[1][4] = 1;332 seqmatrix[1][8] = 1;333 seqmatrix[1][12] = 1;334 seqmatrix[2][4] = 1;335 seqmatrix[2][12] = 1;336 seqmatrix[5][12] = 1;337 seqmatrix[6][14] = 1;338 seqmatrix[8][8] = 1;339 seqmatrix[8][12] = 1;340 seqmatrix[8][14] = 1;341 seqmatrix[10][2] = 1;342 seqmatrix[10][6] = 1;343 seqmatrix[10][8] = 1;344 seqmatrix[10][12] = 1;345 seqmatrix[10][14] = 1;346 seqmatrix[12][2] = 1;347 seqmatrix[12][6] = 1;348 seqmatrix[12][15] = 1;349 seqmatrix[13][4] = 1;350 seqmatrix[13][8] = 1;351 352 });353 354 var bpm = 120;355 356 var cursor = 0;357 358 var inc = 0;359 360 var starttime = 0;361 362 var nowtime = 0;363 364 var targettime = 0;365 366 function SeqCallback(){367 368 var elapsed = 0;369 370 nowtime = (new Date()).getTime();371 372 elapsed = nowtime-starttime;373 374 targettime = (1000*60/bpm)/4;375 376 if(elapsed > targettime || (targettime - elapsed) < 5 ){377 378 starttime = nowtime;379 380 for(var i = 1; i < 16; i++){381 382 if(seqmatrix[i][cursor] == 1) seqmatrix[i]['play']();383 384 }385 386 cursor = cursor + 1;387 388 while(cursor>=16) cursor = cursor - 16;389 390 }391 392 setTimeout(SeqCallback,5);393 394 }395 396 if($('#seqcanvas').length>0) SeqCallback();397 398 // --- //399 400 if($('#seqcanvas').length>0) $('#seqcanvas').mousemove(function(e){401 var left = $('#seqcanvas').position().left;402 403 var top = $('#seqcanvas').position().top;404 var x = e.pageX - left;405 var y = e.pageY - top;406 407 if(x<0) x = 0;408 if(x>canvaswidth) x = canvaswidth-1;409 if(y<0) y = 0;410 if(y>canvasheight) x = canvasheight-1;411 412 mousex = x;413 mousey = y;414 });415 416 if($('#seqcanvas').length>0) $('#seqcanvas').click(function(){417 418 for(var i = 0; i < 16; i++){419 420 for(var j = 1; j < 16; j++){421 422 if(mousex > i*300/16 && mousey > j*300/16 && mousex < (i+1)*300/16 && mousey < (j+1)*300/16){423 424 if(seqmatrix[j][i] == 1){425 426 seqmatrix[j][i] = 0;427 428 } else {429 430 seqmatrix[j][i] = 1;431 432 }433 434 }435 436 }437 438 }439 440 });441 442 // --- //443 444 function SeqDrawCallback(){445 446 var canvas = document.getElementById('seqcanvas');447 448 var context = canvas.getContext('2d');449 450 var w = 300;451 452 var h = 300;453 454 var aw = 400;455 456 context.fillStyle = 'rgb(34,34,34)';457 458 context.fillRect(0,0,aw,h );459 460 context.fillStyle = 'rgb(255,255,255)';461 context.strokeStyle = 'rgb(64,64,64)';462 463 context.lineWidth = 3;464 465 for(var i = 0; i < 16; i++){466 467 if(cursor==i){468 469 seqmatrix[0][i] = 1;470 471 } else {472 473 seqmatrix[0][i] = 0;474 475 }476 477 }478 479 for(var i = 0; i < 16; i++){480 481 for(var j = 0; j < 16; j++){482 483 displaymatrix[i][j] = displaymatrix[i][j]*2/3;484 485 if(displaymatrix[i][j]<0.01) displaymatrix[i][j] = 0;486 487 if(seqmatrix[i][j] == 1) displaymatrix[i][j] = 1;488 489 }490 491 }492 493 for(var i = 0; i < 16; i++){494 495 for(var j = 0; j < 16; j++){496 497 context.fillStyle = 'rgba(255,255,255,' + (displaymatrix[j][i]) + ')';498 499 context.strokeStyle = 'rgba(64,64,64,' + (displaymatrix[j][i]) + ')';500 context.strokeRect(i*w/16+2,j*h/16+2,w/16-4,h/16-4);501 502 context.fillRect(i*w/16+2,j*h/16+2,w/16-4,h/16-4);503 504 }505 506 }507 508 context.lineWidth = 2;509 510 context.fillStyle = 'rgb(255,255,255)';511 512 context.textBaseline = 'top';513 514 context.font = '10pt Arial';515 516 for(var i = 0; i < 16; i++ ){517 518 context.strokeStyle = 'rgb(64,64,64)';519 520 context.strokeText(seqmatrix[i]['name'],310,i*h/16+2,80);521 522 context.fillText(seqmatrix[i]['name'],310,i*h/16+2,80);523 524 }525 526 if(canvas && context) setTimeout(SeqDrawCallback,1000/30);527 528 }529 530 if($('#seqcanvas').length>0) SeqDrawCallback();531 532 533 534 // ---- //535 536 $('div.cat').hide();537 538 $('h1.category').click(539 540 function(){541 542 if( $(this).parent().find('div.cat').is(':hidden') ){543 544 $(this).parent().parent().find('div.cat').hide(100);545 546 $(this).parent().find('div.cat').show(100);547 548 } else {549 550 $(this).parent().find('div.cat').hide(100);551 552 }553 554 }555 556 );557 558 $('canvas#headercanvas').click( HeaderReset );559 560 $('.audio').each(function(index,value){561 562 var audio_file = $(this).attr('href'); 563 $(this).attr('id','audioplayer_'+index);564 AudioPlayer.embed('audioplayer_'+index, {soundFile: audio_file});565 });566 567}...

Full Screen

Full Screen

calendar.js

Source:calendar.js Github

copy

Full Screen

1// ****************************************************************************************************2// Last modified on3// 11-MAR-20154// ****************************************************************************************************5//==================================================================================================6// File name: clients.js7//==================================================================================================8function CreateSubPage(params){9 return new Clients(params)10};11Class.Inherits(Clients, SubPageTable);12function Clients(Params) {13 Clients.prototype.parent.call(this, Params);14};15Clients.prototype.classID = "Clients";16Clients.prototype.dataSource = "calendar";17Clients.prototype.showToolbar = true;18Clients.prototype.horzScroll = false;19Clients.prototype.showPager = false;20Clients.prototype.showSummary = false;21Clients.prototype.Initialize = function(Params) {22 Clients.prototype.parent.prototype.Initialize.call(this, Params);23 this.timeScale = 60;24 this.startTime = 7;25 this.columnCount = 7;26 // this.columnCount = 2; 27 // this.columnCount = 1;28 this.date = new Date(2014, 10, 10); 29 this.appointmentContainers = new JList();30 this.timeOffset = 8;31};32Clients.prototype.Test = function() {33 // alerts("here");34};35Clients.prototype.InitializeToolbar = function(toolbar) {36 Clients.prototype.parent.prototype.InitializeToolbar.call(this, toolbar);37 var self = this;38 // toolbar.NewItem({39 // id: "test",40 // icon: "/engine/images/notebook-new-24.png",41 // hint: "Test create appointments...",42 // click: function(item) {43 // self.Test();44 // }45 // });46 toolbar.NewItem({47 id: "day",48 icon: "/engine/images/calendar-day-24.png",49 hint: "View daily appointments",50 click: function(item) {51 // self.Test();52 }53 });54 toolbar.NewItem({55 id: "week",56 icon: "/engine/images/calendar-blue-24.png",57 hint: "View weekly appointments",58 click: function(item) {59 // self.Test();60 }61 });62 toolbar.NewItem({63 id: "month",64 icon: "/engine/images/calendar-month-24.png",65 hint: "View monthly appointments",66 click: function(item) {67 // self.Test();68 }69 });70 toolbar.NewItem({71 id: "previous",72 icon: "/engine/images/arrow-left-24.png",73 hint: "Previous",74 click: function(item) {75 // self.Test();76 }77 });78 toolbar.NewItem({79 id: "next",80 icon: "/engine/images/arrow-right-24.png",81 hint: "Next",82 click: function(item) {83 // self.Test();84 }85 });86};87Clients.prototype.AddAppointment = function(id) {88 if(this.grid.appointments.gotoKey(id)) {89 var date = this.grid.appointments.columnByName("Start").asDate();90 var dateID = date.format("dd-mmm-yy");91 var appointments = this.appointmentContainers.get(dateID);92 if(appointments) {93 appointments.AddAppointment({94 id: id,95 start: this.grid.appointments.columnByName("Start").asTime(),96 finish: this.grid.appointments.columnByName("Finish").asTime(),97 color: this.grid.appointments.get("LabelColor")98 })99 }'100 }101}102Clients.prototype.PaintAppointments = function(grid) {103 var self = this;104 this.appointmentContainers.clear();105 grid.Painter.content.find("table[grid-sec='content'] tbody tr:first").each(function(i, tr) {106 var date = new Date(self.date);107 $(tr).find("td").each(function(j, td) {108 if($(td).attr("cal-sec") == "hour") {109 self.appointmentContainers.add(110 date.format("dd-mmm-yy"), 111 new JAppointments({112 container: $(td),113 scale: self.timeScale,114 startTime: self.startTime, 115 date: date116 })117 );118 119 date.addDays(1);120 };121 });122 });123 124 this.grid.appointments.each(function(row, i) {125 self.AddAppointment(row.ID);126 })127 128 this.appointmentContainers.each(function(i, appointment) {129 appointment.PaintAppointments();130 });131};132Clients.prototype.InitializeGrid = function(grid) {133 Clients.prototype.parent.prototype.InitializeGrid.call(this, grid);134 135 // grid.options.allowSort = true;136 grid.options.allowSort = false;137 // grid.options.showSelection = true;138 grid.options.showSelection = false;139 // grid.options.showBand = true;140 // grid.options.simpleSearch = true;141 // grid.options.simpleSearchField = "Name";142 grid.optionsData.editCallback = function(grid, id) {143 // __client(id);144 };145 146 grid.Events.OnInitRow.add(function(grid, row) {147 // if(grid.dataset.get("pa_id") != 0) {148 // row.attr("x-pa", "true")149 // };150 });151 152 grid.Methods.add("initListData", function(grid, data) {153 return new Dataset(grid.Methods.call("resetListData", data), "Data");154 });155 156 grid.Methods.add("resetListData", function(grid, data) {157 var rawData = [];158 var add = function(id, time) {159 var row = {id:id, time:id.strZero(2)+":00"};160 for(var i = 1; i <= grid.owner.columnCount; i++) {161 row["day_"+i] = "";162 };163 rawData.push(row)164 };165 for(var i = grid.owner.startTime; i <= 23; i++) {166 add(i);167 };168 169 return rawData;170 });171 172 grid.Events.OnInitSubData.add(function(grid, data) {173 if(data.index == 0) {174 if(grid.appointments) {175 grid.appointments.resetData(data.rawData)176 } else {177 grid.appointments = new Dataset(data.rawData, "Appointments")178 grid.appointments.Columns179 .setprops("ID", {label:"ID", numeric:true, key: true})180 .setprops("DoctorID", {numeric:true})181 .setprops("NameID", {numeric:true})182 .setprops("Name", {label:"Name"})183 .setprops("DoctorName", {label:"Doctor"})184 .setprops("Start", {label:"Start", type:"date"})185 .setprops("Finish", {label:"Finish", type:"date"})186 .setprops("LabelColor")187 .setprops("Message")188 .setprops("State", {numeric:true})189 }190 }191 });192 193 grid.Events.AfterRepainContent.add(function(grid) {194 // alerts("OK");195 grid.owner.PaintAppointments(grid);196 }); 197}198Clients.prototype.InitializeQuery = function(data) {199 Clients.prototype.parent.prototype.InitializeQuery.call(this, data);200 data.addColumn("date", this.date.format("dd-mmm-yy"));201 data.addColumn("date_count", this.columnCount, {numeric:true});202 data.addColumn("time_offset", 0, {numeric:true});203 // data.addColumn("time_offset", -8, {numeric:true});204};205Clients.prototype.InitializeTableData = function(data) {206 Clients.prototype.parent.prototype.InitializeTableData.call(this, data);207 var dateName = new Date(this.date);208 var dateFormat = "ddd, mmmm d";209 data.Columns.setprops("id", {label:"ID", numeric:true, key: true})210 data.Columns.setprops("time", {label:"Time"});211 data.Columns.setprops("day_1", {label:dateName.format(dateFormat)})212 for(var i = 2; i <= this.columnCount; i++) {213 data.Columns.setprops("day_"+i, {label:dateName.addDays(1).format(dateFormat)})214 };215};216Clients.prototype.InitializeColumns = function(grid) {217 Clients.prototype.parent.prototype.InitializeColumns.call(this, grid);218 var self = this;219 var counter = 0;220 221 desktop.zIndex += 100;222 // var date = new Date(this.date);223 var drawContent = function(cell, column) {224 cell.attr("cal-sec", "hour");225 cell.css("z-index", desktop.zIndex--);226 // if(counter++ < grid.owner.columnCount) {227 // self.appointmentContainers.add(228 // date.format("dd-mmm-yy"), 229 // new JAppointments({230 // container: cell,231 // scale: self.timeScale,232 // startTime: self.startTime, 233 // date: date234 // })235 // );236 237 // date.addDays(1);238 // }239 };240 241 var drawHeader = function(cell, column) {242 // cell.html(".");243 };244 245 grid.InitBands("Appointments", function(band) {246 var date = self.date;247 // alerts(date.format("dd-mmm-yy"));248 band.NewColumn({fname: "time", width: 47, fixedWidth:true, 249 drawContent: function(cell) {250 cell.attr("cal-sec", "time");251 },252 drawHeader: function(cell) {253 cell.html("");254 }255 });256 257 for(var i = 1; i <= grid.owner.columnCount; i++) {258 band.NewColumn({fname: "day_"+i, width: 100, drawHeader:drawHeader, drawContent:drawContent});259 };260 261 // band.NewColumn({fname: "day_1", width: 100, drawHeader:drawHeader, drawContent:drawContent});262 // band.NewColumn({fname: "day_2", width: 100, drawHeader:drawHeader, drawContent:drawContent});263 // band.NewColumn({fname: "day_3", width: 100, drawHeader:drawHeader, drawContent:drawContent});264 // band.NewColumn({fname: "day_4", width: 100, drawHeader:drawHeader, drawContent:drawContent});265 // band.NewColumn({fname: "day_5", width: 100, drawHeader:drawHeader, drawContent:drawContent});266 // band.NewColumn({fname: "day_6", width: 100, drawHeader:drawHeader, drawContent:drawContent});267 // band.NewColumn({fname: "day_7", width: 100, drawHeader:drawHeader, drawContent:drawContent});268 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2strykerParent.drawHeader();3var strykerParent = require('stryker-parent');4strykerParent.drawHeader();5var strykerParent = require('stryker-parent');6strykerParent.drawHeader();7var strykerParent = require('stryker-parent');8strykerParent.drawHeader();9var strykerParent = require('stryker-parent');10strykerParent.drawHeader();11var strykerParent = require('stryker-parent');12strykerParent.drawHeader();13var strykerParent = require('stryker-parent');14strykerParent.drawHeader();15var strykerParent = require('stryker-parent');16strykerParent.drawHeader();17var strykerParent = require('stryker-parent');18strykerParent.drawHeader();19var strykerParent = require('stryker-parent');20strykerParent.drawHeader();21var strykerParent = require('stryker-parent');22strykerParent.drawHeader();23var strykerParent = require('stryker-parent');24strykerParent.drawHeader();25var strykerParent = require('stryker-parent');26strykerParent.drawHeader();27var strykerParent = require('stryker-parent');28strykerParent.drawHeader();

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker-parent');2var drawHeader = stryker.drawHeader;3drawHeader('Hello World!');4var stryker = require('stryker-child');5var drawHeader = stryker.drawHeader;6drawHeader('Hello World!');

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var strykerParent = new strykerParent();3strykerParent.drawHeader();4var strykerParent = require('stryker-parent');5var strykerParent = new strykerParent();6strykerParent.drawHeader();7var strykerParent = require('stryker-parent');8var strykerParent = new strykerParent();9strykerParent.drawHeader();10var strykerParent = require('stryker-parent');11var strykerParent = new strykerParent();12strykerParent.drawHeader();13var strykerParent = require('stryker-parent');14var strykerParent = new strykerParent();15strykerParent.drawHeader();16var strykerParent = require('stryker-parent');17var strykerParent = new strykerParent();18strykerParent.drawHeader();19var strykerParent = require('stryker-parent');20var strykerParent = new strykerParent();21strykerParent.drawHeader();22var strykerParent = require('stryker-parent');23var strykerParent = new strykerParent();24strykerParent.drawHeader();25var strykerParent = require('

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2strykerParent.drawHeader();3module.exports = {4drawHeader: function() {5console.log('****************************************');6console.log('Stryker - JavaScript Mutation Test');7console.log('****************************************');8}9};10{11"scripts": {12},13}14{15"dependencies": {}16}17[*.{js,py}]18{19"parserOptions": {20},21"env": {22}23}

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful