Last active
August 29, 2015 13:58
-
-
Save woeldiche/10376003 to your computer and use it in GitHub Desktop.
Template for advance view json response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each row as an object | |
"advancedView": { | |
"allRows": true, | |
"dataContent": { | |
"aaData": [ | |
{ | |
"checkbox": "<div class=\"form-checkbox form-checkbox--single\"><input data-action=\"select.row\" type=\"checkbox\" id=\"select-{{@index}}\" value=\"{{@index}}\" /><label for=\"select-{{@index}}\"><span class=\"aria--visible\">{{this.id}}</span></label></div>", | |
"id": "<a class=\"inline-link\" data-link=\"row\" href=\"http://link-to-subscription-details.html\">{{this.id}}</a>", | |
"name" : "{{this.name}}", | |
"product" : "{{this.product}}", | |
"device" : "{{this.device}}", | |
"status" : "<span class=\"status-icon--error\">{{this.status}}</span>" | |
}, | |
{ | |
"checkbox": "<div class=\"form-checkbox form-checkbox--single\"><input data-action=\"select.row\" type=\"checkbox\" id=\"select-{{@index}}\" value=\"{{@index}}\" /><label for=\"select-{{@index}}\"><span class=\"aria--visible\">{{this.id}}</span></label></div>", | |
"id": "<a class=\"inline-link\" data-link=\"row\" href=\"http://link-to-subscription-details.html\">{{this.id}}</a>", | |
"name" : "{{this.name}}", | |
"product" : "{{this.product}}", | |
"device" : "{{this.device}}", | |
"status" : "<span class=\"status-icon--error\">{{this.status}}</span>" | |
} | |
// More rows ... | |
], | |
"aoColumns": [ | |
{ "sTitle": "", "mData": "checkbox" }, | |
{ "sTitle": "ID", "mData": "id" }, | |
{ "sTitle": "Name", "mData": "name" }, | |
{ "sTitle": "Product", "mData": "product" }, | |
{ "sTitle": "Device", "mData": "device" }, | |
{ "sTitle": "Status", "mData": "status" } | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each row as an array | |
[ | |
"<div class=\"form-checkbox form-checkbox--single\"><input data-action=\"select.row\" type=\"checkbox\" id=\"select-{{@index}}\" value=\"{{@index}}\" /><label for=\"select-{{@index}}\"><span class=\"aria--visible\">{{this.id}}</span></label></div>", | |
"<a class=\"inline-link\" data-link=\"row\" href=\"http://link-to-subscription-details.html\">{{this.id}}</a>", | |
"{{this.name}}", | |
"{{this.product}}", | |
"{{this.device}}", | |
"<span class=\"status-icon--error\">{{this.status}}</span>" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment