Skip to content

Commit

Permalink
Changes before release 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelczak authored and pawelczak committed Nov 29, 2015
1 parent 1f80f23 commit 9d42d3c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
16 changes: 5 additions & 11 deletions dist/jquery.easy-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,14 @@ var EasyAutocomplete = (function(scope){
var EasyAutocomplete = (function(scope){

scope.Logger = function Logger() {
var logger = {};

this.error = function(message) {
console.log("ERROR: " + message);
}
};

this.warning = function(message) {
console.log("WARNING: " + message);
}
};
};

return scope;
Expand Down Expand Up @@ -760,11 +759,12 @@ var EasyAutocomplete = (function(scope){
convertTemplateToMethod = function(template) {


var _fields = template.fields;
var _fields = template.fields,
buildMethod;

if (template.type === "description") {

var buildMethod = genericTemplates.description.method;
buildMethod = genericTemplates.description.method;

if (typeof _fields.description === "string") {
buildMethod = function(elementValue, element) {
Expand All @@ -781,8 +781,6 @@ var EasyAutocomplete = (function(scope){

if (template.type === "iconRight") {

var buildMethod = "";

if (typeof _fields.iconSrc === "string") {
buildMethod = function(elementValue, element) {
return elementValue + "<img class='eac-icon' src='" + element[_fields.iconSrc] + "' />" ;
Expand All @@ -799,8 +797,6 @@ var EasyAutocomplete = (function(scope){

if (template.type === "iconLeft") {

var buildMethod = "";

if (typeof _fields.iconSrc === "string") {
buildMethod = function(elementValue, element) {
return "<img class='eac-icon' src='" + element[_fields.iconSrc] + "' />" + elementValue;
Expand All @@ -816,8 +812,6 @@ var EasyAutocomplete = (function(scope){

if(template.type === "links") {

var buildMethod = "";

if (typeof _fields.link === "string") {
buildMethod = function(elementValue, element) {
return "<a href='" + element[_fields.link] + "' >" + elementValue + "</a>";
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.easy-autocomplete.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
var EasyAutocomplete = (function(scope){

scope.Logger = function Logger() {
var logger = {};

this.error = function(message) {
console.log("ERROR: " + message);
}
};

this.warning = function(message) {
console.log("WARNING: " + message);
}
};
};

return scope;
Expand Down
11 changes: 3 additions & 8 deletions src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ var EasyAutocomplete = (function(scope){
convertTemplateToMethod = function(template) {


var _fields = template.fields;
var _fields = template.fields,
buildMethod;

if (template.type === "description") {

var buildMethod = genericTemplates.description.method;
buildMethod = genericTemplates.description.method;

if (typeof _fields.description === "string") {
buildMethod = function(elementValue, element) {
Expand All @@ -89,8 +90,6 @@ var EasyAutocomplete = (function(scope){

if (template.type === "iconRight") {

var buildMethod = "";

if (typeof _fields.iconSrc === "string") {
buildMethod = function(elementValue, element) {
return elementValue + "<img class='eac-icon' src='" + element[_fields.iconSrc] + "' />" ;
Expand All @@ -107,8 +106,6 @@ var EasyAutocomplete = (function(scope){

if (template.type === "iconLeft") {

var buildMethod = "";

if (typeof _fields.iconSrc === "string") {
buildMethod = function(elementValue, element) {
return "<img class='eac-icon' src='" + element[_fields.iconSrc] + "' />" + elementValue;
Expand All @@ -124,8 +121,6 @@ var EasyAutocomplete = (function(scope){

if(template.type === "links") {

var buildMethod = "";

if (typeof _fields.link === "string") {
buildMethod = function(elementValue, element) {
return "<a href='" + element[_fields.link] + "' >" + elementValue + "</a>";
Expand Down

0 comments on commit 9d42d3c

Please sign in to comment.