123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <!--================================================== -->
-
- <!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)-->
- <script data-pace-options='{ "restartOnRequestAfter": true }' src="lib/SmartAdmin/js/plugin/pace/pace.min.js"></script>
-
- <!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
- <script src="lib/SmartAdmin/js/libs/jquery-2.1.1.min.js"></script>
- <script src="lib/SmartAdmin/js/libs/jquery-ui-1.10.3.min.js"></script>
-
- <!-- IMPORTANT: APP CONFIG -->
- <script src="lib/SmartAdmin/js/app.config.js"></script>
-
- <!-- JS TOUCH : include this plugin for mobile drag / drop touch events-->
- <script src="lib/SmartAdmin/js/plugin/jquery-touch/jquery.ui.touch-punch.min.js"></script>
-
- <!-- BOOTSTRAP JS -->
- <script src="lib/SmartAdmin/js/bootstrap/bootstrap.min.js"></script>
-
- <!-- CUSTOM NOTIFICATION -->
- <script src="lib/SmartAdmin/js/notification/SmartNotification.min.js"></script>
-
- <!-- JARVIS WIDGETS -->
- <script src="lib/SmartAdmin/js/smartwidgets/jarvis.widget.min.js"></script>
-
- <!-- EASY PIE CHARTS -->
- <script src="lib/SmartAdmin/js/plugin/easy-pie-chart/jquery.easy-pie-chart.min.js"></script>
-
- <!-- SPARKLINES -->
- <script src="lib/SmartAdmin/js/plugin/sparkline/jquery.sparkline.min.js"></script>
-
- <!-- JQUERY VALIDATE -->
- <script src="lib/SmartAdmin/js/plugin/jquery-validate/jquery.validate.min.js"></script>
-
- <!-- JQUERY MASKED INPUT -->
- <script src="lib/SmartAdmin/js/plugin/masked-input/jquery.maskedinput.min.js"></script>
-
- <!-- JQUERY SELECT2 INPUT -->
- <script src="lib/SmartAdmin/js/plugin/select2/select2.min.js"></script>
-
- <!-- JQUERY UI + Bootstrap Slider -->
- <script src="lib/SmartAdmin/js/plugin/bootstrap-slider/bootstrap-slider.min.js"></script>
-
- <!-- browser msie issue fix -->
- <script src="lib/SmartAdmin/js/plugin/msie-fix/jquery.mb.browser.min.js"></script>
-
- <!-- FastClick: For mobile devices -->
- <script src="lib/SmartAdmin/js/plugin/fastclick/fastclick.min.js"></script>
-
- <!--[if IE 8]>
-
- <h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>
-
- <![endif]-->
-
- <!-- MAIN APP JS FILE -->
- <script src="lib/SmartAdmin/js/app.min.js"></script>
-
- <!-- ENHANCEMENT PLUGINS : NOT A REQUIREMENT -->
- <!-- Voice command : plugin -->
- <script src="lib/SmartAdmin/js/speech/voicecommand.min.js"></script>
-
- <!-- SmartChat UI : plugin -->
- <script src="lib/SmartAdmin/js/smart-chat-ui/smart.chat.ui.min.js"></script>
- <script src="lib/SmartAdmin/js/smart-chat-ui/smart.chat.manager.min.js"></script>
-
- <!-- PAGE RELATED PLUGIN(S) -->
-
- <!-- Flot Chart Plugin: Flot Engine, Flot Resizer, Flot Tooltip -->
- <script src="lib/SmartAdmin/js/plugin/flot/jquery.flot.cust.min.js"></script>
- <script src="lib/SmartAdmin/js/plugin/flot/jquery.flot.resize.min.js"></script>
- <script src="lib/SmartAdmin/js/plugin/flot/jquery.flot.time.min.js"></script>
- <script src="lib/SmartAdmin/js/plugin/flot/jquery.flot.tooltip.min.js"></script>
-
- <!-- Vector Maps Plugin: Vectormap engine, Vectormap language -->
- <script src="lib/SmartAdmin/js/plugin/vectormap/jquery-jvectormap-1.2.2.min.js"></script>
- <script src="lib/SmartAdmin/js/plugin/vectormap/jquery-jvectormap-world-mill-en.js"></script>
-
- <!-- Full Calendar -->
- <script src="lib/SmartAdmin/js/plugin/moment/moment.min.js"></script>
- <script src="lib/SmartAdmin/js/plugin/fullcalendar/jquery.fullcalendar.min.js"></script>
-
- <script>
- {literal}
- $(document).ready(function() {
-
- // DO NOT REMOVE : GLOBAL FUNCTIONS!
- pageSetUp();
-
- /*
- * PAGE RELATED SCRIPTS
- */
-
- $(".js-status-update a").click(function() {
- var selText = $(this).text();
- var $this = $(this);
- $this.parents('.btn-group').find('.dropdown-toggle').html(selText + ' <span class="caret"></span>');
- $this.parents('.dropdown-menu').find('li').removeClass('active');
- $this.parent().addClass('active');
- });
-
- /*
- * TODO: add a way to add more todo's to list
- */
-
- // initialize sortable
- $(function() {
- $("#sortable1, #sortable2").sortable({
- handle : '.handle',
- connectWith : ".todo",
- update : countTasks
- }).disableSelection();
- });
-
- // check and uncheck
- $('.todo .checkbox > input[type="checkbox"]').click(function() {
- var $this = $(this).parent().parent().parent();
-
- if ($(this).prop('checked')) {
- $this.addClass("complete");
-
- // remove this if you want to undo a check list once checked
- //$(this).attr("disabled", true);
- $(this).parent().hide();
-
- // once clicked - add class, copy to memory then remove and add to sortable3
- $this.slideUp(500, function() {
- $this.clone().prependTo("#sortable3").effect("highlight", {}, 800);
- $this.remove();
- countTasks();
- });
- } else {
- // insert undo code here...
- }
-
- })
- // count tasks
- function countTasks() {
-
- $('.todo-group-title').each(function() {
- var $this = $(this);
- $this.find(".num-of-tasks").text($this.next().find("li").size());
- });
-
- }
-
-
-
- /* hide default buttons */
- $('.fc-toolbar .fc-right, .fc-toolbar .fc-center').hide();
-
- // calendar prev
- $('#calendar-buttons #btn-prev').click(function() {
- $('.fc-prev-button').click();
- return false;
- });
-
- // calendar next
- $('#calendar-buttons #btn-next').click(function() {
- $('.fc-next-button').click();
- return false;
- });
-
- // calendar today
- $('#calendar-buttons #btn-today').click(function() {
- $('.fc-button-today').click();
- return false;
- });
-
- // calendar month
- $('#mt').click(function() {
- $('#calendar').fullCalendar('changeView', 'month');
- });
-
- // calendar agenda week
- $('#ag').click(function() {
- $('#calendar').fullCalendar('changeView', 'agendaWeek');
- });
-
- // calendar agenda day
- $('#td').click(function() {
- $('#calendar').fullCalendar('changeView', 'agendaDay');
- });
-
- /*
- * CHAT
- */
-
- $.filter_input = $('#filter-chat-list');
- $.chat_users_container = $('#chat-container > .chat-list-body')
- $.chat_users = $('#chat-users')
- $.chat_list_btn = $('#chat-container > .chat-list-open-close');
- $.chat_body = $('#chat-body');
-
- /*
- * LIST FILTER (CHAT)
- */
-
- // custom css expression for a case-insensitive contains()
- jQuery.expr[':'].Contains = function(a, i, m) {
- return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
- };
-
- function listFilter(list) {// header is any element, list is an unordered list
- // create and add the filter form to the header
-
- $.filter_input.change(function() {
- var filter = $(this).val();
- if (filter) {
- // this finds all links in a list that contain the input,
- // and hide the ones not containing the input while showing the ones that do
- $.chat_users.find("a:not(:Contains(" + filter + "))").parent().slideUp();
- $.chat_users.find("a:Contains(" + filter + ")").parent().slideDown();
- } else {
- $.chat_users.find("li").slideDown();
- }
- return false;
- }).keyup(function() {
- // fire the above change event after every letter
- $(this).change();
-
- });
-
- }
-
- // on dom ready
- listFilter($.chat_users);
-
- // open chat list
- $.chat_list_btn.click(function() {
- $(this).parent('#chat-container').toggleClass('open');
- })
-
- $.chat_body.animate({
- scrollTop : $.chat_body[0].scrollHeight
- }, 500);
-
- });
- {/literal}
- </script>
-
- </body>
-
- </html>
|