Skip to content
Permalink
Browse files

soy es js

  • Loading branch information...
neilking committed Jan 10, 2017
1 parent 6cb7098 commit 59cb07e34d33e5230ba28f12be2e56106f87f098
@@ -0,0 +1,3 @@
*.pom text eol=lf
*.soy text eol=lf
ivy.xml text eol=lf
@@ -0,0 +1,21 @@
import Component from 'metal-component/src/Component';
import core from 'metal/src/core';
import dom from 'metal-dom/src/dom';
import Soy from 'metal-soy/src/Soy';
import templates from './SoySample.soy';

class SoySample extends Component {
/**
* donate to neil
*
* @param {MouseEvent} event
*/
donate(event) {
console.log("donate successful");
}
}

//Register component
Soy.register(SoySample, templates);

export default SoySample;
@@ -1,36 +1,36 @@
{namespace SoySample}

/**
* Show portlet message in the view.
* @param id
* @param msg
*/
{template .render}
<div id="{$id}">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon" id="inputGroupAddon01">Message:</span>
<input aria-describedby="inputGroupAddon01" class="form-control" value="{$msg}" type="text">
</div>
</div>

<div class="form-group">
<div class="input-group">
<input aria-describedby="inputGroupAddon02" class="form-control" placeholder="Recipient's username, ex. neil.jin ;)" type="text">
<span class="input-group-addon" id="inputGroupAddon02">@liferay.com</span>
</div>
</div>

<div class="form-group">
<div class="input-group">
<span class="input-group-addon">$</span>
<input aria-label="Amount" class="form-control" type="text">
<span class="input-group-addon">.00</span>
</div>
</div>
<div class="form-group">
<button class="btn btn-default" type="button">Donate</button>
</div>
</div>
{/template}
{namespace SoySample}

/**
* Show portlet message in the view.
* @param id
* @param msg
*/
{template .render}
<div id="{$id}">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon" id="inputGroupAddon01">Message:</span>
<input aria-describedby="inputGroupAddon01" class="form-control" value="{$msg}" type="text">
</div>
</div>

<div class="form-group">
<div class="input-group">
<input aria-describedby="inputGroupAddon02" class="form-control" placeholder="Recipient's username, ex. neil.jin ;)" type="text">
<span class="input-group-addon" id="inputGroupAddon02">@liferay.com</span>
</div>
</div>

<div class="form-group">
<div class="input-group">
<span class="input-group-addon">$</span>
<input aria-label="Amount" class="form-control" type="text">
<span class="input-group-addon">.00</span>
</div>
</div>

<div class="form-group">
<button class="btn btn-default" data-onclick="donate" type="button">Donate</button>
</div>
</div>
{/template}

0 comments on commit 59cb07e

Please sign in to comment.
You can’t perform that action at this time.