settings: Move display_checkmark to settings_ui.js.

This commit is contained in:
Tim Abbott
2018-03-04 18:13:29 -08:00
parent 6a06e453c7
commit 4d8e18e58f
3 changed files with 11 additions and 10 deletions

View File

@@ -2,6 +2,13 @@ var settings_ui = (function () {
var exports = {};
exports.display_checkmark = function ($elem) {
var check_mark = document.createElement("img");
check_mark.src = "/static/images/checkbox-green.svg";
$elem.prepend(check_mark);
$(check_mark).css("width", "13px");
};
// This function is used to disable sub-setting when main setting is checked or unchecked
// or two settings are inter-dependent on their values values.
// * is_checked is boolean, shows if the main setting is checked or not.