{"id":8822,"date":"2026-08-28T11:51:50","date_gmt":"2026-08-28T11:51:50","guid":{"rendered":"https:\/\/opiumsystems.sk\/?page_id=8822"},"modified":"2026-08-28T13:51:28","modified_gmt":"2026-08-28T13:51:28","slug":"inovacnycirkus-spatna-zpetna-vazba","status":"publish","type":"page","link":"https:\/\/opiumsystems.sk\/cz\/inovacnycirkus-spatna-vazba\/","title":{"rendered":"Inova\u010dn\u00ed cirkus \u2013 Zp\u011btn\u00e1 vazba"},"content":{"rendered":"<section class=\"bde-section-8822-100 bde-section\">\n  \n  \n\t\n\n\n\n<div class=\"section-container\"><\/div>\n<\/section><section class=\"bde-section-8822-106 bde-section\">\n  \n  \n\t\n\n\n\n<div class=\"section-container\"><h1 class=\"bde-heading-8822-110 bde-heading gradient-text-blue\">\nInova\u010dn\u00fd cirkus 2026\n<\/h1><div class=\"bde-text-8822-111 bde-text\">\nZauj\u00edma n\u00e1s V\u00e1\u0161 n\u00e1zor na prv\u00fd ro\u010dn\u00edk, radi by sme tie \u010fal\u0161ie vylep\u0161ili.\n<\/div><div class=\"bde-shortcode-8822-101 bde-shortcode\">        <div class=\"wp-sjs-plugin\" id=\"surveyContainer-1\">\r\n            <div id=\"surveyElement-1\">Survey is loading...<\/div>\r\n            <div id=\"surveyResult-1\"><\/div>\r\n        <\/div>\r\n        <script>\r\n            jQuery.ajax({\r\n                url:  \"https:\/\/opiumsystems.sk\/wp-admin\/admin-ajax.php?action=SurveyJS_GetSurveyJson\",\r\n                type: \"POST\",\r\n                data: { Id: 1, _wpnonce: 'eca867d8c0' },\r\n                success: function (data) {\r\n                    var json = {}\r\n                    let theme;\r\n                    if (data.json) {\r\n                        json = JSON.parse(data.json.replace(\/\\\\\"\/g, \"\\\"\").replace(\/\\\\\\\\\/g, \"\\\\\").replace(\/\\\\'\/g, \"'\"));\r\n                    }\r\n                    if (data.theme) {\r\n                        theme = JSON.parse(data.theme.replace(\/\\\\\"\/g, \"\\\"\").replace(\/\\\\\\\\\/g, \"\\\\\").replace(\/\\\\'\/g, \"'\"));\r\n                    } else {\r\n                        theme = null\r\n                    }\r\n                    jQuery(document).ready(()=>{\r\n                        initSurvey1(json, theme);\r\n                    });\r\n                }\r\n            });\r\n\r\n            function initSurvey1(json, theme) {\r\n                const survey1 = new Survey.Model(json);\r\n                \r\n    \/\/ \u2705 Povoli HTML v title\/description (GDPR link)\r\n    survey1.allowHtml = true;\r\n\r\n    \/\/ \u2705 Pre vyn\u00fatenie HTML renderingu aj v jQuery variante\r\n    survey1.onTextMarkdown.add(function(s, options) {\r\n        \/\/ Pre title\/description\/text v\u017edy vr\u00e1\u0165 HTML rovno\r\n        options.html = options.text;\r\n    });\r\n\r\n    if (!!theme) {\r\n        survey1.applyTheme(theme);\r\n    }\r\n\r\n    window.survey1 = survey1;\r\n\r\n                \/\/ \u2705 ADD: auto\u2011prefill from URL params when survey is ready\r\n                if (window.OpiumSurveyApplyUrlParams) {\r\n                    window.OpiumSurveyApplyUrlParams(survey1);\r\n                }\r\n\r\n                survey1                    .onComplete\r\n                    .add(function (sender, options) {\r\n                        options.showSaveInProgress();\r\n                        jQuery.ajax({\r\n                            url:  \"https:\/\/opiumsystems.sk\/wp-admin\/admin-ajax.php?action=SurveyJS_SaveResult\",\r\n                            type: \"POST\",\r\n                    data: { SurveyId: '1', Json : JSON.stringify(sender.data), _wpnonce: '4c4c693dd1' },\r\n                            success: function (data) {options.showSaveSuccess();},\r\n                            error: function (xhr) {options.showSaveError(xhr.responseText);}\r\n                        });\r\n                        \/\/document\r\n                        \/\/    .querySelector(\"#surveyResult-1\")\r\n                        \/\/    .innerHTML = \"result: \" + JSON.stringify(sender.data);\r\n                    });\r\n\r\n                survey1.onUploadFiles.add((_, options) => {\r\n                    const formData = new FormData();\r\n                    options.files.forEach((file) => {\r\n                        formData.append(file.name, file);\r\n                    });\r\n                formData.append(\"_wpnonce\", \"003d4233b8\");\r\n\r\n                    fetch(\"https:\/\/opiumsystems.sk\/wp-admin\/admin-ajax.php?action=SurveyJS_UploadFiles\", {\r\n                        method: \"POST\",\r\n                        body: formData\r\n                    })\r\n                        .then((response) => response.json())\r\n                        .then((data) => {\r\n                            options.callback(\r\n                                options.files.map((file) => {\r\n                                    return {\r\n                                        file: file,\r\n                                        content: data[file.name]\r\n                                    };\r\n                                })\r\n                            );\r\n                        })\r\n                        .catch((error) => {\r\n                            console.error(\"Error: \", error);\r\n                            options.callback([], [ 'An error occurred during file upload.' ]);\r\n                        });\r\n                });\r\n\r\n                function deleteFile(fileURL, options) {\r\n                    try {\r\n                        const deleteFileBaseUrl = \"https:\/\/opiumsystems.sk\/wp-admin\/admin-ajax.php?action=SurveyJS_DeleteFile&#038;_wpnonce=3ba1dbb1b3\";\r\n                        const apiUrl = `${deleteFileBaseUrl}&name=${encodeURIComponent(fileURL)}`;\r\n                        fetch(apiUrl);\r\n                    } catch (error) {\r\n                        options.callback(\"error\");\r\n                    }\r\n                }\r\n\r\n                survey1.onClearFiles.add((_, options) => {\r\n                    if (!options.value || options.value.length === 0) {\r\n                        options.callback(\"success\");\r\n                        return;\r\n                    }\r\n\r\n                    if (!options.fileName && !!options.value) {\r\n                        for (const item of options.value) {\r\n                            deleteFile(item.content, options);\r\n                        }\r\n                    } else {\r\n                        const fileToRemove = options.value.find(\r\n                            (item) => item.name === options.fileName\r\n                        );\r\n                        if (fileToRemove) {\r\n                            deleteFile(fileToRemove.content, options);\r\n                        } else {\r\n                            console.error(`File with name ${options.fileName} is not found`);\r\n                        }\r\n                    }\r\n                    options.callback(\"success\");\r\n                });\r\n\r\n                jQuery(\"#surveyElement-1\").Survey({model: survey1\/*, css: customCss*\/});\r\n            }\r\n        <\/script>        \r\n        <\/div><\/div>\n<\/section><section class=\"bde-section-8822-107 bde-section\">\n  \n  \n\t\n\n\n\n<div class=\"section-container\"><\/div>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>Inova\u010dn\u00fd cirkus 2026 Zauj\u00edma n\u00e1s V\u00e1\u0161 n\u00e1zor na prv\u00fd ro\u010dn\u00edk, radi by sme tie \u010fal\u0161ie vylep\u0161ili. Survey is loading&#8230;<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_breakdance_hide_in_design_set":false,"_breakdance_tags":"","footnotes":""},"folder":[],"class_list":["post-8822","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/pages\/8822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/comments?post=8822"}],"version-history":[{"count":13,"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/pages\/8822\/revisions"}],"predecessor-version":[{"id":8835,"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/pages\/8822\/revisions\/8835"}],"wp:attachment":[{"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/media?parent=8822"}],"wp:term":[{"taxonomy":"folder","embeddable":true,"href":"https:\/\/opiumsystems.sk\/cz\/wp-json\/wp\/v2\/folder?post=8822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}