[405] | 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({ |
---|
[461] | 84 | url: '<?php echo base_url();?>admin/mau_tin_nhan/trang/1', |
---|
[405] | 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 | |
---|
[411] | 116 | <div id="addSms" class="modal fade in" tabindex="-1"> |
---|
| 117 | |
---|
[405] | 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> |
---|
[411] | 125 | Mẫu tin nhắn |
---|
[405] | 126 | </div> |
---|
| 127 | </div> |
---|
| 128 | |
---|
| 129 | <div class="modal-body"> |
---|
[411] | 130 | <form id="add_sms" onsubmit="return false;" class="form-horizontal" role="form"> |
---|
| 131 | |
---|
[405] | 132 | <div class="form-group"> |
---|
[411] | 133 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mẫu tin nhắn </label> |
---|
[405] | 134 | |
---|
| 135 | <div class="col-sm-9"> |
---|
[576] | 136 | <label class="block clearfix has-error"> |
---|
[405] | 137 | <span class="input-icon"> |
---|
[411] | 138 | <input name="sms_content" type="text" id="form-field-1" placeholder="Mẫu tin nhắn" value=""> |
---|
[405] | 139 | <i class="icon-user blue"></i> |
---|
| 140 | </span> |
---|
[576] | 141 | <div id="sms_content" class="help-block error"></div> |
---|
| 142 | </label> |
---|
[405] | 143 | </div> |
---|
| 144 | <div class="help-block"> </div> |
---|
| 145 | </div> |
---|
| 146 | <div class="form-group"> |
---|
[411] | 147 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin trả lá»i </label> |
---|
[405] | 148 | |
---|
| 149 | <div class="col-sm-9"> |
---|
[576] | 150 | <label class="block clearfix has-error"> |
---|
[405] | 151 | <span class="input-icon"> |
---|
[411] | 152 | <input name="sms_reply" type="text" id="form-field-1" placeholder="Tin trả lá»i" value=""> |
---|
[405] | 153 | <i class="icon-user blue"></i> |
---|
| 154 | </span> |
---|
[576] | 155 | <div id="sms_reply" class="help-block error"></div> |
---|
| 156 | </label> |
---|
[405] | 157 | </div> |
---|
| 158 | <div class="help-block"> </div> |
---|
| 159 | </div> |
---|
| 160 | <div class="form-group"> |
---|
[411] | 161 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mã dá»ch vụ</label> |
---|
[405] | 162 | |
---|
| 163 | <div class="col-sm-9"> |
---|
[576] | 164 | <label class="block clearfix has-error"> |
---|
[405] | 165 | <span class="input-icon"> |
---|
[411] | 166 | <input name="service_id" type="text" id="form-field-1" placeholder="Mã dá»ch vụ" value=""> |
---|
[405] | 167 | <i class="icon-user blue"></i> |
---|
| 168 | </span> |
---|
[576] | 169 | <div id="service_id" class="help-block error"></div> |
---|
| 170 | </label> |
---|
[405] | 171 | </div> |
---|
| 172 | <div class="help-block"> </div> |
---|
| 173 | </div> |
---|
| 174 | <div class="form-group"> |
---|
[411] | 175 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Mã lá»nh</label> |
---|
[405] | 176 | |
---|
| 177 | <div class="col-sm-9"> |
---|
[576] | 178 | <label class="block clearfix has-error"> |
---|
[405] | 179 | <span class="input-icon"> |
---|
[411] | 180 | <input name="commandcode" type="text" id="form-field-1" placeholder="Mã lá»nh" value=""> |
---|
| 181 | <i class="icon-user blue"></i> |
---|
[405] | 182 | </span> |
---|
[576] | 183 | <div id="commandcode" class="help-block error"></div> |
---|
| 184 | </label> |
---|
[405] | 185 | </div> |
---|
| 186 | <div class="help-block"> </div> |
---|
| 187 | </div> |
---|
[411] | 188 | |
---|
| 189 | |
---|
| 190 | <div class="space-4"></div> |
---|
[405] | 191 | |
---|
[411] | 192 | |
---|
[405] | 193 | |
---|
| 194 | <div class="space-4"></div> |
---|
[411] | 195 | <div class="form-group errors" id="add_sms"></div> |
---|
[405] | 196 | |
---|
| 197 | </div> |
---|
| 198 | <div class="clearfix form-actions"> |
---|
| 199 | <div class="col-md-offset-3 col-md-9"> |
---|
[411] | 200 | <button class="btn btn-info" id="add_sms" type="button"> |
---|
[405] | 201 | <i class="icon-ok bigger-110"></i> |
---|
| 202 | Hoà n tất |
---|
| 203 | </button> |
---|
| 204 | |
---|
| 205 | |
---|
| 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> |
---|
[411] | 216 | |
---|
[405] | 217 | </div><!-- /.modal-content --> |
---|
| 218 | </div><!-- /.modal-dialog --> |
---|
| 219 | <?php |
---|
[409] | 220 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/smstemplate.js'))); |
---|
[405] | 221 | ?> |
---|