Skip to content

Commit 9d42d3c

Browse files
pawelczakpawelczak
authored andcommitted
Changes before release 1.3.3
1 parent 1f80f23 commit 9d42d3c

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

dist/jquery.easy-autocomplete.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,14 @@ var EasyAutocomplete = (function(scope){
375375
var EasyAutocomplete = (function(scope){
376376

377377
scope.Logger = function Logger() {
378-
var logger = {};
379378

380379
this.error = function(message) {
381380
console.log("ERROR: " + message);
382-
}
381+
};
383382

384383
this.warning = function(message) {
385384
console.log("WARNING: " + message);
386-
}
385+
};
387386
};
388387

389388
return scope;
@@ -760,11 +759,12 @@ var EasyAutocomplete = (function(scope){
760759
convertTemplateToMethod = function(template) {
761760

762761

763-
var _fields = template.fields;
762+
var _fields = template.fields,
763+
buildMethod;
764764

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

767-
var buildMethod = genericTemplates.description.method;
767+
buildMethod = genericTemplates.description.method;
768768

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

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

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

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

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

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

819-
var buildMethod = "";
820-
821815
if (typeof _fields.link === "string") {
822816
buildMethod = function(elementValue, element) {
823817
return "<a href='" + element[_fields.link] + "' >" + elementValue + "</a>";

dist/jquery.easy-autocomplete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/logger.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
var EasyAutocomplete = (function(scope){
55

66
scope.Logger = function Logger() {
7-
var logger = {};
87

98
this.error = function(message) {
109
console.log("ERROR: " + message);
11-
}
10+
};
1211

1312
this.warning = function(message) {
1413
console.log("WARNING: " + message);
15-
}
14+
};
1615
};
1716

1817
return scope;

src/template.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ var EasyAutocomplete = (function(scope){
6868
convertTemplateToMethod = function(template) {
6969

7070

71-
var _fields = template.fields;
71+
var _fields = template.fields,
72+
buildMethod;
7273

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

75-
var buildMethod = genericTemplates.description.method;
76+
buildMethod = genericTemplates.description.method;
7677

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

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

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

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

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

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

127-
var buildMethod = "";
128-
129124
if (typeof _fields.link === "string") {
130125
buildMethod = function(elementValue, element) {
131126
return "<a href='" + element[_fields.link] + "' >" + elementValue + "</a>";

0 commit comments

Comments
 (0)