Beispiel #1
0
 public function test__toString_WithProperties()
 {
     $this->checkbox->setIdentifier('SelectAll_checkbox');
     $this->checkbox->setProperties(array('id' => 'chkSelAll', 'label' => 'Select All', 'name' => '_selectall', 'value' => 10));
     $expectedAttributes = array('type="checkbox"', 'id="chkSelAll"', 'name="_selectall"', 'value="10"');
     $html = $this->checkbox->__toString();
     foreach ($expectedAttributes as $attribute) {
         $this->assertRegExp("/{$attribute}/", $html);
     }
 }
Beispiel #2
0
        <div id="helpText" class="helpText"></div>

        <div id="scrollWrapper">
            <div id="scrollContainer">
            </div>
        </div>        
        <div id="tableWrapper">
        <table class="table hover" id="resultTable">
            
                    <?php 
$headerRow1 = '';
$headerRow2 = '';
if ($hasSelectableRows) {
    $selectAllCheckbox = new Checkbox();
    $selectAllCheckbox->setProperties(array('id' => 'ohrmList_chkSelectAll', 'name' => 'chkSelectAll'));
    $selectAllCheckbox->setIdentifier('Select_All');
    $selectAllRowspan = $showGroupHeaders ? 2 : 1;
    $headerRow1 .= content_tag('th', $selectAllCheckbox->__toString(), array('rowspan' => $selectAllRowspan, 'class' => 'checkbox-col')) . "\n";
}
foreach ($headerGroups as $group) {
    $rowspan = 1;
    if ($showGroupHeaders) {
        if ($group->showHeader()) {
            $headerCell = new HeaderCell();
            $headerCell->setProperties(array('label' => __($group->getName())));
            $groupColspan = $group->getHeaderCount();
            $headerRow1 .= content_tag('th', $headerCell->__toString(), array('style' => 'text-align: center', 'colspan' => $groupColspan)) . "\n";
        } else {
            // If we are displaying group headers and this is a
            // group without a header, set rowspan = 2.
            $rowspan = 2;