* @version 1.0 */ $win = new SDPanel(); $win->setCaption("ActionBar"); $table = new Table(); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $actionGroup = new ActionGroup(); $actionGroup->setCaption(""); $actionGroup->setImage("img/ico_thumb.png"); $buttonBar = new ButtonBar(); $buttonBar->setCaption("Button 1"); $buttonBar->setImage("img/ico_thumb.png"); $buttonBar->onTap(functonClick()); $buttonBar_2 = new ButtonBar(); $buttonBar_2->setCaption("Button 2"); $buttonBar_2->setImage("img/ico_thumb.png"); $buttonBar_2->onTap(functonClick_2()); $actionGroup->addControl($buttonBar); $actionGroup->addControl($buttonBar_2); $actionBar->addControl($actionGroup); $win->addControl($actionBar); $win->addControl($table); function functonClick() { echo "On click button 1!"; } function functonClick_2() { echo "On click button 2!"; }
/*** * Task detail screen */ $win = new SDPanel(); $win->setCaption("Task Detail"); //Get var sent from main screen $id = new InputNumeric(); $id->setClass("input.Common"); Data::getParm($id); //Define the acrtion bar $bar = new ActionBar(); $btn_delete = new ButtonBar(); $btn_delete->setCaption("Delete"); $btn_delete->onTap(removeTask()); $btn_delete->setImage("img/deleteBar.png"); $bar->addControl($btn_delete); $win->addControl($bar); //Items definition $name = new InputText(); $name->setClass("input.Common"); $description = new InputText(); $description->setClass("input.Common"); $date = new InputDate(); $date->setLabelCaption("Task date"); $date->setClass("input.Common"); $addToCalendar = new InputBoolean(); $addToCalendar->setLabelCaption("Add to my calendar"); $addToCalendar->setLabelPosition("Right"); //Main table definition $table = new Table();
$acg1->setImage("img/ic_share.png"); $btn_facebook = new ButtonBar(); $btn_facebook->setCaption("Facebook"); $btn_facebook->setImage("img/ic_facebook.png"); $btn_facebook->onTap(facebook()); $btn_tw = new ButtonBar(); $btn_tw->setCaption("Twitter"); $btn_tw->setImage("img/ic_tw.png"); $btn_tw->onTap(twitter()); $btn_sms = new ButtonBar(); $btn_sms->setCaption("SMS"); $btn_sms->setImage("img/ic_sms.png"); $btn_sms->onTap(sms()); $btn_email = new ButtonBar(); $btn_email->setCaption("EMail"); $btn_email->setImage("img/ic_email.png"); $btn_email->onTap(email()); $acg1->addControl($btn_facebook); $acg1->addControl($btn_tw); $acg1->addControl($btn_sms); $acg1->addControl($btn_email); $apb1->addControl($acg1); //Add action bar to a SDPanel. $win->addControl($apb1); $tableItemDetail = new Table(); $tableItemDetail->setClass("table.TableDetailMain"); $title = new InputText(150); $title->setClass("inputtitleblack"); $title->setAutoGrow(true); $title->setReadOnly(true); $desc = new InputText(300);
<?php /*** * Products list. */ $win = new SDPanel(); $win->setCaption("List of products"); $cat = new InputNumeric(); Data::getParm($cat); //Action Bar and Action Group. $acb = new ActionBar(); $btn_img = new ButtonBar(); $btn_img->setCaption(""); $btn_img->setImage("img/ic_view_stream_white.png"); $btn_img->onTap(changeView()); $acb->addControl($btn_img); $win->addControl($acb); //Add action bar in panel. $table = new Table(); $table->setClass("tableGray"); $grid = new Grid(); $table_grid = new Table(); $table_grid->setClass("tableGrid"); $table_grid->setRowsStyle("80dip"); $table_grid->setColumnsStyle("35%;65%;15dip"); $table_grid->setHeight("85dip"); $grid->addSearch($title); $grid->addData(grid_load()); $grid->onTap(action()); $grid->setEmptyGridText("No items available"); //inputs and controls
<?php /*** * Home. */ $win = new SDPanel(); $win->setCaption("KikApp Store"); $acb = new ActionBar(); $btn_cart = new ButtonBar(); $btn_cart->setCaption("Cart"); $btn_cart->setImage("img/cart.png"); $btn_cart->onTap(goToCart()); $acb->addControl($btn_cart); $win->addControl($acb); $table = new Table(); $table->setClass("tableGray"); $grid_home = new HorizontalGrid(); $grid_home->setRowsPerPagePortrait(1); $grid_home->setShowPageController(false); $table_grid = new Canvas(); $grid_home->addData(grid_load()); $grid_home->onTap(action()); //inputs and controls $title = new InputText(150); $title->setClass("inputtextTitlewhite"); $title->setAutoGrow(true); $image = new InputImage(); $image->setClass("imageImageList"); $desc = new InputText(300); $desc->setClass("inputtextwhite"); $price = new InputText(10);
<?php /*** * Thumbnails products list. */ $win = new SDPanel(); $win->setCaption("List of products"); $cat = new InputNumeric(); Data::getParm($cat); //Action Bar y Action Group. $apb1 = new ActionBar(); $btn_img = new ButtonBar(); $btn_img->setCaption("List"); $btn_img->setImage("img/ic_list_white.png"); $btn_img->onTap(lista()); $apb1->addControl($btn_img); $win->addControl($apb1); $table = new Table(); $table->setClass("tableGray"); $grid = new Grid(); $table_grid = new Canvas(); $table_grid->setClass("tableTableDetailMain"); $grid->addSearch($title); $grid->addData(grid_load()); $grid->onTap(action()); $grid->setEmptyGridText("No items available"); //inputs and controls $title = new InputText(150); $title->setClass("inputtextTitlewhite"); $title->setAutoGrow(true); $image = new InputImage();
$mainTable -> addControl($button,1,1); $win -> addControl($mainTable); function clickme(){ echo "Hello !"; }*/ /*** * Listado de categorias. */ $win = new SDPanel(); $win->setCaption("Tasks list thumb"); //Add button to action bar $bar = new ActionBar(); $btn_img = new ButtonBar(); $btn_img->setCaption(""); $btn_img->setImage("img/ico_thumb.png"); $btn_img->onTap(changeViewType()); $bar->addControl($btn_img); $win->addControl($bar); $table = new Table(); $table->setClass("tableMenu"); $list = new Grid(); $list->addData(load_grid()); $list->addSearch($name); $table_grid = new Canvas(); $table_grid->setClass("tableTableDetailMain"); $id = new InputNumeric(); $name = new InputText(); $name->setClass("inputTitle"); /* $status = new InputBoolean();