Articles
Partners
Follow Us
// Datatable start var dataSet = [ ['No data recorded in the database.', '', '', '', ''], ]; $(document).ready(function () { // $('#lekerdezes_table').DataTable({ "drawCallback": function () { $('[data-toggle="popover"]').popover({ "title": "Do you really want to archive this article?", "html": true, "container": "table", }); }, data: dataSet, columns: [ {title: "Article title", class: "text_left"}, {title: "", class: "text_right"}, {title: "Category", class: "text_center"}, {title: "Menu", class: "text_right"}, {title: "Highlighted?", class: "text_right"} ] }); // $(".highlighted_article_select").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_hightlighted_img.php", data: "", success: function (data) { $(".highlighted_img").html(data); } }); }); $(".highlighted_article_unselect").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_empty.php", data: "", success: function (data) { $(".highlighted_img").html(data); } }); }); $(".category_select").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_select_menu.php", data: "", success: function (data) { $(".menu_select").html(data); } }); }); $(".category_unselect").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_empty.php", data: "", success: function (data) { $(".menu_select").html(data); } }); }); $(".resources_select").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_resources.php", data: "", success: function (data) { $(".resources").html(data); } }); // $('#description').prop('disabled', true); }); $(".resources_unselect").click(function () { $.ajax({ type: "post", url: "controllers/controll_form_empty.php", data: "", success: function (data) { $(".resources").html(data); } }); }); // var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var x = 1; //initlal text box count $(add_button).click(function (e) { //on add input button click e.preventDefault(); if (x < max_fields) { //max input box allowed x++; //text box increment $(wrapper).append('
'); //add input box } }); $(wrapper).on("click", ".remove_field", function (e) { //user click on remove text e.preventDefault(); $(this).parent('div').remove(); x--; }) });