Created
February 15, 2012 16:35
-
-
Save sakal/1837166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spine = require('spine') | |
Milk = require('milk/milk') | |
$ = Spine.$ | |
class Payforms extends Spine.Controller | |
constructor: -> | |
super | |
@current = null | |
# include view is here!!!! | |
@tpl_bayticket = require('views/bayticket')('') | |
$("#modal_box").on('hidden', => | |
@navigate '/games', @current.id | |
) | |
@routes { | |
"/sandpay": -> | |
} | |
show: (current) -> | |
params = { | |
name: current.params.name, | |
tickets: current.params.tickets | |
} | |
@current = current | |
console.log params | |
form_tpl = Milk.render @tpl_bayticket, params | |
$("#modal_box").html(form_tpl) | |
#$("@") | |
$("#modal_box").modal('show') | |
module.exports = Payforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="{{action}}" method="POST"> | |
<div class="modal-header"> | |
<a class="close" data-dismiss="modal">×</a> | |
<h3>{{name}}</3> | |
</div> | |
<div class="modal-body"> | |
<div class="controls"> | |
{{#tickets}} | |
<label class="radio" for="t{{ticket_id}}"><input type="radio" name="price" id="t{{ticket_id}}" value="{{ticket_id}}"/> {{{price}}}</label> | |
{{/tickets}} | |
</div> | |
</div> | |
<div class="modal-footer"> | |
<a href="#" class="btn btn-primary">Купить</a> | |
<a href="#" class="btn">Отмена</a> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment