弹出对话框.

@param string|array $content 内容HTML或内容的URL.
@param string       $title   对话框标题.
@param string       $width   宽度
@param string       $height  高度
@param bool         $ajax    ajax方式打开

@return \wulaphp\mvc\view\JsonView
198732
public static function dialog($content, $title = '', $width = 'auto', $height = 'auto', $ajax = true) {
		if (is_array($content)) {
			$args          = $content;
			$args['title'] = $title;
			$args['area']  = $width . ',' . $height;
			$args['type']  = $ajax ? 'ajax' : 2;
		} else {
			$args = [
				'title'   => $title,
				'area'    => $width . ',' . $height,
				'type'    => $ajax ? 'ajax' : 2,
				'content' => $content
			];
		}

		return new JsonView(['code' => self::SUCCESS, 'args' => $args, 'action' => self::ACT_DIALOG], ['ajax' => '1']);
	}
541143
public function create(
        string $title,
        string $description,
        $amount,
        array $optional = []
    ): Response {
        $body = \array_merge(\compact('title', 'description', 'amount'), $optional);

        list($headers, $stream) = $this->prepareMultipartRequestPayloads([], $body);

        return $this->stream('POST', 'open_collections', $headers, $body);
    }
749208
public function addItem($id, $content, $title = false)
    {
        $this->tooltips[$id] = $this->newItem($id, $content, $title);
    }
1007609
public function RenderHtml(&$Content, &$Data)
    {
        header('Content-Type: text/html');

        foreach ($Content as $key => $val) {

            $datum = isset($Data[$val['key']]) ? $Data[$val['key']] : null;
            $hasChild = isset($val['child']) ? true : false;

            $this->_Output .= $val['text'];

            if ($this->CustomRender !== null) {
                $this->CustomRender->RegisterFunction($val['key'], $val['param']);
                $this->_Output .= $this->CustomRender->Parse();
            }

            if ($val['param'] !== false) {
                if ($val['key'] === 'css') {
                    $this->tempCss .= $val['param'];
                }
                if ($val['key'] === 'js') {
                    $this->tempJs .= $val['param'];
                }

                if ($val['key'] === 'part') {
                    if ($val['param'] === 'css') {
                        $this->_Output .= $this->tempCss;
                    }
                    if ($val['param'] === 'js') {
                        $this->_Output .= $this->tempJs;
                    }
                }
            }

            if ($this->GetVarType($datum) === $this->STRINGS) {
                $this->_Output .= (string)$Data[$val['key']];
            } else if ($this->GetVarType($datum) === $this->NUMERIC) {
                $this->_Output .= (double)$Data[$val['key']];
            } else if ($this->GetVarType($datum) === $this->ARRAYS) {
                foreach ($datum as $k => $v) {
                    if (is_array($v)) {
                        //Numeric Array
                        $this->RenderHtml($val['child'], $v);
                    } else {
                        //Associative Arrays
                        $this->RenderHtml($val['child'], $datum);
                        break;
                    }
                }
            } else if ($this->GetVarType($datum) === $this->BOOLEANS) {
                if ($datum) {
                    $this->RenderHtml($val['child'], $datum);
                }
            } else if ($this->GetVarType($datum) === $this->OBJECTS) {
                if ($datum instanceof Parts) {
                    $datum->RegisterFunction($val['key'], $val['param']);
                    if ($datum->tags === $datum->fnName) {
                        //Append output
                        $this->_Output .= $datum->Parse();
                        //Append property
                        $this->tempCss .= $datum->pte->GetTempCss();
                        $this->tempJs .= $datum->pte->GetTempJs();
                    }
                }
            } else {
                if ($hasChild && $datum !== null) {
                    $this->RenderHtml($val['child'], $datum);
                }
            }
        }
        return $this->_Output;
    }
1110387
function title( $contentObjectAttribute, $name = null )
    {
        $locale = eZLocale::instance();
        $retVal = $contentObjectAttribute->attribute( "data_int" ) === null ? '' : $locale->formatDate( $contentObjectAttribute->attribute( "data_int" ) );
        return $retVal;
    }
889746
public function display($content, $options = [])
    {
        if (!empty($options['form'])) {
            $view = !empty($options['view']) ? $options['view'] : '';
            return FormWrap::view($this->_block, $options, $this->displayView($view, '-form'));
        }

        $options = $options + ['random' => false, 'repeated_view' => true];
        $options['repeater_id'] = $content;
        $repeaterRows = PageBlockRepeaterData::loadRepeaterData($content, $options['version'], $options['random']);
        return $this->_renderDisplayView($options, $repeaterRows);
    }
212728
public function renderContent($layout = null, $title = null)
    {
        if ($this->hasSourceComponent()) {
            return $this->SourceComponent()->renderContent($layout, $title);
        }
        
        return parent::renderContent($layout, $title);
    }
914005
public function generateLinkFor($key, $content, $title = null)
    {
        $direction = $linkDirection = 'asc';

        if ($key === $this->getCurrentKey())
        {
            $direction = ($this->getCurrentDirection() === 'asc') ? 'desc' : 'asc';
            $linkDirection = ($this->getCurrentDirection() === 'desc') ? 'desc' : 'asc';
        }

        $params = array_merge(
            $this->getQueryParams(),
            [
                's' => $key,
                'd' => $direction
            ]
        );

        $url = qs_url(
            $this->getCurrentRequestPath(),
            $params
        );

        return sprintf(
            '<a title="%s" class="%s %s %s" href="%s">%s</a>',
            $title,
            static::linkClass,
            static::linkPrefix . $linkDirection,
            ($key === $this->getCurrentKey()) ? static::linkPrefix . 'active' : '',
            $url,
            $content
        );
    }
931981
public static function update($target, $content, $message = '', $append = false, $style = null) {
		$args = ['content' => $content, 'append' => $append];

		return new JsonView([
			'code'    => self::SUCCESS,
			'target'  => $target,
			'message' => $message,
			'style'   => $style,
			'args'    => $args,
			'action'  => self::ACT_UPDATE
		], ['ajax' => '1']);
	}
1157277
public function display($templateFile='',$charset='',$contentType='',$content='',$prefix='') {
        G('viewStartTime');
        // 视图开始标签
        Hook::listen('view_begin',$templateFile);
        // 解析并获取模板内容
        $content = $this->fetch($templateFile,$content,$prefix);
        // 输出模板内容
        $this->render($content,$charset,$contentType);
        // 视图结束标签
        Hook::listen('view_end');
    }
827494
public static function build($title, $slug, $content, $isHidden, $isHtml)
    {
        $page = new static();

        $page->title = $title;
        $page->slug = $slug;
        $page->time = time();
        $page->content = $content;
        $page->is_hidden = (bool) $isHidden;
        $page->is_html = (bool) $isHtml;

        return $page;
    }
1132945
public static function barDump($var, string $title = null, array $options = null)
    {
        if (!self::isProductionMode()) {
            static $panel;
            if (!$panel) {
                self::getBar()->addPanel($panel = new Bar\DefaultPanel('dumps'), 'Tracy:dumps');
            }
            $panel->data[] = [
                'title' => $title,
                'dump' => Dumper::toHtml($var, $options + [
                        Dumper::DEPTH => self::$maxDepth,
                        Dumper::TRUNCATE => self::$maxLength,
                        Dumper::LOCATION => self::$showLocation ?: Dumper::LOCATION_CLASS | Dumper::LOCATION_SOURCE,
                    ]),
            ];
        }

        return $var;
    }
852682
function(content){

			var html = '';

			html += '<div class="ja_wrap '+backgroundClasses.join(' ')+'">'+
					'<div class="jAlert '+classes.join(' ')+ '" style="' +styles.join(' ')+ '" id="' +alert.id+ '">'+
					'<div>';

			if( alert.closeBtn )
			{
				html += 		"<div class='closejAlert ja_close";
				if( alert.closeBtnAlt )
				{
					html += ' ja_close_alt';
				}
                else if( alert.closeBtnRoundWhite )
                {
                    html += ' ja_close_round_white';
                }
                else if( alert.closeBtnRound )
                {
                    html += ' ja_close_round';
                }
				html += "'>&times;</div>"; //closejAlert has a close handler attached, ja_close is for styling
			}

			if( alert.title )
			{
				html += 		"<div class='ja_title'><div>"+alert.title+"</div></div>";
			}

			html += 			'<div class="ja_body">'+content;


			if( alert.btns )
			{
				html += 			'<div class="ja_btn_wrap ';

				if( alert.btnBackground )
				{
					html += 		'optBack';
				}

				html += 			'">';
			}

			if( typeof alert.btns[0] == 'object' )
			{
				$.each(alert.btns, function(index, btn){
					if( typeof btn == 'object' )
					{
						html += 		getBtnHTML(btn);
					}
				});
			}
			else if( typeof alert.btns == 'object' )
			{
				html += 				getBtnHTML(alert.btns);
			}
			else if( alert.btns )
			{
				console.log('jAlert Config Error: Incorrect value for btns (must be object or array of objects): '+alert.btns);
			}

			if( alert.btns )
			{
				html += 			'</div>';
			}

			html += 			'</div>'+
					'</div>'+
					'</div>'+
					'</div>';

			var alertHTML = $(html);

			if( alert.replaceOtherAlerts )
			{
                var alerts = $('.jAlert:visible');
                alerts.each(function(){
                    $(this).jAlert().closeAlert();
                });
			}

			$('body').append(alertHTML);

            //cache instance
			alert.instance = $('#'+alert.id);

            //attach alert object to dom element
            alert.instance[0]['jAlert'] = alert;

            //doing this now will prevent it from happening mid-animation
            $('html,body').css('overflow', 'hidden');

            //show the new alert
			alert.animateAlert('show');

            //add close button handler
			if( alert.closeBtn ){

				alert.instance.on('click', '.closejAlert', function(e){
					e.preventDefault();
					$(this).parents('.jAlert:first').jAlert().closeAlert();
					return false;
				});

			}

			/* Bind mouseup handler to document if this alert has closeOnClick enabled */
			if( alert.closeOnClick ){

				/* Unbind if already exists */
				$(document).off('mouseup touchstart', $.fn.jAlert.onMouseUp);

				/* Bind mouseup */
				$(document).on('mouseup touchstart', $.fn.jAlert.onMouseUp);

			}

			/* Bind on keydown handler to document and if esc was pressed, find all visible jAlerts with that close option enabled and close them */
			if( alert.closeOnEsc ){

				/* Unbind if already exists */
				$(document).off('keydown', $.fn.jAlert.onEscKeyDown);

				/* Bind keydown */
				$(document).on('keydown', $.fn.jAlert.onEscKeyDown);

			}

			/* If there are onOpen callbacks, run them. */
			if( alert.onOpen )
			{
				$.each(alert.onOpen, function(index, onOpen){
					onOpen(alert.instance);
				});
			}

			/* If the alert has an element that should be focused by default */
			if( alert.autofocus )
			{
				alert.instance.find(alert.autofocus).focus();
			}
			else
			{
				alert.instance.focus();
			}
            /*
            	Set Auto
            	usage $.jAlert({
            		autoClose : 3500,
            	});
             */
            if(alert.autoClose)
            {
                $.fn.closeTimer(function()
				{
                    var currentAlert = $.jAlert('current');
                    if(currentAlert !== false)
                    {
                        currentAlert.closeAlert();
                    }
				}, alert.autoClose);
            }

			return alert.instance;

		}
55928
public function renderContent($content, $title = null)
    {
        if ($content instanceof Renderable) {
            $content = $content->render();
        }

        return $this->admin->template()->view('_layout.inner')
            ->with('title', $title)
            ->with('content', $content)
            ->with('breadcrumbKey', $this->parentBreadcrumb);
    }
109087
public function fetchButton($type = 'Help', $url = '#', $width = 700, $height = 500)
	{
		$text  = \Lang::txt('JTOOLBAR_HELP');
		$class = $this->fetchIconClass('help');
		$msg   = \Lang::txt('JHELP', true);

		if (!strstr('?', $url)
		 && !strstr('&', $url)
		 && substr($url, 0, 4) != 'http')
		{
			$url = \Route::url('index.php?option=com_help&component=' . \Request::getCmd('option') . '&page=' . $url);
		}
		else
		{
			$url = $this->_getCommand($ref = $type, $com = false, $override = false, $component = \Request::getCmd('option'));
		}

		$html  = '<a href="' . $url . '" data-title="' . $text . '" data-message="' . $msg. '" data-width="' . $width . '" data-height="' . $height . '" rel="help" class="toolbar toolbar-popup">' . "\n";
		$html .= '<span class="' . $class . '">' . "\n";
		$html .= $text . "\n";
		$html .= '</span>' . "\n";
		$html .= '</a>' . "\n";

		return $html;
	}
1245266
public function setSize($width, $height, $name = null)
    {
        if (null === $name) {
            $name = 'current';
        }

        $this->browser->request('POST', 'window/'.urlencode($name).'/size', json_encode(array('width' => $width, 'height' => $height)));

        return $this;
    }
1268998
function(content) {
        // AJAX is currently loading
        if (content === true) {
            return;
        }

        // Hide blackout loading message
        if (this.blackout) {
            this.blackout.hideLoader();
        }

        this.fireEvent('showing');

        var body = this.element.find(this.ns('content'));
            body.html(content);

        this.fireEvent('load', [content]);

        // Reveal modal
        this.element.reveal();

        // Resize modal
        if (this.options.fullScreen) {
            body.css('min-height', $(window).height());
        }

        this.fireEvent('shown');
    }