From 36b5ab2b459ce74b5b33642625e336c18df18721 Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Sun, 19 Oct 2014 11:57:20 +0530 Subject: [PATCH] Updated contributors file, created a changelog, updated dev dependencies, ensured the default grunt task lints, tests and watches. --- CHANGELOG.md | 7 +++++++ Gruntfile.js | 1 + README.md | 3 ++- bower.json | 3 ++- dst/angular-modal-service.min.js | 2 +- package.json | 8 ++++---- 6 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3481108 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## v0.4 + +### Features + +* The modal can now be added to any specific element in the DOM. If + unspecified, the modal is added to the `body`, as before. + Thanks [cointilt](https://github.com/cointilt)! \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 7b9c3b1..e9d45d8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -63,6 +63,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-karma'); + grunt.registerTask('default', ['jshint', 'karma:silent', 'watch']); grunt.registerTask('dev', ['jshint', 'karma:silent', 'watch']); grunt.registerTask('release', ['uglify', 'copy']); }; \ No newline at end of file diff --git a/README.md b/README.md index e0d801f..e278f23 100644 --- a/README.md +++ b/README.md @@ -172,4 +172,5 @@ Thanks Thanks go the the following contributors: -[joshvillbrandt](https://github.com/joshvillbrandt) - Adding support for `$templateCache`. \ No newline at end of file +[joshvillbrandt](https://github.com/joshvillbrandt) - Adding support for `$templateCache`. +[cointilt](https://github.com/cointilt) - Allowing the modal to be added to a custom element, not just the body. \ No newline at end of file diff --git a/bower.json b/bower.json index ef869df..7ebe681 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-modal-service", - "version": "0.3.0", + "version": "0.4.0", "homepage": "https://github.com/dwmkerr/angular-modal-service", "authors": [ "Dave Kerr (github.com/dwmkerr)" @@ -26,6 +26,7 @@ "*.json", "server.js", "Gruntfile.js", + "CHANGELOG.md", "*.yml" ], "dependencies": { diff --git a/dst/angular-modal-service.min.js b/dst/angular-modal-service.min.js index 259a636..bf67675 100644 --- a/dst/angular-modal-service.min.js +++ b/dst/angular-modal-service.min.js @@ -1,3 +1,3 @@ -/*! angular-modal-service - v0.3.0 - 2014-10-17 github.com/dwmkerr/angular-modal-service */ +/*! angular-modal-service - v0.4.0 - 2014-10-19 github.com/dwmkerr/angular-modal-service */ !function(){"use strict";var a=angular.module("angularModalService",[]);a.factory("ModalService",["$document","$compile","$controller","$http","$rootScope","$q","$timeout","$templateCache",function(a,b,c,d,e,f,g,h){function i(){var a=this,i=function(a,b){var c=f.defer();if(a)c.resolve(a);else if(b){var e=h.get(b);void 0!==e?c.resolve(e):d({method:"GET",url:b,cache:!0}).then(function(a){h.put(b,a.data),c.resolve(a.data)}).catch(function(a){c.reject(a)})}else c.reject("No template or templateUrl has been specified.");return c.promise};a.showModal=function(a){var d=f.defer(),h=a.controller;return h?(i(a.template,a.templateUrl).then(function(i){var k=e.$new(),l=f.defer(),m={$scope:k,close:function(a,b){(void 0===b||null===b)&&(b=0),g(function(){l.resolve(a)},b)}};if(a.inputs)for(var n in a.inputs)m[n]=a.inputs[n];var o=angular.element(i),p=b(o),q=p(k);m.$element=q;var r=c(h,m);a.appendElement?a.appendElement.append(q):j.append(q);var s={controller:r,scope:k,element:q,close:l.promise};s.close.then(function(){k.$destroy(),q.remove()}),d.resolve(s)}).catch(function(a){d.reject(a)}),d.promise):(d.reject("No controller has been specified."),d.promise)}}var j=a.find("body");return new i}])}(); //# sourceMappingURL=angular-modal-service.min.js.map \ No newline at end of file diff --git a/package.json b/package.json index 3f96c33..79e8d5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-modal-service", - "version": "0.3.0", + "version": "0.4.0", "description": "AngularJS Service for showing Modals and Popups", "main": "server.js", "scripts": { @@ -26,7 +26,7 @@ "devDependencies": { "express": "^4.4.0", "grunt": "~0.4.5", - "grunt-contrib-uglify": "~0.5.0", + "grunt-contrib-uglify": "~0.6", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-watch": "~0.6.1", "karma": "~0.12.16", @@ -35,8 +35,8 @@ "karma-phantomjs-launcher": "^0.1.4", "karma-chrome-launcher": "^0.1.3", "karma-junit-reporter": "~0.2.2", - "grunt-karma": "~0.8.3", - "grunt-contrib-copy": "~0.5.0", + "grunt-karma": "~0.9", + "grunt-contrib-copy": "~0.7", "coveralls": "^2.10.0" } }