Skip to content

Commit

Permalink
Fixed colours for saas mode (#201)
Browse files Browse the repository at this point in the history
Signed-off-by: Janos SUTO <[email protected]>
  • Loading branch information
jsuto authored Nov 14, 2024
1 parent a34b831 commit 95ad5ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion webui/assets/js/piler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,17 @@ $(document).ready(function() {
Piler.add_shortcuts();
break;

case 'customer/list':
$('#background-color-picker').on('input', function() {
var color = $(this).val();
$('#background_colour').val(color);
});
$('#text-color-picker').on('input', function() {
var color = $(this).val();
$('#text_colour').val(color);
});
break;

default:
const s = window.location.href;
if(/search.php#?$/.test(s)) {
Expand All @@ -1279,5 +1290,4 @@ $(document).ready(function() {

break;
}

});
6 changes: 4 additions & 2 deletions webui/templates/customer/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
<label for="background_colour" class="col-form-label"><?php print $text_background_colour; ?></label>
</div>
<div class="col-4">
<input type="text" name="background_colour" id="background_colour" class="form-control" placeholder="" value="<?php if(isset($a['background_colour'])) { print $a['background_colour']; } ?>" aria-describedby="help1" />
<input type="hidden" name="background_colour" id="background_colour" />
<input type="color" id="background-color-picker" value="<?php if(isset($a['background_colour'])) { print $a['background_colour']; } else { ?>#d0d0d0<?php } ?>">
</div>
<div class="col-auto">
<span id="help1" class="form-text"></span>
Expand All @@ -103,7 +104,8 @@
<label for="text_colour" class="col-form-label"><?php print $text_text_colour; ?></label>
</div>
<div class="col-4">
<input type="text" name="text_colour" id="text_colour" class="form-control" placeholder="" value="<?php if(isset($a['text_colour'])) { print $a['text_colour']; } ?>" aria-describedby="help1" />
<input type="hidden" name="text_colour" id="text_colour" />
<input type="color" id="text-color-picker" value="<?php if(isset($a['text_colour'])) { print $a['text_colour']; } else { ?>#5f5f5f<?php } ?>">
</div>
<div class="col-auto">
<span id="help1" class="form-text"></span>
Expand Down

0 comments on commit 95ad5ee

Please sign in to comment.