$ (' #archives-table '). DataTable ({"Olanguage": {//Internationalization "sprocessing": " Efforts to load Data ... "," Slengthmenu ":" Show _menu_ results per page "," Szerorecords ":" No Match Results "," sinfo ":" _pages_ page, show the first _ Start_ to _end_, after filtering get _total_, initial _max_ strip "," Infoempty ":" 0 Records ",////filter to display" Sinfoempty "in the lower left corner of the empty time:" No Data "," sinfofiltered ": "(retrieved from _max_ data)",//Bottom left corner filter prompt, "szerorecords": "No Data retrieved",//"Ssearch": ' <span class= ' label label-success ' > Search </span> '},//' bserverside ': false,//The first scenario: The server takes out all the data at once and the client processes the data entirely. False "Bserverside" at this time: True,//second scenario: The server side processes the paging data, the client renders, and this is true. But at this time aocolumns to change, will be ' sname ' replaced by Mdataprop, while the custom column also has the corresponding data "Sservermethod": "Get", " Sajaxsource ":"/admin/adminarchives/getarchivesjson ",//ajax URL address" bprocessing ": True," bpaginate ": true," Spaginationtype ": Full_numbers", "Bjqueryui": true,///client to server parameter is Ssearch ' Bfilter ': false,//' bsearch ': true, ' Blengthchange ': True, ' alengthmenu ': [[5, 15, 20,-1], [5, 15, 20, all]//change PEr page values here], ' idisplaylength ': 7,//10 records per page ' Bautowidth ': true, ' scrollx ': true, ' aocolumns ': [{' Swidth ': ' 5 % "," Mdataprop ":" Id "}, {" Swidth ":" 40% "," Mdataprop ":" Title "," Mrender ": Function (data, type, row) {return ' <a hr ef= "/archives/index/' + row".
Id + ' > ' + data + ' </a> '; }, {"Swidth": "10%", "Mdataprop": "CategoryName"}, {"Swidth": "6%", "Mdataprop": "Viewcount", "bstorable": true}, { "Swidth": "6%", "Mdataprop": "Commentcount", "bstorable": true}, {"Swidth": "6%", "Mdataprop": "Digg", "bstorable": True }, {"Swidth": "6%", "Mdataprop": "Status", "Mrender": Function (data, type, row) {var value = "Published"; if (data = = "0") v
Alue = "Disabled";
return value; }, {//Custom column: Enable/disable ' Mdataprop ': ' null ', ' swidth ': ' 6% ', ' bsearchable ': false, ' bstorable ': false, ' Mrender ': function ( Data, type, row) {var actionstr = ' <a id= ' publicarticle ' class= ' publicaction ' target-id= ' + row.
Id + ' "href=" # "> Release </a>"; if (row. Status = = "1") Actionstr = 'A id= "delarticle" class= "delaction" target-id= "' + row.
Id + ' "href=" # "> Disable </a>";
return actionstr; }, {//Custom column: Real delete "Mdataprop": "null", "Swidth": "6%", "bsearchable": false, "bstorable": false, "Mrender": function (data, type, row) {return ' <a id= ' realdelarticle ' class= ' tip ' target-id= ' ' + row.
Id + ' "href=" # "><i class=" Icon-remove "></i></a>"; }, {//Custom column: Edit "mdataprop": "null", "Swidth": "6%", "bsearchable": false, "bstorable": false, "Mrender": function (data, Type, row) {return ' <a class= ' tip ' href= '/admin/adminarchives/editarchive/' + row.
Id + ' "><i class=" Icon-pencil "></i></a>"; }], "Aocolumndefs": [{//Error: DataTables warning:requested unknown parameter ' 1 ' from the data source for row 0//plus this paragraph
There is no error in the definition. Sdefaultcontent: ", atargets: [' _all ']}]}";