本文整理汇总了PHP中XTemplate::concat方法的典型用法代码示例。如果您正苦于以下问题:PHP XTemplate::concat方法的具体用法?PHP XTemplate::concat怎么用?PHP XTemplate::concat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XTemplate
的用法示例。
在下文中一共展示了XTemplate::concat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$CACHE[$name] = $val;
}
$c->setPropertyValue($name, $val);
}
// load datasource
if (isset($CACHE['datasource'])) {
$ds = $storage->getDatasource($comp_class, $CACHE['datasource']);
$c->setDatasource($ds);
}
$page->addComponent($c);
$script = "\n\t\ttmp= new {$comp_class}();\n\t\ttmp.setup( \$('{$CACHE['id']}') );\n\n\t\tnew Effect.Move( tmp._div, {\n\t\t\tmode: 'absolute',\n\t\t\tx: {$CACHE['x']},\n\t\t\ty: {$CACHE['y']}\n\t\t});\n\n\t";
foreach ($c->getProperties() as $name => $prop) {
$script .= "tmp['{$name}']= unescape(\"{$prop->value}\");\n";
}
$script .= "tmp.updateContent();";
$xtpl->concat('ADDED_JS', $script);
switch ($c->getPropertyValue('position')) {
case 'fixed':
$xtpl->concat('ADDED_JS', "DragDrop.addDraggable(\$('{$CACHE['id']}'), null, 'global_group', {handle: 'handle'});");
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
$c->setCSSStyle('position', 'absolute');
$c->setCSSStyle('left', "expression( {$CACHE['x']} + ( ignoreMe2 = document.body.scrollLeft ) + 'px' )");
$c->setCSSStyle('top', "expression( {$CACHE['y']} + ( ignoreMe = document.body.scrollTop ) + 'px' )");
} else {
$c->setCSSStyle('position', 'fixed');
$c->setCSSStyle('left', $CACHE['x'] . 'px');
$c->setCSSStyle('top', $CACHE['y'] . 'px');
}
$c->setCSSStyle('z-index', 500);
$c->setCSSStyle('width', $CACHE['width'] . 'px');
$xtpl->concat('ADDED_CSS', $c->getCSS());
示例2: foreach
$c->setPropertyValue($name, $val);
}
// load datasource
if (isset($datasource)) {
$ds = $storage->getDatasource($class_name, $datasource);
$c->setDatasource($ds);
}
$page->addComponent($c);
$comp_class = get_class($c);
if ($edit_mode) {
$script = "\n\t\t\ttmp= new {$comp_class}();\n\t\t\ttmp.setup( \$('{$comp_id}') );\n\t\t\tnew Effect.Move(\$('{$comp_id}'), {\n\t\t\t\tmode: 'absolute',\n\t\t\t\tx: {$x},\n\t\t\t\ty: {$y}\n\t\t\t});\n\n\t\t";
foreach ($c->getProperties() as $name => $prop) {
$script .= "tmp['{$name}']= unescape(\"{$prop->value}\");\n";
}
$script .= "tmp.updateContent();";
$xtpl->concat('ADDED_JS', $script);
}
switch ($c->getPropertyValue('position')) {
case 'fixed':
if ($edit_mode) {
$xtpl->concat('ADDED_JS', "\n\t\t\t\t\$('{$comp_id}').obj._drag_obj= new Draggable('{$comp_id}', {handle: 'handle', snap: {$CONF['dragdrop_snap']}});\n\t\t\t");
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
$c->setCSSStyle('position', 'absolute');
$c->setCSSStyle('left', "expression( {$x} + ( ignoreMe2 = document.body.scrollLeft ) + 'px' )");
$c->setCSSStyle('top', "expression( {$y} + ( ignoreMe = document.body.scrollTop ) + 'px' )");
} else {
$c->setCSSStyle('position', 'fixed');
$c->setCSSStyle('left', $x . 'px');
$c->setCSSStyle('top', $y . 'px');
}