You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
view.handleResponse"<h4 class=\"alert-heading\">No Random samples to infer From!</h4>Please generate some random samples. Click \"back\" button on the controller to go to the \"Generate Random Samples!\" button.", "error", "controller-content"
197
+
view.handleResponse"<h4 class=\"alert-heading\">No Random samples to infer From!</h4>Please generate some random samples in Step 2. ", "error", "controller-content"
Copy file name to clipboardExpand all lines: src/appModel.coffee
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,11 @@ socr.model = ->
17
17
# Why there are keys and values? Its because in some form of data input (like coin toss), the "key" contains the symbolic meaningful reference whereas the "value" contains the mathematical equivalent value.
@description: Clears all canvas and div. Resetting the view of the whole App
329
-
@dependencies : none
332
+
@parameter scope - Array
330
333
###
331
-
reset: (option) ->
332
-
333
-
#reset only the samples in the view.
334
-
if option isnt"undefined"and option is"samples"
335
-
$("#sampleList").html""
336
-
else
337
-
338
-
#$('#displayCount').html('0'); //resetting the count to 0
334
+
reset: (scope=["app"]) ->
335
+
_resetSampleScope=->
339
336
$("#sampleList").html""#clear the sample List dive
340
337
$("#showCount").html""
341
338
socr.view.updateSlider()
339
+
$(".pagination").html""
340
+
341
+
_resetDataScope=->
342
342
$("#dataPlot").html""#clear dataPlot div
343
343
$("#dotplot").empty() #clear dotPlot div
344
+
_resetAccordion=->
344
345
$("#accordion").accordion"activate", 0
345
-
$(".pagination").html""
346
346
$("#details").html""
347
-
$("#dataset").html""
348
-
349
-
# $("#input").inputtable('clear');
350
-
_currentValues= []
351
-
$("#controller-content").html"<div class=\"alert alert-error\">From the \"data driven\" tab select an experiment or enter data the spreadsheet first!</div>"
347
+
348
+
scope.forEach (s)->
349
+
switch
350
+
when s is"sampleslistview"
351
+
$("#sampleList").html""
352
+
when s is"randomsamples"
353
+
_resetSampleScope()
354
+
_resetDataScope()
355
+
_resetAccordion()
356
+
when s is"app"
357
+
_resetSampleScope()
358
+
_resetDataScope()
359
+
_resetAccordion()
360
+
_currentValues= []
361
+
$("#controller-content").html"<div class=\"alert alert-error\">From the \"Input\" tab, select an experiment or enter sample data!</div>"
362
+
else
363
+
echo"."
364
+
#$('#displayCount').html('0'); //resetting the count to 0
0 commit comments