
{% if len(result) == 0 %}
    {% include common/text/empty_text.html %}
{% end %}

{% for item in result %}
    <div class="list-item search-dialog-item" data-url="{{item.url}}" 
            data-name="{{item.name}}" onclick="javascript:searchDialogItemOnClick(this)">
        <i class="fa {{item.icon}}"></i>
        <a class="search-dialog-item" data-url="{{item.url}}" 
            data-name="{{item.name}}">{{item.name}}</a>
        <div class="float-right">
            <span>{{item.badge_info}}</span>
            <i class="fa fa-chevron-right"></i>
        </div>
    </div>
{% end %}


<script type="text/javascript">
    $(function () {
        window.searchDialogItemOnClick = function (target) {
            var name = $(target).attr("data-name");
            var url = $(target).attr("data-url");
            var param = {"name": name, "url": url};
            console.log("{{callback}}", param);
            window.{{callback}}(param);
        };
    })
</script>