예제 #1
0
파일: Image.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param   string The Src of the image
  * @param   string Alternate text of the image
  * @param   string Border of the image
  * @access  public
  */
 function Image($src, $alt = '', $border = '0', $width = null, $height = null)
 {
     $this->_src = substr($src, 0, 1) == '?' || substr($src, 0, 7) == 'http://' || substr($src, 0, 8) == 'https://' ? $src : Piwi::getVarConf('LINK_PRIFIX') . $src;
     $this->_alt = $alt;
     $this->_border = $border;
     $this->_width = $width;
     $this->_height = $height;
     parent::init();
 }
예제 #2
0
파일: IFrame.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param   string name
  * @param   string src
  * @param   int frameborder {0, 1}  optional)
  * @param   string scrolling type {auto, horizontal, vertical} (optional)
  * @param   int width (optional)
  * @param   int height (optional)
  * @access  public
  */
 function IFrame($name, $src, $border = 0, $scrolling = 'auto', $width = null, $height = null)
 {
     $this->_name = $name;
     $this->_src = substr($src, 0, 1) == '?' || substr($src, 0, 7) == 'http://' || substr($src, 0, 8) == 'https://' ? $src : Piwi::getVarConf('LINK_PRIFIX') . $src;
     $this->_border = $border;
     $this->_scrolling = $scrolling;
     $this->_width = $width;
     $this->_height = $height;
     parent::init();
 }
예제 #3
0
파일: Link.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param   string $text  Link Text
  * @param   string $href  Link Reference
  * @param   string $image Link Image
  * @access  public
  */
 function Link($text, $href, $image = '')
 {
     $this->_text = $text;
     $this->_link = $href;
     $this->_image = substr($image, 0, 1) == '?' || substr($image, 0, 7) == 'http://' || substr($image, 0, 8) == 'https://' ? $image : Piwi::getVarConf('LINK_PRIFIX') . $image;
     if (!empty($this->_image)) {
         $this->_hideText = true;
     }
     parent::init();
 }
예제 #4
0
 /**
  * Public constructor
  *
  * @param  string  $name      Name that will be used in every option
  * @param  string  $direction Direction of the combo (default: horizontal)
  * @param  string  $title     Title of the radio buttons
  * @access public
  */
 function RadioButtons($name, $direction = 'horizontal', $title = '')
 {
     $this->_name = $name;
     $this->_direction = $direction;
     $this->_title = $title;
     $this->_options = array();
     if ($this->_direction != 'horizontal' && $this->_direction != 'vertical') {
         $this->_direction = 'horizontal';
     }
     parent::init();
 }
예제 #5
0
파일: Entry.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param    string Name of the entry
  * @param    string Value of the entry (optional)
  * @param    string Title of the entry (optional)
  * @param    int    Length of the field (optional)
  * @param   boolean Set the readonly status (optional)
  * @access   public
  */
 function Entry($name, $value = '', $title = '', $length = '', $status = false)
 {
     $this->_name = $name;
     $this->_value = $value;
     $this->_title = $title;
     $this->_maxLength = $length;
     $this->_isReadOnly = $status;
     $this->_type = 'any';
     $this->_availableEvents = array("tabindex", "accesskey", "onfocus", "onblur", "onselect", "onchange", "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup");
     parent::init();
 }
예제 #6
0
파일: Button.php 프로젝트: Dulciane/jaws
 function Button($name, $value, $stock = '')
 {
     $this->_name = $name;
     $this->_value = $value;
     $this->_title = '';
     $this->_isSubmit = false;
     $this->_isReset = false;
     $this->_availableEvents = array("onfocus", "onblur", "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup");
     if (!empty($stock)) {
         $this->SetStock($stock);
     }
     parent::init();
 }
예제 #7
0
 /**
  * Public constructor
  *
  * @param  string  $name      Name that will be used in every option
  * @param  string  $direction Direction of the combo (default: horizontal)
  * @param  string  $title     Title of the checkbuttons
  * @access public
  */
 function CheckButtons($name, $direction = 'horizontal', $title = '')
 {
     $this->_name = $name;
     $this->_direction = $direction;
     $this->_title = $title;
     $this->_options = array();
     $this->_multiple = true;
     if ($this->_direction != 'horizontal' && $this->_direction != 'vertical') {
         $this->_direction = 'horizontal';
     }
     $this->_columns = 0;
     parent::init();
 }
예제 #8
0
파일: TextArea.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param    string  Name of the entry
  * @param    string  Value of the entry (optional)
  * @param    string  Title of the textarea
  * @param    int     Number of rows
  * @param    int     Number of columns
  * @access   public
  */
 function TextArea($name, $value = '', $title = '', $rows = 0, $cols = 0)
 {
     $this->_name = $name;
     $this->_value = $value;
     $this->_title = $title;
     $this->_rows = $rows;
     $this->_cols = $cols;
     $this->_isReadOnly = false;
     $this->_isEnabled = true;
     $this->_isRequired = false;
     $this->_availableEvents = array("onfocus", "onblur", "onselect", "onchange", "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup");
     parent::init();
 }
예제 #9
0
파일: Combo.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param string Name of the combo
  * @param string Title of the combo
  * @param array  Data that will be used in the combo
  * @access  public
  */
 function Combo($name, $title = '', $options = array())
 {
     $this->_name = $name;
     $this->_title = $title;
     $this->_multiple = false;
     if (is_array($options) && !empty($options)) {
         $this->addOptions($options);
     } else {
         $this->_options = array();
     }
     $oddClass = Piwi::getVarConf('CLASS_ODD');
     if (empty($oddClass)) {
         $oddClass = 'piwi_option_odd';
     }
     $this->setOddClass($oddClass);
     $evenClass = Piwi::getVarConf('CLASS_EVEN');
     if (empty($evenClass)) {
         $evenClass = 'piwi_option_even';
     }
     $this->setEvenClass($evenClass);
     $this->_availableEvents = array("onchange", "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup");
     parent::init();
 }
예제 #10
0
파일: Label.php 프로젝트: Dulciane/jaws
 /**
  * Public constructor
  *
  * @param    string $label Text to use
  * @param    mixed  $bound Bound to element object or ID
  * @access   public
  */
 function Label($label, $bound = '')
 {
     $this->_value = $label;
     $this->_bound = $bound;
     parent::init();
 }
예제 #11
0
 /**
  * Public constrcutor
  *
  * @param   string   $name   Name of calendar field
  * @param   string   $value  Value of calendar field
  * @param   string   $text   Text in the button
  * @param   string   $stock  Stock image (the button image)
  * @access  public
  */
 function DatePicker($name, $value = '', $text = '', $stock = '')
 {
     if (empty($stock)) {
         $stock = STOCK_CALENDAR;
     }
     $this->_tableID = $name . '_table';
     $this->_value = $value;
     $this->_buttonText = $text;
     $this->_buttonIcon = $stock;
     $this->_selectedDates = array();
     $this->_button = new Button($name . '_button', $text, $stock);
     $this->_entry = new Entry($name, $value);
     $this->_calType = 'gregorian';
     $this->_langFile = PIWI_URL . 'piwidata/js/jscalendar/lang/calendar-en.js';
     $this->_availableEvents = array("onselect", "onclose", "onupdate", "onchange");
     parent::init();
 }
예제 #12
0
 function StaticEntry($value, $title = '')
 {
     $this->_value = $value;
     $this->_title = $title;
     parent::init();
 }
예제 #13
0
 /**
  * Public constrcutor
  *
  * @param   string   $name   Color picker field name
  * @param   string   $value  Value of field
  * @param   string   $text   Text in the button
  * @param   string   $stock  Stock image (the button image)
  * @access  public
  */
 function ColorPicker($name, $value = '', $text = '', $stock = '')
 {
     $this->_name = $name;
     $this->_value = $value;
     $this->_button = new Button($name . '_button', $text, $stock);
     $this->_entry = new Entry($name, $value);
     $this->setButtonText($text);
     $this->setButtonIcon($stock);
     $this->setColorFontStyle('10px Helvetica');
     $this->_availableEvents = array('onselect');
     parent::init();
 }