Main theme for SuiteDesk

This commit is contained in:
Manuel Cillero 2017-07-25 13:57:02 +02:00
parent 8cf3c56044
commit 42540d1310
185 changed files with 17597 additions and 0 deletions

File diff suppressed because one or more lines are too long

11
themes/zuitedesk/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
#!/bin/sh
jscript="bootstrap.min.js"
original="$jscript.original"
if [ -f "$jscript" ]
then
[ ! -f "$original" ] && cp "$jscript" "$original" && echo "Keeping original file in $original"
sed -i ".bak" 's/\(jQuery\)/\$jq/g' "$jscript"
echo "Replacing $jscript"
else
echo "File $jscript not found"
fi

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*
* This file is used/requested by the 'Styles' button.
*/
CKEDITOR.addStylesSet( 'drupal',
[
/* Block Styles */
{ name: 'Normal', element: 'p', attributes: { 'class': '' } },
{ name: 'A !', element: 'p', attributes: { 'class': 'note-cyan' } },
{ name: 'B !', element: 'p', attributes: { 'class': 'note-green' } },
{ name: 'C !', element: 'p', attributes: { 'class': 'note-yellow' } },
{ name: 'D !', element: 'p', attributes: { 'class': 'note-orange' } },
{ name: 'E !', element: 'p', attributes: { 'class': 'note-red' } },
/* Inline Styles */
{ name: '[code]', element: 'code', attributes: { 'class': 'code-inline' } },
{ name: '"sample"', element: 'samp', attributes: { 'class': 'code-sample' } },
{ name: 'Variable', element: 'var', attributes: { 'class': 'code-variable' } },
{ name: 'Keyboard', element: 'kbd', attributes: { 'class': 'code-keyboard' } },
/* Object Styles */
{ name: 'Responsive', element: 'img', attributes: { 'class': 'img-responsive' } },
]);

View file

@ -0,0 +1,420 @@
'use strict';
/*
* A Design by GraphBerry
* Author: GraphBerry
* Author URL: http://graphberry.com
* License: http://graphberry.com/pages/license
*/
$jq(document).ready(function ($) {
var lastId,
topMenu = $("#top-navigation"),
topMenuHeight = topMenu.outerHeight(),
// All list items
menuItems = topMenu.find("a"),
// Anchors corresponding to menu items
scrollItems = menuItems.map(function () {
var item = $($(this).attr("href"));
if (item.length) {
return item;
}
});
//Get width of container
var containerWidth = $('.page-section .container').width();
//Resize animated triangle
$(".triangle").css({
"border-left": containerWidth / 2 + 'px outset transparent',
"border-right": containerWidth / 2 + 'px outset transparent'
});
$(window).resize(function () {
if (Math.max($(window).width(), window.innerWidth) > 529) {
$('#block-custom_search_blocks-1').css('top', $('#da-slider').height() + 104);
} else {
$('#block-custom_search_blocks-1').css('top', '.5em');
}
containerWidth = $('.container').width();
$(".triangle").css({
"border-left": containerWidth / 2 + 'px outset transparent',
"border-right": containerWidth / 2 + 'px outset transparent'
});
});
//Initialize header slider.
$('#da-slider').cslider();
//Initial mixitup, used for animated filtering portfolio.
$('#portfolio-grid').mixitup({
'onMixStart': function (config) {
$('div.toggleDiv').hide();
}
});
//Initial Out clients slider in client section
$('#client-slider').bxSlider({
pager: false,
minSlides: 1,
maxSlides: 5,
moveSlides: 2,
slideWidth: 210,
slideMargin: 25,
prevSelector: $('#client-prev'),
nextSelector: $('#client-next'),
prevText: '<i class="icon-left-open"></i>',
nextText: '<i class="icon-right-open"></i>'
});
$('input, textarea').placeholder();
// Bind to scroll
$(window).scroll(function () {
if ($(this).scrollTop() > 130) {
$('.navbar').addClass('navbar-fixed-top animated fadeInDown');
$('#frontpage').css('margin-top','90px');
} else {
$('.navbar').removeClass('navbar-fixed-top animated fadeInDown');
$('#frontpage').css('margin-top','0');
}
// Get container scroll position
var fromTop = $(this).scrollTop() + topMenuHeight + 10;
// Get id of current scroll item
var cur = scrollItems.map(function () {
if ($(this).offset().top < fromTop)
return this;
});
// Get the id of the current element
cur = cur[cur.length - 1];
var id = cur && cur.length ? cur[0].id : "";
if (lastId !== id) {
lastId = id;
// Set/remove active class
menuItems
.parent().removeClass("active")
.end().filter("[href=#" + id + "]").parent().addClass("active");
}
});
$(window).load(function () {
$('#block-custom_search_blocks-1').css('visibility', 'visible');
if (Math.max($(window).width(), window.innerWidth) > 529) {
$('#block-custom_search_blocks-1').css('top', $('#da-slider').height() + 104);
} else {
$('#block-custom_search_blocks-1').css('top', '.5em');
}
// Show email
$('#info-mail').html(function() {
var e = "man";
var a = "uel@";
var d = "cille";
var c = "ro.es";
var h = 'mailto:' + e + a + d + c;
$(this).parent('a').attr('href', h);
return e + a + d + c;
});
function filterPath(string) {
return string.replace(/^\//, '').replace(/(index|default).[a-zA-Z]{3,4}$/, '').replace(/\/$/, '');
}
$('a[href*=#]').each(function () {
if (filterPath(location.pathname) == filterPath(this.pathname) && location.hostname == this.hostname && this.hash.replace(/#/, '')) {
var $targetId = $(this.hash),
$targetAnchor = $('[name=' + this.hash.slice(1) + ']');
var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
if ($target) {
$(this).click(function () {
//Hack collapse top navigation after clicking
topMenu.parent().attr('style', 'height:0px').removeClass('in');
//Close navigation
$('.navbar .btn-navbar').addClass('collapsed');
var targetOffset = $target.offset().top - 63;
$('html, body').animate({
scrollTop: targetOffset
}, 800);
return false;
});
}
}
});
});
/*
Sand newsletter
**********************************************************************/
$('#subscribe').click(function () {
var error = false;
var emailCompare = /^([a-z0-9_.-]+)@([0-9a-z.-]+).([a-z.]{2,6})$/; // Syntax to compare against input
var email = $('input#nlmail').val().toLowerCase(); // get the value of the input field
if (email == "" || email == " " || !emailCompare.test(email)) {
$('#err-subscribe').show(500);
$('#err-subscribe').delay(4000);
$('#err-subscribe').animate({
height: 'toggle'
}, 500, function () {
// Animation complete.
});
error = true; // change the error state to true
}
if (error === false) {
$.ajax({
type: 'POST',
url: 'php/newsletter.php',
data: {
email: $('#nlmail').val()
},
error: function (request, error) {
alert("An error occurred");
},
success: function (response) {
if (response == 'OK') {
$('#success-subscribe').show();
$('#nlmail').val('')
} else {
alert("An error occurred");
}
}
});
}
return false;
});
/*
Sand mail
**********************************************************************/
$("#send-mail").click(function () {
var name = $('input#name').val(); // get the value of the input field
var error = false;
if (name == "" || name == " ") {
$('#err-name').show(500);
$('#err-name').delay(4000);
$('#err-name').animate({
height: 'toggle'
}, 500, function () {
// Animation complete.
});
error = true; // change the error state to true
}
var emailCompare = /^([a-z0-9_.-]+)@([da-z.-]+).([a-z.]{2,6})$/; // Syntax to compare against input
var email = $('input#email').val().toLowerCase(); // get the value of the input field
if (email == "" || email == " " || !emailCompare.test(email)) {
$('#err-email').show(500);
$('#err-email').delay(4000);
$('#err-email').animate({
height: 'toggle'
}, 500, function () {
// Animation complete.
});
error = true; // change the error state to true
}
var comment = $('textarea#comment').val(); // get the value of the input field
if (comment == "" || comment == " ") {
$('#err-comment').show(500);
$('#err-comment').delay(4000);
$('#err-comment').animate({
height: 'toggle'
}, 500, function () {
// Animation complete.
});
error = true; // change the error state to true
}
if (error == false) {
var dataString = $('#contact-form').serialize(); // Collect data from form
$.ajax({
type: "POST",
url: $('#contact-form').attr('action'),
data: dataString,
timeout: 6000,
error: function (request, error) {
},
success: function (response) {
response = $.parseJSON(response);
if (response.success) {
$('#successSend').show();
$("#name").val('');
$("#email").val('');
$("#comment").val('');
} else {
$('#errorSend').show();
}
}
});
return false;
}
return false; // stops user browser being directed to the php file
});
//Function for show or hide portfolio desctiption.
$.fn.showHide = function (options) {
var defaults = {
speed: 1000,
easing: '',
changeText: 0,
showText: 'Show',
hideText: 'Hide'
};
var options = $.extend(defaults, options);
$(this).click(function () {
$('.toggleDiv').slideUp(options.speed, options.easing);
var toggleClick = $(this);
var toggleDiv = $(this).attr('rel');
$(toggleDiv).slideToggle(options.speed, options.easing, function () {
if (options.changeText == 1) {
$(toggleDiv).is(":visible") ? toggleClick.text(options.hideText) : toggleClick.text(options.showText);
}
});
return false;
});
};
//Initial Show/Hide portfolio element.
$('div.toggleDiv').hide();
$('.show_hide').showHide({
speed: 500,
changeText: 0,
showText: 'View',
hideText: 'Close'
});
/************************
Animate elements
*************************/
//Animate thumbnails
$jq('.thumbnail').one('inview', function (event, visible) {
if (visible == true) {
$jq(this).addClass("animated fadeInDown");
} else {
$jq(this).removeClass("animated fadeInDown");
}
});
//Animate triangles
$jq('.triangle').bind('inview', function (event, visible) {
if (visible == true) {
$jq(this).addClass("animated fadeInDown");
} else {
$jq(this).removeClass("animated fadeInDown");
}
});
//animate first team member
$jq('#first-person').bind('inview', function (event, visible) {
if (visible == true) {
$jq('#first-person').addClass("animated pulse");
} else {
$jq('#first-person').removeClass("animated pulse");
}
});
//animate sectond team member
$jq('#second-person').bind('inview', function (event, visible) {
if (visible == true) {
$jq('#second-person').addClass("animated pulse");
} else {
$jq('#second-person').removeClass("animated pulse");
}
});
//animate thrid team member
$jq('#third-person').bind('inview', function (event, visible) {
if (visible == true) {
$jq('#third-person').addClass("animated pulse");
} else {
$jq('#third-person').removeClass("animated pulse");
}
});
//Animate price columns
$jq('.price-column, .testimonial').bind('inview', function (event, visible) {
if (visible == true) {
$jq(this).addClass("animated fadeInDown");
} else {
$jq(this).removeClass("animated fadeInDown");
}
});
//Animate contact form
$jq('#block-cillero_manuel-block-availability').bind('inview', function (event, visible) {
if (visible == true) {
$jq('#block-cillero_manuel-block-availability').addClass("animated pulse");
} else {
$jq('#block-cillero_manuel-block-availability').removeClass("animated pulse");
}
});
$jq('#block-cillero_manuel-block-info-contact').bind('inview', function (event, visible) {
if (visible == true) {
$jq('#block-cillero_manuel-block-info-contact').addClass("animated pulse");
} else {
$jq('#block-cillero_manuel-block-info-contact').removeClass("animated pulse");
}
});
//Animate skill bars
$jq('.skills > li > span').one('inview', function (event, visible) {
if (visible == true) {
$jq(this).each(function () {
$jq(this).animate({
width: $jq(this).attr('data-width')
}, 3000);
});
}
});
});
//Initialize google map for contact setion with your location.
function initializeMap() {
var lat = '44.8164056'; //Set your latitude.
var lon = '20.46090424'; //Set your longitude.
var centerLon = lon - 0.0105;
var myOptions = {
scrollwheel: false,
draggable: false,
disableDefaultUI: true,
center: new google.maps.LatLng(lat, centerLon),
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
//Bind map to elemet with id map-canvas
var map = new google.maps.Map(document.getElementById('map-canvas'), myOptions);
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(lat, lon),
});
var infowindow = new google.maps.InfoWindow();
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
infowindow.open(map, marker);
}

4
themes/zuitedesk/js/html5shiv.min.js vendored Normal file
View file

@ -0,0 +1,4 @@
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,335 @@
(function ($, undefined) {
/*
* Slider object.
*/
$.Slider = function (options, element) {
this.$el = $(element);
this._init(options);
};
$.Slider.defaults = {
width:1170, //Max slider width
height:500, //max slider height
current: 0, // index of current slide
bgincrement: 100, // increment the bg position (parallax effect) when sliding
autoplay: true, // slideshow on / off
interval: 6000 // time between transitions
};
$.Slider.prototype = {
_init: function (options) {
var self = this;
this.options = $.extend(true, {}, $.Slider.defaults, options);
this.ratio = this.$el.width() / this.$el.height();
this.$slides = this.$el.children().children('.da-slide');
this.slidesCount = this.$slides.length;
this.current = this.options.current;
if (this.current < 0 || this.current >= this.slidesCount) {
this.current = 0;
}
this.$slides.eq(this.current).addClass('da-slide-current');
var $navigation = $('<nav class="da-dots"/>');
for (var i = 0; i < this.slidesCount; ++i) {
$navigation.append('<span/>');
}
$navigation.appendTo(this.$el);
this.$pages = this.$el.find('nav.da-dots > span');
this.$navNext = this.$el.find('span.da-arrows-next');
this.$navPrev = this.$el.find('span.da-arrows-prev');
this.isAnimating = false;
this.bgpositer = 0;
this.cssAnimations = Modernizr.cssanimations;
this.cssTransitions = Modernizr.csstransitions;
if (!this.cssAnimations || !this.cssAnimations) {
this.$el.addClass('da-slider-fb');
}
this._updatePage();
// load the events
this._loadEvents();
// slideshow
if (this.options.autoplay) {
this._startSlideshow();
}
$(window).bind('resize', function() {
setTimeout(function() {
self._makeResponsive();
}, 150);
});
this._makeResponsive();
},
_navigate: function (page, dir) {
var $current = this.$slides.eq(this.current),
$next, _self = this;
if (this.current === page || this.isAnimating) return false;
this.isAnimating = true;
// check dir
var classTo, classFrom, d;
if (!dir) {
(page > this.current) ? d = 'next' : d = 'prev';
} else {
d = dir;
}
if (this.cssAnimations && this.cssAnimations) {
if (d === 'next') {
classTo = 'da-slide-toleft';
classFrom = 'da-slide-fromright';
++this.bgpositer;
} else {
classTo = 'da-slide-toright';
classFrom = 'da-slide-fromleft';
--this.bgpositer;
}
this.$el.css('background-position', this.bgpositer * this.options.bgincrement + '% center');
}
this.current = page;
$next = this.$slides.eq(this.current);
if (this.cssAnimations && this.cssAnimations) {
var rmClasses = 'da-slide-toleft da-slide-toright da-slide-fromleft da-slide-fromright';
$current.removeClass(rmClasses);
$next.removeClass(rmClasses);
$current.addClass(classTo);
$next.addClass(classFrom);
$current.removeClass('da-slide-current');
$next.addClass('da-slide-current');
}
// fallback
if (!this.cssAnimations || !this.cssAnimations) {
$next.addClass('da-slide-current');
$next.css('left', (d === 'next') ? '100%' : '-100%').stop().animate({
left: '0%'
}, 1000, function () {
_self.isAnimating = false;
});
$current.stop().animate({
left: (d === 'next') ? '-100%' : '100%'
}, 1000, function () {
$current.removeClass('da-slide-current');
});
}
this._updatePage();
},
_updatePage: function () {
this.$pages.removeClass('da-dots-current');
this.$pages.eq(this.current).addClass('da-dots-current');
},
_startSlideshow: function () {
var _self = this;
this.slideshow = setTimeout(function () {
var page = (_self.current < _self.slidesCount - 1) ? page = _self.current + 1 : page = 0;
_self._navigate(page, 'next');
if (_self.options.autoplay) {
_self._startSlideshow();
}
}, this.options.interval);
},
page: function (idx) {
if (idx >= this.slidesCount || idx < 0) {
return false;
}
if (this.options.autoplay) {
clearTimeout(this.slideshow);
this.options.autoplay = false;
}
this._navigate(idx);
},
_makeResponsive: function () {
var _self = this;
var w = this.$el.width();
var h = this.$el.height();
var nH = h;
if(w < _self.options.width){
var xy = this.options.width / this.options.height;
var nH = w / xy;
this.$el.height(Math.ceil(nH));
}else{
this.$el.height(Math.ceil(this.options.height));
}
},
_loadEvents: function () {
var _self = this;
this.$pages.on('click.cslider', function (event) {
_self.page($(this).index());
return false;
});
this.$navNext.on('click.cslider', function (event) {
if (_self.options.autoplay) {
clearTimeout(_self.slideshow);
_self.options.autoplay = false;
}
var page = (_self.current < _self.slidesCount - 1) ? page = _self.current + 1 : page = 0;
_self._navigate(page, 'next');
return false;
});
this.$navPrev.on('click.cslider', function (event) {
if (_self.options.autoplay) {
clearTimeout(_self.slideshow);
_self.options.autoplay = false;
}
var page = (_self.current > 0) ? page = _self.current - 1 : page = _self.slidesCount - 1;
_self._navigate(page, 'prev');
return false;
});
if (this.cssTransitions) {
if (!this.options.bgincrement) {
this.$el.on('webkitAnimationEnd.cslider animationend.cslider OAnimationEnd.cslider', function (event) {
if (event.originalEvent.animationName === 'toRightAnim4' || event.originalEvent.animationName === 'toLeftAnim4') {
_self.isAnimating = false;
}
});
} else {
this.$el.on('webkitTransitionEnd.cslider transitionend.cslider OTransitionEnd.cslider', function (event) {
if (event.target.id === _self.$el.attr('id'))
_self.isAnimating = false;
});
}
}
}
};
var logError = function (message) {
if (this.console) {
console.error(message);
}
};
$.fn.cslider = function (options) {
if (typeof options === 'string') {
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = $.data(this, 'cslider');
if (!instance) {
logError("cannot call methods on cslider prior to initialization; " +
"attempted to call method '" + options + "'");
return;
}
if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
logError("no such method '" + options + "' for cslider instance");
return;
}
instance[options].apply(instance, args);
});
} else {
this.each(function () {
var instance = $.data(this, 'cslider');
if (!instance) {
$.data(this, 'cslider', new $.Slider(options, this));
}
});
}
return this;
};
})($jq);

View file

@ -0,0 +1,60 @@
/**
* author Remy Sharp
* url http://remysharp.com/2009/01/26/element-in-view-event-plugin/
*/
(function ($) {
function getViewportHeight() {
var height = window.innerHeight; // Safari, Opera
var mode = document.compatMode;
if ( (mode || !$.support.boxModel) ) { // IE, Gecko
height = (mode == 'CSS1Compat') ?
document.documentElement.clientHeight : // Standards
document.body.clientHeight; // Quirks
}
return height;
}
$(window).scroll(function () {
var vpH = getViewportHeight(),
scrolltop = (document.documentElement.scrollTop ?
document.documentElement.scrollTop :
document.body.scrollTop),
elems = [];
// naughty, but this is how it knows which elements to check for
$.each($.cache, function () {
if (this.events && this.events.inview) {
elems.push(this.handle.elem);
}
});
if (elems.length) {
$(elems).each(function () {
var $el = $(this),
top = $el.offset().top,
height = $el.height(),
inview = $el.data('inview') || false;
if (scrolltop > (top + height) || scrolltop + vpH < top) {
if (inview) {
$el.data('inview', false);
$el.trigger('inview', [ false ]);
}
} else if (scrolltop < (top + height)) {
if (!inview) {
$el.data('inview', true);
$el.trigger('inview', [ true ]);
}
}
});
}
});
// kick the event to pick up any elements already in view.
// note however, this only works if the plugin is included after the elements are bound to 'inview'
$(function () {
$(window).scroll();
});
})($jq);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,175 @@
/*! http://mths.be/placeholder v2.0.7 by @mathias */
;(function(window, document, $) {
var isInputSupported = 'placeholder' in document.createElement('input');
var isTextareaSupported = 'placeholder' in document.createElement('textarea');
var prototype = $.fn;
var valHooks = $.valHooks;
var propHooks = $.propHooks;
var hooks;
var placeholder;
if (isInputSupported && isTextareaSupported) {
placeholder = prototype.placeholder = function() {
return this;
};
placeholder.input = placeholder.textarea = true;
} else {
placeholder = prototype.placeholder = function() {
var $this = this;
$this
.filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
.not('.placeholder')
.bind({
'focus.placeholder': clearPlaceholder,
'blur.placeholder': setPlaceholder
})
.data('placeholder-enabled', true)
.trigger('blur.placeholder');
return $this;
};
placeholder.input = isInputSupported;
placeholder.textarea = isTextareaSupported;
hooks = {
'get': function(element) {
var $element = $(element);
var $passwordInput = $element.data('placeholder-password');
if ($passwordInput) {
return $passwordInput[0].value;
}
return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
},
'set': function(element, value) {
var $element = $(element);
var $passwordInput = $element.data('placeholder-password');
if ($passwordInput) {
return $passwordInput[0].value = value;
}
if (!$element.data('placeholder-enabled')) {
return element.value = value;
}
if (value == '') {
element.value = value;
// Issue #56: Setting the placeholder causes problems if the element continues to have focus.
if (element != document.activeElement) {
// We can't use `triggerHandler` here because of dummy text/password inputs :(
setPlaceholder.call(element);
}
} else if ($element.hasClass('placeholder')) {
clearPlaceholder.call(element, true, value) || (element.value = value);
} else {
element.value = value;
}
// `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
return $element;
}
};
if (!isInputSupported) {
valHooks.input = hooks;
propHooks.value = hooks;
}
if (!isTextareaSupported) {
valHooks.textarea = hooks;
propHooks.value = hooks;
}
$(function() {
// Look for forms
$(document).delegate('form', 'submit.placeholder', function() {
// Clear the placeholder values so they don't get submitted
var $inputs = $('.placeholder', this).each(clearPlaceholder);
setTimeout(function() {
$inputs.each(setPlaceholder);
}, 10);
});
});
// Clear placeholder values upon page reload
$(window).bind('beforeunload.placeholder', function() {
$('.placeholder').each(function() {
this.value = '';
});
});
}
function args(elem) {
// Return an object of element attributes
var newAttrs = {};
var rinlinejQuery = /^$jq\d+$/;
$.each(elem.attributes, function(i, attr) {
if (attr.specified && !rinlinejQuery.test(attr.name)) {
newAttrs[attr.name] = attr.value;
}
});
return newAttrs;
}
function clearPlaceholder(event, value) {
var input = this;
var $input = $(input);
if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
if ($input.data('placeholder-password')) {
$input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id'));
// If `clearPlaceholder` was called from `$.valHooks.input.set`
if (event === true) {
return $input[0].value = value;
}
$input.focus();
} else {
input.value = '';
$input.removeClass('placeholder');
input == document.activeElement && input.select();
}
}
}
function setPlaceholder() {
var $replacement;
var input = this;
var $input = $(input);
var id = this.id;
if (input.value == '') {
if (input.type == 'password') {
if (!$input.data('placeholder-textinput')) {
try {
$replacement = $input.clone().attr({ 'type': 'text' });
} catch(e) {
$replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));
}
$replacement
.removeAttr('name')
.data({
'placeholder-password': $input,
'placeholder-id': id
})
.bind('focus.placeholder', clearPlaceholder);
$input
.data({
'placeholder-textinput': $replacement,
'placeholder-id': id
})
.before($replacement);
}
$input = $input.removeAttr('id').hide().prev().attr('id', id).show();
// Note: `$input[0] != input` now!
}
$input.addClass('placeholder');
$input[0].value = $input.attr('placeholder');
} else {
$input.removeClass('placeholder');
}
}
}(this, document, $jq));

File diff suppressed because one or more lines are too long

5
themes/zuitedesk/js/respond.min.js vendored Normal file
View file

@ -0,0 +1,5 @@
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);

View file

@ -0,0 +1,23 @@
'use strict';
$jq(document).ready(function ($) {
// Bind to scroll.
$(window).scroll(function () {
//Display or hide scroll to top button.
if ($(this).scrollTop() > 100) {
$('#scroll-top-link').fadeIn();
} else {
$('#scroll-top-link').fadeOut();
}
});
// Function for scrolling to top.
$('#scroll-top-link').click(function () {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
});

View file

@ -0,0 +1,91 @@
$jq(function() {
var path, prev, next, endtour, tour, cookie_tour, cookie_value;
path = location.pathname.substring(0, 8);
if (path != "/en" && path != "/en/") path = "/";
prev = Drupal.t("&laquo; Prev");
next = Drupal.t("Next &raquo;");
endtour = Drupal.t("End Tour");
tour = new Tour({
template: "<div class='popover'> \
<div class='arrow'></div> \
<h3 class='popover-title' style='font-weight: bold;'></h3> \
<div class='popover-content small'></div> \
<div class='popover-navigation'> \
<div class='btn-group'> \
<button class='btn btn-sm btn-default' data-role='prev'>" + prev + "</button> \
<button class='btn btn-sm btn-default' data-role='next'>" + next + "</button> \
</div> \
<button class='btn btn-sm btn-default' data-role='end'>" + endtour + "</button> \
</div> \
</div>",
steps: [
{
element: "#user-options",
placement: "left",
title: Drupal.t("Welcome!"),
content: Drupal.t("Remember, here you can see your user profile and main options.")
} , {
path: path,
element: "li.suitedesk",
placement: "bottom",
title: Drupal.t("What is SuiteDesk?"),
content: Drupal.t("SuiteDesk is a web based software useful for project management, planning, personal productivity, communication between project stakeholders, collaboration, customers support, documentation, cost control and change management.")
} , {
path: path,
element: "#stormprojects",
placement: "bottom",
title: Drupal.t("Active projects"),
content: Drupal.t("Here you can see your projects. At the most basic level, SuiteDesk will help to track projects from start to finish, allows for the creation, assignment and control of tasks and deadlines, and let project stakeholders at different levels to have an input into the process.")
} , {
path: path,
element: "#stormtickets",
placement: "bottom",
title: Drupal.t("An issue tracking system"),
content: Drupal.t("SuiteDesk facilitates the reporting, notifying, updating, and viewing of issues like bugs, errors and new features. If you want to notify a bug or track an issue, here you can do it. A support ticket should include vital information for the account involved and the issue encountered.")
} , {
path: path,
element: "#storminvoices",
placement: "bottom",
title: Drupal.t("Easy invoice tracking"),
content: Drupal.t("SuiteDesk give you total control of the invoicing and payment activities of projects you are involved with.")
} , {
path: path,
element: "#stormdok",
placement: "bottom",
title: Drupal.t("Sharing project documents"),
content: Drupal.t("It is vital to keep all participants up to date on what is going on. Document sharing and collaboration is essentially a document repository that all project stakeholders have access to.")
} , {
path: path,
element: "#stormfaq",
placement: "bottom",
title: Drupal.t("Frequently Asked Questions"),
content: Drupal.t("A compilation of questions and answers commonly asked by a new customer, user or project member. Before asking a question make sure that you've checked out this list.")
} , {
path: path,
element: "#stormwatcher",
placement: "bottom",
title: Drupal.t("Watch content for changes"),
content: Drupal.t("SuiteDesk lets users a way to easily watch tickets for changes or new comments without having to post themselves. Supports email notifications being sent when both or either of the above occurs.")
} , {
path: path,
element: "#edit-custom-search-blocks-form-1-1",
placement: "bottom",
title: Drupal.t("Search in SuiteDesk"),
content: Drupal.t("You can search for words and phrases on each page. SuiteDesk will show you where the search phrase you've typed appears and lets you highlight all the places where it appears.")
} , {
path: path,
element: "#block-views-updates_recent-block_1",
placement: "top",
title: Drupal.t("Updated content"),
content: Drupal.t("And this block displays the last updated contents of your projects in SuiteDesk.")
}
]
}).init().start(true);
if (decodeURI((RegExp('tour=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]) == 'suitedesk') {
tour.goTo(1);
}
});