/** * add js loaded validation */ protected function addJsLoadedValidationScripts($output) { $galleryHtmlID = $this->galleryHtmlID; if (GlobalsUG::$isScriptsInFooter == true) { $output .= self::LINE_PREFIX1 . "<script type='text/javascript'>"; } $output .= self::LINE_PREFIX2 . "window.onload = function(e) {"; $output .= self::LINE_PREFIX3 . "if(typeof ugCheckForErrors == \"undefined\"){"; $notIncludedMessage = "Unite Gallery Error - gallery js and css files not included"; if (method_exists("UniteProviderFunctionsUG", "getJsNotIncludedErrorMessage")) { $notIncludedMessage = UniteProviderFunctionsUG::getJsNotIncludedErrorMessage(); } $output .= self::LINE_PREFIX4 . "document.getElementById(\"{$galleryHtmlID}\").innerHTML = \"<span style='color:red'>{$notIncludedMessage}</span>\";}"; $output .= self::LINE_PREFIX3 . "else{ ugCheckForErrors(\"{$galleryHtmlID}\", \"jquery\");}"; $output .= self::LINE_PREFIX2 . "};"; if (GlobalsUG::$isScriptsInFooter == true) { $output .= self::LINE_PREFIX1 . "</script>"; } return $output; }