diff --git a/.gitignore b/.gitignore index 72252f9c..ff75e66f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,5 @@ composer.phar Thumbs.db config.codekit npm-debug.log -public/js -publics/css \ No newline at end of file +public/js/ +publics/css/ \ No newline at end of file diff --git a/app/assets/js/plugins/jquery/tabs.js b/app/assets/js/plugins/jquery/tabs.js new file mode 100644 index 00000000..536d233d --- /dev/null +++ b/app/assets/js/plugins/jquery/tabs.js @@ -0,0 +1,25 @@ +/** + * jQuery Tab Plugin + */ +$.fn.tabs = function(options) { + // Default Settings + var settings = $.extend({ + state: "active", + active: 1, + }, options ); + + // Ensure only one given tab is displaying + $(this).next().children().not("#tab-" + settings.active).css("display", "none"); + + // When an tab andchor is clicked + $(this).on("click", "a", function (event) { + event.preventDefault(); + + $(this).parent().addClass(settings.state); + $(this).parent().siblings().removeClass(settings.state); + + var tab = $(this).attr("href"); + $('.tab-content').children().not(tab).css("display", "none"); + $(tab).css("display", "block"); + }); +}; diff --git a/app/assets/js/start.js b/app/assets/js/start.js new file mode 100644 index 00000000..3d24c559 --- /dev/null +++ b/app/assets/js/start.js @@ -0,0 +1,5 @@ +$(function() { + + $('.tabs').tabs({active: 2}); + +}); \ No newline at end of file diff --git a/app/views/dashboard/index.blade.php b/app/views/dashboard/index.blade.php index 69f3ce5a..e6a9f1e7 100644 --- a/app/views/dashboard/index.blade.php +++ b/app/views/dashboard/index.blade.php @@ -1,40 +1,33 @@ @extends('layout.master') @section('content') +

Dashboard. Manage Cachet.


-
-