Ejemplo n.º 1
0
 public function Load()
 {
     parent::$PAGE_TITLE = __(CONFIGURE_MODULES);
     $config_modules_obj = new Object();
     $construction_page = new Object(__(PAGE_IN_CONSTRUCTION));
     $construction_page->setClass("warning");
     $config_modules_obj->add($construction_page);
     $config_modules_obj->add("<br/>", __(PRESENTATION), "<br/><br/>");
     $sort_event_install = new SortableEvent($this);
     $sort_event_install->onSort("onChangeModule")->setAjaxEvent()->disableAjaxWaitMessage();
     $this->list_install_modules_obj = new Object();
     $this->list_install_modules_obj->setId("list_install_modules");
     $this->list_install_modules_obj->setSortable(true, $sort_event_install);
     $list_all_install_modules_obj = new Object();
     $module_style = "cursor:pointer;width:100px;border:1px solid gray;padding:2px;margin:2px;";
     $array_active_modules = array();
     $module_file = new File(dirname(__FILE__) . "/../../../wsp/config/modules.cnf");
     while (($line = $module_file->read_line()) != false) {
         if (trim($line) != "") {
             $array_active_modules[] = trim($line);
             $module_obj = new Object(trim($line));
             $module_obj->setId("module_" . str_replace("-", "_", trim($line)))->forceDivTag();
             if (trim($line) != "Authentication") {
                 $module_obj->setStyle($module_style);
                 $module_obj->setDraggable(true, false, null, true);
                 $this->list_install_modules_obj->add($module_obj);
             } else {
                 $module_obj->setStyle($module_style . "cursor:none;");
                 $list_all_install_modules_obj->add($module_obj);
             }
         }
     }
     $module_file->close();
     $list_all_install_modules_obj->add($this->list_install_modules_obj);
     $sort_event = new SortableEvent($this);
     $sort_event->onSort("onChangeModule")->setAjaxEvent()->disableAjaxWaitMessage();
     $this->list_modules_obj = new Object();
     $this->list_modules_obj->setId("list_modules");
     $this->list_modules_obj->setSortable(true, $sort_event);
     $folder = dirname(__FILE__) . "/../../../wsp/class/modules";
     $array_module_dir = scandir($folder);
     for ($i = 0; $i < sizeof($array_module_dir); $i++) {
         if (is_dir($folder . "/" . $array_module_dir[$i]) && !in_array($array_module_dir[$i], $array_active_modules) && $array_module_dir[$i] != "." && $array_module_dir[$i] != ".." && $array_module_dir[$i] != ".svn") {
             $module_obj = new Object($array_module_dir[$i]);
             $module_obj->setId("module_" . str_replace("-", "_", $array_module_dir[$i]))->forceDivTag();
             $module_obj->setDraggable(true, false, null, true)->setStyle($module_style);
             $this->list_modules_obj->add($module_obj);
         }
     }
     $config_table = new Table();
     $config_table->setWidth(400)->setDefaultAlign(RowTable::ALIGN_CENTER);
     $config_table->setDefaultValign(RowTable::VALIGN_TOP);
     $config_table->addRowColumns(new Object(new Label(__(ALL_MODULES), true), "<br/>", $this->list_modules_obj), "&nbsp;", new Object(new Label(__(INSTALLED_MODULES), true), "<br/>", $list_all_install_modules_obj));
     $config_modules_obj->add($config_table, "<br/><br/>");
     $this->render = new AdminTemplateForm($this, $config_modules_obj);
 }
Ejemplo n.º 2
0
 /**
  * Method addRowLoadFromSqlDataView
  * @access private
  * @param mixed $row 
  * @param mixed $list_attribute 
  * @param mixed $list_attribute_type 
  * @param mixed $key_attributes 
  * @param mixed $ind 
  * @param boolean $is_delete_action [default value: false]
  * @param double $line_nb [default value: 0]
  * @return boolean
  * @since 1.1.6
  */
 private function addRowLoadFromSqlDataView($row, $list_attribute, $list_attribute_type, $key_attributes, $ind, $is_delete_action = false, $line_nb = null)
 {
     if ($this->from_sql_data_view_delete) {
         // create delete button if not already exists
         $bnt_del_id = $this->id . "_btndel__ind_" . $ind;
         $delete_pic = $this->getPage()->getObjectId($bnt_del_id);
         if ($delete_pic == null) {
             $delete_pic = new Picture("img/wsp-admin/delete_16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
             $delete_pic->setId($bnt_del_id);
             $delete_pic->onClickJs("if (!confirm('" . __(TABLE_CONFIME_DEL_ROW) . "')) { return false; }");
             $delete_pic->onClick($this->getPage(), "onChangeTableFromSqlDataView")->setAjaxEvent()->disableAjaxWaitMessage();
         }
     }
     // create row
     $row_table = new RowTable();
     $row_table->setId($this->id . "_row_" . $ind);
     for ($i = 0; $i < sizeof($list_attribute); $i++) {
         // get field properties
         if (is_array($this->from_sql_data_view_properties[$list_attribute[$i]])) {
             $attribute_properties = $this->from_sql_data_view_properties[$list_attribute[$i]];
         } else {
             $attribute_properties = array();
         }
         // get property display
         if (isset($attribute_properties["display"]) && $attribute_properties["display"] == false) {
             continue;
         }
         // get property update
         $is_update_ok = true;
         if (isset($attribute_properties["update"]) && $attribute_properties["update"] == false) {
             $is_update_ok = false;
         }
         if ($this->from_sql_data_view_update && !in_array($list_attribute[$i], $key_attributes) && $is_update_ok) {
             $row_value = $row->getValue($list_attribute[$i]);
             if (gettype($row_value) == "object" && method_exists($row_value, "render")) {
                 $row_value = $row_value->render();
             }
             $edit_pic = new Picture("wsp/img/edit_16x16.png", 16, 16);
             $row_obj = new Object($edit_pic, trim($row_value) == "" ? "&nbsp;&nbsp;" : utf8encode($row_value));
             $row_obj->setId($this->id . "_" . $list_attribute[$i] . "_obj_" . $ind)->setStyle("cursor:pointer;border:1px solid gray;");
             $input_obj = $this->createDbAttributeObject($row, $list_attribute, $list_attribute_type, $i, $ind, $key_attributes);
             if (get_class($input_obj) == "ComboBox") {
                 // Get foreign key value
                 $row_obj->emptyObject();
                 $value = $input_obj->getText();
                 $row_obj->add($edit_pic, trim($value) == "" ? "&nbsp;&nbsp;" : $value);
             } else {
                 if (get_class($input_obj) == "Calendar") {
                     $row_obj->emptyObject();
                     $value = $input_obj->getValueStr();
                     $row_obj->add($edit_pic, trim($value) == "" ? "&nbsp;&nbsp;" : $value);
                     $row_table->setNowrap();
                 }
             }
             $row_obj_input = new Object($input_obj);
             $row_obj_input->setId($this->id . "_" . $list_attribute[$i] . "_input_obj_" . $ind);
             $cancel_pic = new Picture("wsp/img/cancel_12x12.png", 12, 12);
             $cancel_pic->setId($this->id . "_img_" . $ind . "_cancel_" . $list_attribute[$i]);
             $cancel_pic->onClickJs("\$('#" . $row_obj->getId() . "').css('display', 'inline');\$('#" . $row_obj_input->getId() . "').hide();" . ($this->from_sql_data_view_add_button != null ? "\$('#" . $this->from_sql_data_view_add_button->getId() . "').button({ disabled: false });" : ""));
             $cancel_pic_obj = new Object($cancel_pic);
             $row_obj_input->add($cancel_pic_obj->forceSpanTag()->setStyle("position:absolute;"));
             if (!$this->getPage()->isAjaxPage() || $is_delete_action || $this->from_sql_data_view_reload_pic != null && $this->from_sql_data_view_reload_pic->isClicked() || $this->from_sql_data_view_add_button != null && $this->from_sql_data_view_add_button->isClicked()) {
                 $this->getPage()->addObject(new JavaScript("\$(document).ready(function() { \$('#" . $row_obj_input->getId() . "').hide(); });"));
             }
             $row_obj->onClickJs("\$('#" . $row_obj->getId() . "').hide();\$('#" . $row_obj_input->getId() . "').show();" . ($this->from_sql_data_view_add_button != null ? "\$('#" . $this->from_sql_data_view_add_button->getId() . "').button({ disabled: true });" : ""));
             $row_table->add(new Object($row_obj, $row_obj_input));
             // get properties align
             if (isset($attribute_properties["align"])) {
                 $row_table->setColumnAlign($i + 1, $attribute_properties["align"]);
             }
         } else {
             $value = $row->getValue($list_attribute[$i]);
             if (isset($this->from_sql_data_view_properties[$list_attribute[$i]]['cmb_obj'])) {
                 $input_obj_tmp = $this->from_sql_data_view_properties[$list_attribute[$i]]['cmb_obj'];
                 $input_obj_tmp->setValue($value);
                 $value = $input_obj_tmp->getText();
             }
             if (get_class($value) == "DateTime") {
                 $value = $value->format("Y-m-d");
             }
             $row_table->add(utf8encode($value));
         }
     }
     if ($this->from_sql_data_view_delete) {
         $row_table->add($delete_pic);
     } else {
         if ($this->from_sql_data_view_insert) {
             $row_table->add();
         }
     }
     if ($is_table_defined_style) {
         $row_table->setBorderPredefinedStyle($this->class);
     }
     if ($this->is_advance_table) {
         if (isset($line_nb) && $line_nb !== null) {
             $row_table->setRowClass($line_nb % 2 == 0 ? "odd" : "even");
         } else {
             if (is_numeric($ind)) {
                 $row_table->setRowClass($ind % 2 == 0 ? "odd" : "even");
             } else {
                 $row_table->setRowClass("even");
             }
         }
     }
     $this->addRow($row_table);
 }
Ejemplo n.º 3
0
    public function testObject()
    {
        $binary = new Binary();
        $binary->setCompression('deflate');
        $binary->setData('dGhpcyBpcyB1bmNvbXByZXNzZWQgZGF0YQo=');
        $binary->setFileUrl('foo.txt');
        $binary->setLength(25);
        $binary->setMd5('827ae7e1ab45e4dd591d087c741e5770');
        $binary->setMimeType('text/plain');
        $laura = new Object();
        $laura->setObjectType('person');
        $laura->setDisplayName('Laura');
        $object = new Object();
        $object->setId('1');
        $object->setObjectType('person');
        $object->setLanguage('en');
        $object->setDisplayName('foo');
        $object->setUrl('http://localhost.com');
        $object->setRel('self');
        $object->setMediaType('text/plain');
        $object->setAlias('@network');
        $object->setAttachments(array($binary));
        $object->setAuthor($laura);
        $object->setContent('foobar');
        $object->setDuplicates('http://localhost.com#foo');
        $object->setIcon('http://localhost.com/icon.png');
        $object->setImage('http://localhost.com/image.png');
        $object->setLocation('foo');
        $object->setPublished(new DateTime('2012-12-12T12:00:00Z'));
        $object->setGenerator('http://phpsx.org');
        $object->setProvider('http://phpsx.org');
        $object->setSummary('foobar');
        $object->setUpdated(new DateTime('2012-12-12T12:00:00Z'));
        $object->setStartTime(new DateTime('2012-12-12T12:00:00Z'));
        $object->setEndTime(new DateTime('2012-12-12T12:00:00Z'));
        $object->setRating(0.8);
        $object->setTags(array('#foo', '#bar'));
        $object->setTitle('foobar');
        $object->setDuration('PT5M');
        $object->setHeight(256);
        $object->setWidth(256);
        $object->setInReplyTo('http://localhost.com#foo');
        $object->setScope('http://localhost.com');
        $content = <<<JSON
{
  "id": "1",
  "objectType": "person",
  "language": "en",
  "displayName": "foo",
  "url": "http://localhost.com",
  "rel": "self",
  "mediaType": "text/plain",
  "alias": "@network",
  "attachments": [{
      "compression": "deflate",
      "data": "dGhpcyBpcyB1bmNvbXByZXNzZWQgZGF0YQo=",
      "fileUrl": "foo.txt",
      "length": 25,
      "md5": "827ae7e1ab45e4dd591d087c741e5770",
      "mimeType": "text/plain",
      "objectType": "binary"
    }],
  "author": {
    "objectType": "person",
    "displayName": "Laura"
  },
  "content": "foobar",
  "duplicates": "http://localhost.com#foo",
  "icon": "http://localhost.com/icon.png",
  "image": "http://localhost.com/image.png",
  "location": "foo",
  "published": "2012-12-12T12:00:00Z",
  "generator": "http://phpsx.org",
  "provider": "http://phpsx.org",
  "summary": "foobar",
  "updated": "2012-12-12T12:00:00Z",
  "startTime": "2012-12-12T12:00:00Z",
  "endTime": "2012-12-12T12:00:00Z",
  "rating": 0.8,
  "tags": [
    "#foo",
    "#bar"
  ],
  "title": "foobar",
  "duration": "PT5M",
  "height": 256,
  "width": 256,
  "inReplyTo": "http://localhost.com#foo",
  "scope": "http://localhost.com"
}
JSON;
        $this->assertRecordEqualsContent($object, $content);
        $this->assertEquals('1', $object->getId());
        $this->assertEquals('person', $object->getObjectType());
        $this->assertEquals('en', $object->getLanguage());
        $this->assertEquals('foo', $object->getDisplayName());
        $this->assertEquals('http://localhost.com', $object->getUrl());
        $this->assertEquals('self', $object->getRel());
        $this->assertEquals('text/plain', $object->getMediaType());
        $this->assertEquals('@network', $object->getAlias());
        $this->assertEquals(array($binary), $object->getAttachments());
        $this->assertEquals($laura, $object->getAuthor());
        $this->assertEquals('foobar', $object->getContent());
        $this->assertEquals('http://localhost.com#foo', $object->getDuplicates());
        $this->assertEquals('http://localhost.com/icon.png', $object->getIcon());
        $this->assertEquals('http://localhost.com/image.png', $object->getImage());
        $this->assertEquals('foo', $object->getLocation());
        $this->assertEquals(new DateTime('2012-12-12T12:00:00Z'), $object->getPublished());
        $this->assertEquals('http://phpsx.org', $object->getGenerator());
        $this->assertEquals('http://phpsx.org', $object->getProvider());
        $this->assertEquals('foobar', $object->getSummary());
        $this->assertEquals(new DateTime('2012-12-12T12:00:00Z'), $object->getUpdated());
        $this->assertEquals(new DateTime('2012-12-12T12:00:00Z'), $object->getStartTime());
        $this->assertEquals(new DateTime('2012-12-12T12:00:00Z'), $object->getEndTime());
        $this->assertEquals(0.8, $object->getRating());
        $this->assertEquals(array('#foo', '#bar'), $object->getTags());
        $this->assertEquals('foobar', $object->getTitle());
        $this->assertEquals('PT5M', $object->getDuration());
        $this->assertEquals(256, $object->getHeight());
        $this->assertEquals(256, $object->getWidth());
        $this->assertEquals('http://localhost.com#foo', $object->getInReplyTo());
        $this->assertEquals('http://localhost.com', $object->getScope());
        $this->assertEquals('http://localhost.com', $object->__toString());
    }
Ejemplo n.º 4
0
<?php

/**
  * @desc Testfall 4
  * @needs $_POST['object']
*/
include 'object.php';
// Objekt-Klasse für Datenstrukturierung
switch ($_SERVER['REQUEST_METHOD']) {
    case "POST":
        $input = json_decode($_POST['object']);
        if ($input != NULL) {
            $tmp = new Object();
            $tmp->setId(substr($_SERVER['PATH_INFO'], 1));
            $tmp->setName($input->Name);
            $dbHandle = mysql_connect("localhost", "root", "pass") or die("keine dbHandle möglich.");
            mysql_select_db("express") or die("Die Datenbank existiert nicht.");
            $InsertSql = "INSERT INTO tbl_person (Id, Name) VALUES('" . $tmp->Id . "', '" . $tmp->Name . "')";
            $result = mysql_query($InsertSql);
            $SelectSql = "SELECT UniqId FROM tbl_person WHERE UniqId = " . mysql_insert_id() . "";
            $SelectResult = mysql_query($SelectSql);
            $ResultRow = mysql_fetch_object($SelectResult);
            mysql_close($dbHandle);
            $tmp->UniqId = $ResultRow->UniqId;
            if ($result) {
                header("Content-Type: application/json");
                header("HTTP/1.1 201 Created");
                header("Location: /object/" . $tmp->UniqId);
                echo $tmp->getJson();
            } else {
                header("Content-Type: application/json");
Ejemplo n.º 5
0
 /**
  * Set value of 'id' field
  *
  * @access public   
  * @param integer $value
  * @return boolean
  */
 function setId($value)
 {
     return $this->object->setId($value);
 }
Ejemplo n.º 6
0
 /**
  * Collects the Object sent by HTTP. This method also fills the controller messages with the appropiate errors.
  * @param $object Object - object to update, if not supplied a new one is created
  * @return Object - Object collected, it there was problems collecting, it will return null
  */
 function collectObject($object = null)
 {
     // Signal -> if true, there was an error, so do not save
     $save = true;
     // Get languages
     $languageMapper = new LanguageMapper();
     $languageArray = $languageMapper->getAll();
     // Collect data from attributes for each language
     $frontAttributeArray = array();
     $objectAttributeArray = array();
     foreach ($languageArray as $language) {
         $attributeArray = $this->class->getAttributesForLanguage($language);
         foreach ($attributeArray as $attribute) {
             // Get the ObjectAttribute if it was already saved (it could be new...)
             if (is_null($object) == false) {
                 $objectAttribute = $object->getAttributeForLanguage($attribute->getId(), $language->getId());
                 if ($objectAttribute != null) {
                     $attribute = $objectAttribute;
                 }
             }
             // Create his GUI representation
             $frontAttribute = FrontAttributeFactory::newInstance($language, $attribute);
             // Collect it
             $frontAttribute->collectWidget();
             if ($frontAttribute->isValid() == false) {
                 $this->frontAttributeNotValidMessage($frontAttribute);
                 $save = false;
             }
             array_push($frontAttributeArray, $frontAttribute);
             array_push($objectAttributeArray, $frontAttribute->toObjectAttribute());
         }
     }
     // Collect object relations
     $classRelationArray = $this->class->getClassRelations();
     $objectRelationArray = array();
     foreach ($classRelationArray as $classRelation) {
         /* @var $classRelation ClassRelation */
         $name = "classRelation" . $classRelation->getId() . "Select";
         $valueArray = $_POST[$name];
         if (is_null($valueArray) == false && $valueArray != "") {
             foreach ($valueArray as $value) {
                 $objectRelation = new ObjectRelation();
                 $objectRelation->setChildId($value);
                 $objectRelation->setPosition($classRelation->getPosition());
                 array_push($objectRelationArray, $objectRelation);
             }
         } else {
             if ($classRelation->getIsRequired()) {
                 // It was required, notify the user
                 $this->dataNotValidMessage($classRelation->getTitle());
                 $save = false;
             }
         }
     }
     // Collect publishing info
     // Get date format
     $dateFormat = DateFormatFactory::getDateFormat();
     $publishCheckbox = $_REQUEST["publishCheckbox"];
     $publish = 0;
     if ($publishCheckbox == "-1") {
         $publish = true;
     }
     // Only get publishing dates if the user issued publish in true
     $publishFromDateString = null;
     $publishToDateString = null;
     if ($publish == true) {
         // Get ISO dateFormat for the database
         $isoDateFormat = new IsoDateFormat();
         // Get publishFrom/to checking if they are available first
         $publishFrom = $_REQUEST["publishFromText"];
         if ($publishFrom != null && $publishFrom != "") {
             $publishFromDate = $dateFormat->parseDate($publishFrom);
             if ($publishFromDate == null) {
                 $this->dataNotValidMessage($this->text["from"]);
                 $save = false;
             } else {
                 $publishFromDateString = $isoDateFormat->toDatetimeString($publishFromDate);
             }
         }
         $publishTo = $_REQUEST["publishToText"];
         if ($publishTo != null && $publishTo != "") {
             $publishToDate = $dateFormat->parseDate($publishTo);
             if ($publishToDate == null) {
                 $this->dataNotValidMessage($this->text["to"]);
                 $save = false;
             } else {
                 $publishToDateString = $isoDateFormat->toDatetimeString($publishToDate);
             }
         }
     }
     $hits = $_REQUEST["hitsText"];
     // Get tree references
     $folders = $_REQUEST["folders"];
     $objectFolderArray = array();
     $folderMapper = new FolderMapper();
     if ($folders != null && $folders != "") {
         $folderIdArray = split(",", $folders);
         foreach ($folderIdArray as $folderId) {
             $folder = $folderMapper->get($folderId);
             /* @var $folder Folder */
             $objectFolderPosition = $folder->getNextObjectFolderPosition();
             $objectFolder = new ObjectFolder(null, $folderId);
             $objectFolder->setPosition($objectFolderPosition);
             array_push($objectFolderArray, $objectFolder);
         }
     }
     if ($save == false) {
         return null;
     }
     // My new object
     if ($object == null) {
         $object = new Object();
     }
     $object->setId($this->objectId);
     $object->setClassID($this->classId);
     $object->setIsPublished($publish);
     $object->setStartPublishing($publishFromDateString);
     $object->setEndPublishing($publishToDateString);
     $object->setHits($hits);
     // Attributes
     $object->setAttributes($objectAttributeArray);
     // Folders
     $object->setObjectFolders($objectFolderArray);
     // Relationships
     $object->setObjectRelations($objectRelationArray);
     // Save attached data, if any
     /* @var $frontAttribute FrontAttribute */
     foreach ($frontAttributeArray as $frontAttribute) {
         $frontAttribute->saveAttachedData();
     }
     // Return the object
     return $object;
 }
Ejemplo n.º 7
0
 /**
  * Maps a Object object contained in a recordset to an object representation
  *
  * @param $rs Recordset filled with the object data
  * @return objeto Mapped Object object
  */
 function &mapOne($rs)
 {
     if ($rs->EOF) {
         return null;
     }
     $object = new Object();
     $object->setId($rs->fields["ID"]);
     $object->setClassID($rs->fields["classID"]);
     $object->setCreated($rs->fields["created"]);
     $object->setCreatedBy($rs->fields["createdBy"]);
     $object->setEndPublishing($rs->fields["endPublishing"]);
     $object->setFullTextIndex($rs->fields["fullTextIndex"]);
     $object->setHits($rs->fields["hits"]);
     $object->setIsPublished($rs->fields["isPublished"]);
     $object->setStartPublishing($rs->fields["startPublishing"]);
     $object->setUpdated($rs->fields["startPublishing"]);
     $object->setUpdated($rs->fields["updated"]);
     $object->setUpdatedBy($rs->fields["updatedBy"]);
     return $object;
 }
Ejemplo n.º 8
0
 public function createExamples($ind)
 {
     $table_box = new Table();
     $table_box->setWidth(250)->setDefaultAlign(RowTable::ALIGN_LEFT);
     $table_box->addRow();
     $body_obj = new Object();
     $body_obj->setAlign(Object::ALIGN_CENTER);
     //->setId("id_body_obj")->setStyle("padding:5px;background:".$this->background_body->getValue().";");
     $text_obj = new Object(__(TEXT_ON_BODY));
     $body_obj->add($text_obj->setId("id_body_text"), "<br/>");
     $link_obj = new Object(new Link("javascript:void(0);", Link::TARGET_BLANK, __(LINK_ON_BODY)));
     $body_obj->add($link_obj->setId("id_body_link"), "<br/>");
     $body_obj->add($this->text_link_note_obj, "<br/>");
     $table_box->addRow($body_obj);
     $table_box->addRow();
     $table_box->addRow();
     $button_1 = new Button($this);
     $button_1->setWidth(245);
     $table_box->addRow($button_1->setValue("Button [style jquery]"));
     $table_box->addRow();
     $tabs = new Tabs("tab-sample");
     $tabs->addTab("Tab1", "");
     $tabs->addTab("Tab2", "");
     $tabs->addTab("Tab3", "");
     $table_box->addRow($tabs);
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $dialogbox = new DialogBox(__(DIALOGBOX_TITLE), __(DIALOGBOX_CONTENT));
     $dialogbox->setWidth(245)->activateOneInstance()->setPosition("");
     $dialogbox_link = new Object(new Link($dialogbox, Link::TARGET_NONE, __(VIEW_DIALOGBOX)));
     $table_box->addRow($dialogbox_link->setId("id_dialogbox_link"));
     $dialogbox->setPositionX("\$('#" . $dialogbox_link->getId() . "').position().left-f_scrollLeft()");
     $dialogbox->setPositionY("\$('#" . $dialogbox_link->getId() . "').position().top-f_scrollTop()-70");
     $this->addObject(clone $dialogbox);
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $table_box->addRow();
     $style1_box_text = new Box("text", false, $this->current_style_val, $this->current_style_val, "", "box_text_" . $this->current_style_val, 245);
     if ($this->background_picture_1->getValue() != "") {
         $style1_box_text->forceBoxWithPicture(true, $this->border_table_1->getValue());
     } else {
         $style1_box_text->forceBoxWithPicture(false);
     }
     $table_box->addRow($style1_box_text->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
     $style1_box = new Box("link", false, $this->current_style_val, $this->current_style_val, "javascript:void(0);", "box_" . $this->current_style_val, 245);
     if ($this->background_picture_1->getValue() != "") {
         $style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
     } else {
         $style1_box->forceBoxWithPicture(false);
     }
     $style1_box->setShadow(true);
     $table_box->addRow($style1_box->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
     $style1_box = new RoundBox($this->current_style_val, "round_box_" . $this->current_style_val, 245);
     $style1_box->setShadow(true);
     if ($this->background_picture_1->getValue() != "") {
         $style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
     } else {
         $style1_box->forceBoxWithPicture(false);
     }
     $table_box->addRow($style1_box->setContent("RoundBox Object<br/>[style " . $this->current_style_val . "]"));
     $table_box->addRow();
     if (!defined('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val)) {
         define('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val, $this->border_table_1->getValue());
     }
     $table = new Table();
     $table->setId("table_sample")->setWidth(245);
     $table->addRowColumns("header1", "header2", "header3")->setHeaderClass($this->current_style_val);
     $table->addRowColumns("cel 1-1", "cel 1-2", "cel 1-3")->setId("table_tr_sample")->setBorderPredefinedStyle($this->current_style_val)->setAlign(RowTable::ALIGN_CENTER);
     $table_box->addRow($table);
     return $table_box;
 }
Ejemplo n.º 9
0
 /**
  * Method getProgressBarObject
  * @access public
  * @return mixed
  * @since 1.2.13
  */
 public function getProgressBarObject()
 {
     $loading_sub_percent_obj = new Object();
     $loading_sub_percent_obj->forceDivTag();
     $loading_sub_percent_txt_obj = new Object();
     $loading_sub_percent_txt_obj->forceSpanTag();
     $loading_percent_obj = new Object($loading_sub_percent_obj, $loading_sub_percent_txt_obj);
     $loading_percent_obj->setClass("wsp-progress-bar")->forceDivTag();
     $loading_obj = new Object($loading_percent_obj);
     $loading_obj->setClass("wsp-progress-bar-container")->forceDivTag();
     $loading_obj->setId("wspAjaxEventLoadingObj" . get_class($this) . "_" . $this->getEventObjectName());
     $loading_obj->hide();
     return $loading_obj;
 }