|
136 | 136 | <tr>
|
137 | 137 | @if (ViewBag.ShowString == "true")
|
138 | 138 | {
|
139 |
| - <th>StringProperty</th> |
| 139 | + <th>StringProperty</th> |
140 | 140 | }
|
141 | 141 | <th>Integer</th>
|
142 | 142 | <th>IntegerNullable</th>
|
|
177 | 177 |
|
178 | 178 | @if (ViewBag.ShowChar == "true")
|
179 | 179 | {
|
180 |
| - <th>CharProperty</th> |
181 |
| - <th>CharNullable</th> |
| 180 | + <th>CharProperty</th> |
| 181 | + <th>CharNullable</th> |
182 | 182 | }
|
183 | 183 |
|
184 | 184 | @if (ViewBag.ShowString == "true")
|
185 | 185 | {
|
186 |
| - <th>Nested Model StringProperty</th> |
| 186 | + <th>Nested Model StringProperty</th> |
187 | 187 | }
|
188 | 188 | <th>Nested Model Integer</th>
|
189 | 189 | <th>Nested Model IntegerNullable</th>
|
|
224 | 224 |
|
225 | 225 | @if (ViewBag.ShowChar == "true")
|
226 | 226 | {
|
227 |
| - <th>Nested Model CharProperty</th> |
228 |
| - <th>Nested Model CharNullable</th> |
| 227 | + <th>Nested Model CharProperty</th> |
| 228 | + <th>Nested Model CharNullable</th> |
229 | 229 | }
|
230 | 230 | </tr>
|
231 | 231 | </thead>
|
|
353 | 353 | @if (ViewBag.dataSourceApp == "mvc")
|
354 | 354 | {
|
355 | 355 | @:url: "/home/GetData",
|
356 |
| - } else if(ViewBag.dataSourceApp == "webapi2") |
| 356 | + } else if (ViewBag.dataSourceApp == "webapi2") |
357 | 357 | {
|
358 | 358 | @:url: "@ViewBag.WebApi2Url/home",
|
359 | 359 | }
|
|
474 | 474 | { "data": "NestedModel.BooleanProperty", searchable: false, "defaultContent": "" },
|
475 | 475 | { "data": "NestedModel.BooleanNullable", searchable: false, "defaultContent": "" },
|
476 | 476 |
|
477 |
| - @if(ViewBag.ShowChar == "true") |
| 477 | + @if (ViewBag.ShowChar == "true") |
478 | 478 | {
|
479 | 479 | @:{ "data": "NestedModel.CharProperty", searchable: true, "defaultContent": "" },
|
480 | 480 | @:{ "data": "NestedModel.CharNullable", searchable: true, "defaultContent": "" },
|
481 | 481 | }
|
482 | 482 | ],
|
483 |
| - "columnDefs": [ |
484 |
| - { |
485 |
| - "render": function (data, type, row) { |
486 |
| - if (!row.DateTimeProperty) { |
487 |
| - return ""; |
488 |
| - } |
489 |
| -
|
490 |
| - date = new Date(parseInt(row.DateTimeProperty.replace("/Date(", "").replace(")/", ""), 10)); |
491 |
| -
|
492 |
| - return date.toUTCString(); |
493 |
| - }, |
494 |
| - "targets": 23 |
495 |
| - }, |
496 |
| -
|
497 |
| - { |
498 |
| - "render": function (data, type, row) { |
499 |
| - var prop = row.DateTimeNullable; |
500 |
| -
|
501 |
| - if (!prop) { |
502 |
| - return ""; |
503 |
| - } |
504 |
| -
|
505 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
506 |
| -
|
507 |
| - return date.toUTCString(); |
508 |
| - }, |
509 |
| - "targets": 24 |
510 |
| - }, |
511 |
| -
|
512 |
| - { |
513 |
| - "render": function (data, type, row) { |
514 |
| - var prop = row.DateTimeOffsetProperty; |
515 |
| -
|
516 |
| - if (!prop) { |
517 |
| - return ""; |
518 |
| - } |
519 |
| -
|
520 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
521 |
| -
|
522 |
| - return date.toUTCString(); |
523 |
| - }, |
524 |
| - "targets": 25 |
525 |
| - }, |
526 |
| -
|
527 |
| - { |
528 |
| - "render": function (data, type, row) { |
529 |
| - var prop = row.DateTimeOffsetNullable; |
530 |
| -
|
531 |
| - if (!prop) { |
532 |
| - return ""; |
533 |
| - } |
534 |
| -
|
535 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
536 |
| -
|
537 |
| - return date.toUTCString(); |
538 |
| - }, |
539 |
| - "targets": 26 |
540 |
| - }, |
541 |
| -
|
542 |
| - { |
543 |
| - "render": function (data, type, row) { |
544 |
| - if (!row.NestedModel) return ''; |
545 |
| -
|
546 |
| - var prop = row.NestedModel.DateTimeProperty; |
547 |
| -
|
548 |
| - if (!prop) { |
549 |
| - return ""; |
550 |
| - } |
551 |
| -
|
552 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
553 |
| -
|
554 |
| - return date.toUTCString(); |
555 |
| - }, |
556 |
| - "targets": 54 |
557 |
| - }, |
558 |
| -
|
559 |
| - { |
560 |
| - "render": function (data, type, row) { |
561 |
| - if (!row.NestedModel) return ''; |
562 |
| -
|
563 |
| - var prop = row.NestedModel.DateTimeNullable; |
564 |
| -
|
565 |
| - if (!prop) { |
566 |
| - return ""; |
567 |
| - } |
568 |
| -
|
569 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
570 |
| -
|
571 |
| - return date.toUTCString(); |
572 |
| - }, |
573 |
| - "targets": 55 |
574 |
| - }, |
575 |
| -
|
576 |
| - { |
577 |
| - "render": function (data, type, row) { |
578 |
| - if (!row.NestedModel) return ''; |
579 |
| -
|
580 |
| - var prop = row.NestedModel.DateTimeOffsetProperty; |
581 |
| -
|
582 |
| - if (!prop) { |
583 |
| - return ""; |
584 |
| - } |
585 |
| -
|
586 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
587 |
| -
|
588 |
| - return date.toUTCString(); |
589 |
| - }, |
590 |
| - "targets": 56 |
591 |
| - }, |
592 |
| -
|
593 |
| - { |
594 |
| - "render": function (data, type, row) { |
595 |
| - if (!row.NestedModel) return ''; |
596 |
| -
|
597 |
| - var prop = row.NestedModel.DateTimeOffsetNullable; |
598 |
| -
|
599 |
| - if (!prop) { |
600 |
| - return ""; |
601 |
| - } |
602 |
| -
|
603 |
| - date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
604 |
| -
|
605 |
| - return date.toUTCString(); |
606 |
| - }, |
607 |
| - "targets": 57 |
608 |
| - }, |
609 |
| - ] |
610 |
| - }); |
| 483 | + @if (ViewBag.dataSourceApp == "mvc") |
| 484 | + { |
| 485 | + @: "columnDefs": [ |
| 486 | + @: { |
| 487 | + @: "render": function(data, type, row) { |
| 488 | + @: if (!row.DateTimeProperty) { |
| 489 | + @: return ""; |
| 490 | + @: } |
| 491 | + @: |
| 492 | + @: date = new Date(parseInt(row.DateTimeProperty.replace("/Date(", "").replace(")/", ""), 10)); |
| 493 | + @: |
| 494 | + @: return date.toUTCString(); |
| 495 | + @: }, |
| 496 | + @: "targets": 23 |
| 497 | + @: }, |
| 498 | + @: |
| 499 | + @: { |
| 500 | + @: "render": function(data, type, row) { |
| 501 | + @: var prop = row.DateTimeNullable; |
| 502 | + @: |
| 503 | + @: if (!prop) { |
| 504 | + @: return ""; |
| 505 | + @: } |
| 506 | + @: |
| 507 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 508 | + @: |
| 509 | + @: return date.toUTCString(); |
| 510 | + @: }, |
| 511 | + @: "targets": 24 |
| 512 | + @: }, |
| 513 | + @: |
| 514 | + @: { |
| 515 | + @: "render": function(data, type, row) { |
| 516 | + @: var prop = row.DateTimeOffsetProperty; |
| 517 | + @: |
| 518 | + @: if (!prop) { |
| 519 | + @: return ""; |
| 520 | + @: } |
| 521 | + @: |
| 522 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 523 | + @: |
| 524 | + @: return date.toUTCString(); |
| 525 | + @: }, |
| 526 | + @: "targets": 25 |
| 527 | + @: }, |
| 528 | + @: |
| 529 | + @: { |
| 530 | + @: "render": function(data, type, row) { |
| 531 | + @: var prop = row.DateTimeOffsetNullable; |
| 532 | + @: |
| 533 | + @: if (!prop) { |
| 534 | + @: return ""; |
| 535 | + @: } |
| 536 | + @: |
| 537 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 538 | + @: |
| 539 | + @: return date.toUTCString(); |
| 540 | + @: }, |
| 541 | + @: "targets": 26 |
| 542 | + @: }, |
| 543 | + @: |
| 544 | + @: { |
| 545 | + @: "render": function(data, type, row) { |
| 546 | + @: if (!row.NestedModel) return ''; |
| 547 | + @: |
| 548 | + @: var prop = row.NestedModel.DateTimeProperty; |
| 549 | + @: |
| 550 | + @: if (!prop) { |
| 551 | + @: return ""; |
| 552 | + @: } |
| 553 | + @: |
| 554 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 555 | + @: |
| 556 | + @: return date.toUTCString(); |
| 557 | + @: }, |
| 558 | + @: "targets": 54 |
| 559 | + @: }, |
| 560 | + @: |
| 561 | + @: { |
| 562 | + @: "render": function(data, type, row) { |
| 563 | + @: if (!row.NestedModel) return ''; |
| 564 | + @: |
| 565 | + @: var prop = row.NestedModel.DateTimeNullable; |
| 566 | + @: |
| 567 | + @: if (!prop) { |
| 568 | + @: return ""; |
| 569 | + @: } |
| 570 | + @: |
| 571 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 572 | + @: |
| 573 | + @: return date.toUTCString(); |
| 574 | + @: }, |
| 575 | + @: "targets": 55 |
| 576 | + @: }, |
| 577 | + @: |
| 578 | + @: { |
| 579 | + @: "render": function(data, type, row) { |
| 580 | + @: if (!row.NestedModel) return ''; |
| 581 | + @: |
| 582 | + @: var prop = row.NestedModel.DateTimeOffsetProperty; |
| 583 | + @: |
| 584 | + @: if (!prop) { |
| 585 | + @: return ""; |
| 586 | + @: } |
| 587 | + @: |
| 588 | + @: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10)); |
| 589 | + @: |
| 590 | + @: return date.toUTCString(); |
| 591 | + @: }, |
| 592 | + @: "targets": 56 |
| 593 | + @: }, |
| 594 | + @: |
| 595 | + @: { |
| 596 | + @: "render": function(data, type, row) { |
| 597 | + @: if (!row.NestedModel) return ''; |
| 598 | + @: |
| 599 | + @: var prop = if; |
| 600 | + @: |
| 601 | + @: return date.toUTCString(); |
| 602 | + @: }, |
| 603 | + @: "targets": 57 |
| 604 | + @: }, |
| 605 | + @: ] |
| 606 | + } |
| 607 | + }); |
611 | 608 |
|
612 | 609 | String.prototype.replaceAll = function (search, replacement) {
|
613 | 610 | var target = this;
|
|
0 commit comments