Skip to content

Commit 810be21

Browse files
committed
fixed incorrect build of angular wrapper v0.1.15
1 parent cbf7ffc commit 810be21

8 files changed

+63
-55
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
.idea

Gruntfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ module.exports = function (grunt) {
3838
sourceMap: true
3939
},
4040
files: {
41-
'<%= appConfig.dist %>/locationpicker.jquery.min.js': ['<%= appConfig.app %>/*.js']
41+
'<%= appConfig.dist %>/locationpicker.jquery.min.js': ['<%= appConfig.app %>/locationpicker.jquery.js'],
42+
'<%= appConfig.dist %>/angularLocationpicker.jquery.min.js': ['<%= appConfig.app %>/angularLocationpicker.jquery.js']
4243
}
4344
},
4445
beautify: {
@@ -52,7 +53,8 @@ module.exports = function (grunt) {
5253
mangle: false
5354
},
5455
files: {
55-
'<%= appConfig.dist %>/locationpicker.jquery.js': ['<%= appConfig.app %>/*.js']
56+
'<%= appConfig.dist %>/locationpicker.jquery.js': ['<%= appConfig.app %>/locationpicker.jquery.js'],
57+
'<%= appConfig.dist %>/angularLocationpicker.jquery.js': ['<%= appConfig.app %>/angularLocationpicker.jquery.js']
5658
}
5759
}
5860
}

dist/angularLocationpicker.jquery.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*! jquery-locationpicker - v0.1.15 - 2016-09-24 */
2+
"use strict";
3+
4+
angular.module("angular-jquery-locationpicker", []).constant("angularJQueryLocationpickerDefaultValue", {
5+
css: {
6+
width: "550px",
7+
height: "400px",
8+
"float": "left"
9+
}
10+
}).service("angularJQueryLocationpickerService", [ "angularJQueryLocationpickerDefaultValue", function(defaultValue) {
11+
var service = {};
12+
service.callAutosizeOnInit = function(element, initCb) {
13+
var cb = initCb;
14+
if (!!cb) {
15+
initCb = function() {
16+
$(element).locationpicker("autosize");
17+
cb();
18+
};
19+
} else {
20+
initCb = function() {
21+
$(element).locationpicker("autosize");
22+
};
23+
}
24+
};
25+
service.checkDefaultStyles = function(element) {
26+
var elementStyle = element[0].style;
27+
element.css({
28+
width: elementStyle.width || defaultValue.css.width,
29+
height: elementStyle.height || defaultValue.css.height,
30+
"float": elementStyle.float || defaultValue.css.float,
31+
overflow: "hidden"
32+
});
33+
};
34+
return service;
35+
} ]).directive("jqueryLocationpicker", [ "angularJQueryLocationpickerService", function(service) {
36+
return {
37+
restrict: "EA",
38+
replace: true,
39+
scope: {
40+
options: "="
41+
},
42+
link: function(scope, element, attrs) {
43+
service.checkDefaultStyles(element);
44+
service.callAutosizeOnInit(element, scope.options.oninitialized);
45+
$(element).locationpicker(scope.options);
46+
}
47+
};
48+
} ]);

dist/angularLocationpicker.jquery.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angularLocationpicker.jquery.min.js.map

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

dist/locationpicker.jquery.js

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,4 @@
1-
/*! jquery-locationpicker - v0.1.15 - 2016-09-23 */
2-
"use strict";
3-
4-
angular.module("angular-jquery-locationpicker", []).constant("angularJQueryLocationpickerDefaultValue", {
5-
css: {
6-
width: "550px",
7-
height: "400px",
8-
"float": "left"
9-
}
10-
}).service("angularJQueryLocationpickerService", [ "angularJQueryLocationpickerDefaultValue", function(defaultValue) {
11-
var service = {};
12-
service.callAutosizeOnInit = function(element, initCb) {
13-
var cb = initCb;
14-
if (!!cb) {
15-
initCb = function() {
16-
$(element).locationpicker("autosize");
17-
cb();
18-
};
19-
} else {
20-
initCb = function() {
21-
$(element).locationpicker("autosize");
22-
};
23-
}
24-
};
25-
service.checkDefaultStyles = function(element) {
26-
var elementStyle = element[0].style;
27-
element.css({
28-
width: elementStyle.width || defaultValue.css.width,
29-
height: elementStyle.height || defaultValue.css.height,
30-
"float": elementStyle.float || defaultValue.css.float,
31-
overflow: "hidden"
32-
});
33-
};
34-
return service;
35-
} ]).directive("jqueryLocationpicker", [ "angularJQueryLocationpickerService", function(service) {
36-
return {
37-
restrict: "EA",
38-
replace: true,
39-
scope: {
40-
options: "="
41-
},
42-
link: function(scope, element, attrs) {
43-
service.checkDefaultStyles(element);
44-
service.callAutosizeOnInit(element, scope.options.oninitialized);
45-
$(element).locationpicker(scope.options);
46-
}
47-
};
48-
} ]);
49-
1+
/*! jquery-locationpicker - v0.1.15 - 2016-09-24 */
502
(function($) {
513
function GMapContext(domElement, options) {
524
var _map = new google.maps.Map(domElement, options);

dist/locationpicker.jquery.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/locationpicker.jquery.min.js.map

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

0 commit comments

Comments
 (0)