mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 14:15:35 +08:00
Final button colour changes
This commit is contained in:
parent
43d19b1d8f
commit
81392362ac
8 changed files with 21 additions and 13 deletions
|
@ -43,7 +43,7 @@
|
|||
var task_button = $("[data-action='complete-task']");
|
||||
task_button.attr('data-action', 'uncomplete-task');
|
||||
task_button.find('.btn')
|
||||
.removeClass('btn-success').addClass('btn-default');
|
||||
.removeClass('btn-toggle').addClass('btn-default');
|
||||
$('.task-due-date').html(data.module_header_due_date_label);
|
||||
$('.task-state-label').html(data.module_state_label);
|
||||
task_button
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
button = step.find("[data-action='complete-step']");
|
||||
button.attr("data-action", "uncomplete-step");
|
||||
button.find(".btn").removeClass("btn-success").addClass("btn-default");
|
||||
button.find(".btn").removeClass("btn-toggle").addClass("btn-default");
|
||||
button.find("button").html('<span class="glyphicon glyphicon-remove"></span> ' + data.new_title);
|
||||
|
||||
if (data.task_ready_to_complete) {
|
||||
|
@ -93,7 +93,7 @@
|
|||
|
||||
button = step.find("[data-action='uncomplete-step']");
|
||||
button.attr("data-action", "complete-step");
|
||||
button.find(".btn").removeClass("btn-default").addClass("btn-success");
|
||||
button.find(".btn").removeClass("btn-default").addClass("btn-toggle");
|
||||
button.find("button").html('<span class="glyphicon glyphicon-ok"></span> ' + data.new_title);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -75,10 +75,10 @@
|
|||
for (var i = 0; i < notification_settings.length; i++ ) {
|
||||
var setting = $('[name="' + notification_settings[i] + '"]');
|
||||
var dependant = $('[name="' + notification_settings[i] + '_email"]');
|
||||
dependant.checkboxpicker({ onActiveCls: 'btn-primary', offActiveCls: 'btn-primary' });
|
||||
dependant.checkboxpicker({ onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle' });
|
||||
setting
|
||||
.checkboxpicker({
|
||||
onActiveCls: 'btn-primary', offActiveCls: 'btn-primary'
|
||||
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
|
||||
}).change(function() {
|
||||
if ( $(this).prop('checked') ) {
|
||||
enableDependant($('[name="' + $(this).attr('name') + '_email"]'));
|
||||
|
@ -100,7 +100,7 @@
|
|||
function setEmailSwitch(setting) {
|
||||
setting
|
||||
.checkboxpicker({
|
||||
onActiveCls: 'btn-primary', offActiveCls: 'btn-primary'
|
||||
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
|
||||
});
|
||||
if ( setting.attr('value') === 'true' ) {
|
||||
setting.prop('checked', true);
|
||||
|
@ -123,7 +123,7 @@
|
|||
var system_message_notification = $('[name="system_message_notification"]');
|
||||
system_message_notification
|
||||
.checkboxpicker({
|
||||
onActiveCls: 'btn-primary', offActiveCls: 'btn-primary'
|
||||
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
|
||||
});
|
||||
system_message_notification.prop('checked', true);
|
||||
system_message_notification.prop('disabled', true);
|
||||
|
@ -132,7 +132,7 @@
|
|||
var system_message_notification_mail = $('[name="system_message_notification_email"]');
|
||||
system_message_notification_mail
|
||||
.checkboxpicker({
|
||||
onActiveCls: 'btn-primary', offActiveCls: 'btn-primary'
|
||||
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
|
||||
});
|
||||
system_message_notification_mail.prop(
|
||||
'checked',
|
||||
|
|
|
@ -132,6 +132,9 @@ $btn-warning-border: darken($btn-warning-bg, 5%);
|
|||
$btn-danger-color: $color-white;
|
||||
$btn-danger-bg: $brand-danger;
|
||||
$btn-danger-border: darken($btn-danger-bg, 5%);
|
||||
$btn-toggle-color: $color-white;
|
||||
$btn-toggle-bg: $brand-primary;
|
||||
$btn-toggle-border: darken($btn-toggle-bg, 5%);
|
||||
$btn-link-disabled-color: $gray-light;
|
||||
$btn-border-radius-base: $border-radius-base;
|
||||
$btn-border-radius-large: $border-radius-large;
|
||||
|
|
|
@ -8,7 +8,7 @@ $color-module-hover: $brand-primary;
|
|||
#new-project-modal,
|
||||
#edit-project-modal,
|
||||
#copy-to-repository-modal {
|
||||
.btn-group label.btn-primary:not(.active) {
|
||||
.btn-group label.btn-toggle:not(.active) {
|
||||
background-color: $color-white;
|
||||
border-color: $color-silver;
|
||||
color: $color-emperor;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
@import "mixins";
|
||||
@import "main_navigation";
|
||||
@import "repositories";
|
||||
@import "bootstrap/mixins/buttons";
|
||||
/** Layout **/
|
||||
|
||||
body,
|
||||
|
@ -24,6 +25,10 @@ table {
|
|||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.btn-toggle {
|
||||
@include button-variant($btn-toggle-color, $btn-toggle-bg, $btn-toggle-border);
|
||||
}
|
||||
|
||||
#alert-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
@ -987,7 +992,7 @@ ul.content-module-activities {
|
|||
position: absolute;
|
||||
|
||||
& > .badge {
|
||||
background: $brand-success;
|
||||
background: $brand-primary;
|
||||
border-radius: 2em;
|
||||
float: left;
|
||||
font-size: 23.4px;
|
||||
|
|
|
@ -110,7 +110,7 @@ module BootstrapFormHelper
|
|||
active_str = active ? " active" : ""
|
||||
checked_str = active ? " checked='checked'" : ""
|
||||
|
||||
res << "<label class='btn btn-primary#{active_str}'>"
|
||||
res << "<label class='btn btn-toggle#{active_str}'>"
|
||||
res << "<input type='radio' value='#{val}' name='#{input_name}' id='#{id}_#{val}'#{checked_str}>"
|
||||
res << btn_names[val]
|
||||
res << "</label>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<button class="btn btn-success">
|
||||
<button class="btn btn-toggle">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<%= t("my_modules.buttons.complete") %>
|
||||
</button>
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
<div data-action="complete-step"
|
||||
class="pull-right"
|
||||
data-link-url="<%= toggle_step_state_step_path(step)%>">
|
||||
<button class="btn btn-success">
|
||||
<button class="btn btn-toggle">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<%= t("protocols.steps.options.complete_title") %>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Reference in a new issue