����C�  
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/admin/productimages/clean.php:1) in /var/www/html/admin/productimages/clean.php on line 4
PK!bootstrap.min.jsnuIw/*! * Bootstrap v3.1.1 (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ +function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focusin",i=g=="hover"?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n=this.options.container=="body"?window.innerWidth:k.outerWidth(),o=this.options.container=="body"?window.innerHeight:k.outerHeight(),p=this.options.container=="body"?0:k.offset().left;e=e=="bottom"&&h.top+h.height+j-m>o?"top":e=="top"&&h.top-m-j<0?"bottom":e=="right"&&h.right+i>n?"left":e=="left"&&h.left-i= 2) ? days : "0" + days; hours = (String(hours).length >= 2) ? hours : "0" + hours; minutes = (String(minutes).length >= 2) ? minutes : "0" + minutes; seconds = (String(seconds).length >= 2) ? seconds : "0" + seconds; } //update the countdown's html values. if (!isNaN(eventDate)) { thisEl.find(".days").text(days); thisEl.find(".hours").text(hours); thisEl.find(".minutes").text(minutes); thisEl.find(".seconds").text(seconds); } else { alert("Invalid date. Here's an example: 12 Tuesday 2012 17:30:00"); clearInterval(interval); } } //run the function countdown_proc(); //loop the function interval = setInterval(countdown_proc, 1000); }; })(jQuery);PK!Tpages-gallery.jsnuIwvar PagesGallery = function () { //function to initiate Colorbox var runColorBox = function () { $(".group1").colorbox({ rel: 'group1', transition: "none", width: "100%", height: "100%", retinaImage: true }); }; //function to Image Picker var runImagePicker = function () { $('.wrap-image .chkbox').bind('click', function () { if ($(this).parent().hasClass('selected')) { $(this).parent().removeClass('selected').children('a').children('img').removeClass('selected'); } else { $(this).parent().addClass('selected').children('a').children('img').addClass('selected'); } }); }; return { //main function to initiate template pages init: function () { runColorBox(); runImagePicker(); } }; }();PK!Lmaps.jsnuIwvar Maps = function () { //function to initiate GMaps //Gmaps.js allows you to use the potential of Google Maps in a simple way. //For more information, please visit http://hpneo.github.io/gmaps/documentation.html var runMaps = function () { // Basic Map map = new GMaps({ el: '#map1', lat: -12.043333, lng: -77.028333 }); //Markers map2 = new GMaps({ div: '#map2', lat: -12.043333, lng: -77.028333 }); map2.addMarker({ lat: -12.043333, lng: -77.03, title: 'Lima', details: { database_id: 42, author: 'HPNeo' }, click: function (e) { if (console.log) console.log(e); alert('You clicked in this marker'); } }); map2.addMarker({ lat: -12.042, lng: -77.028333, title: 'Marker with InfoWindow', height: '200px', infoWindow: { content: '

HTML Content

' } }); //Street View panorama = GMaps.createPanorama({ el: '#map3', lat: 42.3455, lng: -71.0983 }); //Search Address map = new GMaps({ div: '#map4', lat: -12.043333, lng: -77.028333 }); $('#geocoding_form').submit(function (e) { e.preventDefault(); GMaps.geocode({ address: $('#address').val().trim(), callback: function (results, status) { if (status == 'OK') { var latlng = results[0].geometry.location; map.setCenter(latlng.lat(), latlng.lng()); map.addMarker({ lat: latlng.lat(), lng: latlng.lng() }); } } }); }); //Interacting var map; // Update position $(document).on('submit', '.edit_marker', function (e) { e.preventDefault(); var $index = $(this).data('marker-index'); $lat = $('#marker_' + $index + '_lat').val(); $lng = $('#marker_' + $index + '_lng').val(); var template = $('#edit_marker_template').text(); // Update form values var content = template.replace(/{{index}}/g, $index).replace(/{{lat}}/g, $lat).replace(/{{lng}}/g, $lng); map.markers[$index].setPosition(new google.maps.LatLng($lat, $lng)); map.markers[$index].infoWindow.setContent(content); $marker = $('#markers-with-coordinates').find('li').eq(0).find('a'); $marker.data('marker-lat', $lat); $marker.data('marker-lng', $lng); }); // Update center $(document).on('click', '.pan-to-marker', function (e) { e.preventDefault(); var lat, lng; var $index = $(this).data('marker-index'); var $lat = $(this).data('marker-lat'); var $lng = $(this).data('marker-lng'); if ($index != undefined) { // using indices var position = map.markers[$index].getPosition(); lat = position.lat(); lng = position.lng(); } else { // using coordinates lat = $lat; lng = $lng; } map.setCenter(lat, lng); }); map = new GMaps({ div: '#map5', lat: -12.043333, lng: -77.028333 }); GMaps.on('marker_added', map, function (marker) { $('#map-ui').append('' + marker.title + '' + marker.title + ''); }); GMaps.on('click', map.map, function (event) { var index = map.markers.length; var lat = event.latLng.lat(); var lng = event.latLng.lng(); var template = $('#edit_marker_template').text(); var content = template.replace(/{{index}}/g, index).replace(/{{lat}}/g, lat).replace(/{{lng}}/g, lng); map.addMarker({ lat: lat, lng: lng, title: 'Marker #' + index, infoWindow: { content: content } }); }); }; return { //main function to initiate template pages init: function () { runMaps(); } }; }();PK!=MMform-calendar.jsnuIwvar Calendar = function () { //function to initiate Full CAlendar var runCalendar = function () { var $modal = $('#event-management'); $('#event-categories div.event-category').each(function () { // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end var eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; // store the Event Object in the DOM element so we can get to it later $(this).data('eventObject', eventObject); // make the event draggable using jQuery UI $(this).draggable({ zIndex: 999, revert: true, // will cause the event to go back to its revertDuration: 50 // original position after the drag }); }); /* initialize the calendar -----------------------------------------------------------------*/ var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var form = ''; var calendar = $('#calendar').fullCalendar({ buttonText: { prev: '', next: '' }, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, events: [{ title: 'Meeting with Boss', start: new Date(y, m, 1), className: 'label-default' }, { title: 'Bootstrap Seminar', start: new Date(y, m, d - 5), end: new Date(y, m, d - 2), className: 'label-teal' }, { title: 'Lunch with Nicole', start: new Date(y, m, d - 3, 12, 0), className: 'label-green', allDay: false }], editable: true, droppable: true, // this allows things to be dropped onto the calendar !!! drop: function (date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object var originalEventObject = $(this).data('eventObject'); var $categoryClass = $(this).attr('data-class'); // we need to copy it, so that multiple events don't have a reference to the same object var copiedEventObject = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; copiedEventObject.allDay = allDay; if ($categoryClass) copiedEventObject['className'] = [$categoryClass]; // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) $('#calendar').fullCalendar('renderEvent', copiedEventObject, true); // is the "remove after drop" checkbox checked? if ($('#drop-remove').is(':checked')) { // if so, remove the element from the "Draggable Events" list $(this).remove(); } }, selectable: true, selectHelper: true, select: function (start, end, allDay) { $modal.modal({ backdrop: 'static' }); form = $("
"); form.append("
"); form.find(".row").append("
").append("
").find("select[name='category']").append("").append("").append("").append("").append("").append("").append(""); $modal.find('.remove-event').hide().end().find('.save-event').show().end().find('.modal-body').empty().prepend(form).end().find('.save-event').unbind('click').click(function () { form.submit(); }); $modal.find('form').on('submit', function () { title = form.find("input[name='title']").val(); $categoryClass = form.find("select[name='category'] option:checked").val(); if (title !== null) { calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay, className: $categoryClass }, true // make the event "stick" ); } $modal.modal('hide'); return false; }); calendar.fullCalendar('unselect'); }, eventClick: function (calEvent, jsEvent, view) { var form = $("
"); form.append(""); form.append("
"); $modal.modal({ backdrop: 'static' }); $modal.find('.remove-event').show().end().find('.save-event').hide().end().find('.modal-body').empty().prepend(form).end().find('.remove-event').unbind('click').click(function () { calendar.fullCalendar('removeEvents', function (ev) { return (ev._id == calEvent._id); }); $modal.modal('hide'); }); $modal.find('form').on('submit', function () { calEvent.title = form.find("input[type=text]").val(); calendar.fullCalendar('updateEvent', calEvent); $modal.modal('hide'); return false; }); } }); }; return { init: function () { runCalendar(); } }; }();PK!4D\HHindex.jsnuIwvar Index = function () { // function to initiate Chart 1 var runChart1 = function () { function randValue() { return (Math.floor(Math.random() * (1 + 40 - 20))) + 20; }; var pageviews = [ [1, randValue()], [2, randValue()], [3, 2 + randValue()], [4, 3 + randValue()], [5, 5 + randValue()], [6, 10 + randValue()], [7, 15 + randValue()], [8, 20 + randValue()], [9, 25 + randValue()], [10, 30 + randValue()], [11, 35 + randValue()], [12, 25 + randValue()], [13, 15 + randValue()], [14, 20 + randValue()], [15, 45 + randValue()], [16, 50 + randValue()], [17, 65 + randValue()], [18, 70 + randValue()], [19, 85 + randValue()], [20, 80 + randValue()], [21, 75 + randValue()], [22, 80 + randValue()], [23, 75 + randValue()], [24, 70 + randValue()], [25, 65 + randValue()], [26, 75 + randValue()], [27, 80 + randValue()], [28, 85 + randValue()], [29, 90 + randValue()], [30, 95 + randValue()] ]; var visitors = [ [1, randValue() - 5], [2, randValue() - 5], [3, randValue() - 5], [4, 6 + randValue()], [5, 5 + randValue()], [6, 20 + randValue()], [7, 25 + randValue()], [8, 36 + randValue()], [9, 26 + randValue()], [10, 38 + randValue()], [11, 39 + randValue()], [12, 50 + randValue()], [13, 51 + randValue()], [14, 12 + randValue()], [15, 13 + randValue()], [16, 14 + randValue()], [17, 15 + randValue()], [18, 15 + randValue()], [19, 16 + randValue()], [20, 17 + randValue()], [21, 18 + randValue()], [22, 19 + randValue()], [23, 20 + randValue()], [24, 21 + randValue()], [25, 14 + randValue()], [26, 24 + randValue()], [27, 25 + randValue()], [28, 26 + randValue()], [29, 27 + randValue()], [30, 31 + randValue()] ]; var plot = $.plot($("#placeholder-h1"), [{ data: pageviews, label: "Unique Visits" }, { data: visitors, label: "Page Views" }], { series: { lines: { show: true, lineWidth: 2, fill: true, fillColor: { colors: [{ opacity: 0.05 }, { opacity: 0.01 }] } }, points: { show: false }, shadowSize: 2 }, grid: { hoverable: true, clickable: true, tickColor: "#eee", borderWidth: 0 }, colors: ["#d12610", "#37b7f3", "#52e136"], xaxis: { ticks: 11, tickDecimals: 0 }, yaxis: { ticks: 11, tickDecimals: 0 } }); function showTooltip(x, y, contents) { $('
' + contents + '
').css({ position: 'absolute', display: 'none', top: y + 5, left: x + 15, border: '1px solid #333', padding: '4px', color: '#fff', 'border-radius': '3px', 'background-color': '#333', opacity: 0.80 }).appendTo("body").fadeIn(200); } var previousPoint = null; $("#placeholder-h1").bind("plothover", function (event, pos, item) { $("#x").text(pos.x.toFixed(2)); $("#y").text(pos.y.toFixed(2)); if (item) { if (previousPoint != item.dataIndex) { previousPoint = item.dataIndex; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); showTooltip(item.pageX, item.pageY, item.series.label + " of " + x + " = " + y); } } else { $("#tooltip").remove(); previousPoint = null; } }); }; // function to initiate Chart 2 var runChart2 = function () { var data_pie = [], series = Math.floor(Math.random() * 6) + 3; for (var i = 0; i < series; i++) { data_pie[i] = { label: "Series" + (i + 1), data: Math.floor(Math.random() * 100) + 1 }; } $.plot('#placeholder-h2', data_pie, { series: { pie: { show: true, radius: 1, tilt: 0.5, label: { show: true, radius: 1, formatter: labelFormatter, background: { opacity: 0.8 } }, combine: { color: '#999', threshold: 0.1 } } }, legend: { show: false } }); function labelFormatter(label, series) { return "
" + label + "
" + Math.round(series.percent) + "%
"; } }; // function to initiate Chart 3 var runChart3 = function () { var data = [], totalPoints = 300; function getRandomData() { if (data.length > 0) data = data.slice(1); // Do a random walk while (data.length < totalPoints) { var prev = data.length > 0 ? data[data.length - 1] : 50, y = prev + Math.random() * 10 - 5; if (y < 0) { y = 0; } else if (y > 100) { y = 100; } data.push(y); } // Zip the generated y values with the x values var res = []; for (var i = 0; i < data.length; ++i) { res.push([i, data[i]]); } return res; } // Set up the control widget var updateInterval = 30; $("#updateInterval").val(updateInterval).change(function () { var v = $(this).val(); if (v && !isNaN(+v)) { updateInterval = +v; if (updateInterval < 1) { updateInterval = 1; } else if (updateInterval > 2000) { updateInterval = 2000; } $(this).val("" + updateInterval); } }); var plot = $.plot("#placeholder-h3", [getRandomData()], { grid: { borderWidth: 1, borderColor: '#eeeeee' }, series: { shadowSize: 0 // Drawing is faster without shadows }, yaxis: { min: 0, max: 100 }, xaxis: { show: false } }); function update() { plot.setData([getRandomData()]); // Since the axes don't change, we don't need to call plot.setupGrid() plot.draw(); setTimeout(update, updateInterval); } update(); }; // function to initiate Sparkline var runSparkline = function () { $(".sparkline_line_good span").sparkline("html", { type: "line", fillColor: "#B1FFA9", lineColor: "#459D1C", width: "50", height: "24" }); $(".sparkline_line_bad span").sparkline("html", { type: "line", fillColor: "#FFC4C7", lineColor: "#BA1E20", width: "50", height: "24" }); $(".sparkline_line_neutral span").sparkline("html", { type: "line", fillColor: "#CCCCCC", lineColor: "#757575", width: "50", height: "24" }); $(".sparkline_bar_good span").sparkline('html', { type: "bar", barColor: "#459D1C", barWidth: "5", height: "24" }); $(".sparkline_bar_bad span").sparkline('html', { type: "bar", barColor: "#BA1E20", barWidth: "5", height: "24" }); $(".sparkline_bar_neutral span").sparkline('html', { type: "bar", barColor: "#757575", barWidth: "5", height: "24" }); }; // function to initiate EasyPieChart var runEasyPieChart = function () { if (isIE8 || isIE9) { if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest thing possible to the ECMAScript 5 internal IsCallable function throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; } } $('.easy-pie-chart .bounce').easyPieChart({ animate: 1000, size: 70 }); $('.easy-pie-chart .cpu').easyPieChart({ animate: 1000, lineWidth: 3, barColor: '#35aa47', size: 70 }); }; // function to initiate Full Calendar var runFullCalendar = function () { //calendar /* initialize the calendar -----------------------------------------------------------------*/ var $modal = $('#event-management'); $('#event-categories div.event-category').each(function () { // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end var eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; // store the Event Object in the DOM element so we can get to it later $(this).data('eventObject', eventObject); // make the event draggable using jQuery UI $(this).draggable({ zIndex: 999, revert: true, // will cause the event to go back to its revertDuration: 50 // original position after the drag }); }); /* initialize the calendar -----------------------------------------------------------------*/ var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var form = ''; var calendar = $('#calendar').fullCalendar({ buttonText: { prev: '', next: '' }, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, events: [{ title: 'Meeting with Boss', start: new Date(y, m, 1), className: 'label-default' }, { title: 'Bootstrap Seminar', start: new Date(y, m, d - 5), end: new Date(y, m, d - 2), className: 'label-teal' }, { title: 'Lunch with Nicole', start: new Date(y, m, d - 3, 12, 0), className: 'label-green', allDay: false }], editable: true, droppable: true, // this allows things to be dropped onto the calendar !!! drop: function (date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object var originalEventObject = $(this).data('eventObject'); var $categoryClass = $(this).attr('data-class'); // we need to copy it, so that multiple events don't have a reference to the same object var copiedEventObject = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; copiedEventObject.allDay = allDay; if ($categoryClass) copiedEventObject['className'] = [$categoryClass]; // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) $('#calendar').fullCalendar('renderEvent', copiedEventObject, true); // is the "remove after drop" checkbox checked? if ($('#drop-remove').is(':checked')) { // if so, remove the element from the "Draggable Events" list $(this).remove(); } }, selectable: true, selectHelper: true, select: function (start, end, allDay) { $modal.modal({ backdrop: 'static' }); form = $("
"); form.append("
"); form.find(".row").append("
").append("
").find("select[name='category']").append("").append("").append("").append("").append("").append("").append(""); $modal.find('.remove-event').hide().end().find('.save-event').show().end().find('.modal-body').empty().prepend(form).end().find('.save-event').unbind('click').click(function () { form.submit(); }); $modal.find('form').on('submit', function () { title = form.find("input[name='title']").val(); $categoryClass = form.find("select[name='category'] option:checked").val(); if (title !== null) { calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay, className: $categoryClass }, true // make the event "stick" ); } $modal.modal('hide'); return false; }); calendar.fullCalendar('unselect'); }, eventClick: function (calEvent, jsEvent, view) { var form = $("
"); form.append(""); form.append("
"); $modal.modal({ backdrop: 'static' }); $modal.find('.remove-event').show().end().find('.save-event').hide().end().find('.modal-body').empty().prepend(form).end().find('.remove-event').unbind('click').click(function () { calendar.fullCalendar('removeEvents', function (ev) { return (ev._id == calEvent._id); }); $modal.modal('hide'); }); $modal.find('form').on('submit', function () { calEvent.title = form.find("input[type=text]").val(); calendar.fullCalendar('updateEvent', calEvent); $modal.modal('hide'); return false; }); } }); }; return { init: function () { runChart1(); runChart2(); runChart3(); runSparkline(); runEasyPieChart(); runFullCalendar(); } }; }();PK!Lxxmain.jsnuIw// global variables var isIE8 = false; var isIE9 = false; var $windowWidth; var $windowHeight; var $pageArea; // Debounce Function (function ($, sr) { // debouncing function from John Hann // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ var debounce = function (func, threshold, execAsap) { var timeout; return function debounced() { var obj = this, args = arguments; function delayed() { if (!execAsap) func.apply(obj, args); timeout = null; }; if (timeout) clearTimeout(timeout); else if (execAsap) func.apply(obj, args); timeout = setTimeout(delayed, threshold || 100); }; }; // smartresize jQuery.fn[sr] = function (fn) { return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); }; })(jQuery, 'clipresize'); //Main Function var Main = function () { //function to detect explorer browser and its version var runInit = function () { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { var ieversion = new Number(RegExp.$1); if (ieversion == 8) { isIE8 = true; } else if (ieversion == 9) { isIE9 = true; } } }; //function to adjust the template elements based on the window size var runElementsPosition = function () { $windowWidth = $(window).width(); $windowHeight = $(window).height(); $pageArea = $windowHeight - $('body > .navbar').outerHeight() - $('body > .footer').outerHeight(); $('.sidebar-search input').removeAttr('style').removeClass('open'); runContainerHeight(); }; //function to adapt the Main Content height to the Main Navigation height var runContainerHeight = function () { mainContainer = $('.main-content > .container'); mainNavigation = $('.main-navigation'); if ($pageArea < 760) { $pageArea = 760; } if (mainContainer.outerHeight() < mainNavigation.outerHeight() && mainNavigation.outerHeight() > $pageArea) { mainContainer.css('min-height', mainNavigation.outerHeight()); } else { mainContainer.css('min-height', $pageArea); }; if ($windowWidth < 768) { mainNavigation.css('min-height', $windowHeight - $('body > .navbar').outerHeight()); } }; //function to activate the ToDo list, if present var runToDoAction = function () { if ($(".todo-actions").length) { $(".todo-actions").click(function () { if ($(this).find("i").hasClass("fa-square-o") || $(this).find("i").hasClass("icon-check-empty")) { if ($(this).find("i").hasClass("fa")) { $(this).find("i").removeClass("fa-square-o").addClass("fa-check-square-o"); } else { $(this).find("i").removeClass("icon-check-empty").addClass("fa fa-check-square-o"); }; $(this).parent().find("span").css({ opacity: .25 }); $(this).parent().find(".desc").css("text-decoration", "line-through"); } else { $(this).find("i").removeClass("fa-check-square-o").addClass("fa-square-o"); $(this).parent().find("span").css({ opacity: 1 }); $(this).parent().find(".desc").css("text-decoration", "none"); } return !1; }); } }; //function to activate the Tooltips, if present var runTooltips = function () { if ($(".tooltips").length) { $('.tooltips').tooltip(); } }; //function to activate the Popovers, if present var runPopovers = function () { if ($(".popovers").length) { $('.popovers').popover(); } }; //function to allow a button or a link to open a tab var runShowTab = function () { if ($(".show-tab").length) { $('.show-tab').bind('click', function (e) { e.preventDefault(); var tabToShow = $(this).attr("href"); if ($(tabToShow).length) { $('a[href="' + tabToShow + '"]').tab('show'); } }); }; if (getParameterByName('tabId').length) { $('a[href="#' + getParameterByName('tabId') + '"]').tab('show'); } }; var runPanelScroll = function () { if ($(".panel-scroll").length) { $('.panel-scroll').perfectScrollbar({ wheelSpeed: 50, minScrollbarLength: 20, suppressScrollX: true }); } }; //function to extend the default settings of the Accordion var runAccordionFeatures = function () { if ($('.accordion').length) { $('.accordion .panel-collapse').each(function () { if (!$(this).hasClass('in')) { $(this).prev('.panel-heading').find('.accordion-toggle').addClass('collapsed'); } }); } $(".accordion").collapse().height('auto'); var lastClicked; $('.accordion .accordion-toggle').bind('click', function () { currentTab = $(this); $('html,body').animate({ scrollTop: currentTab.offset().top - 100 }, 1000); }); }; //function to reduce the size of the Main Menu var runNavigationToggler = function () { $('.navigation-toggler').bind('click', function () { if (!$('body').hasClass('navigation-small')) { $('body').addClass('navigation-small'); } else { $('body').removeClass('navigation-small'); }; }); }; //function to activate the panel tools var runModuleTools = function () { $('.panel-tools .panel-expand').bind('click', function (e) { $('.panel-tools a').not(this).hide(); $('body').append('
'); $('.main-container').removeAttr('style'); backdrop = $('.full-white-backdrop'); wbox = $(this).parents('.panel'); wbox.removeAttr('style'); if (wbox.hasClass('panel-full-screen')) { backdrop.fadeIn(200, function () { $('.panel-tools a').show(); wbox.removeClass('panel-full-screen'); backdrop.fadeOut(200, function () { backdrop.remove(); }); }); } else { $('body').append('
'); backdrop.fadeIn(200, function () { $('.main-container').css({ 'max-height': $(window).outerHeight() - $('header').outerHeight() - $('.footer').outerHeight() - 100, 'overflow': 'hidden' }); backdrop.fadeOut(200); backdrop.remove(); wbox.addClass('panel-full-screen').css({ 'max-height': $(window).height(), 'overflow': 'auto' }); }); } }); $('.panel-tools .panel-close').bind('click', function (e) { $(this).parents(".panel").remove(); e.preventDefault(); }); $('.panel-tools .panel-refresh').bind('click', function (e) { var el = $(this).parents(".panel"); el.block({ overlayCSS: { backgroundColor: '#fff' }, message: ' Just a moment...', css: { border: 'none', color: '#333', background: 'none' } }); window.setTimeout(function () { el.unblock(); }, 1000); e.preventDefault(); }); $('.panel-tools .panel-collapse').bind('click', function (e) { e.preventDefault(); var el = jQuery(this).parent().closest(".panel").children(".panel-body"); if ($(this).hasClass("collapses")) { $(this).addClass("expand").removeClass("collapses"); el.slideUp(200); } else { $(this).addClass("collapses").removeClass("expand"); el.slideDown(200); } }); }; //function to activate the 3rd and 4th level menus var runNavigationMenu = function () { $('.main-navigation-menu li.active').addClass('open'); $('.main-navigation-menu > li a').bind('click', function () { if ($(this).parent().children('ul').hasClass('sub-menu') && ((!$('body').hasClass('navigation-small') || $windowWidth < 767) || !$(this).parent().parent().hasClass('main-navigation-menu'))) { if (!$(this).parent().hasClass('open')) { $(this).parent().addClass('open'); $(this).parent().parent().children('li.open').not($(this).parent()).not($('.main-navigation-menu > li.active')).removeClass('open').children('ul').slideUp(200); $(this).parent().children('ul').slideDown(200, function () { runContainerHeight(); }); } else { if (!$(this).parent().hasClass('active')) { $(this).parent().parent().children('li.open').not($('.main-navigation-menu > li.active')).removeClass('open').children('ul').slideUp(200, function () { runContainerHeight(); }); } else { $(this).parent().parent().children('li.open').removeClass('open').children('ul').slideUp(200, function () { runContainerHeight(); }); } } } }); }; //function to activate the Go-Top button var runGoTop = function () { $('.go-top').bind('click', function (e) { $("html, body").animate({ scrollTop: 0 }, "slow"); e.preventDefault(); }); }; //function to avoid closing the dropdown on click var runDropdownEnduring = function () { if ($('.dropdown-menu.dropdown-enduring').length) { $('.dropdown-menu.dropdown-enduring').click(function (event) { event.stopPropagation(); }); } }; //function to return the querystring parameter with a given name. var getParameterByName = function (name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }; //function to activate the iCheck Plugin var runCustomCheck = function () { if ($('input[type="checkbox"]').length || $('input[type="radio"]').length) { $('input[type="checkbox"].grey, input[type="radio"].grey').iCheck({ checkboxClass: 'icheckbox_minimal-grey', radioClass: 'iradio_minimal-grey', increaseArea: '10%' // optional }); $('input[type="checkbox"].red, input[type="radio"].red').iCheck({ checkboxClass: 'icheckbox_minimal-red', radioClass: 'iradio_minimal-red', increaseArea: '10%' // optional }); $('input[type="checkbox"].green, input[type="radio"].green').iCheck({ checkboxClass: 'icheckbox_minimal-green', radioClass: 'iradio_minimal-green', increaseArea: '10%' // optional }); $('input[type="checkbox"].teal, input[type="radio"].teal').iCheck({ checkboxClass: 'icheckbox_minimal-aero', radioClass: 'iradio_minimal-aero', increaseArea: '10%' // optional }); $('input[type="checkbox"].orange, input[type="radio"].orange').iCheck({ checkboxClass: 'icheckbox_minimal-orange', radioClass: 'iradio_minimal-orange', increaseArea: '10%' // optional }); $('input[type="checkbox"].purple, input[type="radio"].purple').iCheck({ checkboxClass: 'icheckbox_minimal-purple', radioClass: 'iradio_minimal-purple', increaseArea: '10%' // optional }); $('input[type="checkbox"].yellow, input[type="radio"].yellow').iCheck({ checkboxClass: 'icheckbox_minimal-yellow', radioClass: 'iradio_minimal-yellow', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-black, input[type="radio"].square-black').iCheck({ checkboxClass: 'icheckbox_square', radioClass: 'iradio_square', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-grey, input[type="radio"].square-grey').iCheck({ checkboxClass: 'icheckbox_square-grey', radioClass: 'iradio_square-grey', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-red, input[type="radio"].square-red').iCheck({ checkboxClass: 'icheckbox_square-red', radioClass: 'iradio_square-red', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-green, input[type="radio"].square-green').iCheck({ checkboxClass: 'icheckbox_square-green', radioClass: 'iradio_square-green', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-teal, input[type="radio"].square-teal').iCheck({ checkboxClass: 'icheckbox_square-aero', radioClass: 'iradio_square-aero', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-orange, input[type="radio"].square-orange').iCheck({ checkboxClass: 'icheckbox_square-orange', radioClass: 'iradio_square-orange', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-purple, input[type="radio"].square-purple').iCheck({ checkboxClass: 'icheckbox_square-purple', radioClass: 'iradio_square-purple', increaseArea: '10%' // optional }); $('input[type="checkbox"].square-yellow, input[type="radio"].square-yellow').iCheck({ checkboxClass: 'icheckbox_square-yellow', radioClass: 'iradio_square-yellow', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-black, input[type="radio"].flat-black').iCheck({ checkboxClass: 'icheckbox_flat', radioClass: 'iradio_flat', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-grey, input[type="radio"].flat-grey').iCheck({ checkboxClass: 'icheckbox_flat-grey', radioClass: 'iradio_flat-grey', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({ checkboxClass: 'icheckbox_flat-red', radioClass: 'iradio_flat-red', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-green, input[type="radio"].flat-green').iCheck({ checkboxClass: 'icheckbox_flat-green', radioClass: 'iradio_flat-green', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-teal, input[type="radio"].flat-teal').iCheck({ checkboxClass: 'icheckbox_flat-aero', radioClass: 'iradio_flat-aero', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-orange, input[type="radio"].flat-orange').iCheck({ checkboxClass: 'icheckbox_flat-orange', radioClass: 'iradio_flat-orange', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-purple, input[type="radio"].flat-purple').iCheck({ checkboxClass: 'icheckbox_flat-purple', radioClass: 'iradio_flat-purple', increaseArea: '10%' // optional }); $('input[type="checkbox"].flat-yellow, input[type="radio"].flat-yellow').iCheck({ checkboxClass: 'icheckbox_flat-yellow', radioClass: 'iradio_flat-yellow', increaseArea: '10%' // optional }); }; }; //Search Input function var runSearchInput = function () { var search_input = $('.sidebar-search input'); var search_button = $('.sidebar-search button'); var search_form = $('.sidebar-search'); search_input.attr('data-default', $(search_input).outerWidth()).focus(function () { $(this).animate({ width: 200 }, 200); }).blur(function () { if ($(this).val() == "") { if ($(this).hasClass('open')) { $(this).animate({ width: 0, opacity: 0 }, 200, function () { $(this).hide(); }); } else { $(this).animate({ width: $(this).attr('data-default') }, 200); } } }); search_button.bind('click', function () { if ($(search_input).is(':hidden')) { $(search_input).addClass('open').css({ width: 0, opacity: 0 }).show().animate({ width: 200, opacity: 1 }, 200).focus(); } else if ($(search_input).hasClass('open') && $(search_input).val() == '') { $(search_input).removeClass('open').animate({ width: 0, opacity: 0 }, 200, function () { $(this).hide(); }); } else if ($(search_input).val() != '') { return; } else $(search_input).focus(); return false; }); }; //Set of functions for Style Selector var runStyleSelector = function () { $('.style-toggle').bind('click', function () { if ($(this).hasClass('open')) { $(this).removeClass('open').addClass('close'); $('#style_selector_container').hide(); } else { $(this).removeClass('close').addClass('open'); $('#style_selector_container').show(); } }); setColorScheme(); setLayoutStyle(); setHeaderStyle(); setFooterStyle(); setBoxedBackgrounds(); }; $('.drop-down-wrapper').perfectScrollbar({ wheelSpeed: 50, minScrollbarLength: 20, suppressScrollX: true }); $('.navbar-tools .dropdown').on('shown.bs.dropdown', function () { $(this).find('.drop-down-wrapper').scrollTop(0).perfectScrollbar('update'); }); var setColorScheme = function () { $('.icons-color a').bind('click', function () { $('.icons-color img').each(function () { $(this).removeClass('active'); }); $(this).find('img').addClass('active'); if ($('#skin_color').attr("rel") == "stylesheet/less") { $('#skin_color').next('style').remove(); $('#skin_color').attr("rel", "stylesheet"); } $('#skin_color').attr("href", "assets/css/theme_" + $(this).attr('id') + ".css"); }); }; var setBoxedBackgrounds = function () { $('.boxed-patterns a').bind('click', function () { if ($('body').hasClass('layout-boxed')) { var classes = $('body').attr("class").split(" ").filter(function (item) { return item.indexOf("bg_style_") === -1 ? item : ""; }); $('body').attr("class", classes.join(" ")); $('.boxed-patterns img').each(function () { $(this).removeClass('active'); }); $(this).find('img').addClass('active'); $('body').addClass($(this).attr('id')); } else { alert('Select boxed layout'); } }); }; var setLayoutStyle = function () { $('select[name="layout"]').change(function () { if ($('select[name="layout"] option:selected').val() == 'boxed') $('body').addClass('layout-boxed'); else $('body').removeClass('layout-boxed'); }); }; var setHeaderStyle = function () { $('select[name="header"]').change(function () { if ($('select[name="header"] option:selected').val() == 'default') $('body').addClass('header-default'); else $('body').removeClass('header-default'); }); }; var setFooterStyle = function () { $('select[name="footer"]').change(function () { if ($('select[name="footer"] option:selected').val() == 'fixed') $('body').addClass('footer-fixed'); else $('body').removeClass('footer-fixed'); }); }; var runColorPalette = function () { if ($('.colorpalette').length) { $('.colorpalette').colorPalette().on('selectColor', function (e) { $(this).closest('ul').prev('a').children('i').css('background-color', e.color).end().closest('div').prev('input').val(e.color); runActivateLess(); }); }; }; //function to activate Less style var runActivateLess = function () { $(' .icons-color img').removeClass('active'); if ($('#skin_color').attr("rel") == "stylesheet") { $('#skin_color').attr("rel", "stylesheet/less").attr("href", "assets/less/styles.less"); less.sheets.push($('link#skin_color')[0]); less.refresh(); }; less.modifyVars({ '@base': $('.color-base').val(), '@text': $('.color-text').val(), '@badge': $('.color-badge').val() }); }; //Window Resize Function var runWIndowResize = function (func, threshold, execAsap) { //wait until the user is done resizing the window, then execute $(window).clipresize(function () { runElementsPosition(); }); }; //function to save user settings var runSaveSetting = function () { $('.save_style').bind('click', function () { var clipSetting = new Object; if ($('body').hasClass('rtl')) { clipSetting.rtl = true; } else { clipSetting.rtl = false; }; if ($('body').hasClass('layout-boxed')) { clipSetting.layoutBoxed = true; $("body[class]").filter(function () { var classNames = this.className.split(/\s+/); for (var i = 0; i < classNames.length; ++i) { if (classNames[i].substr(0, 9) === "bg_style_") { clipSetting.bgStyle = classNames[i]; } } }); } else { clipSetting.layoutBoxed = false; }; if ($('body').hasClass('header-default')) { clipSetting.headerDefault = true; } else { clipSetting.headerDefault = false; }; if ($('body').hasClass('footer-fixed')) { clipSetting.footerDefault = false; } else { clipSetting.footerDefault = true; }; if ($('#skin_color').attr('rel') == 'stylesheet') { clipSetting.useLess = false; } else if ($('#skin_color').attr('rel') == 'stylesheet/less') { clipSetting.useLess = true; clipSetting.baseColor = $('.color-base').val(); clipSetting.textColor = $('.color-text').val(); clipSetting.badgeColor = $('.color-badge').val(); }; clipSetting.skinClass = $('#skin_color').attr('href'); $.cookie("clip-setting", JSON.stringify(clipSetting)); var el = $('#style_selector_container'); el.block({ overlayCSS: { backgroundColor: '#fff' }, message: ' Just a moment...', css: { border: 'none', color: '#333', background: 'none' } }); window.setTimeout(function () { el.unblock(); }, 1000); }); }; //function to load user settings var runCustomSetting = function () { if ($.cookie("clip-setting")) { var loadSetting = jQuery.parseJSON($.cookie("clip-setting")); if (loadSetting.layoutBoxed) { $('body').addClass('layout-boxed'); $('#style_selector select[name="layout"]').find('option[value="boxed"]').attr('selected', 'true'); }; if (loadSetting.headerDefault) { $('body').addClass('header-default'); $('#style_selector select[name="header"]').find('option[value="default"]').attr('selected', 'true'); }; if (!loadSetting.footerDefault) { $('body').addClass('footer-fixed'); $('#style_selector select[name="footer"]').find('option[value="fixed"]').attr('selected', 'true'); }; if ($('#style_selector').length) { if (loadSetting.useLess) { $('.color-base').val(loadSetting.baseColor).next('.dropdown').find('i').css('background-color', loadSetting.baseColor); $('.color-text').val(loadSetting.textColor).next('.dropdown').find('i').css('background-color', loadSetting.textColor); $('.color-badge').val(loadSetting.badgeColor).next('.dropdown').find('i').css('background-color', loadSetting.badgeColor); runActivateLess(); } else { $('.color-base').val('#FFFFFF').next('.dropdown').find('i').css('background-color', '#FFFFFF'); $('.color-text').val('#555555').next('.dropdown').find('i').css('background-color', '#555555'); $('.color-badge').val('#007AFF').next('.dropdown').find('i').css('background-color', '#007AFF'); $('#skin_color').attr('href', loadSetting.skinClass); }; }; $('body').addClass(loadSetting.bgStyle); } else { runDefaultSetting(); }; }; //function to clear user settings var runClearSetting = function () { $('.clear_style').bind('click', function () { $.removeCookie("clip-setting"); $('body').removeClass("layout-boxed header-default footer-fixed"); $('body')[0].className = $('body')[0].className.replace(/\bbg_style_.*?\b/g, ''); if ($('#skin_color').attr("rel") == "stylesheet/less") { $('#skin_color').next('style').remove(); $('#skin_color').attr("rel", "stylesheet"); } $('.icons-color img').first().trigger('click'); runDefaultSetting(); }); }; //function to restore user settings var runDefaultSetting = function () { $('#style_selector select[name="layout"]').val('default'); $('#style_selector select[name="header"]').val('fixed'); $('#style_selector select[name="footer"]').val('default'); $(' .boxed-patterns img').removeClass('active'); $('.color-base').val('#FFFFFF').next('.dropdown').find('i').css('background-color', '#FFFFFF'); $('.color-text').val('#555555').next('.dropdown').find('i').css('background-color', '#555555'); $('.color-badge').val('#007AFF').next('.dropdown').find('i').css('background-color', '#007AFF'); }; return { //main function to initiate template pages init: function () { runWIndowResize(); runInit(); runStyleSelector(); runSearchInput(); runElementsPosition(); runToDoAction(); runNavigationToggler(); runNavigationMenu(); runGoTop(); runModuleTools(); runDropdownEnduring(); runTooltips(); runPopovers(); runPanelScroll(); runShowTab(); runAccordionFeatures(); runCustomCheck(); runColorPalette(); runSaveSetting(); runCustomSetting(); runClearSetting(); } }; }();PK!ui-nestable.jsnuIwvar UINestable = function () { //function to initiate jquery.nestable var updateOutput = function (e) { var list = e.length ? e : $(e.target), output = list.data('output'); if (window.JSON) { output.val(window.JSON.stringify(list.nestable('serialize'))); //, null, 2)); } else { output.val('JSON browser support required for this demo.'); } }; var runNestable = function () { // activate Nestable for list 1 $('#nestable').nestable({ group: 1 }).on('change', updateOutput); // activate Nestable for list 2 $('#nestable2').nestable({ group: 1 }).on('change', updateOutput); // output initial serialised data updateOutput($('#nestable').data('output', $('#nestable-output'))); updateOutput($('#nestable2').data('output', $('#nestable2-output'))); $('#nestable-menu').on('click', function (e) { var target = $(e.target), action = target.data('action'); if (action === 'expand-all') { $('.dd').nestable('expandAll'); } if (action === 'collapse-all') { $('.dd').nestable('collapseAll'); } }); $('#nestable3').nestable(); }; return { //main function to initiate template pages init: function () { runNestable(); } }; }();PK!;x! ui-sliders.jsnuIwvar UISliders = function () { //function to initiate jQRangeSlider var runRangeSliders = function () { //jQRangeSlider is highly dependant on CSS. Be sure to include one of the provided stylesheets. $("#slider_example_1").rangeSlider(); $("#slider_example_2").editRangeSlider(); $("#slider_example_3").dateRangeSlider({ bounds: { min: new Date(2013, 0, 1), max: new Date(2014, 11, 31) }, defaultValues: { min: new Date(2013, 2, 1), max: new Date(2014, 2, 31) } }); $("#slider_example_4").rangeSlider({ valueLabels: "change", delayOut: 1000 }); $("#slider_example_5").rangeSlider({ valueLabels: "change", durationIn: 1000, durationOut: 1000 }); $("#slider_example_6").rangeSlider({ enabled: false }); $("#slider_example_7").rangeSlider({ range: { min: 10, max: 40 } }); $("#slider_example_8").rangeSlider({ step: 10 }); }; //function to initiate jQuery Knob var runKnob = function () { $(".knob").knob({ draw: function () { // "tron" case if (this.$.data('skin') == 'tron') { var a = this.angle(this.cv) // Angle , sa = this.startAngle // Previous start angle , sat = this.startAngle // Start angle , ea // Previous end angle , eat = sat + a // End angle , r = true; this.g.lineWidth = this.lineWidth; this.o.cursor && (sat = eat - 0.3) && (eat = eat + 0.3); if (this.o.displayPrevious) { ea = this.startAngle + this.angle(this.value); this.o.cursor && (sa = ea - 0.3) && (ea = ea + 0.3); this.g.beginPath(); this.g.strokeStyle = this.previousColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false); this.g.stroke(); } this.g.beginPath(); this.g.strokeStyle = r ? this.o.fgColor : this.fgColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false); this.g.stroke(); this.g.lineWidth = 2; this.g.beginPath(); this.g.strokeStyle = this.o.fgColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); this.g.stroke(); return false; } } }); // Example of infinite knob, iPod click wheel var v, up = 0, down = 0, i = 0, $idir = $("div.idir"), $ival = $("div.ival"), incr = function () { i++; $idir.show().html("+").fadeOut(); $ival.html(i); }, decr = function () { i--; $idir.show().html("-").fadeOut(); $ival.html(i); }; $("input.infinite").knob({ min: 0, max: 20, stopper: false, change: function () { if (v > this.cv) { if (up) { decr(); up = 0; } else { up = 1; down = 0; } } else { if (v < this.cv) { if (down) { incr(); down = 0; } else { down = 1; up = 0; } } } v = this.cv; } }); }; return { init: function () { runRangeSliders(); runKnob(); } }; }();PK!ui-animation.jsnuIwvar Animation = function () { //function to initiate CSS3 Animation var runAnimation = function () { /* ENTRANCES */ $('.animation-buttons .btn').click(function (e) { e.preventDefault(); }); $('#slideUpBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("slideUp"); }); }); $('#slideDownBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("slideDown"); }); }); $('#slideLeftBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("slideLeft"); }); }); $('#slideRightBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("slideRight"); }); }); $('#slideExpandUpBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("slideExpandUp"); }); }); $('#expandUpBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("expandUp"); }); }); $('#fadeInBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("fadeIn"); }); }); $('#expandOpenBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("expandOpen"); }); }); $('#bigEntranceBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("bigEntrance"); }); }); $('#hatchBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("hatch"); }); }); /* MISC */ $('#bounceBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("bounce"); }); }); $('#pulseBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("pulse"); }); }); $('#floatBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("floating"); }); }); $('#tossingBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("tossing"); }); }); $('#pullUpBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("pullUp"); }); }); $('#pullDownBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("pullDown"); }); }); $('#stretchLeftBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("stretchLeft"); }); }); $('#stretchRightBtn').click(function () { $(this).each(function () { $('#object').removeClass(); $('#object').addClass("stretchRight"); }); }); }; return { init: function () { runAnimation(); } }; }();PK!b8%%pages-user-profile.jsnuIwvar PagesUserProfile = function () { //function to initiate Pulsate var runPulsate = function () { $('.pulsate').pulsate({ color: '#C43C35', // set the color of the pulse reach: 20, // how far the pulse goes in px speed: 1000, // how long one pulse takes in ms pause: 0, // how long the pause between pulses is in ms glow: true, // if the glow should be shown too repeat: 3, // will repeat forever if true, if given a number will repeat for that many times onHover: false // if true only pulsate if user hovers over the element }); }; return { //main function to initiate template pages init: function () { runPulsate(); } }; }();PK!/2YY charts.jsnuIwvar Charts = function () { //function to initiate jQRangeSlider //There are plenty of options you can set to control the precise looks of your plot. //You can control the ticks on the axes, the legend, the graph type, etc. //For more information, please visit http://www.flotcharts.org/ var runCharts = function () { // Basic Chart var d1 = []; for (var i = 0; i < Math.PI * 2; i += 0.25) { d1.push([i, Math.sin(i)]); } var d2 = []; for (var i = 0; i < Math.PI * 2; i += 0.25) { d2.push([i, Math.cos(i)]); } var d3 = []; for (var i = 0; i < Math.PI * 2; i += 0.1) { d3.push([i, Math.tan(i)]); } $.plot("#placeholder", [{ label: "sin(x)", data: d1 }, { label: "cos(x)", data: d2 }, { label: "tan(x)", data: d3 }], { series: { lines: { show: true }, points: { show: true } }, xaxis: { ticks: [0, [Math.PI / 2, "\u03c0/2"], [Math.PI, "\u03c0"], [Math.PI * 3 / 2, "3\u03c0/2"], [Math.PI * 2, "2\u03c0"] ] }, yaxis: { ticks: 10, min: -2, max: 2, tickDecimals: 3 }, grid: { backgroundColor: { colors: ["#fff", "#eee"] }, borderWidth: { top: 1, right: 1, bottom: 2, left: 2 } } }); // Toggling Series var datasets = { "usa": { label: "USA", data: [ [1988, 483994], [1989, 479060], [1990, 457648], [1991, 401949], [1992, 424705], [1993, 402375], [1994, 377867], [1995, 357382], [1996, 337946], [1997, 336185], [1998, 328611], [1999, 329421], [2000, 342172], [2001, 344932], [2002, 387303], [2003, 440813], [2004, 480451], [2005, 504638], [2006, 528692] ] }, "russia": { label: "Russia", data: [ [1988, 218000], [1989, 203000], [1990, 171000], [1992, 42500], [1993, 37600], [1994, 36600], [1995, 21700], [1996, 19200], [1997, 21300], [1998, 13600], [1999, 14000], [2000, 19100], [2001, 21300], [2002, 23600], [2003, 25100], [2004, 26100], [2005, 31100], [2006, 34700] ] }, "uk": { label: "UK", data: [ [1988, 62982], [1989, 62027], [1990, 60696], [1991, 62348], [1992, 58560], [1993, 56393], [1994, 54579], [1995, 50818], [1996, 50554], [1997, 48276], [1998, 47691], [1999, 47529], [2000, 47778], [2001, 48760], [2002, 50949], [2003, 57452], [2004, 60234], [2005, 60076], [2006, 59213] ] }, "germany": { label: "Germany", data: [ [1988, 55627], [1989, 55475], [1990, 58464], [1991, 55134], [1992, 52436], [1993, 47139], [1994, 43962], [1995, 43238], [1996, 42395], [1997, 40854], [1998, 40993], [1999, 41822], [2000, 41147], [2001, 40474], [2002, 40604], [2003, 40044], [2004, 38816], [2005, 38060], [2006, 36984] ] }, "denmark": { label: "Denmark", data: [ [1988, 3813], [1989, 3719], [1990, 3722], [1991, 3789], [1992, 3720], [1993, 3730], [1994, 3636], [1995, 3598], [1996, 3610], [1997, 3655], [1998, 3695], [1999, 3673], [2000, 3553], [2001, 3774], [2002, 3728], [2003, 3618], [2004, 3638], [2005, 3467], [2006, 3770] ] }, "sweden": { label: "Sweden", data: [ [1988, 6402], [1989, 6474], [1990, 6605], [1991, 6209], [1992, 6035], [1993, 6020], [1994, 6000], [1995, 6018], [1996, 3958], [1997, 5780], [1998, 5954], [1999, 6178], [2000, 6411], [2001, 5993], [2002, 5833], [2003, 5791], [2004, 5450], [2005, 5521], [2006, 5271] ] }, "norway": { label: "Norway", data: [ [1988, 4382], [1989, 4498], [1990, 4535], [1991, 4398], [1992, 4766], [1993, 4441], [1994, 4670], [1995, 4217], [1996, 4275], [1997, 4203], [1998, 4482], [1999, 4506], [2000, 4358], [2001, 4385], [2002, 5269], [2003, 5066], [2004, 5194], [2005, 4887], [2006, 4891] ] } }; // hard-code color indices to prevent them from shifting as // countries are turned on/off var i = 0; $.each(datasets, function (key, val) { val.color = i; ++i; }); // insert checkboxes var choiceContainer = $("#choices"); $.each(datasets, function (key, val) { choiceContainer.append(""); }); choiceContainer.find("input").iCheck({ checkboxClass: 'icheckbox_minimal-grey', radioClass: 'iradio_minimal-grey', increaseArea: '10%' // optional }).on('ifClicked', function (event) { $(this).iCheck('toggle'); plotAccordingToChoices(); }); function plotAccordingToChoices() { var data = []; choiceContainer.find("input:checked").each(function () { var key = $(this).attr("name"); if (key && datasets[key]) { data.push(datasets[key]); } }); if (data.length > 0) { $.plot("#placeholder2", data, { yaxis: { min: 0 }, xaxis: { tickDecimals: 0 } }); } } plotAccordingToChoices(); // Interactivity function randValue() { return (Math.floor(Math.random() * (1 + 40 - 20))) + 20; } var pageviews = [ [1, randValue()], [2, randValue()], [3, 2 + randValue()], [4, 3 + randValue()], [5, 5 + randValue()], [6, 10 + randValue()], [7, 15 + randValue()], [8, 20 + randValue()], [9, 25 + randValue()], [10, 30 + randValue()], [11, 35 + randValue()], [12, 25 + randValue()], [13, 15 + randValue()], [14, 20 + randValue()], [15, 45 + randValue()], [16, 50 + randValue()], [17, 65 + randValue()], [18, 70 + randValue()], [19, 85 + randValue()], [20, 80 + randValue()], [21, 75 + randValue()], [22, 80 + randValue()], [23, 75 + randValue()], [24, 70 + randValue()], [25, 65 + randValue()], [26, 75 + randValue()], [27, 80 + randValue()], [28, 85 + randValue()], [29, 90 + randValue()], [30, 95 + randValue()] ]; var visitors = [ [1, randValue() - 5], [2, randValue() - 5], [3, randValue() - 5], [4, 6 + randValue()], [5, 5 + randValue()], [6, 20 + randValue()], [7, 25 + randValue()], [8, 36 + randValue()], [9, 26 + randValue()], [10, 38 + randValue()], [11, 39 + randValue()], [12, 50 + randValue()], [13, 51 + randValue()], [14, 12 + randValue()], [15, 13 + randValue()], [16, 14 + randValue()], [17, 15 + randValue()], [18, 15 + randValue()], [19, 16 + randValue()], [20, 17 + randValue()], [21, 18 + randValue()], [22, 19 + randValue()], [23, 20 + randValue()], [24, 21 + randValue()], [25, 14 + randValue()], [26, 24 + randValue()], [27, 25 + randValue()], [28, 26 + randValue()], [29, 27 + randValue()], [30, 31 + randValue()] ]; var plot = $.plot($("#placeholder3"), [{ data: pageviews, label: "Unique Visits" }, { data: visitors, label: "Page Views" }], { series: { lines: { show: true, lineWidth: 2, fill: true, fillColor: { colors: [{ opacity: 0.05 }, { opacity: 0.01 }] } }, points: { show: true }, shadowSize: 2 }, grid: { hoverable: true, clickable: true, tickColor: "#eee", borderWidth: 0 }, colors: ["#d12610", "#37b7f3", "#52e136"], xaxis: { ticks: 11, tickDecimals: 0 }, yaxis: { ticks: 11, tickDecimals: 0 } }); function showTooltip(x, y, contents) { $('
' + contents + '
').css({ position: 'absolute', display: 'none', top: y + 5, left: x + 15, border: '1px solid #333', padding: '4px', color: '#fff', 'border-radius': '3px', 'background-color': '#333', opacity: 0.80 }).appendTo("body").fadeIn(200); } var previousPoint = null; $("#placeholder3").bind("plothover", function (event, pos, item) { $("#x").text(pos.x.toFixed(2)); $("#y").text(pos.y.toFixed(2)); if (item) { if (previousPoint != item.dataIndex) { previousPoint = item.dataIndex; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); showTooltip(item.pageX, item.pageY, item.series.label + " of " + x + " = " + y); } } else { $("#tooltip").remove(); previousPoint = null; } }); //Real Time // We use an inline data source in the example, usually data would // be fetched from a server var data = [], totalPoints = 300; function getRandomData() { if (data.length > 0) data = data.slice(1); // Do a random walk while (data.length < totalPoints) { var prev = data.length > 0 ? data[data.length - 1] : 50, y = prev + Math.random() * 10 - 5; if (y < 0) { y = 0; } else if (y > 100) { y = 100; } data.push(y); } // Zip the generated y values with the x values var res = []; for (var i = 0; i < data.length; ++i) { res.push([i, data[i]]); } return res; } // Set up the control widget var updateInterval = 30; $("#updateInterval").val(updateInterval).change(function () { var v = $(this).val(); if (v && !isNaN(+v)) { updateInterval = +v; if (updateInterval < 1) { updateInterval = 1; } else if (updateInterval > 2000) { updateInterval = 2000; } $(this).val("" + updateInterval); } }); var plot = $.plot("#placeholder4", [getRandomData()], { series: { shadowSize: 0 // Drawing is faster without shadows }, yaxis: { min: 0, max: 100 }, xaxis: { show: false } }); function update() { plot.setData([getRandomData()]); // Since the axes don't change, we don't need to call plot.setupGrid() plot.draw(); setTimeout(update, updateInterval); } update(); //Categories var data_category = [ ["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9] ]; $.plot("#placeholder5", [data_category], { series: { bars: { show: true, barWidth: 0.6, align: "center", fillColor: "#4DBEF4", lineWidth: 0, } }, xaxis: { mode: "categories", tickLength: 0 } }); // Annotations var d_1 = []; for (var i = 0; i < 20; ++i) { d_1.push([i, Math.sin(i)]); } var data_annotation = [{ data: d_1, label: "Pressure", color: "#333" }]; var markings = [{ color: "#f6f6f6", yaxis: { from: 1 } }, { color: "#f6f6f6", yaxis: { to: -1 } }, { color: "#000", lineWidth: 1, xaxis: { from: 2, to: 2 } }, { color: "#000", lineWidth: 1, xaxis: { from: 8, to: 8 } }]; var placeholder = $("#placeholder6"); var plot_annotation = $.plot(placeholder, data_annotation, { bars: { show: true, barWidth: 0.5, fill: 0.9 }, xaxis: { ticks: [], autoscaleMargin: 0.02 }, yaxis: { min: -2, max: 2 }, grid: { markings: markings } }); var o = plot_annotation.pointOffset({ x: 2, y: -1.2 }); // Append it to the placeholder that Flot already uses for positioning placeholder.append("
Warming up
"); o = plot_annotation.pointOffset({ x: 8, y: -1.2 }); placeholder.append("
Actual measurements
"); // Draw a little arrow on top of the last label to demonstrate canvas // drawing var ctx = plot_annotation.getCanvas().getContext("2d"); ctx.beginPath(); o.left += 4; ctx.moveTo(o.left, o.top); ctx.lineTo(o.left, o.top - 10); ctx.lineTo(o.left + 10, o.top - 5); ctx.lineTo(o.left, o.top); ctx.fillStyle = "#000"; ctx.fill(); // Default Pie var data_pie = [], series = Math.floor(Math.random() * 6) + 3; for (var i = 0; i < series; i++) { data_pie[i] = { label: "Series" + (i + 1), data: Math.floor(Math.random() * 100) + 1 }; } $.plot('#placeholder7', data_pie, { series: { pie: { show: true } } }); // Label Formatter $.plot('#placeholder8', data_pie, { series: { pie: { show: true, radius: 1, label: { show: true, radius: 1, formatter: labelFormatter, background: { opacity: 0.8 } } } }, legend: { show: false } }); // Label Style $.plot('#placeholder9', data_pie, { series: { pie: { show: true, radius: 1, label: { show: true, radius: 3 / 4, formatter: labelFormatter, background: { opacity: 0.5, color: '#000' } } } }, legend: { show: false } }); // Rectangular Pie $.plot('#placeholder10', data_pie, { series: { pie: { show: true, radius: 500, label: { show: true, formatter: labelFormatter, threshold: 0.1 } } }, legend: { show: false } }); // Tilted Pie $.plot('#placeholder11', data_pie, { series: { pie: { show: true, radius: 1, tilt: 0.5, label: { show: true, radius: 1, formatter: labelFormatter, background: { opacity: 0.8 } }, combine: { color: '#999', threshold: 0.1 } } }, legend: { show: false } }); // Interactivity Pie $.plot('#placeholder12', data_pie, { series: { pie: { show: true } }, grid: { hoverable: true, clickable: true } }); $("#placeholder12").bind("plotclick", function (event, pos, obj) { if (!obj) { return; } percent = parseFloat(obj.series.percent).toFixed(2); alert("" + obj.series.label + ": " + percent + "%"); }); function labelFormatter(label, series) { return "
" + label + "
" + Math.round(series.percent) + "%
"; } }; return { //main function to initiate template pages init: function () { runCharts(); } }; }();PK!5 table-data.jsnuIwvar TableData = function () { //function to initiate DataTable //DataTable is a highly flexible tool, based upon the foundations of progressive enhancement, //which will add advanced interaction controls to any HTML table //For more information, please visit https://datatables.net/ var runDataTable = function () { var oTable = $('#sample_1').dataTable({ "aoColumnDefs": [{ "aTargets": [0] }], "oLanguage": { "sLengthMenu": "Show _MENU_ Rows", "sSearch": "", "oPaginate": { "sPrevious": "", "sNext": "" } }, "aaSorting": [ [1, 'asc'] ], "aLengthMenu": [ [5, 10, 15, 20, -1], [5, 10, 15, 20, "All"] // change per page values here ], // set the initial value "iDisplayLength": 10, }); $('#sample_1_wrapper .dataTables_filter input').addClass("form-control input-sm").attr("placeholder", "Search"); // modify table search input $('#sample_1_wrapper .dataTables_length select').addClass("m-wrap small"); // modify table per page dropdown $('#sample_1_wrapper .dataTables_length select').select2(); // initialzie select2 dropdown $('#sample_1_column_toggler input[type="checkbox"]').change(function () { /* Get the DataTables object again - this is not a recreation, just a get of the object */ var iCol = parseInt($(this).attr("data-column")); var bVis = oTable.fnSettings().aoColumns[iCol].bVisible; oTable.fnSetColumnVis(iCol, (bVis ? false : true)); }); }; return { //main function to initiate template pages init: function () { runDataTable(); } }; }();PK!l9 ui-buttons.jsnuIwvar UIButtons = function () { //function to initiate LaddaButtons var runLeddaButtons = function () { // Bind normal buttons Ladda.bind('.ladda-button', { timeout: 2000 }); // Bind progress buttons and simulate loading progress Ladda.bind('.progress-demo 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); } }); // You can control loading explicitly using the JavaScript API // as outlined below: // var l = Ladda.create( document.querySelector( 'button' ) ); // l.start(); // l.stop(); // l.toggle(); // l.isLoading(); // l.setProgress( 0-1 ); }; return { //main function to initiate template pages init: function () { runLeddaButtons(); } }; }();PK!*utility-error404.jsnuIwvar Error404 = function () { //function to initiate RainyDay var getURLParameter = function (name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null; }; var runRainyDay = function () { var image = document.getElementById('background'); image.onload = function () { var engine = new RainyDay('canvas', 'background', window.innerWidth, window.innerHeight, 1, getURLParameter("blur") || 20); var preset = 3 || 1; if (preset == 1) { engine.gravity = engine.GRAVITY_NON_LINEAR; engine.trail = engine.TRAIL_DROPS; engine.rain([engine.preset(3, 3, 0.88), engine.preset(5, 5, 0.9), engine.preset(6, 2, 1)], 100); } else if (preset == 2) { engine.gravity = engine.GRAVITY_NON_LINEAR; engine.trail = engine.TRAIL_DROPS; engine.VARIABLE_GRAVITY_ANGLE = Math.PI / 8; engine.rain([engine.preset(0, 2, 0.5), engine.preset(4, 4, 1)], 50); } else if (preset == 3) { engine.gravity = engine.GRAVITY_NON_LINEAR; engine.trail = engine.TRAIL_SMUDGE; engine.rain([engine.preset(0, 2, 0.5), engine.preset(4, 4, 1)], 50); } }; image.crossOrigin = "anonymous"; image.src = "assets/images/back-error-page.jpg"; }; return { //main function to initiate template pages init: function () { runRainyDay(); } }; }();PK!Okz!!ui-treeview.jsnuIwvar UITreeview = function () { //function to initiate jquery.dynatree var runTreeView = function () { //Default Tree $("#tree").dynatree({ // using default options }); //Init from JS object $("#tree2").dynatree({ onActivate: function (node) { // A DynaTreeNode object is passed to the activation handler // Note: we also get this event, if persistence is on, and the page is reloaded. alert("You activated " + node.data.title); }, children: [{ title: "Item 1" }, { title: "Folder 2", isFolder: true, key: "folder2", children: [{ title: "Sub-item 2.1" }, { title: "Sub-item 2.2" }] }, { title: "Item 3" }] }); //External data $("#tree3").dynatree({ // In real life we would call a URL on the server like this: // initAjax: { // url: "/getTopLevelNodesAsJson", // data: { mode: "funnyMode" } // }, // .. but here we use a local file instead: initAjax: { url: "assets/plugins/dynatree/tests/sample-data1.json" }, onActivate: function (node) { $("#echoActive").text(node.data.title); }, onDeactivate: function (node) { $("#echoActive").text("-"); } }); var treeData = [{ title: "item1 with key and tooltip", tooltip: "Look, a tool tip!" }, { title: "item2: selected on init", }, { title: "Folder", isFolder: true, key: "id3", children: [{ title: "Sub-item 3.1", children: [{ title: "Sub-item 3.1.1", key: "id3.1.1" }, { title: "Sub-item 3.1.2", key: "id3.1.2" }] }, { title: "Sub-item 3.2", children: [{ title: "Sub-item 3.2.1", key: "id3.2.1" }, { title: "Sub-item 3.2.2", key: "id3.2.2" }] }] }, { title: "Document with some children (expanded on init)", key: "id4", children: [{ title: "Sub-item 4.1 (active on init)", activate: true, children: [{ title: "Sub-item 4.1.1", key: "id4.1.1" }, { title: "Sub-item 4.1.2", key: "id4.1.2" }] }, { title: "Sub-item 4.2 (selected on init)", select: true, children: [{ title: "Sub-item 4.2.1", key: "id4.2.1" }, { title: "Sub-item 4.2.2", key: "id4.2.2" }] }, { title: "Sub-item 4.3 (hideCheckbox)", hideCheckbox: true }, { title: "Sub-item 4.4 (unselectable)", unselectable: true }] }]; //Checkbox $("#tree4").dynatree({ checkbox: true, // Override class name for checkbox icon: classNames: { checkbox: "dynatree-radio" }, selectMode: 1, children: treeData, onActivate: function (node) { $("#echoActive1").text(node.data.title); }, onSelect: function (select, node) { // Display list of selected nodes var s = node.tree.getSelectedNodes().join(", "); $("#echoSelection1").text(s); }, onDblClick: function (node, event) { node.toggleSelect(); }, onKeydown: function (node, event) { if (event.which == 32) { node.toggleSelect(); return false; } }, // The following options are only required, if we have more than one tree on one page: // initId: "treeData", cookieId: "dynatree-Cb1", idPrefix: "dynatree-Cb1-" }); //Multi-Selection $("#tree5").dynatree({ checkbox: true, selectMode: 2, children: treeData, onSelect: function (select, node) { // Display list of selected nodes var selNodes = node.tree.getSelectedNodes(); // convert to title/key array var selKeys = $.map(selNodes, function (node) { return "[" + node.data.key + "]: '" + node.data.title + "'"; }); $("#echoSelection3").text(selKeys.join(", ")); }, onClick: function (node, event) { // We should not toggle, if target was "checkbox", because this // would result in double-toggle (i.e. no toggle) if (node.getEventTargetType(event) == "title") node.toggleSelect(); }, onKeydown: function (node, event) { if (event.which == 32) { node.toggleSelect(); return false; } }, // The following options are only required, if we have more than one tree on one page: cookieId: "dynatree-Cb2", idPrefix: "dynatree-Cb2-" }); // Drag-and-drop $("#tree6").dynatree({ initAjax: { url: "assets/plugins/dynatree/tests/sample-data1.json" }, onLazyRead: function (node) { // Mockup a slow reqeuest ... node.appendAjax({ url: "sample-data2.json", debugLazyDelay: 750 // don't do this in production code }); }, dnd: { preventVoidMoves: true, // Prevent dropping nodes 'before self', etc. onDragStart: function (node) { /** This function MUST be defined to enable dragging for the tree. * Return false to cancel dragging of node. */ return true; }, onDragEnter: function (node, sourceNode) { /** sourceNode may be null for non-dynatree droppables. * Return false to disallow dropping on node. In this case * onDragOver and onDragLeave are not called. * Return 'over', 'before, or 'after' to force a hitMode. * Return ['before', 'after'] to restrict available hitModes. * Any other return value will calc the hitMode from the cursor position. */ // Prevent dropping a parent below another parent (only sort // nodes under the same parent) if (node.parent !== sourceNode.parent) { return false; } // Don't allow dropping *over* a node (would create a child) return ["before", "after"]; }, onDrop: function (node, sourceNode, hitMode, ui, draggable) { /** This function MUST be defined to enable dropping of items on * the tree. */ sourceNode.move(node, hitMode); } } }); }; return { //main function to initiate template pages init: function () { runTreeView(); } }; }();PK!Ebzzform-wizard.jsnuIwvar FormWizard = function () { var wizardContent = $('#wizard'); var wizardForm = $('#form'); var initWizard = function () { // function to initiate Wizard Form wizardContent.smartWizard({ selected: 0, keyNavigation: false, onLeaveStep: leaveAStepCallback, onShowStep: onShowStep, }); var numberOfSteps = 0; animateBar(); initValidator(); }; var animateBar = function (val) { if ((typeof val == 'undefined') || val == "") { val = 1; }; numberOfSteps = $('.swMain > ul > li').length; var valueNow = Math.floor(100 / numberOfSteps * val); $('.step-bar').css('width', valueNow + '%'); }; var initValidator = function () { $.validator.addMethod("cardExpiry", function () { //if all values are selected if ($("#card_expiry_mm").val() != "" && $("#card_expiry_yyyy").val() != "") { return true; } else { return false; } }, 'Please select a month and year'); $.validator.setDefaults({ errorElement: "span", // contain the error msg in a span tag errorClass: 'help-block', errorPlacement: function (error, element) { // render error placement for each input type if (element.attr("type") == "radio" || element.attr("type") == "checkbox") { // for chosen elements, need to insert the error after the chosen container error.insertAfter($(element).closest('.form-group').children('div').children().last()); } else if (element.attr("name") == "card_expiry_mm" || element.attr("name") == "card_expiry_yyyy") { error.appendTo($(element).closest('.form-group').children('div')); } else { error.insertAfter(element); // for other inputs, just perform default behavior } }, ignore: ':hidden', rules: { username: { minlength: 2, required: true }, email: { required: true, email: true }, password: { minlength: 6, required: true }, password_again: { required: true, minlength: 5, equalTo: "#password" }, full_name: { required: true, minlength: 2, }, phone: { required: true }, gender: { required: true }, address: { required: true }, city: { required: true }, country: { required: true }, card_name: { required: true }, card_number: { minlength: 16, maxlength: 16, required: true }, card_cvc: { digits: true, required: true, minlength: 3, maxlength: 4 }, card_expiry_yyyy: "cardExpiry", payment: { required: true, minlength: 1 } }, messages: { firstname: "Please specify your first name" }, highlight: function (element) { $(element).closest('.help-block').removeClass('valid'); // display OK icon $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); // add the Bootstrap error class to the control group }, unhighlight: function (element) { // revert the change done by hightlight $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group }, success: function (label, element) { label.addClass('help-block valid'); // mark the current input as valid and display OK icon $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); } }); }; var displayConfirm = function () { $('.display-value', form).each(function () { var input = $('[name="' + $(this).attr("data-display") + '"]', form); if (input.attr("type") == "text" || input.attr("type") == "email" || input.is("textarea")) { $(this).html(input.val()); } else if (input.is("select")) { $(this).html(input.find('option:selected').text()); } else if (input.is(":radio") || input.is(":checkbox")) { $(this).html(input.filter(":checked").closest('label').text()); } else if ($(this).attr("data-display") == 'card_expiry') { $(this).html($('[name="card_expiry_mm"]', form).val() + '/' + $('[name="card_expiry_yyyy"]', form).val()); } }); }; var onShowStep = function (obj, context) { $(".next-step").unbind("click").click(function (e) { e.preventDefault(); wizardContent.smartWizard("goForward"); }); $(".back-step").unbind("click").click(function (e) { e.preventDefault(); wizardContent.smartWizard("goBackward"); }); $(".finish-step").unbind("click").click(function (e) { e.preventDefault(); onFinish(obj, context); }); }; var leaveAStepCallback = function (obj, context) { return validateSteps(context.fromStep, context.toStep); // return false to stay on step and true to continue navigation }; var onFinish = function (obj, context) { if (validateAllSteps()) { alert('form submit function'); $('.anchor').children("li").last().children("a").removeClass('wait').removeClass('selected').addClass('done'); //wizardForm.submit(); } }; var validateSteps = function (stepnumber, nextstep) { var isStepValid = false; if (numberOfSteps > nextstep && nextstep > stepnumber) { // cache the form element selector if (wizardForm.valid()) { // validate the form wizardForm.validate().focusInvalid(); $('.anchor').children("li:nth-child(" + stepnumber + ")").children("a").removeClass('wait'); //focus the invalid fields animateBar(nextstep); isStepValid = true; return true; }; } else if (nextstep < stepnumber) { $('.anchor').children("li:nth-child(" + stepnumber + ")").children("a").addClass('wait'); animateBar(nextstep); return true; } else { $('.anchor').children("li:nth-child(" + stepnumber + ")").children("a").removeClass('wait'); displayConfirm(); animateBar(nextstep); return true; }; }; var validateAllSteps = function () { var isStepValid = true; // all step validation logic return isStepValid; }; return { init: function () { initWizard(); } }; }();PK!ǘL& ui-modals.jsnuIwvar UIModals = function () { //function to initiate bootstrap extended modals var initModals = function () { $.fn.modalmanager.defaults.resize = true; $.fn.modal.defaults.spinner = $.fn.modalmanager.defaults.spinner = '
' + '
' + '
' + '
' + '
'; var $modal = $('#ajax-modal'); $('.ajax .demo').on('click', function () { // create the backdrop and wait for next modal to be triggered $('body').modalmanager('loading'); setTimeout(function () { $modal.load('modal_ajax_test.html', '', function () { $modal.modal(); }); }, 1000); }); $modal.on('click', '.update', function () { $modal.modal('loading'); setTimeout(function () { $modal .modal('loading') .find('.modal-body') .prepend('
' + 'Updated!' + '
'); }, 1000); }); }; return { init: function () { initModals(); } }; }();PK!Թ))ui-elements.jsnuIwvar UIElements = function () { //function to initiate bootstrap-paginator var runPaginator = function () { $('#paginator-example-1').bootstrapPaginator({ bootstrapMajorVersion: 3, currentPage: 3, totalPages: 10, onPageClicked: function (e, originalEvent, type, page) { $('#paginator-content-1').text("Page item clicked, type: " + type + " page: " + page); } }); $('#paginator-example-2').bootstrapPaginator({ bootstrapMajorVersion: 3, currentPage: 3, totalPages: 10, onPageChanged: function (e, oldPage, newPage) { $('#paginator-content-2').text("Current page changed, old: " + oldPage + " new: " + newPage); } }); $('#paginator-changed-select').change(function () { var page = $(this).val(); $('#paginator-example-2').bootstrapPaginator("show", page); }); }; //function to initiate jQuery.pulsate var runPulsate = function () { $('#pulsate-regular').pulsate({ color: '#C43C35', // set the color of the pulse reach: 20, // how far the pulse goes in px speed: 1000, // how long one pulse takes in ms pause: 0, // how long the pause between pulses is in ms glow: true, // if the glow should be shown too repeat: true, // will repeat forever if true, if given a number will repeat for that many times onHover: false // if true only pulsate if user hovers over the element }); }; //function to initiate jquery.gritter var runGritterNotification = function () { $.extend($.gritter.options, { class_name: 'gritter-light', // for light notifications (can be added directly to $.gritter.add too) position: 'top-right', // possibilities: bottom-left, bottom-right, top-left, top-right fade_in_speed: 100, // how fast notifications fade in (string or int) fade_out_speed: 100, // how fast the notices fade out time: 3000 // hang on the screen for... }); $('#add-sticky').click(function () { var unique_id = $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a sticky notice!', // (string | mandatory) the text inside the notification text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', // (string | optional) the image to display on the left image: 'assets/images/avatar-1.jpg', // (bool | optional) if you want it to fade out on its own or just sit there sticky: true, // (int | optional) the time you want it to be alive for before fading out time: '', // (string | optional) the class name you want to apply to that specific message class_name: 'my-sticky-class' }); // You can have it return a unique id, this can be used to manually remove it later using /* setTimeout(function(){ $.gritter.remove(unique_id, { fade: true, speed: 'slow' }); }, 6000) */ return false; }); $('#add-regular').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a regular notice!', // (string | mandatory) the text inside the notification text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', // (string | optional) the image to display on the left image: 'assets/images/avatar-2.jpg', // (bool | optional) if you want it to fade out on its own or just sit there sticky: false, // (int | optional) the time you want it to be alive for before fading out time: '' }); return false; }); $('#add-max').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a notice with a max of 3 on screen at one time!', // (string | mandatory) the text inside the notification text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', // (string | optional) the image to display on the left image: 'http://a0.twimg.com/profile_images/59268975/jquery_avatar_bigger.png', // (bool | optional) if you want it to fade out on its own or just sit there sticky: false, // (function) before the gritter notice is opened before_open: function () { if ($('.gritter-item-wrapper').length == 3) { // Returning false prevents a new gritter from opening return false; } } }); return false; }); $('#add-without-image').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a notice without an image!', // (string | mandatory) the text inside the notification text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.' }); return false; }); $('#add-gritter-light').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a light notification', // (string | mandatory) the text inside the notification text: 'Just add a "gritter-light" class_name to your $.gritter.add or globally to $.gritter.options.class_name', class_name: 'gritter-light' }); return false; }); $('#add-with-callbacks').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a notice with callbacks!', // (string | mandatory) the text inside the notification text: 'The callback is...', // (function | optional) function called before it opens before_open: function () { alert('I am called before it opens'); }, // (function | optional) function called after it opens after_open: function (e) { alert("I am called after it opens: \nI am passed the jQuery object for the created Gritter element...\n" + e); }, // (function | optional) function called before it closes before_close: function (e, manual_close) { var manually = (manual_close) ? 'The "X" was clicked to close me!' : ''; alert("I am called before it closes: I am passed the jQuery object for the Gritter element... \n" + manually); }, // (function | optional) function called after it closes after_close: function (e, manual_close) { var manually = (manual_close) ? 'The "X" was clicked to close me!' : ''; alert('I am called after it closes. ' + manually); } }); return false; }); $('#add-sticky-with-callbacks').click(function () { $.gritter.add({ // (string | mandatory) the heading of the notification title: 'This is a sticky notice with callbacks!', // (string | mandatory) the text inside the notification text: 'Sticky sticky notice.. sticky sticky notice...', // Stickeh! sticky: true, // (function | optional) function called before it opens before_open: function () { alert('I am a sticky called before it opens'); }, // (function | optional) function called after it opens after_open: function (e) { alert("I am a sticky called after it opens: \nI am passed the jQuery object for the created Gritter element...\n" + e); }, // (function | optional) function called before it closes before_close: function (e) { alert("I am a sticky called before it closes: I am passed the jQuery object for the Gritter element... \n" + e); }, // (function | optional) function called after it closes after_close: function () { alert('I am a sticky called after it closes'); } }); return false; }); $("#remove-all").click(function () { $.gritter.removeAll(); return false; }); $("#remove-all-with-callbacks").click(function () { $.gritter.removeAll({ before_close: function (e) { alert("I am called before all notifications are closed. I am passed the jQuery object containing all of Gritter notifications.\n" + e); }, after_close: function () { alert('I am called after everything has been closed.'); } }); return false; }); }; return { //main function to initiate template pages init: function () { runPaginator(); runPulsate(); runGritterNotification(); } }; }();PK!g,Bform-dropzone.jsnuIwvar Dropzone = function () { //function to initiate DropzoneJS var runDropzone = function () { //for more information about Server side implementation //please visit http://www.dropzonejs.com/ $(".dropzone").dropzone({ paramName: "file", // The name that will be used to transfer the file maxFilesize: 5.0, // MB addRemoveLinks: true }); }; return { init: function () { runDropzone(); } }; }();PK! E((form-image-cropping.jsnuIwvar ImageCropping = function () { // function to initiate Jcrop // Create variables (in this scope) to hold the API and image size var jcrop_api, boundx, boundy; var runBasicHandler = function () { $('#target').Jcrop({ onChange: showCoords, onSelect: showCoords, onRelease: clearCoords }, function () { jcrop_api = this; }); $('#coords').on('change', 'input', function (e) { var x1 = $('#x1').val(), x2 = $('#x2').val(), y1 = $('#y1').val(), y2 = $('#y2').val(); jcrop_api.setSelect([x1, y1, x2, y2]); }); }; // Simple event handler, called from onChange and onSelect // event handlers, as per the Jcrop invocation above var showCoords = function(c) { $('#x1').val(c.x); $('#y1').val(c.y); $('#x2').val(c.x2); $('#y2').val(c.y2); $('#w').val(c.w); $('#h').val(c.h); }; var clearCoords = function() { $('#coords input').val(''); }; var runPreviewPane = function () { // Grab some information about the preview pane var $preview = $('#preview-pane'), $pcnt = $('#preview-pane .preview-container'), $pimg = $('#preview-pane .preview-container img'), xsize = $pcnt.width(), ysize = $pcnt.height(); $('#target2').Jcrop({ onChange: updatePreview, onSelect: updatePreview, aspectRatio: xsize / ysize }, function () { // Use the API to get the real image size var bounds = this.getBounds(); boundx = bounds[0]; boundy = bounds[1]; // Store the API in the jcrop_api variable jcrop_api = this; // Move the preview into the jcrop container for css positioning $preview.appendTo(jcrop_api.ui.holder); }); function updatePreview(c) { if (parseInt(c.w) > 0) { var rx = xsize / c.w; var ry = ysize / c.h; $pimg.css({ width: Math.round(rx * boundx) + 'px', height: Math.round(ry * boundy) + 'px', marginLeft: '-' + Math.round(rx * c.x) + 'px', marginTop: '-' + Math.round(ry * c.y) + 'px' }); } }; }; var runAnimationsTransitions = function () { $('#target3').Jcrop({ bgFade: true, bgOpacity: .2, setSelect: [60, 70, 540, 330] }, function () { jcrop_api = this; }); $('#fadetog').on('ifChecked', function (event) { jcrop_api.setOptions({ bgFade: true }); }); $('#fadetog').on('ifUnchecked', function (event) { jcrop_api.setOptions({ bgFade: false }); }); $('#shadetog').on('ifUnchecked', function (event) { $('#shadetxt').slideUp(); }); $('#shadetog').on('ifChecked', function (event) { $('#shadetxt').slideDown(); }); // Define page sections var sections = { bgc_buttons: 'Change bgColor', bgo_buttons: 'Change bgOpacity', anim_buttons: 'Animate Selection' }; // Define animation buttons var ac = { anim1: [217, 122, 382, 284], anim2: [20, 20, 580, 380], anim3: [24, 24, 176, 376], anim4: [347, 165, 550, 355], anim5: [136, 55, 472, 183] }; // Define bgOpacity buttons var bgo = { Low: .2, Mid: .5, High: .8, Full: 1 }; // Define bgColor buttons var bgc = { R: '#900', B: '#4BB6F0', Y: '#F0B207', G: '#46B81C', W: 'white', K: 'black' }; // Create fieldset targets for buttons for (i in sections) insertSection(i, sections[i]); function create_btn(c) { var $o = $('