0byt3m1n1
Path:
/
home
/
mgatv524
/
atvcms.com.br
/
maisqtv2
/
cache
/
71
/
[
Home
]
File: 71265a90fa714262ed4960ecf3a5548fa36e0ff6b1ab2a117586742149031d43.php
<?php use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Extension\SandboxExtension; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; /* subplaylist-designer-javascript.twig */ class __TwigTemplate_e5918697d8f4028997dda5baeeb19fe6edee4ee324981e7eb363396f0b0f7ca3 extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->parent = false; $this->blocks = [ ]; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 23 echo " <script type=\"text/javascript\"> // Runs after form opens function subplaylist_form_edit_open() { // Get form object var \$form = \$(this); // Bind our tooltips \$form.find('[data-toggle=\"tooltip\"]').tooltip(); // Translations var fillTitle = \""; // line 36 echo __("Fill"); echo "\"; var fillHelpText = \""; // line 37 echo __("Fill - use the first Playlist to fill any remaining Spots"); echo "\"; var padTitle = \""; // line 38 echo __("Pad"); echo "\"; var padHelpText = \""; // line 39 echo __("Pad - use the first Playlist to pad any remaining Spots"); echo "\"; var repeatTitle = \""; // line 40 echo __("Repeat"); echo "\"; var repeatHelpText = \""; // line 41 echo __("Repeat - repeat the Widgets in this Playlist until the number of Spots have been filled"); echo "\"; var noPlaylistsMessage = \""; // line 42 echo __("No playlists"); echo "\"; var noPlaylistsHelpMessage = \""; // line 43 echo __("You don't have available playlists"); echo "\"; var noPlaylistsAccessHelpMessage = \""; // line 44 echo __("You don't have access to this playlist"); echo "\"; var playlistIdMessage = \""; // line 45 echo __("Playlist Id "); echo "\"; // Order Clause var subPlaylistFields = \$(\".sub-playlists\", \$form); // Get template var subPlaylistFormTemplate = formHelpers.getTemplate('subPlaylistFormTemplate'); if(subPlaylistFields.length === 0) return; if(\$form.data().extra.subPlaylistId.length === 0) { // Add a template row subPlaylistFields.append(subPlaylistFormTemplate({ playlists: \$form.data().extra.playlists, isPlaylistEditable: true, title: \"1\", subPlaylistId: \"\", subPlaylistIdSpots: \"\", subPlaylistIdSpotLength: \"\", subPlaylistIdSpotFill: \"\", buttonGlyph: \"fa-plus\", fillTitle: fillTitle, padTitle: padTitle, repeatTitle: repeatTitle, fillHelpText: fillHelpText, padHelpText: padHelpText, repeatHelpText: repeatHelpText, noPlaylistsMessage: noPlaylistsMessage, noPlaylistsHelpMessage: noPlaylistsHelpMessage, noPlaylistsAccessHelpMessage: noPlaylistsAccessHelpMessage, playlistIdMessage: playlistIdMessage })); } else { // For each of the existing codes, create form components var i = 0; \$.each(\$form.data().extra.subPlaylistId, function(index, field) { i++; var isPlaylistEditable = false; \$.each(\$form.data().extra.playlists, function(index2, field2) { if(field == field2.playlistId) { isPlaylistEditable = true; } }); subPlaylistFields.append(subPlaylistFormTemplate({ playlists: \$form.data().extra.playlists, title: i, isPlaylistEditable: isPlaylistEditable, subPlaylistId: field, subPlaylistIdSpots: (\$form.data().extra.subPlaylistOptions[field] === undefined) ? \"\" : \$form.data().extra.subPlaylistOptions[field].subPlaylistIdSpots, subPlaylistIdSpotLength: (\$form.data().extra.subPlaylistOptions[field] === undefined) ? \"\" : \$form.data().extra.subPlaylistOptions[field].subPlaylistIdSpotLength, subPlaylistIdSpotFill: (\$form.data().extra.subPlaylistOptions[field] === undefined) ? \"\" : \$form.data().extra.subPlaylistOptions[field].subPlaylistIdSpotFill, buttonGlyph: ((i === 1) ? \"fa-plus\" : \"fa-minus\"), fillTitle: fillTitle, padTitle: padTitle, repeatTitle: repeatTitle, fillHelpText: fillHelpText, padHelpText: padHelpText, repeatHelpText: repeatHelpText, noPlaylistsMessage: noPlaylistsMessage, noPlaylistsHelpMessage: noPlaylistsHelpMessage, noPlaylistsAccessHelpMessage: noPlaylistsAccessHelpMessage, playlistIdMessage: playlistIdMessage })); }); } // Nabble the resulting buttons subPlaylistFields.on(\"click\", \"button\", function(e) { e.preventDefault(); // find the gylph if(\$(this).find(\"i\").hasClass(\"fa-plus\")) { subPlaylistFields.append(subPlaylistFormTemplate({ playlists: \$form.data().extra.playlists, isPlaylistEditable: true, title: subPlaylistFields.find('.row-special').length + 1, subPlaylistId: \"\", subPlaylistIdSpots: \"\", subPlaylistIdSpotLength: \"\", subPlaylistIdSpotFill: \"\", buttonGlyph: \"fa-minus\", fillTitle: fillTitle, padTitle: padTitle, repeatTitle: repeatTitle, fillHelpText: fillHelpText, padHelpText: padHelpText, repeatHelpText: repeatHelpText, noPlaylistsMessage: noPlaylistsMessage, noPlaylistsHelpMessage: noPlaylistsHelpMessage, noPlaylistsAccessHelpMessage: noPlaylistsAccessHelpMessage, playlistIdMessage: playlistIdMessage })); subplaylist_init_row(\$form); } else { // Remove this row \$(this).closest(\".row-special\").remove(); } }); subplaylist_init_row(\$form); } function subplaylist_init_row(\$row) { \$row.find('.subPlaylistSelect').select2({ dropdownAutoWidth: true }); \$row.find('select[name=\"subPlaylistIdSpotFill[]\"]').select2({ templateResult: function(state) { if (!state.id) { return state.text; } return \$(state.element).data().templateResult; }, dropdownAutoWidth: true, minimumResultsForSearch: -1 }); } </script>"; } public function getTemplateName() { return "subplaylist-designer-javascript.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 88 => 45, 84 => 44, 80 => 43, 76 => 42, 72 => 41, 68 => 40, 64 => 39, 60 => 38, 56 => 37, 52 => 36, 37 => 23,); } public function getSourceContext() { return new Source("", "subplaylist-designer-javascript.twig", "/home/mgatv524/atvcms.com.br/maisqtv2/modules/subplaylist-designer-javascript.twig"); } }