mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix travis
This commit is contained in:
parent
1d4ff1d2de
commit
9a3a87bd57
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
ns.SettingsController.prototype.init = function() {
|
ns.SettingsController.prototype.init = function() {
|
||||||
|
|
||||||
var show_grid = pskl.UserSettings.get(pskl.UserSettings.SHOW_GRID);
|
var show_grid = pskl.UserSettings.get(pskl.UserSettings.SHOW_GRID);
|
||||||
$('#show-grid').prop('checked', show_grid);
|
$('#show-grid').prop('checked', show_grid);
|
||||||
|
|
||||||
// Expand drawer when clicking 'Settings' tab.
|
// Expand drawer when clicking 'Settings' tab.
|
||||||
@ -27,10 +27,10 @@
|
|||||||
$('#background-picker-wrapper').click(function(evt) {
|
$('#background-picker-wrapper').click(function(evt) {
|
||||||
var target = $(evt.target).closest('.background-picker');
|
var target = $(evt.target).closest('.background-picker');
|
||||||
if (target.length) {
|
if (target.length) {
|
||||||
var backgroundClass = target.data('background');
|
var backgroundClass = target.data('background');
|
||||||
var body = $('body');
|
var body = $('body');
|
||||||
body.removeClass(body.data('current-background'));
|
body.removeClass(body.data('current-background'));
|
||||||
body.addClass(backgroundClass);
|
body.addClass(backgroundClass);
|
||||||
body.data('current-background', backgroundClass);
|
body.data('current-background', backgroundClass);
|
||||||
|
|
||||||
$('.background-picker').removeClass('selected');
|
$('.background-picker').removeClass('selected');
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
ns.UserSettings = {
|
ns.UserSettings = {
|
||||||
|
|
||||||
SHOW_GRID: 'SHOW_GRID',
|
SHOW_GRID : 'SHOW_GRID',
|
||||||
|
|
||||||
KEY_TO_DEFAULT_VALUE_MAP_ : {
|
KEY_TO_DEFAULT_VALUE_MAP_ : {
|
||||||
'SHOW_GRID' : false
|
'SHOW_GRID' : false
|
||||||
@ -12,7 +12,7 @@
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
cache_: {},
|
cache_ : {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static method to access a user defined settings value ot its default
|
* Static method to access a user defined settings value ot its default
|
||||||
@ -57,11 +57,14 @@
|
|||||||
window.localStorage[key] = JSON.stringify(entry);
|
window.localStorage[key] = JSON.stringify(entry);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
checKeyValidity_ : function(key) {
|
checKeyValidity_ : function(key) {
|
||||||
if(key in this.KEY_TO_DEFAULT_VALUE_MAP_) {
|
if(key in this.KEY_TO_DEFAULT_VALUE_MAP_) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
console.log("UserSettings key <"+ key +"> not find in supported keys.")
|
console.log("UserSettings key <"+ key +"> not find in supported keys.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user