12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- var strings = strings;
- $(document).ready(function(){
- resolveAttributes();
- optionSelected();
- });
- function optionSelected() {
- var v = $('input[name=option]:checked', '#fm1').val();
- if (v == 0) {
- $('#reminderPanel').hide();
- $('#reminderTab').hide();
- } else {
- $('#reminderPanel').show();
- $('#reminderTab').show();
- }
- }
- function resolveAttributes() {
- var table;
- if ( $.fn.dataTable.isDataTable( '#attributesTable' ) ) {
- table = $('#attributesTable').DataTable();
- }
- else {
- table = $('#attributesTable').DataTable( {
- paging : false,
- searching : false,
- language: {
- info: strings.info
- }
- } );
- }
- table.clear();
- var attrs = data.attributes;
- for (var property in attrs) {
- if (attrs.hasOwnProperty(property)) {
- table.row.add([
- '<code>' + property + '</code>', '<code>' + attrs[property] + '</code>'
- ]).draw(false);
- }
- }
- }
|