Subversion Repositories SmartDukaan

Rev

Rev 36404 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36404 Rev 36442
Line 83... Line 83...
83
 
83
 
84
                    for (var i = 0; i < data.length; i++) {
84
                    for (var i = 0; i < data.length; i++) {
85
                        var d = data[i];
85
                        var d = data[i];
86
                        var cls = '';
86
                        var cls = '';
87
                        if (d.monitor_type === 'focused') cls = 'monitor-focused';
87
                        if (d.monitor_type === 'focused') cls = 'monitor-focused';
88
                        else if (d.monitor_type === 'normal') cls = 'monitor-normal';
88
                        else if (d.monitor_type === 'base') cls = 'monitor-base';
89
 
89
 
90
                        $select.append(`<option value="${d.catalogId_i}" data-monitor-type="${d.monitor_type || ''}" class="${cls}">${d.title_s}</option>`);
90
                        $select.append(`<option value="${d.catalogId_i}" data-monitor-type="${d.monitor_type || ''}" class="${cls}">${d.title_s}</option>`);
91
 
91
 
92
                        if (d.monitor_type === 'focused' || d.monitor_type === 'normal') {
92
                        if (d.monitor_type === 'focused' || d.monitor_type === 'base') {
93
                            $taggedSelect.append(
93
                            $taggedSelect.append(
94
                                `<option value="${d.catalogId_i}" data-monitor-type="${d.monitor_type}" class="${cls}">${d.title_s}</option>`
94
                                `<option value="${d.catalogId_i}" data-monitor-type="${d.monitor_type}" class="${cls}">${d.title_s}</option>`
95
                            );
95
                            );
96
                        }
96
                        }
97
                    }
97
                    }
Line 120... Line 120...
120
                var $cb = $li.find('input[type="checkbox"]');
120
                var $cb = $li.find('input[type="checkbox"]');
121
                var val = $cb.val();
121
                var val = $cb.val();
122
                if (val == null) return;
122
                if (val == null) return;
123
                var $opt = $sel.find('option[value="' + val + '"]');
123
                var $opt = $sel.find('option[value="' + val + '"]');
124
                var mt = $opt.attr('data-monitor-type');
124
                var mt = $opt.attr('data-monitor-type');
125
                $li.removeClass('monitor-focused monitor-normal');
125
                $li.removeClass('monitor-focused monitor-base');
126
                if (mt === 'focused') $li.addClass('monitor-focused');
126
                if (mt === 'focused') $li.addClass('monitor-focused');
127
                else if (mt === 'normal') $li.addClass('monitor-normal');
127
                else if (mt === 'base') $li.addClass('monitor-base');
128
            });
128
            });
129
        });
129
        });
130
    }
130
    }
131
 
131
 
132
    $(document).on('click', '.monitor-type-upload-submit', function () {
132
    $(document).on('click', '.monitor-type-upload-submit', function () {