Sha256: 38c70e143ebce23c0a9fe56b095fcbeedb17ac773d42684293e70514f571352b

Contents?: true

Size: 1.75 KB

Versions: 39

Compression:

Stored size: 1.75 KB

Contents

<%= Gon::Base.render_data %>
    <div class="layui-form layuimini-form">
        <div class="layui-form-item" style="padding: 25px">
            <div id="tag"></div>
            <div class="layui-form-item text-center" style="margin-top: 60px;">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="btn">提交</button>
            </div>
        </div>
    </div>
    <script>
        layui.use(['form', 'request', 'xmSelect'], function() {
            var form = layui.form,
                request = layui.request,
                xmSelect = layui.xmSelect,
                $ = layui.$;

            var place_list = xmSelect.render({
                el: '#tag',
                name: "tags",
                tips: '请输入或选择标签',
                clickClose: true,
                paging: true,
                filterable: true,
                data: gon.tags,
                create: function(val, arr) {
                    return {
                        name: val,
                        value: val
                    }
                },
            })

            form.on("submit(btn)", function(form) {
                request.post('missions/follow_ups/' + parent.follow_up_id + '/update_tags',
                    form.field,
                    function(res) {
                        if (res.success) {
                            $("#tag_" + parent.follow_up_id).html("");
                            res.tags.forEach(function(tag) {
                                $("#tag_" + parent.follow_up_id).append(' <span class="layui-badge layui-bg-green">' + tag + '</span')
                            })
                        }
                        layer.close(tindex);
                    })
            })

        })
    </script>

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
educode_sales-1.10.74 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.73 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.72 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.71 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.70 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.59 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.58 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.49 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.48 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.46 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.41 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.37 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.36 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.35 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.34 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.33 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.31 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.30 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.29 app/views/educode_sales/follow_ups/add_tag.html.erb
educode_sales-1.10.28 app/views/educode_sales/follow_ups/add_tag.html.erb