source: pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/index.php @ 762

Last change on this file since 762 was 576, checked in by quyenla, 10 years ago
File size: 8.4 KB
Line 
1<?php
2$base_url = base_url();
3$this->load->view('layout/admin/header', array('base_url' => $base_url));
4$this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class  ));
5?>
6<script type="text/javascript">
7    function init_page()
8    {
9
10        $(".ajax_paging").click(function () {
11            $.ajax({
12                url: $(this).attr("href"),
13                type: "POST",
14                data: $("#collaborator").serialize(),
15                success: function (data, textStatus, jqXHR)
16                {
17                    // $result = jQuery.parseJSON(data);
18                    $("#content").html(data);
19                    init_page();
20
21                },
22                error: function (jqXHR, textStatus, errorThrown)
23                {
24                    $(".ajaxloading").hide();
25                }
26            });
27            return false;
28        })
29        $('#keyword').keyup(function (event) {
30            if (event.keyCode == '13') {
31                filter();
32            }
33            return false;
34        });
35       
36       
37        $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
38            var current_class=$( this ).attr('class');
39            $(".sorting_desc").attr("class","sorting");
40            $(".sorting_asc").attr("class","sorting");
41     
42            if(current_class=='sorting')
43            {
44                $(this).attr("class","sorting_desc");
45            }
46            else
47            {
48                if(current_class=='sorting_desc')
49                {
50                    $(this).attr("class","sorting_asc");
51                }
52                else
53                    {
54                    if(current_class=='sorting_asc')
55                    {
56                        $(this).attr("class","sorting");
57                    }
58                }
59            }
60            $("#sorting_field").val($(this).attr("id"));
61            $("#sorting_order").val($(this).attr("class"));
62            filter();
63        });
64        $('[data-toggle="ajaxModal"]').on('click',
65              function(e) {
66                $('#ajaxModal').remove();
67                e.preventDefault();
68                var $this = $(this)
69                  , $remote = $this.data('remote') || $this.attr('href')
70                  , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>');
71                $('body').append($modal);
72                $modal.modal({backdrop: 'static', keyboard: false});
73                $modal.load($remote);
74              }
75            );
76
77
78    }
79
80
81    function filter()
82    {
83        $.ajax({
84            url: '<?php echo base_url();?>admin/mau_tin_nhan/trang/1',
85            type: "POST",
86            data: $("#collaborator").serialize(),
87            success: function (data, textStatus, jqXHR)
88            {
89                // $result = jQuery.parseJSON(data);
90                $("#content").html(data);
91                init_page();
92                $("#keyword").focus();
93                $("#keyword").setCursorToTextEnd();
94
95            },
96            error: function (jqXHR, textStatus, errorThrown)
97            {
98                $(".ajaxloading").hide();
99            }
100        });
101    }
102
103
104</script>
105<div class="main-content" id="content">
106    <?php echo $content; ?>
107</div><!-- /.main-content -->
108</div><!-- /.main-container-inner -->
109
110<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
111    <i class="icon-double-angle-up icon-only bigger-110"></i>
112</a>
113</div><!-- /.main-container -->
114
115
116<div id="addSms" class="modal fade in" tabindex="-1">
117     
118    <div class="modal-dialog">
119        <div class="modal-content">
120            <div class="modal-header no-padding">
121                <div class="table-header">
122                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
123                        <span class="white">×</span>
124                    </button>
125                    Mẫu tin nhắn
126                </div>
127            </div>
128
129            <div class="modal-body">
130                <form id="add_sms" onsubmit="return false;" class="form-horizontal" role="form">
131                   
132                    <div class="form-group">
133                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mẫu tin nhắn </label>
134
135                        <div class="col-sm-9">
136                            <label class="block clearfix has-error">
137                            <span class="input-icon">
138                                <input  name="sms_content" type="text" id="form-field-1" placeholder="Mẫu tin nhắn" value="">
139                                <i class="icon-user blue"></i>
140                            </span>
141                            <div id="sms_content" class="help-block error"></div>
142                            </label>
143                        </div>
144                        <div class="help-block"> </div>
145                    </div>
146                    <div class="form-group">
147                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin trả lời </label>
148
149                        <div class="col-sm-9">
150                            <label class="block clearfix has-error">
151                            <span class="input-icon">
152                                <input  name="sms_reply" type="text" id="form-field-1" placeholder="Tin trả lời"  value="">
153                                <i class="icon-user blue"></i>
154                            </span>
155                            <div id="sms_reply" class="help-block error"></div>
156                            </label>
157                        </div>
158                        <div class="help-block"> </div>
159                    </div>
160                    <div class="form-group">
161                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mã dịch vụ</label>
162
163                        <div class="col-sm-9">
164                            <label class="block clearfix has-error">
165                            <span class="input-icon">
166                                <input   name="service_id" type="text" id="form-field-1" placeholder="Mã dịch vụ"  value="">
167                                <i class="icon-user blue"></i>
168                            </span>
169                            <div id="service_id" class="help-block error"></div>
170                            </label>
171                        </div>
172                        <div class="help-block"> </div>
173                    </div>
174                    <div class="form-group">
175                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mã lệnh</label>
176
177                        <div class="col-sm-9">
178                            <label class="block clearfix has-error">
179                            <span class="input-icon">
180                                <input   name="commandcode" type="text" id="form-field-1" placeholder="Mã lệnh"  value="">
181                                <i class="icon-user blue"></i>
182                            </span>
183                            <div id="commandcode" class="help-block error"></div>
184                            </label>
185                        </div>
186                        <div class="help-block"> </div>
187                    </div>
188                   
189                   
190                    <div class="space-4"></div>
191
192                   
193
194                    <div class="space-4"></div>
195                    <div class="form-group errors" id="add_sms"></div>
196                       
197                    </div>
198                    <div class="clearfix form-actions">
199                        <div class="col-md-offset-3 col-md-9">
200                            <button class="btn btn-info" id="add_sms" type="button">
201                                <i class="icon-ok bigger-110"></i>
202                                Hoàn tất
203                            </button>
204
205                            &nbsp; &nbsp; &nbsp;
206                            <button class="btn" type="reset">
207                                <i class="icon-undo bigger-110"></i>
208                                Xóa hết
209                            </button>
210                        </div>
211                    </div>
212
213                </form></div>
214
215        </div>
216
217    </div><!-- /.modal-content -->
218</div><!-- /.modal-dialog -->
219<?php
220$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/smstemplate.js')));
221?>
Note: See TracBrowser for help on using the repository browser.