username@email.com
2023-02-28 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//选择图标
;RoadUI.SelectIco = function (options)
{
    var instance = this;
    var defaults = {
        obj: null,
        x: true
    };
 
    this.opts = $.extend(defaults, options);
    var $source = $(this.opts.obj);
    var validate = $source.attr('validate');
    var val = $source.val();
    var id = $source.attr('id');
    var name = $source.attr('name');
    var more = $source.attr('more');
    var source = $source.attr("source");        //| 设置数据源{GUID 或 Code}
    var title = $source.attr("title");
    if (title == null || title == undefined) title = "选择图标";
 
    if (name == null || name == undefined) name = id;
 
    more = more == null || more == undefined ? "0" : more.toLowerCase() == "true" || more == "1" ? "1" : "0";
    source = source == null || source == undefined ? "" : source;
    $source.removeClass().addClass("mytext");
    $source.prop("readonly", true);
    var $but = $('<input type="button" class="mybutton" style="border-left:none;margin:0;" value="选择" />');
    var $label = $('<label type="msg"></label>');
 
    if ($source.prop("disabled"))
    {
        $but.prop("disabled", true);
    }
    else
    {
        $but.bind('click', function ()
        {
            new RoadUI.Window().open({
                id: "ico_" + id, title: title, width: 600, height: 406,
                url: top.rootdir + '/Controls/SelectIco/Index?more=' + more + '&id=' + id + '&source=' + source + '&values=' + val, openerid: RoadUI.Core.query("tabid")
            });
        });
    }
 
    $source.after($but, $label);
}