当前位置: 首页>>代码示例>>PHP>>正文


PHP Ajax::wrapJSforDocumentReady方法代码示例

本文整理汇总了PHP中Ajax::wrapJSforDocumentReady方法的典型用法代码示例。如果您正苦于以下问题:PHP Ajax::wrapJSforDocumentReady方法的具体用法?PHP Ajax::wrapJSforDocumentReady怎么用?PHP Ajax::wrapJSforDocumentReady使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ajax的用法示例。


在下文中一共展示了Ajax::wrapJSforDocumentReady方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFieldsetBlock

    /**
     * Get fieldset block
     * @return string
     */
    private function getFieldsetBlock()
    {
        $String = '';
        $String .= HTML::info(sprintf(__('Found %s activities.'), count($this->TrainingObjects)));
        $String .= '<table class="fullwidth multi-import-table zebra-style c" id="multi-import-table">';
        $String .= '<thead><tr><th>' . __('Import') . '</th><th>' . __('Date') . '</th><th>' . __('Duration') . '</th><th>' . __('Distance') . '</th><th colspan="4"></th></tr></thead>';
        $String .= '<tbody>';
        foreach ($this->TrainingObjects as $i => $TrainingObject) {
            $String .= '<tr>' . $this->getTableRowFor($TrainingObject, $i) . '</tr>';
        }
        $String .= '</tbody>';
        $String .= '</table>';
        $String .= Ajax::wrapJSforDocumentReady('
			$("#multi-import-table td").click(function(e){
				if ($(e.target).closest(\'input[type="checkbox"]\').length == 0)
					$(this).parent().find(\'input:checkbox\').attr(\'checked\', !$(this).parent().find(\'input:checkbox\').attr(\'checked\'));
			});
		');
        return $String;
    }
开发者ID:guancio,项目名称:Runalyze,代码行数:24,代码来源:class.MultiImporterFormular.php

示例2: connectPagination

 /**
  * Connect pagination links
  */
 protected function connectPagination()
 {
     echo Ajax::wrapJSforDocumentReady('$("#search-back").click(function(){' . 'var $i = $("#search input[name=\'page\']");' . '$i.val( parseInt($i.val()) - 1 );' . '$("#search").submit();' . '});' . '$("#search-next").click(function(){' . 'var $i = $("#search input[name=\'page\']");' . '$i.val( parseInt($i.val()) + 1 );' . '$("#search").submit();' . '});');
 }
开发者ID:steckbrief,项目名称:Runalyze,代码行数:7,代码来源:class.SearchResults.php

示例3: getJScode

 /**
  * @return string
  */
 protected function getJScode()
 {
     return Ajax::wrapJSforDocumentReady('splits = $("#formularSplitsContainer");' . 'defaultSplit = $("#defaultInputSplit").val();' . 'splits.find(".add-split").click(addSplit);' . 'splits.find(".round-splits").click(roundSplits);' . 'splits.find(".sum-splits").click(sumSplitsToTotal);' . 'splits.find(".active-splits").click(allSplitsActive);' . 'splits.find(".rest-splits").click(allSplitsRest);' . 'splits.find(".alternate-splits-rest").click(function(){evenSplits(0);oddSplits(1);});' . 'splits.find(".alternate-splits-active").click(function(){evenSplits(1);oddSplits(0);});');
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:7,代码来源:class.TrainingInputSplits.php

示例4: initPlots

 /**
  * Init plots
  */
 protected function initPlots()
 {
     echo Ajax::wrapJSforDocumentReady('RunalyzePlot.resizeTrainingCharts();');
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:7,代码来源:class.TrainingView.php

示例5: Frontend

<?php

/**
 * File for displaying the config-window for a plugin.
 * Call:   call.Plugin.config.php?id=
 */
require_once '../inc/class.Frontend.php';
$Frontend = new Frontend(true);
$Factory = new PluginFactory();
if (isset($_GET['key'])) {
    $Factory->uninstallPlugin(filter_input(INPUT_GET, 'key'));
    echo Ajax::wrapJSforDocumentReady('Runalyze.Overlay.load("call/window.config.php");');
} elseif (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $Plugin = $Factory->newInstanceFor($_GET['id']);
    $Plugin->displayConfigWindow();
} else {
    echo '<em>' . __('Something went wrong ...') . '</em>';
}
开发者ID:guancio,项目名称:Runalyze,代码行数:18,代码来源:call.Plugin.config.php

示例6: sendErrorsToJSLog

 /**
  * Send all errors to JS-Log 
  */
 private function sendErrorsToJSLog()
 {
     echo Ajax::wrapJSforDocumentReady('Runalyze.Log.addArray(' . json_encode($this->errors) . ')');
 }
开发者ID:9x,项目名称:Runalyze,代码行数:7,代码来源:class.Error.php

示例7: _e

?>

</head>

<body id="installer">

<div id="headline">
	<a class="tab logo" href="http://www.runalyze.de/" target="_blank">Runalyze</a>
	<a class="tab right" href="login.php"><i class="fa fa-fw fa-sign-in"></i> <?php 
_e('Please login');
?>
</a>
</div>

<?php 
echo Ajax::wrapJSforDocumentReady('Runalyze.init();');
?>

<div id="overlay" style="display:block;"></div>

<div id="ajax-outer">
<div id="ajax" class="panel<?php 
if (defined('ADMIN_WINDOW')) {
    echo ' big-window';
}
?>
" style="display:block;">
	<div class="panel-heading">
		<div class="panel-menu">
                    <ul>
                    <li class="with-submenu">
开发者ID:steckbrief,项目名称:Runalyze,代码行数:31,代码来源:tpl.installerHeader.php

示例8: SUM

$NumKm = Cache::get('NumKm', 1);
if ($NumKm == NULL) {
    $NumKm = DB::getInstance()->query('SELECT SUM(distance) FROM ' . PREFIX . 'training')->fetchColumn();
    Cache::set('NumKm', $NumKm, '500', 1);
}
DB::getInstance()->startAddingAccountID();
$NumUserOn = SessionAccountHandler::getNumberOfUserOnline();
?>

<p class="text"></p>
<p class="text small c login-window-stats">
	<?php 
printf(_n('Until now <strong>%d</strong> athlete is registered and', 'Until now <strong>%d</strong> athletes are registered and', $NumUser), $NumUser);
?>
	<?php 
printf(_n('has logged <strong>%s</strong>.', 'have logged <strong>%s</strong>.', $NumUser), Distance::format($NumKm));
?>
	<br>
	<?php 
printf(_n('<strong>%d</strong> athlete is online.', '<strong>%d</strong> athletes are online.', $NumUserOn), $NumUserOn);
?>
<br>
</p>

<?php 
if (isset($_POST['new_username'])) {
    echo Ajax::wrapJSforDocumentReady("show('reg');");
}
if (isset($_POST['send_username'])) {
    echo Ajax::wrapJSforDocumentReady("show('pwf');");
}
开发者ID:n0rthface,项目名称:Runalyze,代码行数:31,代码来源:tpl.loginWindow.php

示例9: getFieldsetBlock

    /**
     * Get fieldset block
     * @return string
     */
    private function getFieldsetBlock()
    {
        $String = '';
        foreach ($this->TrainingObjects as $i => $TrainingObject) {
            $activityIDs[] = $TrainingObject->getActivityId();
        }
        $duplicates = (new DuplicateFinder(DB::getInstance(), SessionAccountHandler::getId()))->checkForDuplicates($activityIDs);
        $countDuplicates = count(array_filter($duplicates));
        $String .= HTML::info(sprintf(__('Found %s activities.'), count($this->TrainingObjects)));
        if ($countDuplicates > 0) {
            $String .= HTML::warning(_n('Found <strong>one</strong> duplicate activity.', 'Found duplicate activities.', $countDuplicates));
        }
        $String .= '<table class="fullwidth multi-import-table zebra-style c" id="multi-import-table">';
        $String .= '<thead><tr><th>' . __('Import') . '</th><th>' . __('Date') . '</th><th>' . __('Duration') . '</th><th>' . __('Distance') . '</th><th colspan="4"></th></tr></thead>';
        $String .= '<tbody>';
        foreach ($this->TrainingObjects as $i => $TrainingObject) {
            $String .= '<tr>' . $this->getTableRowFor($TrainingObject, $i, $duplicates[$TrainingObject->getActivityId()]) . '</tr>';
        }
        $String .= '</tbody>';
        $String .= '</table>';
        $String .= Ajax::wrapJSforDocumentReady('
			$("#multi-import-table td").click(function(e){
				if ($(e.target).closest(\'input[type="checkbox"]\').length == 0)
					$(this).parent().find(\'input:checkbox\').attr(\'checked\', !$(this).parent().find(\'input:checkbox\').attr(\'checked\'));
			});
		');
        return $String;
    }
开发者ID:rob-st,项目名称:Runalyze,代码行数:32,代码来源:class.MultiImporterFormular.php

示例10: _e

<p class="info">
	<?php 
_e('<strong>VDOT/Time (Shape):</strong> by your shape at that time<br>');
?>
	<?php 
_e('The time is the prognosis by Runalyze.');
?>
</p>

<p class="info">
	<?php 
_e('<strong>Corrector:</strong> Ratio between VDOT and VDOT (by HR)');
?>
</p>

<?php 
if (Configuration::Vdot()->useElevationCorrection()) {
    ?>
<p class="warning">
	<?php 
    _e('The distance correction for elevation is not used in this table.');
    ?>
</p>
<?php 
}
?>

<?php 
echo Ajax::wrapJSforDocumentReady('$("#ajax").addClass("big-window");');
开发者ID:guancio,项目名称:Runalyze,代码行数:29,代码来源:tpl.Table.php

示例11: Frontend

<?php

/**
 * File displaying the config panel
 * Call:   call/window.config.php[?key=...]
 */
require '../inc/class.Frontend.php';
$Frontend = new Frontend();
$ConfigTabs = new ConfigTabs();
$ConfigTabs->addDefaultTab(new ConfigTabGeneral());
$ConfigTabs->addTab(new ConfigTabPlugins());
$ConfigTabs->addTab(new ConfigTabDataset());
$ConfigTabs->addTab(new ConfigTabSports());
$ConfigTabs->addTab(new ConfigTabTypes());
$ConfigTabs->addTab(new ConfigTabEquipment());
$ConfigTabs->addTab(new ConfigTabAccount());
$ConfigTabs->display();
echo Ajax::wrapJSforDocumentReady('Runalyze.Overlay.removeClasses();');
开发者ID:guancio,项目名称:Runalyze,代码行数:18,代码来源:window.config.php


注:本文中的Ajax::wrapJSforDocumentReady方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。