$(document).ready(function(){
var REGEX_EMAIL = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.searching_by_name').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '
' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.number_search').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#category_search').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.name_found').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.number_found').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.mark_found').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.crossnumber_found').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.searching_by_brand').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.area1').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'S-class', name:''},
{mark:'Gl-class', name:''},
{mark:'Glk', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.area7').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'S-class', name:''},
{mark:'Gl-class', name:''},
{mark:'Glk', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.area8').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'S-class', name:''},
{mark:'Gl-class', name:''},
{mark:'Glk', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.areamark').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'Opel', name:''},
{mark:'Chevrolet', name:''},
{mark:'Maybach', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.area2').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'W204', name:''},
{mark:'W205', name:''},
{mark:'W-202', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.area3').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'S-class', name:''},
{mark:'Gl-class', name:''},
{mark:'Glk', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.area4').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'Opel', name:''},
{mark:'Chevrolet', name:''},
{mark:'Maybach', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.area5').selectize({
persist: false,
maxItems: 1,
valueField: 'mark',
searchField: ['mark', 'name'],
options: [
{mark:'W204', name:''},
{mark:'W205', name:''},
{mark:'W-202', name:''}
],
render: {
item: function(item, escape) {
return '' +
(item.mark ? '' + escape(item.mark) + '' : '')+
(item.name ? '' + escape(item.name) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.mark || item.name;
var caption = item.mark ? item.name : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.searching_for_tovars').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.searching_for_vin').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
var REGEX_Name = '^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$';
$('.steel').selectize({
persist: false,
maxItems: 1,
valueField: 'vin',
searchField: ['vin','vin_number'],
options: [
{vin:'12345', vin_number:'12345'},
{vin:'34567',vin_number:'34567'},
{vin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vin ? '' + escape(item.vin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#number').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.input_search').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('.input_search1').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#number1').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#crossnumber1').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#mark1').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#name2').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#crossnumber').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#mark').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
$('#name1').selectize({
persist: false,
maxItems: 1,
valueField: 'vinvin',
searchField: ['vinvin','vin_number'],
options: [
{vinvin:'12345', vin_number:'12345'},
{vinvin:'34567',vin_number:'34567'},
{vinvin:'75434',vin_number:'75434'}
],
render: {
item: function(item, escape) {
return '' +
(item.vinvin ? '' + escape(item.vinvin) + '' : '')+
(item.vin_number ? '' + escape(item.vin_number) + '' : '') +
'
';
},
option: function(item, escape) {
var label = item.vinvin || item.vin_number;
var caption = item.vin ? item.vin_number : null;
return '' +
'' + escape(label) + '' +
(caption ? '' + escape(caption) + '' : '') +
'
';
}
},
createFilter: function(input) {
var match, regex;
// email@address.com
regex = new RegExp('^' + REGEX_EMAIL + '$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[0]);
// name
regex = new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i');
match = input.match(regex);
if (match) return !this.options.hasOwnProperty(match[2]);
return false;
},
create: function(input) {
if ((new RegExp('^' + REGEX_EMAIL + '$', 'i')).test(input)) {
return {email: input};
}
var match = input.match(new RegExp('^([^<]*)\<' + REGEX_EMAIL + '\>$', 'i'));
if (match) {
return {
vin : match[1],
vin_number : $.trim(match[1])
};
}
alert('Invalid email address.');
return false;
}
});
// $('.status').selectize({
// create: true,
// sortField: 'text'
// });
$('.areamark').click(function(){
$('.area1').css({'opacity':'1'})
});
$('.area1').click(function(){
$('.area2').css({'opacity':'1'})
});
$('.area3').click(function(){
$('.area4').css({'opacity':'1'})
});
$('.area4').click(function(){
$('.area5').css({'opacity':'1'})
});
});