Пример #1
0
 /**
  * TextField::getField()
  *
  * Return the HTML of the field
  *
  * @return string: the html
  * @access public
  * @author Johan Wiegel
  */
 function getField()
 {
     // view mode enabled ?
     if ($this->getViewMode()) {
         // get the view value..
         return $this->_getViewValue();
     }
     //$this->_form->_setJS( '<script>function SetUrl( sUrl ){document.getElementById(\'bestand\').value=sUrl}</script>', $isFile = false, $before = true);
     $oButton = new Button($this->_form, 'Bladeren');
     $oButton->setCaption('Bladeren');
     $oButton->setExtra("onclick=\"window.open( '" . FH_FHTML_DIR . "filemanager/browser/default/browser.html?Type=File&naam=" . $this->_sName . "&Connector=../../connectors/php/connector.php?ServerPath=" . $this->_path . "','','modal=yes,width=650,height=400');\"");
     $sButton = $oButton->getButton();
     return sprintf('<input type="text" name="%s" id="%1$s" value="%s" size="%d" %s' . FH_XHTML_CLOSE . '>%s %s ', $this->_sName, isset($this->_mValue) ? htmlspecialchars($this->_mValue) : '', $this->_iSize, (isset($this->_iTabIndex) ? 'tabindex="' . $this->_iTabIndex . '" ' : '') . (isset($this->_sExtra) ? ' ' . $this->_sExtra . ' ' : ''), isset($this->_sExtraAfter) ? $this->_sExtraAfter : '', $sButton);
 }
Пример #2
0
/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Address Book");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$btn_contact_add = new Button();
$btn_contact_add->setCaption("Add Contact");
$btn_contact_add->onTap(addContact());
$btn_contact_viewAll = new Button();
$btn_contact_viewAll->setCaption("View All Contact");
$btn_contact_viewAll->onTap(viewAllContact());
$input_name = new InputText();
$input_name->setLabelCaption("Name");
$input_lastname = new InputText();
$input_lastname->setLabelCaption("Last Name");
$input_email = new InputEmail();
$input_email->setLabelCaption("E-mail");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Phone");
$input_work = new InputText();
$input_work->setLabelCaption("Work");
$input_message = new InputText();
$input_message->setLabelCaption("Message");
$mainTable->addControl($input_name, 1, 1);
$mainTable->addControl($input_lastname, 2, 1);
Пример #3
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_message = new InputText();
$input_message->setLabelCaption("Write the message");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_message = new Button();
$button_message->setCaption("Message!");
$button_message->onTap(message());
$mainTable->addControl($input_message, 1, 1);
$mainTable->addControl($input_phone, 2, 1);
$mainTable->addControl($button_message, 3, 1);
$win->addControl($mainTable);
function message()
{
    Interop::SendMessage($input_message, $input_phone);
}
Пример #4
0
$grid->setShowPageController(true);
//$grid -> setPageControllerBackColor("#FFFFFF");
$grid->addData(load_image());
//$grid -> onTap(view_image());
$grid->setPageControllerClass("table.grid");
$table_grid = new Table();
$table_grid->setRowsStyle("100%");
$table_grid->setHeight("100%");
$table_grid->setClass("table.grid");
$image = new InputImage();
$image->setClass("imageImageList");
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$btnAdd = new Button();
$btnAdd->setClass("buttonred");
$btnAdd->setCaption("Add to Cart");
$btnAdd->onTap(add_cart());
$tableButtons = new Table();
$tableButtons->addControl($btnAdd, 1, 1);
$tableItemDetail->addControl($title, 1, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($price, 2, 1, 1, 1, "Left", "Middle");
$tableItemDetail->addControl($stock, 2, 2, 1, 1, "Center", "Middle");
$tableItemDetail->addControl($desc, 3, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($tableButtons, 4, 1, 1, 2, "Left", "Middle");
$table->addControl($grid, 1, 1);
$table->addControl($tableItemDetail, 2, 1);
$table->setRowsStyle("250dip;100%");
$win->addControl($table, 1, 1, 1, 2);
function load_image()
{
    $url = "http://www.demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id;
Пример #5
0
/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Login");
$table = new Table();
$table_form = new Table();
$email = new InputEmail();
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setIsPassword(true);
//it hides characters
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->onTap(login());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
function login()
{
    if ($email == null) {
        echo "E-Mail is a required field.";
        //you can't leave it blank
    } else {
        ProgressIndicator::ShowWithTitle("Loading...");
Пример #6
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Facebook Post!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input = new InputText();
//create input
$input->setLabelCaption("Write your thoughts");
$button = new Button();
$button->setCaption("Post on Facebook");
$button->onTap(facebook());
$button->setClass("button.blue");
$mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
function facebook()
{
    Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", "");
}
Пример #7
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$input = new InputText();
$input->setLabelCaption("Write your name");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($input, 1, 1);
$mainTable->addControl($button, 2, 1);
$win->addControl($mainTable);
function clickme()
{
    StorageAPI::Set("token", $input);
    $name = new InputText();
    $name = StorageAPI::Get("token");
    echo "Your name is: " . $name;
}
Пример #8
0
$email = new InputEmail();
$email->setInviteMessage("E-Mail");
$email->setClass("input.form");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$password_2 = new InputText();
$password_2->setClass("input.form");
$password_2->setInviteMessage("Confirm your Password");
$password_2->setIsPassword(true);
$table_form->addControl($email, 1, 1);
$table_form->addControl($password, 2, 1);
$table_form->addControl($password_2, 3, 1);
$btn_save = new Button();
$btn_save->setCaption("SIGN UP");
$btn_save->setClass("button.blue");
$btn_save->onTap(save());
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function save()
{
    if ($email == null) {
        echo "EMail is a required field.";
    } else {
        if ($password == null) {
            echo "Password is a required field.";
        } else {
Пример #9
0
$email = new InputEmail();
$email->setClass("inputForm");
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setClass("inputForm");
$pass->setInviteMessage("Password");
$pass->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->setClass("buttonform");
$btn_save->onTap(login());
$lbl_signup = new Label();
$lbl_signup->setClass("label.SubTitlelogin");
$lbl_signup->setCaption("Not a store member?");
$btn_register = new Button();
$btn_register->setCaption("SIGN UP NOW");
$btn_register->setClass("button.Small");
$btn_register->onTap(register());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($lbl_home, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($lbl_signup, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
$win->Render();
function login()
{
Пример #10
0
$total->setReadOnly(true);
$total->setClass("input.textPriceTotal");
//$total -> setLabelPosition("Left");
//$total -> setLabelCaption("$");
$subtotal = new InputText(10);
$subtotal->setReadOnly(true);
$subtotal->setClass("input.textPrice");
$shipping = new InputText(10);
$shipping->setReadOnly(true);
$shipping->setClass("input.textPrice");
$tax = new InputText(10);
$tax->setReadOnly(true);
$tax->setClass("input.textPrice");
$btn_checkout = new Button();
$btn_checkout->setClass("buttonred");
$btn_checkout->setCaption("CHECKOUT NOW");
$btn_checkout->onTap(checkout());
$table_total = new Table();
$table_total->setColumnsStyle("70%;30%");
$table_total->setRowsStyle("25dip;25dip;25dip;40dip");
$table_total->addControl($lbl_sub_total, 1, 1, 1, 1, "Left", "Middle");
$table_total->addControl($subtotal, 1, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_tax, 2, 1, 1, 1, "Left", "Middle");
$table_total->addControl($tax, 2, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_shipping, 3, 1, 1, 1, "Left", "Middle");
$table_total->addControl($shipping, 3, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_total, 4, 1, 1, 1, "Left", "Middle");
$table_total->addControl($total, 4, 2, 1, 1, "Right", "Middle");
$table_result->addControl($table_total, 1, 1);
$table_result->addControl($btn_checkout, 2, 1, 1, 1, "Left", "Top");
$table->addControl($list, 1, 1);
Пример #11
0
/**
 * Main object.
 * @author KikApp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Gecko CRM");
$mainTable = new Table();
$button = new Button();
$button->setCaption("Companies");
$button->onTap(list_companies());
$button_2 = new Button();
$button_2->setCaption("Contacts");
$button_2->onTap(list_contacts());
$button_3 = new Button();
$button_3->setCaption("Meetings");
$button_3->onTap(list_meetings());
$mainTable->addControl($button, 1, 1);
$mainTable->addControl($button_2, 2, 1);
$mainTable->addControl($button_3, 3, 1);
$win->addControl($mainTable);
function list_companies()
{
    $win->Open("list_companies");
}
function list_contacts()
{
    $win->Open("list_contact");
}
function list_meetings()
{
Пример #12
0
<?php

/***
 * Popup
 */
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
//$table -> setFormClass("form.algo");
$lugar = new Label();
$lugar->setCaption("Place");
$combo_box_lugar = new ComboBox();
$combo_box_lugar->setEmptyItem(false);
//$combo_box_fecha-> setEmptyItemText("Choose options");
$combo_box_lugar->setValues("All:1, Staples Center:2, Quickens Loans Arena:3");
$boton = new Button();
$boton->setCaption("Search");
$boton->onTap(prueba());
$table->addControl($lugar, 1, 1);
$table->addControl($combo_box_lugar, 1, 2);
$table->addControl($boton, 2, 1, 1, 2, "", "");
$win->addControl($table);
function prueba()
{
    echo "Searching...";
}
Пример #13
0
<?php

/**
 * Button control example.
 * mainButton.php
 */
$win = new SDPanel();
$win->setCaption("Button control");
$tabMain = new Table();
$button = new Button();
$button->setCaption("Button");
$button->setClass("button.Example");
$button->onTap(action());
$tabMain->addControl($button, 1, 1);
$win->addControl($tabMain);
function action()
{
    echo "Hello world!";
}
Пример #14
0
$table_form = new Table();
$table_form->setRowsStyle("76dip;76dip;76dip");
$table_form->setClass("table.forms");
$username = new InputEmail();
$username->setClass("input.form");
$username->setInviteMessage("E-Mail");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$password2 = new InputText();
$password2->setClass("input.form");
$password2->setInviteMessage("Password");
$password2->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("Save changes");
$btn_save->onTap(save());
$btn_save->setClass("button.blue");
$table_form->addControl($username, 1, 1);
$table_form->addControl($password, 2, 1);
$table_form->addControl($password2, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function clientStart()
{
    $url2 = "http://demo.kikapptools.com/Gastos/crud/getUser.php?id=" . $token;
    $httpClient2 = new httpClient();
    $result2 = $httpClient2->Execute('GET', $url2);
Пример #15
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_call = new Button();
$button_call->setCaption("Call!");
$button_call->onTap(call());
$mainTable->addControl($input_phone, 1, 1);
$mainTable->addControl($button_call, 2, 1);
$win->addControl($mainTable);
function call()
{
    Interop::PlaceCall($input_phone);
}
Пример #16
0
$win->setCaption("Add Budget");
$token = new InputText(80);
$table = new Table();
$table->setRowsStyle("100%");
$table->setWidth("100%");
$table->setHeight("100%");
$table->setClass("table.white");
$table_form = new Table();
$table_form->setRowsStyle("76dip;76dip");
$table_form->setClass("table.forms");
$money_value = new InputNumeric(15);
$money_value->setClass("input.form");
$input_date = new InputDate();
$input_date->setClass("input.form");
$button = new Button();
$button->setCaption("Confirm");
$button->onTap(confirm());
$button->setClass("button.blue");
$table_form->addControl($money_value, 1, 1, 1, 1, "Center", "Middle");
$table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle");
$table_button = new Table();
$table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function confirm()
{
    $token = StorageAPI::Get("token");
    ProgressIndicator::ShowWithTitle("Adding budget...");
    $httpUpdate = new httpClient();
    $httpUpdate->addVariable('money', $money_value);
Пример #17
0
$username = new InputEmail();
$username->setClass("input.form");
$username->setInviteMessage("E-Mail");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$label = new Label();
$label->setCaption("OR");
$label->setClass("label.big");
$btn_save = new Button();
$btn_save->setCaption("Log in");
$btn_save->onTap(login());
$btn_save->setClass("button.blue");
$btn_register = new Button();
$btn_register->setCaption("Sign up");
$btn_register->onTap(register());
$btn_register->setClass("button.blue");
$table_form->addControl($username, 1, 1);
$table_form->addControl($password, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($label, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function login()
{
    if ($username == null) {
        echo "E-Mail is a required field.";
Пример #18
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$twitterUrl = new InputText();
$button = new Button();
$button->setCaption("Open Twitter!");
$button->onTap(openTW());
$mainTable->addControl($button, 1, 1);
$win->addControl($mainTable);
function openTW()
{
    $twitterUrl = "https://twitter.com/kikapptools";
    Interop::Open($twitterUrl);
}
Пример #19
0
 /**
  * FormHandler::backButton()
  *
  * Generate a back button to go one page back in a multi-paged form
  *
  * @param string $caption: The caption of the button
  * @param string $name: The name of the button
  * @param string $extra: CSS, Javascript or other which are inserted into the HTML tag
  * @return void
  * @access public
  * @author Teye Heimans
  */
 function backButton($caption = null, $name = null, $extra = null)
 {
     static $setJS = false;
     // include the needed javascript file
     if (!$setJS) {
         $this->_setJS(FH_FHTML_DIR . 'js/page_back.js', true);
         $setJS = true;
     }
     // get new button name if none given
     if (empty($name)) {
         $name = $this->_getNewButtonName();
     }
     $extra .= ' onclick="pageBack(document.forms[\'' . $this->_name . '\']);"';
     // if no caption is given, get our own caption
     if (is_null($caption)) {
         $caption = $this->_text(38);
     }
     // create new button
     $btn = new Button($this, $name);
     $btn->setCaption($caption);
     if (!empty($extra)) {
         $btn->setExtra($extra);
     }
     // register the button
     $this->_registerField($name, $btn);
 }
Пример #20
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Twitter API!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
//$mainTable-> setClass("table.general");
$input = new InputText();
$input->setLabelCaption("Write what you want to tweet!");
$button = new Button();
$button->setCaption("Tweet!");
$button->onTap(twitter());
$button->setClass("button.blue");
$mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
function twitter()
{
    Twitter::Tweet($input);
}
Пример #21
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_message = new InputText();
$input_message->setLabelCaption("Write the message");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_sms = new Button();
$button_sms->setCaption("Send SMS!");
$button_sms->onTap(sms());
$mainTable->addControl($input_message, 1, 1);
$mainTable->addControl($input_phone, 2, 1);
$mainTable->addControl($button_sms, 3, 1);
$win->addControl($mainTable);
function sms()
{
    Interop::SendSMS($input_phone, $input_message);
}
Пример #22
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Scanner API");
$mainTable = new Table();
$button = new Button();
$button->setCaption("Scan!");
$button->onTap(scanner());
$mainTable->addControl($button, 1, 1);
$win->addControl($mainTable);
function scanner()
{
    $code = new InputText();
    $code = ScannerAPI::ScanBarcode();
    echo "code " . $code;
}
Пример #23
0
$win->setCaption("My Account");
$token = new InputText(80);
Data::getParm($token);
$table = new Table();
$table->setClass("tablebackground");
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$name = new InputText();
$name->setClass("inputForm");
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
$win->Render();
function refresh()
{
    $ur = "http://www.demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userData&customerToken=" . $token;
    $http = new httpClient();
Пример #24
0
<?php

$win = new SDPanel();
$win->setCaption("httpClient Example");
$table = new Table();
$city = new InputText();
$city->setReadOnly(true);
$button = new Button();
$button->setCaption("Load City");
$button->onTap(loadCity());
$table->addControl($city, 1, 1);
$table->addControl($button, 2, 1);
$win->addControl($table);
function loadCity()
{
    $url = "http://demo.kikapptools.com/HttpClientEjemplo/crud/getCity.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("nombreCiudad" => DataType::Character(150));
    Data::FromJson($struct, $result);
    $city = $product['nombreCiudad'];
}