Skip to content

Commit

Permalink
Recipe 202
Browse files Browse the repository at this point in the history
  • Loading branch information
LearningLaravel committed Feb 1, 2017
1 parent c8232b1 commit f0cd3e6
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PagesController extends Controller
{
public function home()
{
Alert::error('There is an error', 'Error')->autoclose(2000);
// Alert::error('There is an error', 'Error')->autoclose(2000);
return view('home');
}

Expand Down
7 changes: 7 additions & 0 deletions public/css/ladda-themeless.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions public/css/ladda.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions public/js/custom_script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Ladda.bind('input[type=submit]', {timeout: 10000});

// Bind normal buttons
Ladda.bind('.ladda-button', {timeout: 10000});

// Bind progress buttons and simulate loading progress
Ladda.bind('.ladda-button', {
callback: function (instance) {
var progress = 0;
var interval = setInterval(function () {
progress = Math.min(progress + Math.random() * 0.1, 1);
instance.setProgress(progress);

if (progress === 1) {
instance.stop();
clearInterval(interval);
}
}, 200);
}
});
Loading

0 comments on commit f0cd3e6

Please sign in to comment.