"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/");
}
}
else {
console.error("Could not preload script \"" + file + "\"");
}
return response;
}, function () {
console.error("Could not preload script \"" + file + "\"");
}); });
$q.all([].concat(audioPromises, stylePromises, scriptPromises, imgPromises)).then(function () {
loadingPromise.resolve();
});
loadingPromise.promise.then(function () {
if (!cancelled) {
element.append($compile(markup, null, 9999)(scope));
if (attrs.preloadNotify) {
scope.$eval(attrs.preloadNotify);
}
$rootScope.$broadcast("loading:end");
}
else {
console.warn("Preloading canceled.");
}
}, function () {
console.error("some assets were not preloaded!");
}).catch(function () {
console.error("some assets were not preloaded!");
});
element.one("$destroy", function () {
$rootScope.$broadcast("loading:end");
cancelled = true;
});
};
}
};
}
]);
})(whow || (whow = {}));
/* jshint ignore:end */
(function(global) {
"use strict";
/**
* DIRECTIVES
*
* What are directives and how do I use them?
* Directived can listen to element names, attributes and class names
* to add events to theme or manipulate the DOM.
*
* You can define what your directive will listen on by adding the 'restrict' option.
* There are three possible values for 'restrict'.
* 1. A => Listen to attributes of an element (e.g. '')
* 2. C => Listen to CSS class names of an element (e.g. '')
* 3. E => Listen to the element name (e.g. '')
* You can also combine this options like this: 'ACE' or 'AC' etc.
*/
angular
.module('whow')
/**
* Wrapper directive for inputs of type radio and checkbox
*
* Description:
* Creates a directive with a hidden checkbox or radio button
* Any input attributes (like value, type or name) are reflected
* on the hidden input.
* The directive is transcluding which means that any content put
* inside the element will also appear
*
* Usage:
*
*
*
Accept our Terms and Conditions
*
*
* Attributes:
* ng-model => the model that the value should be bound to
* type => the type of the input (radio or checkbox)
* id => id attribute that is reflected on the hidden input
* onClick => attribute to override internal onclick handler
* value => value attribute reflected on the hidden input
*/
.directive('radioCheckbox', function() {
return {
restrict: 'E',
scope: {
name: '@?',
ngModel: '=',
ngModelOptions: '=?',
type: '@',
value: '@?',
onClick: '&?',
id: '@?'
},
require: "ngModel",
replace: true,
transclude: true,
template:
'
' +
'' +
'
',
link: function($scope, $elem, $attr, ngModelController) {
if ($scope.type === undefined) {
throw new Error('type of radio-checkbox directive must be defined, can be radio or checkbox');
}
if ($attr.onClick === undefined || $attr.onClick === '') {
$scope.onClick = function() {
if ($scope.type === 'radio') {
ngModelController.$setViewValue($scope.value);
} else if ($scope.type === 'checkbox') {
ngModelController.$setViewValue(!$scope.ngModel);
}
};
}
}
};
})
/**
* Creates a custom styled selectbox
*
* Description:
* This will create a CSS customizable Dropdown field.
* We created our own, because we are using our image
* sprite system and there was no library out there
* which could fit our needs.
* Notice: You have to add the value attribute to the options!
*
* Tip: You can also write invalid JSON like "{foo:'bar'}"
*
* Usage:
*
*
* Usage with parameters:
*
*
* Parameters:
* style {string} => Defines a style via a CSS class
* label {string} => Label text if no item is selected. You have to add an empty option.
*/
.directive('customSelect', function($timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var defaults = {
style: 'default'
},
options = {},
select = element,
wrapper = $('
').addClass('cSelect'),
selectedText = $('
').addClass('text'),
selected = $('
').addClass('selected').append(selectedText),
list = $('
').addClass('items').hide();
if (attrs.customSelect) {
try {
options = scope.$eval(attrs.customSelect);
} catch (e) {}
}
if (_.isEmpty(options)) {
switch (attrs.customSelect) {
case 'destroy':
element
.prev('.cSelect').remove()
.end()
.show();
return;
}
}
options = $.extend(defaults, options);
$(wrapper).addClass(options.style).addClass(attrs.class);
$(selectedText).html(options.label);
$timeout(function() {
$(wrapper).append(selected, list).on('click', function() {
$('.cSelect').not(this).find('.items').hide();
$(wrapper).find('.items').toggle();
});
element.find('option').each(function() {
if ("" !== $(this).val()) {
var icon,
_text = $(this).text().replace(/\_\_(\S(.*?\S)?)\_\_/gm, '$1'),
text = $('