Created
June 27, 2014 03:24
-
-
Save augustine-tran/93a157fada25391b6cbb to your computer and use it in GitHub Desktop.
PhalconEye modal box and callback function
This file contains hidden or 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
{% extends "../../Core/View/layouts/main.volt" %} | |
{% block head %} | |
<script type="text/javascript"> | |
var manageUsersAction = function($btn) { | |
PhalconEye.widget.modal.open($btn.data('url'), {'callbackFn': 'onAfterUserSelection'}); | |
} | |
var onAfterUserSelection = function(users) { | |
var container = $('#assigneesWrapper').html(''); | |
var str = ''; | |
for(var i=0; i < users.length; i++) { | |
str += '<li>' + users[i][1] + '</li>'; | |
} | |
container.append(str); | |
} | |
</script> | |
{% endblock %} | |
{% block content %} | |
<div class="row"> | |
<div class="col-md-12"> | |
{{ form.render() }} | |
</div> | |
</div> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment