本文整理汇总了PHP中CCol::setRowSpan方法的典型用法代码示例。如果您正苦于以下问题:PHP CCol::setRowSpan方法的具体用法?PHP CCol::setRowSpan怎么用?PHP CCol::setRowSpan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCol
的用法示例。
在下文中一共展示了CCol::setRowSpan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
//.........这里部分代码省略.........
if ($this->mode == SCREEN_MODE_EDIT && $screenitem['screenitemid'] != 0) {
$action = 'screenedit.php?form=update' . url_param('screenid') . '&screenitemid=' . $screenitem['screenitemid'];
} elseif ($this->mode == SCREEN_MODE_EDIT && $screenitem['screenitemid'] == 0) {
$action = 'screenedit.php?form=update' . url_param('screenid') . '&x=' . $c . '&y=' . $r;
} else {
$action = null;
}
// edit form cell
if ($this->mode == SCREEN_MODE_EDIT && (isset($_REQUEST['form']) && $_REQUEST['form'] == 'update') && (isset($_REQUEST['x']) && $_REQUEST['x'] == $c && isset($_REQUEST['y']) && $_REQUEST['y'] == $r || isset($_REQUEST['screenitemid']) && bccomp($_REQUEST['screenitemid'], $screenitem['screenitemid']) == 0)) {
$screenView = new CView('configuration.screen.constructor.edit', array('screen' => $this->screen));
$item = $screenView->render();
$isEditForm = true;
} elseif (!empty($screenitem['screenitemid']) && isset($screenitem['resourcetype'])) {
$screenBase = CScreenBuilder::getScreen(array('isFlickerfree' => $this->isFlickerfree, 'pageFile' => $this->pageFile, 'mode' => $this->mode, 'timestamp' => $this->timestamp, 'hostid' => $this->hostid, 'profileIdx' => $this->profileIdx, 'profileIdx2' => $this->profileIdx2, 'updateProfile' => $this->updateProfile, 'timeline' => $this->timeline, 'resourcetype' => $screenitem['resourcetype'], 'screenitem' => $screenitem));
if (!empty($screenBase)) {
if ($this->mode == SCREEN_MODE_EDIT && !empty($screenitem['screenitemid'])) {
$screenBase->action = 'screenedit.php?form=update' . url_param('screenid') . '&screenitemid=' . $screenitem['screenitemid'];
} elseif ($this->mode == SCREEN_MODE_EDIT && empty($screenitem['screenitemid'])) {
$screenBase->action = 'screenedit.php?form=update' . url_param('screenid') . '&x=' . $c . '&y=' . $r;
}
$item = $screenBase->get();
} else {
$item = null;
}
} else {
$item = array(SPACE);
if ($this->mode == SCREEN_MODE_EDIT) {
array_push($item, BR(), new CLink(_('Change'), $action, 'empty_change_link'));
}
}
// align
$halign = 'def';
if ($screenitem['halign'] == HALIGN_CENTER) {
$halign = 'cntr';
}
if ($screenitem['halign'] == HALIGN_LEFT) {
$halign = 'left';
}
if ($screenitem['halign'] == HALIGN_RIGHT) {
$halign = 'right';
}
$valign = 'def';
if ($screenitem['valign'] == VALIGN_MIDDLE) {
$valign = 'mdl';
}
if ($screenitem['valign'] == VALIGN_TOP) {
$valign = 'top';
}
if ($screenitem['valign'] == VALIGN_BOTTOM) {
$valign = 'bttm';
}
if ($this->mode == SCREEN_MODE_EDIT && !$isEditForm) {
$item = new CDiv($item, 'draggable');
$item->setAttribute('id', 'position_' . $r . '_' . $c);
$item->setAttribute('data-xcoord', $c);
$item->setAttribute('data-ycoord', $r);
}
// colspan/rowspan
$newColumn = new CCol($item, $halign . '_' . $valign . ' screenitem');
if (!empty($screenitem['colspan'])) {
$newColumn->setColSpan($screenitem['colspan']);
}
if (!empty($screenitem['rowspan'])) {
$newColumn->setRowSpan($screenitem['rowspan']);
}
array_push($newColumns, $newColumn);
}
// action right cell
if ($this->mode == SCREEN_MODE_EDIT) {
$icon = new CImg('images/general/minus.png', null, null, null, 'pointer');
if ($emptyScreenRow) {
$removeRowLink = 'javascript: location.href = "screenedit.php?screenid=' . $this->screen['screenid'] . '&rmv_row=' . $r . '";';
} else {
$removeRowLink = 'javascript: if (Confirm("' . _('This screen-row is not empty. Delete it?') . '")) {' . ' location.href = "screenedit.php?screenid=' . $this->screen['screenid'] . '&rmv_row=' . $r . '"; }';
}
$icon->addAction('onclick', $removeRowLink);
array_push($newColumns, new CCol($icon));
}
$screenTable->addRow(new CRow($newColumns));
}
// action bottom row
if ($this->mode == SCREEN_MODE_EDIT) {
$icon = new CImg('images/general/plus.png', null, null, null, 'pointer');
$icon->addAction('onclick', 'javascript: location.href = "screenedit.php?screenid=' . $this->screen['screenid'] . '&add_row=' . $this->screen['vsize'] . '";');
$newColumns = array(new CCol($icon));
for ($i = 0; $i < $this->screen['hsize']; $i++) {
$icon = new CImg('images/general/minus.png', null, null, null, 'pointer');
if (isset($emptyScreenColumns[$i])) {
$removeColumnLink = 'javascript: if (Confirm("' . _('This screen-column is not empty. Delete it?') . '")) {' . ' location.href = "screenedit.php?screenid=' . $this->screen['screenid'] . '&rmv_col=' . $i . '"; }';
} else {
$removeColumnLink = 'javascript: location.href = "screenedit.php?config=1&screenid=' . $this->screen['screenid'] . '&rmv_col=' . $i . '";';
}
$icon->addAction('onclick', $removeColumnLink);
array_push($newColumns, new CCol($icon));
}
array_push($newColumns, new CCol(new CImg('images/general/zero.png', 'zero', 1, 1)));
$screenTable->addRow($newColumns);
}
return $screenTable;
}