Updated credits

pull/54/head
Aigars Silkalns 2016-03-06 23:23:41 +02:00
parent 55185e03b1
commit 6b71e150f3
34 changed files with 430 additions and 443 deletions

View File

@ -372,9 +372,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -508,7 +508,7 @@
<!-- footer content -->
<footer>
<div class="copyright-info">
<p class="pull-right">Gentelella Alela! - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -711,9 +711,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -497,9 +497,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -690,10 +690,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
</p>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a></p>
</div>
<div class="clearfix"></div>
</footer>

View File

@ -156,9 +156,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -1381,9 +1381,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -1797,9 +1797,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -780,9 +780,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -377,9 +377,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -448,9 +448,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -631,9 +631,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -1650,9 +1650,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -1761,9 +1761,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -2372,9 +2372,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -567,9 +567,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -1070,9 +1070,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -788,9 +788,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -903,9 +903,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -524,9 +524,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -10,12 +10,13 @@ var validator = (function($){
var message, tests, checkField, validate, mark, unmark, field, minmax, defaults,
validateWords, lengthRange, lengthLimit, pattern, alertTxt, data,
email_illegalChars = /[\(\)\<\>\,\;\:\\\/\"\[\]]/,
email_filter = /^.+@.+\..{2,3}$/;
email_filter = /^.+@.+\..{2,6}$/; // exmaple email "steve@s-i.photo"
/* general text messages
*/
message = {
invalid : 'invalid input',
checked : 'must be checked',
empty : 'please put something here',
min : 'input is too short',
max : 'input is too long',
@ -37,7 +38,14 @@ var validator = (function($){
}
// defaults
defaults = { alerts:true };
defaults = {
alerts : true,
classes : {
item : 'item',
alert : 'alert',
bad : 'bad'
}
};
/* Tests for each type of field (including Select element)
*/
@ -68,7 +76,8 @@ var validator = (function($){
}
return true;
},
text : function(a){
// a "skip" will skip some of the tests (needed for keydown validation)
text : function(a, skip){
// make sure there are at least X number of words, each at least 2 chars long.
// for example 'john F kenedy' should be at least 2 words and will pass validation
if( validateWords ){
@ -87,7 +96,7 @@ var validator = (function($){
}
return true;
}
if( lengthRange && a.length < lengthRange[0] ){
if( !skip && lengthRange && a.length < lengthRange[0] ){
alertTxt = message.min;
return false;
}
@ -97,24 +106,22 @@ var validator = (function($){
alertTxt = message.max;
return false;
}
// check if the field's value should obey any length limits, and if so, make sure the length of the value is as specified
if( lengthLimit && lengthLimit.length ){
var obeyLimit = false;
while( lengthLimit.length ){
if( lengthLimit.pop() == a.length )
obeyLimit = true;
}
if( !obeyLimit ){
if( lengthLimit.pop() == a.length ){
alertTxt = message.complete;
return false;
}
}
}
if( pattern ){
var regex, jsRegex;
switch( pattern ){
case 'alphanumeric' :
regex = /^[a-z0-9]+$/i;
regex = /^[a-zA-Z0-9]+$/i;
break;
case 'numeric' :
regex = /^[0-9]+$/i;
@ -135,6 +142,7 @@ var validator = (function($){
return false;
}
}
return true;
},
number : function(a){
@ -191,7 +199,6 @@ var validator = (function($){
return /^(https?:\/\/)?([\w\d\-_]+\.+[A-Za-z]{2,})+\/?/.test( url );
}
if( !testUrl( a ) ){
console.log(a);
alertTxt = a ? message.url : message.empty;
return false;
}
@ -230,24 +237,24 @@ var validator = (function($){
// check if not already marked as a 'bad' record and add the 'alert' object.
// if already is marked as 'bad', then make sure the text is set again because i might change depending on validation
var item = field.parents('.item'),
var item = field.closest('.' + defaults.classes.item),
warning;
if( item.hasClass('bad') ){
if( item.hasClass(defaults.classes.bad) ){
if( defaults.alerts )
item.find('.alert').html(text);
item.find('.'+defaults.classes.alert).html(text);
}
else if( defaults.alerts ){
warning = $('<div class="alert">').html( text );
warning = $('<div class="'+ defaults.classes.alert +'">').html( text );
item.append( warning );
}
item.removeClass('bad');
item.removeClass(defaults.classes.bad);
// a delay so the "alert" could be transitioned via CSS
setTimeout(function(){
item.addClass('bad');
item.addClass(defaults.classes.bad);
}, 0);
};
/* un-marks invalid fields
@ -258,36 +265,39 @@ var validator = (function($){
return false;
}
field.parents('.item')
.removeClass('bad')
.find('.alert').remove();
field.closest('.' + defaults.classes.item)
.removeClass(defaults.classes.bad)
.find('.'+ defaults.classes.alert).remove();
};
function testByType(type, value){
if( type == 'tel' )
pattern = pattern || 'phone';
if( !type || type == 'password' || type == 'tel' )
if( !type || type == 'password' || type == 'tel' || type == 'search' || type == 'file' )
type = 'text';
return tests[type](value);
return tests[type] ? tests[type](value, true) : true;
}
function prepareFieldData(el){
field = $(el);
field.data( 'valid', true ); // initialize validness of field by first checking if it's even filled out of now
field.data( 'valid', true ); // initialize validity of field
field.data( 'type', field.attr('type') ); // every field starts as 'valid=true' until proven otherwise
pattern = el.pattern;
pattern = field.attr('pattern');
}
/* Validations per-character keypress
*/
function keypress(e){
prepareFieldData(this);
// String.fromCharCode(e.charCode)
if( e.charCode )
return testByType( data.type, String.fromCharCode(e.charCode) );
if( e.charCode ){
return testByType( this.type, this.value );
}
}
/* Checks a single form field by it's type and specific (custom) attributes
@ -305,11 +315,11 @@ var validator = (function($){
// Check if there is a specific error message for that field, if not, use the default 'invalid' message
alertTxt = message[field.prop('name')] || message.invalid;
// SELECT / TEXTAREA nodes needs special treatment
// Special treatment
if( field[0].nodeName.toLowerCase() === "select" ){
data.type = 'select';
}
if( field[0].nodeName.toLowerCase() === "textarea" ){
else if( field[0].nodeName.toLowerCase() === "textarea" ){
data.type = 'text';
}
/* Gather Custom data attributes for specific validation:
@ -320,8 +330,19 @@ var validator = (function($){
minmax = data['validateMinmax'] ? (data['validateMinmax']+'').split(',') : ''; // for type 'number', defines the minimum and/or maximum for the value as a number.
data.valid = tests.hasValue(data.val);
if( field.hasClass('optional') && !data.valid )
data.valid = true;
// for checkboxes
if( field[0].type === "checkbox" ){
data.valid = field[0].checked;
alertTxt = message.checked;
}
// check if field has any value
if( data.valid ){
else if( data.valid ){
/* Validate the field's value is different than the placeholder attribute (and attribute exists)
* this is needed when fixing the placeholders for older browsers which does not support them.
* in this case, make sure the "placeholder" jQuery plugin was even used before proceeding
@ -341,9 +362,6 @@ var validator = (function($){
else if( data.valid || data.type == 'select' )
data.valid = testByType(data.type, data.val);
// optional fields are only validated if they are not empty
if( field.hasClass('optional') && !data.val )
data.valid = true;
}
// mark / unmark the field, and set the general 'submit' flag accordingly
@ -369,6 +387,7 @@ var validator = (function($){
var that = this,
submit = true, // save the scope
// get all the input/textareas/select fields which are required or optional (meaning, they need validation only if they were filled)
fieldsToCheck = $form.find(':input').filter('[required=required], .required, .optional').not('[disabled=disabled]');
fieldsToCheck.each(function(){

View File

@ -563,9 +563,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -507,9 +507,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -474,9 +474,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -366,9 +366,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -512,9 +512,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -668,9 +668,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -503,9 +503,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -709,9 +709,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -775,9 +775,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -938,9 +938,8 @@
</div>
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -405,9 +405,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>

View File

@ -935,9 +935,8 @@
<!-- footer content -->
<footer>
<div class="">
<p class="pull-right">Gentelella Alela! a Bootstrap 3 template by <a>Kimlabs</a>. |
<span class="lead"> <i class="fa fa-paw"></i> Gentelella Alela!</span>
<div class="copyright-info">
<p class="pull-right">Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
</p>
</div>
<div class="clearfix"></div>