Gets inline JavaScript for this progress bar

@return string inline JavaScript for this progress bar.
326954
protected function getInlineJavaScript()
    {
        return sprintf(
            "var %s_obj = new SwatProgressBar('%s', %s, %s);",
            $this->id,
            $this->id,
            $this->orientation,
            $this->value
        );
    }
294094
public function getScript()
    {
        $name = $this->chart->getName();
        $dataArrayJs = '[';

        $counter = 0;
        foreach ( $this->chart->getSeries() as $title => $series ) {

            $dataArrayJs .= $counter++ > 0 ? ', ' : '';

            $dataArrayJs .= '{';

            // associate Xs with Ys in cases where we need it
            $data = $series->getData();

            $formattedData = array();
            foreach ( $data as $datum ) { 
                if (! $datum instanceof ChartDatum\ChartDatumAbstract ) {
                    throw new \UnexpectedValueException('Chart data should be an object inheriting from ChartDatumAbstract');
                }
                foreach ( $this->dateAxes as $axis => $flag ) {
                    if ( $flag ) {
                        $date = \DateTime::createFromFormat( 'm/d/Y', $datum[$axis] );
                        $datum[$axis] = $date->getTimestamp() * 1000;
                    }
                }
                        
                if ( $this->useLabels ) {
                    $dataPoints = "{$datum['x']},{$datum['y']}";
                    $this->pointLabels[$dataPoints] = $datum->getLabel();
                }
                
                $formattedData[] = $datum->getRenderData();
            }
            
            $dataArrayJs .= 'data: '.$this->makeJSArray($formattedData);
            
            if ( isset( $this->types['default'] ) && 
               ( $this->types['default'] instanceOf \Altamira\Type\Flot\Bubble
                || $this->types['default'] instanceOf \Altamira\Type\Flot\Donut ) ) {
                $dataArrayJs .= ', label: "' . str_replace('"', '\\"', $series->getTitle() ) . '"';
            }

            $this->prepOpts( $this->options['seriesStorage'][$title] );

            $opts = substr( json_encode( $this->options['seriesStorage'][$title] ), 1, -1 );

            if (strlen($opts) > 2) {
                $dataArrayJs .= ',' . $opts;
            }

            $dataArrayJs .= '}';
        }

        $dataArrayJs .= ']';

        $optionsJs = ($js = $this->getOptionsJs()) ? ", {$js}" : ', {}';

        $extraFunctionCallString = implode("\n", $this->getExtraFunctionCalls($dataArrayJs, $optionsJs));

        return sprintf( self::SCRIPT_OUTPUT, $name, $dataArrayJs, $optionsJs, $extraFunctionCallString );
    }
937457
public function getScript()
    {
        if(count($this->aScripts) == 0)
        {
            return '';
        }
        if(($this->sContext))
        {
            $js = "$('" . $this->sSelector . "', $('" . $this->sContext . "'))";
        }
        else
        {
            $js = "$('" . $this->sSelector . "')";
        }
        return $js . '.' . implode('.', $this->aScripts);
    }
233257
public function getHtml()
    {
        $url = json_encode((string) $this->resolver->resolve(['/install', 'web_precondition', 'request_urls', '20']));
        $errorMessage = json_encode(t('concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.'));
        $myIdentifier = json_encode($this->getUniqueIdentifier());

        return <<<EOT
<script>
$(document).ready(function() {
    $.ajax({
        cache: false,
        dataType: 'json',
        method: 'GET',
        url: {$url}
    })
    .done(function(data) {
        if (data.response === 400) {
            setWebPreconditionResult({$myIdentifier}, true);
        } else {
            setWebPreconditionResult({$myIdentifier}, false, {$errorMessage});
        }
    })
    .fail(function(xhr, textStatus, errorThrown) {
        setWebPreconditionResult({$myIdentifier}, false, {$errorMessage});
    });
});
</script>
EOT
        ;
    }
520330
protected function getProgressBar(): ProgressBar
    {
        if ($this->progressBar === null) {
            $this->progressBar = new ProgressBar($this->output);
        }
        return $this->progressBar;
    }
376573
function getInline($as_html = true) {
        if(!$as_html) {
            return $this->css_inline;
        }
        if(!count($this->css_inline)) {
            return '';
        }
        $css_inline = (implode(PHP_EOL, $this->css_inline));
        $css_inline = $this->prepare($css_inline, config('larakit.lk-staticfiles.css.inline.min'));
        if(config('larakit.lk-staticfiles.css.inline.build', false)) {
            $build_name = $this->makeFileName($css_inline, 'css/inline', 'css');
            $build_file = $this->buildFile($build_name);
            if(!file_exists($build_file)) {
                if(!file_exists(dirname($build_file))) {
                    mkdir(dirname($build_file), 0777, true);
                }
                $this->save($build_file, $css_inline);
            }
            
            return $this->getLink($this->buildUrl($build_name), 'all') . "\n        ";
        } else {
            return '<style type="text/css">' . PHP_EOL . $css_inline . PHP_EOL . '</style>';
        }
    }
973860
private function getCode()
    {
        $_paq = '';
        foreach ($this->options as $key => $values) {
            foreach ($values as &$value) {
                $value = "'".$value."'";
            }
            $_paq .= sprintf("_paq.push([%s]);\n", implode($values, ','));
        }

        return <<<PWK
<script>
var _paq = _paq || [];
{$_paq}
(function() {
    var u="{$this->piwikUrl}";
    _paq.push(['setSiteId', {$this->siteId}]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="{$this->piwikUrl}piwik.php?idsite={$this->siteId}" style="border:0;" alt="" /></p></noscript>
PWK;
    }
337359
public function getElement()
    {
        if ($this->getDocblock()) {
            $this->setLines($this->getDocblock()->getElement());
        }

        $name = '';
        if ($this->getName() and !is_array($this->getValue())) {
            $name = ($this->getType() ? $this->getType().' ' : '')
                .'$'.$this->getName().
                ($this->getValue() ? ' = '.$this->getValue() : '').';';
            $this->addLine($name);
        } else if ($this->getName() and is_array($this->getValue())) {
            $value = $this->getValue();
            $begin = array_shift($value);
            $end = array_pop($value);
            $value[] = $end.';';
            $this->addLine(($this->getType() ? $this->getType().' ' : '').'$'.$this->getName().' = '.$begin);
            $this->addLine($value);
        }


        return $this->getLines();
    }
1017805
public function getJs()
    {
        if (isset($this->_themeConfig['js'])) {
            return array_merge($this->_themeConfig['js'], $this->_data['js']);
        } else {
            return $this->_data['js'];
        }
    }
217070
protected function getInlineJavaScript()
    {
        static $shown = false;

        if (!$shown) {
            $javascript = $this->getInlineJavaScriptTranslations();
            $shown = true;
        } else {
            $javascript = '';
        }

        $values = array();
        if ($this->show_blank) {
            $values[] = "''";
        }

        foreach ($this->action_items as $item) {
            if ($item->visible) {
                $values[] = SwatString::quoteJavaScriptString($item->id);
            }
        }

        $selected_value =
            $this->selected === null
                ? 'null'
                : SwatString::quoteJavaScriptString($this->selected->id);

        $javascript .= sprintf(
            "var %s_obj = new SwatActions(%s, [%s], %s);",
            $this->id,
            SwatString::quoteJavaScriptString($this->id),
            implode(', ', $values),
            $selected_value
        );

        if ($this->view !== null && $this->selector !== null) {
            $javascript .= sprintf(
                "\n%s_obj.setViewSelector(%s, '%s');",
                $this->id,
                $this->view->id,
                $this->selector->getId()
            );
        }

        return $javascript;
    }
33965
protected function getPreviewCode()
    {
        $file = file(self::$stack['file']);
        $line = self::$stack['line'];

        $start = ($line - 5 >= 0) ? $line - 5 : $line - 1;
        $end = ($line - 5 >= 0) ? $line + 4 : $line + 8;

        for ($i = $start; $i < $end; $i++) {
            if (! isset($file[$i])) {
                continue;
            }

            $text = trim($file[$i]);

            if ($i == $line - 1) {
                self::$stack['preview'] .=
                    "<span class='jst-line'>" . ($i + 1) . '</span>' .
                    "<span class='jst-mark text'>" . $text . '</span><br>';
                continue;
            }

            self::$stack['preview'] .=
                "<span class='jst-line'>" . ($i + 1) . '</span>' .
                "<span class='text'>" . $text . '</span><br>';
        }
    }
804664
public function getScript()
    {
        $this->useSingleQuotes();
        foreach($this->aArguments as $xArgument)
        {
            if($xArgument instanceof Element)
            {
                $this->addParameter(Jaxon::JS_VALUE, $xArgument->getScript());
            }
            else if($xArgument instanceof Parameter)
            {
                $this->addParameter($xArgument->getType(), $xArgument->getValue());
            }
            else if($xArgument instanceof Request)
            {
                $this->addParameter(Jaxon::JS_VALUE, 'function(){' . $xArgument->getScript() . ';}');
            }
            else if(is_numeric($xArgument))
            {
                $this->addParameter(Jaxon::NUMERIC_VALUE, $xArgument);
            }
            else if(is_string($xArgument))
            {
                $this->addParameter(Jaxon::QUOTED_VALUE, $xArgument);
            }
            else if(is_bool($xArgument))
            {
                $this->addParameter(Jaxon::BOOL_VALUE, $xArgument);
            }
            else if(is_array($xArgument) || is_object($xArgument))
            {
                $this->addParameter(Jaxon::JS_VALUE, $xArgument);
            }
        }
        return $this->sMethod . '(' . implode(', ', $this->aParameters) . ')';
    }
256008
protected function getAppend()
	{
		if ($this->hasAddOn())
		{
			$htmlOptions = $this->appendOptions;

			if (isset($htmlOptions['class']))
				$htmlOptions['class'] .= ' add-on';
			else
				$htmlOptions['class'] = 'add-on';

			ob_start();
			if (isset($this->appendText))
				echo CHtml::tag('span', $htmlOptions, $this->appendText);

			echo '</div>';
			return ob_get_clean();
		} else
			return '';
	}
937378
protected function getPrepend()
	{
		if ($this->hasAddOn()) {
			$htmlOptions = $this->prependOptions;

			if (isset($htmlOptions['class'])) {
				$htmlOptions['class'] .= ' add-on';
			} else {
				$htmlOptions['class'] = 'add-on';
			}

			ob_start();
			echo '<div class="' . $this->getAddonCssClass() . '">';
			if (isset($this->prependText)) {
				if (isset($htmlOptions['isRaw']) && $htmlOptions['isRaw']) {
					echo $this->prependText;
				} else {
					echo CHtml::tag('span', $htmlOptions, $this->prependText);
				}
			}

			return ob_get_clean();
		} else {
			return '';
		}
	}
815813
protected function getScriptText()
    {
        $graphId    = Builder::escapeText($this->graph->getId(), false);
        $scriptText = "
declare Graph <=> (Page.GetFirstChild(\"{$graphId}\") as CMlGraph);
if (Graph != Null) {
    declare GraphCurve <=> Graph.AddCurve();
";
        foreach ($this->points as $point) {
            $pointVec2  = Builder::getVec2($point);
            $scriptText .= "
    GraphCurve.Points.add({$pointVec2});";
        }
        if ($this->sortPoints) {
            $scriptText .= "
    GraphCurve.SortPoints();";
        }
        if ($this->color) {
            $colorVec3  = Builder::getVec3($this->color);
            $scriptText .= "
    GraphCurve.Color = {$colorVec3};";
        }
        if ($this->style) {
            $scriptText .= "
    GraphCurve.Style = {$this->style};";
        }
        if ($this->width) {
            $scriptText .= "
    GraphCurve.Width = {$this->width};";
        }
        return $scriptText . "
}";
    }
79891
public function getHTML()
    {
        $clone = clone $this;
        foreach ($clone->_getNodesForCssSelector('[inlinestyle-original-style]') as $node) {
            $current = $node->hasAttribute("style") ?
                $this->_styleToArray($node->getAttribute("style")) :
                array();
            $original = $node->hasAttribute("inlinestyle-original-style") ?
                $this->_styleToArray($node->getAttribute("inlinestyle-original-style")) :
                array();

            $current = $clone->_mergeStyles($current, $original);

            $node->setAttribute("style", $this->_arrayToStyle($current));
            $node->removeAttribute('inlinestyle-original-style');
        }

        return $clone->_dom->saveHTML();
    }
779460
private function getJS()
    {

        if (strlen($this->JSrenderDocReady . $this->JSrender) == 0) {
            return "";
        }

        $js = "
                    <script type=\"text/javascript\">

                    ";
        if (strlen($this->JSrenderDocReady) > 0) {
            $js .= "   $(document).ready(function()
                        {
                        {$this->JSrenderDocReady}
                        } )
                      ";
        }
        $js .= $this->JSrender . "


                    </script>"
        ;

        return $js;
    }