hamasyou / titanium_alloy_alertbutton

This is the button with a confirmation in the widget of Titanium Alloy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This is the button with a confirmation in the widget of Titanium Alloy.

SS1 SS2

Usage

Copy the widgets folder in app/widgets folder of your project.

View

app/views/index.xml

<Alloy>
  <Window>
    <Widget src="jp.co.mountposition.alertbutton" title="Delete" onDispose="doDispose" />
  </Window>
</Alloy>

Controller

app/controllers/index.js

function doDispose() {
  // Do button click action.
}

config.json

Add dependencies of app/config.json

{
    "global": {},
    "env:development": {},
    "env:test": {},
    "env:production": {},
    "os:ios": {},
    "os:android": {},
    "dependencies": {
        "jp.co.mountposition.alertbutton": "1.0"
    }
}

I18n

i18n/ja/strings.xml

Wording of the cancellation is compatible with I18n.

<?xml version="1.0" encoding="UTF-8"?>
<!-- i18n/ja/strings.xml -->
<resources>
  <string name="cancel">キャンセル</string>
</resources>

License

Written by @hamasyou Copyright © 2013 MountPosition Inc. Licensed under the [MIT License][MIT] [MIT]: http://www.opensource.org/licenses/mit-license.php

Reference

About

This is the button with a confirmation in the widget of Titanium Alloy.


Languages

Language:JavaScript 93.4%Language:Python 5.8%Language:CoffeeScript 0.8%