Fixed css bug; Added support for case insensitive search for clients and search by notes too!

This commit is contained in:
h3ct0r 2016-03-10 12:55:00 -03:00
parent 58c996a839
commit 1c4ab83d32
3 changed files with 19 additions and 18 deletions

View file

@ -410,15 +410,17 @@ class Backend_api extends CI_Controller {
$this->load->model('customers_model'); $this->load->model('customers_model');
$key = $this->db->escape_str($_POST['key']); $key = $this->db->escape_str($_POST['key']);
$key = strtoupper($key);
$where_clause = $where_clause =
'(first_name LIKE "%' . $key . '%" OR ' . '(first_name LIKE upper("%' . $key . '%") OR ' .
'last_name LIKE "%' . $key . '%" OR ' . 'last_name LIKE upper("%' . $key . '%") OR ' .
'email LIKE "%' . $key . '%" OR ' . 'email LIKE upper("%' . $key . '%") OR ' .
'phone_number LIKE "%' . $key . '%" OR ' . 'phone_number LIKE upper("%' . $key . '%") OR ' .
'address LIKE "%' . $key . '%" OR ' . 'address LIKE upper("%' . $key . '%") OR ' .
'city LIKE "%' . $key . '%" OR ' . 'city LIKE upper("%' . $key . '%") OR ' .
'zip_code LIKE "%' . $key . '%")'; 'zip_code LIKE upper("%' . $key . '%") OR ' .
'notes LIKE upper("%' . $key . '%"))';
$customers = $this->customers_model->get_batch($where_clause); $customers = $this->customers_model->get_batch($where_clause);

View file

@ -294,15 +294,14 @@
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div class="modal-footer footer">
</div> <button id="save-appointment" class="btn btn-primary">
<div class="modal-footer footer"> <?php echo $this->lang->line('save'); ?>
<button id="save-appointment" class="btn btn-primary"> </button>
<?php echo $this->lang->line('save'); ?> <button id="cancel-appointment" class="btn btn-default" data-dismiss="modal">
</button> <?php echo $this->lang->line('cancel'); ?>
<button id="cancel-appointment" class="btn btn-default" data-dismiss="modal"> </button>
<?php echo $this->lang->line('cancel'); ?> </div>
</button>
</div> </div>
</div> </div>

View file

@ -168,12 +168,12 @@ body .modal.full-screen .modal-content {
body .modal.full-screen .wrapper { body .modal.full-screen .wrapper {
min-height: 100%; min-height: 100%;
margin-bottom: -67px; /* modal-footer height */ /*margin-bottom: -67px;*/ /* modal-footer height */
} }
body .modal.full-screen .modal-footer { body .modal.full-screen .modal-footer {
background-color: #f5f5f5; background-color: #f5f5f5;
position: absolute; /*position: absolute;*/
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 67px; height: 67px;