mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-27 00:52:56 +03:00
Refactored CSS with common backend rules for users page.
This commit is contained in:
parent
fe215e8be6
commit
afca1a015e
5 changed files with 37 additions and 73 deletions
|
@ -36,7 +36,7 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<div id="users-page" class="container-fluid">
|
||||
<div id="users-page" class="container-fluid backend-page">
|
||||
|
||||
<?php
|
||||
// ---------------------------------------------------------------------
|
||||
|
@ -77,7 +77,7 @@
|
|||
<div class="results"></div>
|
||||
</div>
|
||||
|
||||
<div class="details column col-xs-12 col-sm-7">
|
||||
<div class="record-details column col-xs-12 col-sm-7">
|
||||
<div class="btn-toolbar">
|
||||
<div class="add-edit-delete-group btn-group">
|
||||
<button id="add-admin" class="btn btn-primary">
|
||||
|
@ -218,7 +218,7 @@
|
|||
<div class="results"></div>
|
||||
</div>
|
||||
|
||||
<div class="details column col-xs-12 col-sm-7">
|
||||
<div class="record-details column col-xs-12 col-sm-7">
|
||||
<div class="pull-left">
|
||||
<div class="add-edit-delete-group btn-group">
|
||||
<button id="add-provider" class="btn btn-primary">
|
||||
|
@ -492,7 +492,7 @@
|
|||
<div class="results"></div>
|
||||
</div>
|
||||
|
||||
<div class="details column col-xs-12 col-sm-7">
|
||||
<div class="record-details column col-xs-12 col-sm-7">
|
||||
<div class="btn-toolbar">
|
||||
<div class="add-edit-delete-group btn-group">
|
||||
<button id="add-secretary" class="btn btn-primary">
|
||||
|
|
|
@ -496,42 +496,6 @@ body .form-horizontal .controls {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#users-page .filter-records {
|
||||
max-width: 380px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#users-page .filter-records .results {
|
||||
overflow-y: auto;
|
||||
max-height: 650px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#users-page .secretary-row,
|
||||
#users-page .provider-row,
|
||||
#users-page .admin-row {
|
||||
padding: 10px 7px;
|
||||
}
|
||||
|
||||
#users-page .secretary-row:hover:not(.selected-row),
|
||||
#users-page .provider-row:hover:not(.selected-row),
|
||||
#users-page .admin-row:hover:not(.selected-row) {
|
||||
cursor: pointer;
|
||||
background-color: #F3F3F3;
|
||||
}
|
||||
|
||||
#users-page .selected-row {
|
||||
background-color: #F4F4F4;
|
||||
border-right: 5px solid #35B66F;
|
||||
}
|
||||
|
||||
#users-page .details input,
|
||||
#users-page .details select,
|
||||
#users-page .details textarea {
|
||||
background-color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#users-page #secretary-notifications.active,
|
||||
#users-page #provider-notifications.active,
|
||||
#users-page #admin-notifications.active {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
$('#admins').on('submit', '#filter-admins form', function() {
|
||||
var key = $('#filter-admins .key').val();
|
||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||
$('#filter-admins .selected').removeClass('selected');
|
||||
this.resetForm();
|
||||
this.filter(key);
|
||||
return false;
|
||||
|
@ -72,8 +72,8 @@
|
|||
});
|
||||
|
||||
this.display(admin);
|
||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||
$(e.currentTarget).addClass('selected-row');
|
||||
$('#filter-admins .selected').removeClass('selected');
|
||||
$(e.currentTarget).addClass('selected');
|
||||
$('#edit-admin, #delete-admin').prop('disabled', false);
|
||||
}.bind(this));
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
this.resetForm();
|
||||
$('#admins .add-edit-delete-group').hide();
|
||||
$('#admins .save-cancel-group').show();
|
||||
$('#admins .details').find('input, textarea').prop('readonly', false);
|
||||
$('#admins .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#admin-password, #admin-password-confirm').addClass('required');
|
||||
$('#admin-notifications').prop('disabled', false);
|
||||
$('#filter-admins button').prop('disabled', true);
|
||||
|
@ -97,7 +97,7 @@
|
|||
$('#admins').on('click', '#edit-admin', function() {
|
||||
$('#admins .add-edit-delete-group').hide();
|
||||
$('#admins .save-cancel-group').show();
|
||||
$('#admins .details').find('input, textarea').prop('readonly', false);
|
||||
$('#admins .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#admin-password, #admin-password-confirm').removeClass('required');
|
||||
$('#admin-notifications').prop('disabled', false);
|
||||
|
||||
|
@ -287,16 +287,16 @@
|
|||
AdminsHelper.prototype.resetForm = function() {
|
||||
$('#admins .add-edit-delete-group').show();
|
||||
$('#admins .save-cancel-group').hide();
|
||||
$('#admins .details').find('input, textarea').prop('readonly', true);
|
||||
$('#admins .record-details').find('input, textarea').prop('readonly', true);
|
||||
$('#admins .form-message').hide();
|
||||
$('#admin-notifications').prop('disabled', true);
|
||||
$('#admins .required').css('border', '');
|
||||
$('#admin-password, #admin-password-confirm').css('border', '');
|
||||
$('#admins .details').find('input, textarea').val('');
|
||||
$('#admins .record-details').find('input, textarea').val('');
|
||||
$('#admin-notifications').removeClass('active');
|
||||
$('#edit-admin, #delete-admin').prop('disabled', true);
|
||||
|
||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||
$('#filter-admins .selected').removeClass('selected');
|
||||
$('#filter-admins button').prop('disabled', false);
|
||||
$('#filter-admins .results').css('color', '');
|
||||
};
|
||||
|
@ -388,7 +388,7 @@
|
|||
? info + ', ' + admin.phone_number : info;
|
||||
|
||||
var html =
|
||||
'<div class="admin-row" data-id="' + admin.id + '">' +
|
||||
'<div class="admin-row entry" data-id="' + admin.id + '">' +
|
||||
'<strong>' + name + '</strong><br>' +
|
||||
info + '<br>' +
|
||||
'</div><hr>';
|
||||
|
@ -407,11 +407,11 @@
|
|||
AdminsHelper.prototype.select = function(id, display) {
|
||||
display = display || false;
|
||||
|
||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||
$('#filter-admins .selected').removeClass('selected');
|
||||
|
||||
$('.admin-row').each(function() {
|
||||
if ($(this).attr('data-id') == id) {
|
||||
$(this).addClass('selected-row');
|
||||
$(this).addClass('selected');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
$('#providers').on('submit', '#filter-providers form', function() {
|
||||
var key = $('#filter-providers .key').val();
|
||||
$('.selected-row').removeClass('selected-row');
|
||||
$('.selected').removeClass('selected');
|
||||
this.resetForm();
|
||||
this.filter(key);
|
||||
return false;
|
||||
|
@ -74,8 +74,8 @@
|
|||
});
|
||||
|
||||
this.display(provider);
|
||||
$('#filter-providers .selected-row').removeClass('selected-row');
|
||||
$(e.currentTarget).addClass('selected-row');
|
||||
$('#filter-providers .selected').removeClass('selected');
|
||||
$(e.currentTarget).addClass('selected');
|
||||
$('#edit-provider, #delete-provider').prop('disabled', false);
|
||||
}.bind(this));
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
$('#filter-providers .results').css('color', '#AAA');
|
||||
$('#providers .add-edit-delete-group').hide();
|
||||
$('#providers .save-cancel-group').show();
|
||||
$('#providers .details').find('input, textarea').prop('readonly', false);
|
||||
$('#providers .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#provider-password, #provider-password-confirm').addClass('required');
|
||||
$('#provider-notifications').prop('disabled', false);
|
||||
$('#providers').find('.add-break, .edit-break, .delete-break, #reset-working-plan').prop('disabled', false);
|
||||
|
@ -108,7 +108,7 @@
|
|||
$('#providers .save-cancel-group').show();
|
||||
$('#filter-providers button').prop('disabled', true);
|
||||
$('#filter-providers .results').css('color', '#AAA');
|
||||
$('#providers .details').find('input, textarea').prop('readonly', false);
|
||||
$('#providers .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#provider-password, #provider-password-confirm').removeClass('required');
|
||||
$('#provider-notifications').prop('disabled', false);
|
||||
$('#provider-services input[type="checkbox"]').prop('disabled', false);
|
||||
|
@ -189,7 +189,7 @@
|
|||
* Cancel add or edit of an provider record.
|
||||
*/
|
||||
$('#providers').on('click', '#cancel-provider', function() {
|
||||
var id = $('#filter-providers .selected-row').attr('data-id');
|
||||
var id = $('#filter-providers .selected').attr('data-id');
|
||||
this.resetForm();
|
||||
if (id != '') {
|
||||
this.select(id, true);
|
||||
|
@ -335,13 +335,13 @@
|
|||
* Resets the admin tab form back to its initial state.
|
||||
*/
|
||||
ProvidersHelper.prototype.resetForm = function() {
|
||||
$('#filter-providers .selected-row').removeClass('selected-row');
|
||||
$('#filter-providers .selected').removeClass('selected');
|
||||
$('#filter-providers button').prop('disabled', false);
|
||||
$('#filter-providers .results').css('color', '');
|
||||
|
||||
$('#providers .add-edit-delete-group').show();
|
||||
$('#providers .save-cancel-group').hide();
|
||||
$('#providers .details').find('input, textarea').prop('readonly', true);
|
||||
$('#providers .record-details').find('input, textarea').prop('readonly', true);
|
||||
$('#providers .form-message').hide();
|
||||
$('#provider-notifications').removeClass('active');
|
||||
$('#provider-notifications').prop('disabled', true);
|
||||
|
@ -355,7 +355,7 @@
|
|||
$('.breaks').find('.edit-break, .delete-break').prop('disabled', true);
|
||||
|
||||
$('#edit-provider, #delete-provider').prop('disabled', true);
|
||||
$('#providers .details').find('input, textarea').val('');
|
||||
$('#providers .record-details').find('input, textarea').val('');
|
||||
$('#providers input[type="checkbox"]').prop('checked', false);
|
||||
$('#provider-services input[type="checkbox"]').prop('checked', false);
|
||||
$('#providers .breaks tbody').empty();
|
||||
|
@ -461,7 +461,7 @@
|
|||
? info + ', ' + provider.phone_number : info;
|
||||
|
||||
var html =
|
||||
'<div class="provider-row" data-id="' + provider.id + '">' +
|
||||
'<div class="provider-row entry" data-id="' + provider.id + '">' +
|
||||
'<strong>' + name + '</strong><br>' +
|
||||
info + '<br>' +
|
||||
'</div><hr>';
|
||||
|
@ -548,7 +548,7 @@
|
|||
// Select record in filter results.
|
||||
$('#filter-providers .provider-row').each(function() {
|
||||
if ($(this).attr('data-id') == id) {
|
||||
$(this).addClass('selected-row');
|
||||
$(this).addClass('selected');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
$('#secretaries').on('submit', '#filter-secretaries form', function() {
|
||||
var key = $('#filter-secretaries .key').val();
|
||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||
$('#filter-secretaries .selected').removeClass('selected');
|
||||
this.resetForm();
|
||||
this.filter(key);
|
||||
return false;
|
||||
|
@ -75,8 +75,8 @@
|
|||
|
||||
this.display(secretary);
|
||||
|
||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||
$(e.currentTarget).addClass('selected-row');
|
||||
$('#filter-secretaries .selected').removeClass('selected');
|
||||
$(e.currentTarget).addClass('selected');
|
||||
$('#edit-secretary, #delete-secretary').prop('disabled', false);
|
||||
}.bind(this));
|
||||
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
$('#secretaries .add-edit-delete-group').hide();
|
||||
$('#secretaries .save-cancel-group').show();
|
||||
$('#secretaries .details').find('input, textarea').prop('readonly', false);
|
||||
$('#secretaries .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#secretary-password, #secretary-password-confirm').addClass('required');
|
||||
$('#secretary-notifications').prop('disabled', false);
|
||||
$('#secretary-providers input[type="checkbox"]').prop('disabled', false);
|
||||
|
@ -104,7 +104,7 @@
|
|||
$('#filter-secretaries .results').css('color', '#AAA');
|
||||
$('#secretaries .add-edit-delete-group').hide();
|
||||
$('#secretaries .save-cancel-group').show();
|
||||
$('#secretaries .details').find('input, textarea').prop('readonly', false);
|
||||
$('#secretaries .record-details').find('input, textarea').prop('readonly', false);
|
||||
$('#secretary-password, #secretary-password-confirm').removeClass('required');
|
||||
$('#secretary-notifications').prop('disabled', false);
|
||||
$('#secretary-providers input[type="checkbox"]').prop('disabled', false);
|
||||
|
@ -297,11 +297,11 @@
|
|||
* Resets the admin tab form back to its initial state.
|
||||
*/
|
||||
SecretariesHelper.prototype.resetForm = function() {
|
||||
$('#secretaries .details').find('input, textarea').val('');
|
||||
$('#secretaries .record-details').find('input, textarea').val('');
|
||||
$('#secretaries .add-edit-delete-group').show();
|
||||
$('#secretaries .save-cancel-group').hide();
|
||||
$('#edit-secretary, #delete-secretary').prop('disabled', true);
|
||||
$('#secretaries .details').find('input, textarea').prop('readonly', true);
|
||||
$('#secretaries .record-details').find('input, textarea').prop('readonly', true);
|
||||
$('#secretaries .form-message').hide();
|
||||
$('#secretary-notifications').removeClass('active');
|
||||
$('#secretary-notifications').prop('disabled', true);
|
||||
|
@ -310,7 +310,7 @@
|
|||
$('#secretaries .required').css('border', '');
|
||||
$('#secretary-password, #secretary-password-confirm').css('border', '');
|
||||
|
||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||
$('#filter-secretaries .selected').removeClass('selected');
|
||||
$('#filter-secretaries button').prop('disabled', false);
|
||||
$('#filter-secretaries .results').css('color', '');
|
||||
};
|
||||
|
@ -410,7 +410,7 @@
|
|||
? info + ', ' + secretary.phone_number : info;
|
||||
|
||||
var html =
|
||||
'<div class="secretary-row" data-id="' + secretary.id + '">' +
|
||||
'<div class="secretary-row entry" data-id="' + secretary.id + '">' +
|
||||
'<strong>' + name + '</strong><br>' +
|
||||
info + '<br>' +
|
||||
'</div><hr>';
|
||||
|
@ -428,11 +428,11 @@
|
|||
SecretariesHelper.prototype.select = function(id, display) {
|
||||
display = display || false;
|
||||
|
||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||
$('#filter-secretaries .selected').removeClass('selected');
|
||||
|
||||
$('#filter-secretaries .secretary-row').each(function() {
|
||||
if ($(this).attr('data-id') == id) {
|
||||
$(this).addClass('selected-row');
|
||||
$(this).addClass('selected');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue