mirror of
https://github.com/prymitive/karma
synced 2026-08-23 11:56:20 +00:00
Call javascript functions via public methods
This fixes cookie reset button, which wasn't working due to name conflicts (reset function in summary.js was called instead)
This commit is contained in:
@@ -46,7 +46,7 @@ var Colors = (function() {
|
||||
}
|
||||
|
||||
isStaticLabel = function(key) {
|
||||
return ($.inArray(key, getStaticLabels()) >= 0);
|
||||
return ($.inArray(key, Colors.GetStaticLabels()) >= 0);
|
||||
}
|
||||
|
||||
init = function(staticColors) {
|
||||
|
||||
@@ -107,7 +107,7 @@ var Config = (function() {
|
||||
|
||||
// reset settings button action
|
||||
$(params.ResetSelector).on('click', function(elem) {
|
||||
reset();
|
||||
Config.Reset();
|
||||
location.reload();
|
||||
});
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ var Counter = (function(params) {
|
||||
bgColor: '#333',
|
||||
textColor: '#ff0'
|
||||
});
|
||||
setUnknown();
|
||||
Counter.Unknown();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ var Progress = (function() {
|
||||
|
||||
|
||||
complete = function() {
|
||||
resetTimer();
|
||||
Progress.ResetTimer();
|
||||
NProgress.done();
|
||||
}
|
||||
|
||||
|
||||
pause = function() {
|
||||
resetTimer();
|
||||
Progress.ResetTimer();
|
||||
NProgress.set(0.0);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ var Progress = (function() {
|
||||
var step_ms = 250; // animation step in ms
|
||||
var steps = (Unsee.GetRefreshRate() * 1000) / step_ms; // how many steps we have
|
||||
NProgress.set(0.0);
|
||||
resetTimer();
|
||||
Progress.ResetTimer();
|
||||
timer = setInterval(function() {
|
||||
NProgress.inc(1.0 / steps);
|
||||
}, step_ms);
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user