/**
  * @param string $culture_code Code of current <CultureInfo>
  * @param mixed $date_format Chosen date format
  * @param mixed $time_format Chosen time format
  * @param string $timezone Currently chosen timezone
  * @param bool $append_timezone If true timezome will be appended
  */
 function __initialize($culture_code, $date_format, $time_format, $timezone = false, $append_timezone = false)
 {
     parent::__initialize();
     $this->script("Locale_Settings_Init();");
     store_object($this);
     if (!$timezone) {
         $timezone = Localization::getTimeZone();
     }
     $this->timezone = $timezone;
     $this->culture_code = $culture_code;
     $txt = $this->_sample(false, $date_format, $time_format);
     if ($append_timezone) {
         $txt .= " {$timezone}";
     }
     $sample = new Control('span');
     $sample->append("({$txt})")->css('color', 'gray');
     $cb = new CheckBox();
     $cb->setData('role', 'timeformatex')->setData('controller', buildQuery($this->id));
     $cb->value = 1;
     if ($append_timezone) {
         $cb->checked = "checked";
     }
     $lab = $cb->CreateLabel(tds("TXT_APPEND_TIMEZONE", "Append timezone") . " ");
     $lab->content($sample);
     $this->append($cb)->append($lab);
 }
Example #2
0
 /**
  * Constructs a new <TBody>.
  * 
  * Possible options: 
  * - 'collapsible' := true|false
  * - 'visible' := true|false
  * @param array $options Options
  * @param string $class Classname
  * @param Table $parent_table The parent table this belongs to
  */
 function __initialize($options, $class = "tbody", &$parent_table = false)
 {
     parent::__initialize("div");
     $this->class = $class;
     $this->options = $options;
     $this->table = $parent_table;
 }
 /**
  * @param string $label A label text
  * @param string $src Source for the image
  */
 function __initialize($label, $src)
 {
     parent::__initialize("button");
     $img = new Image($src, $label);
     $this->content($img);
     $this->CloseTagNeeded();
 }
Example #4
0
 /**
  * @param string $name The name
  */
 function __initialize($name = false)
 {
     parent::__initialize("select");
     if ($name) {
         $this->name = $name;
     }
 }
 /**
  * @param mixed $content Some content to add
  * @param string $id an optional id
  */
 function __initialize($content, $id = "")
 {
     parent::__initialize("li");
     if (!empty($id)) {
         $this->id = $id;
     }
     $this->content($content);
 }
 /**
  * @param string $tag Allows to specify another tag for the wrapper control, default for google controls is &lt;span&gt;
  */
 function __initialize($tag = 'span')
 {
     parent::__initialize($tag);
     $page = current_controller(false);
     if ($page instanceof HtmlPage) {
         $page->addJs('//www.google.com/jsapi');
     }
 }
Example #7
0
 /**
  * @param string $value The text
  * @param string $name The name
  * @param string $cid 
  */
 function __initialize($value = '', $name = false)
 {
     parent::__initialize("textarea");
     if ($name) {
         $this->name = $name;
     }
     $this->content($value);
 }
 /**
  * @param string $src value for the src attribute
  * @param string $title value for the title attribute
  * @param string $link value for the href attribute
  * @param string $margin Value for the margin (css)
  */
 function __initialize($src, $title, $link = "", $margin = "")
 {
     parent::__initialize('a');
     $this->href = $link;
     $this->css("text-decoration", "none");
     if ($margin != "") {
         $this->css("margin", "{$margin}");
     }
     $this->content(new Image($src, $title, 0));
 }
 /**
  * @param type $options SimplyScroll options (see http://logicbox.net/jquery/simplyscroll)
  */
 function __initialize($options = array())
 {
     parent::__initialize("ul");
     if (!isset($options['autoMode'])) {
         $options['autoMode'] = 'loop';
     }
     $this->Options = $options;
     $options = system_to_json($this->Options);
     $code = "\$('#{self}').simplyScroll({$options});";
     $this->script($code);
 }
Example #10
0
 /**
  * @param string $id Id to be set
  * @param string $listType Type of list (ol|ul)
  */
 function __initialize($id = "", $listType = "ul")
 {
     if ($listType != "ul" || $listType != "ol") {
         $listType = "ul";
     }
     parent::__initialize($listType);
     if (!empty($id)) {
         $this->id = $id;
     }
     store_object($this);
 }
Example #11
0
 /**
  * @param string $tag Allows to specify another tag for the wrapper control, default for google controls is &lt;span&gt;
  */
 function __initialize($tag = 'span', $frozen = true)
 {
     parent::__initialize($tag);
     $this->frozen = $frozen;
     $page = current_controller(false);
     if ($page instanceof HtmlPage) {
         if ($this->frozen) {
             $page->addJs('//www.gstatic.com/charts/loader.js');
         } else {
             $page->addJs('//www.google.com/jsapi');
         }
     }
 }
Example #12
0
 /**
  * Create a new HTML anchor element.
  * 
  * @param string $href The href attribute
  * @param string $label The anchor text
  * @param string $class The CSS class
  * @param string $target The target attribute
  * @return void
  */
 function __initialize($href = "", $label = "", $class = "", $target = "")
 {
     parent::__initialize("a");
     $href = str_replace("&", "&amp;", $href);
     $this->href = $href;
     if ($target != "") {
         $this->target = $target;
     }
     $this->content($label);
     if ($class != "") {
         $this->class = $class;
     }
     $this->CloseTagNeeded();
 }
Example #13
0
 /**
  * @param array $options Currently none
  */
 function __initialize($options = false)
 {
     parent::__initialize("div");
     $this->class = "tr";
     $this->options = $options;
     if ($options) {
         if (isset($options['oddclass']) && isset($options['evenclass'])) {
             if (!isset($options['hidden']) || !$options['hidden']) {
                 //					$this->class = $GLOBALS['TR_CURRENTLY_ODD']?$options['oddclass']:$options['evenclass'];
                 //					$GLOBALS['TR_CURRENTLY_ODD'] = !$GLOBALS['TR_CURRENTLY_ODD'];
             }
         }
         if (isset($options['tr_class'])) {
             $this->class = $options['tr_class'];
         }
     }
 }
Example #14
0
 /**
  * @param string $src value for the src attribute
  * @param string $title value for the title attribute
  * @param string $border value for the border attribute
  * @param string $style value for the style attribute
  * @param string $id optional value for the id attribute
  */
 function __initialize($src = null, $title = "", $border = "0", $style = "", $id = false)
 {
     parent::__initialize("img");
     if ($src != null) {
         $this->src = $src;
         if ($title == "") {
             // show filename (without extension) as alt
             $this->alt = basename($src, '.' . pathinfo($src, PATHINFO_EXTENSION));
         } else {
             $this->alt = $title;
             $this->title = $title;
         }
         $this->border = $border;
         if ($id) {
             $this->id = $id;
         }
         if ($style != "") {
             $this->style = $style;
         }
     }
 }
 function __initialize()
 {
     parent::__initialize("div");
 }
 /**
  * @param string $label Item label
  * @param mixed $controller Controller object or id
  * @param string $event Handler method
  * @param mixed $data Array or urlencoded string containing additional data to be passed
  */
 function __initialize($label, $controller, $event = "", $data = array())
 {
     parent::__initialize("li");
     $this->class = "";
     if ($event == '$is_link$') {
         $this->content(new Anchor($controller, $label));
     } else {
         $this->content(new Anchor(buildQuery($controller, $event, $data), $label));
     }
     $this->controller = strtolower($controller);
     if ($event) {
         $this->event = strtolower($event);
     }
     $this->data = md5(render_var($data));
 }
Example #17
0
 function __initialize()
 {
     parent::__initialize("div");
     $this->class = "colgroup";
 }
 /**
  * @param string $tag Allows to specify another tag for the wrapper control, default for google controls is &lt;span&gt;
  */
 function __initialize($tag = 'span')
 {
     parent::__initialize($tag);
 }
Example #19
0
 function __initialize($tag = "")
 {
     parent::__initialize($tag);
     $this->InitFunctionName = strtolower(preg_replace('/^ui/', '', get_class_simple($this)));
 }
Example #20
0
 function __initialize($type = "MSColumnLine3D", $title = "", $width = 1000, $height = 450, $plotColors = false)
 {
     if ($type === null) {
         $type = "MSColumnLine3D";
     }
     parent::__initialize("div");
     if ($plotColors) {
         $this->arPlotColors = $plotColors;
     }
     $this->style = 'display:block; float:left';
     $this->content("The chart is currently loading. Please stand by...<br/>");
     $this->content('FusionCharts needs Adobe Flash Player to run. If you\'re unable to see the chart here, it means that your browser does not seem to have the Flash Player Installed. You can downloaded it <a href="http://www.adobe.com/products/flashplayer/" target="_blank"><u>here</u></a> for free.');
     $this->Type = $type;
     $this->Title = $title;
     $this->Width = $width;
     $this->Height = $height;
     $this->Prepare();
 }
Example #21
0
 function __initialize()
 {
     parent::__initialize("input");
 }
Example #22
0
 /**
  * @param string $name The actual text
  * @param mixed $for Can be <Control> or string holding an id
  */
 function __initialize($name, $for = "")
 {
     parent::__initialize("label");
     $this->content($name);
     $this->for = $for instanceof Control ? $for->id : $for;
 }
Example #23
0
 function __initialize()
 {
     parent::__initialize("form");
     $this->method = 'post';
 }
Example #24
0
 function __initialize()
 {
     parent::__initialize("div");
     $this->class = 'table';
     $this->script("\$('#{self}').table();");
 }
Example #25
0
 /**
  * @param array $options No valid options defined yet
  */
 function __initialize($options = false)
 {
     parent::__initialize("div");
     $this->class = "td";
     $this->options = $options;
 }
 /**
  * No need to call this manually, use <uiTreeView::AddRootNode>() instead.
  * @param string $text Node label text
  */
 function __initialize($text)
 {
     parent::__initialize("li");
     $this->class = "ui-treeview-node";
     $this->content($text);
 }
 function __initialize($is_sub_item = false)
 {
     parent::__initialize("li");
 }