From 283de41c23dd361e10476c70432ec9309a8fea16 Mon Sep 17 00:00:00 2001 From: Vivek Yadav Date: Mon, 16 Jan 2017 12:00:21 +0530 Subject: [PATCH 1/5] valueType added to allow use the input as password valueType added to allow people use the input box as password, email, number --- angular-prompt.js | 1 + 1 file changed, 1 insertion(+) diff --git a/angular-prompt.js b/angular-prompt.js index d67508c..8c5c6d0 100644 --- a/angular-prompt.js +++ b/angular-prompt.js @@ -10,6 +10,7 @@ angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal input: false, label: '', value: '', + valueType:'text', values: false, buttons: [ {label:'Cancel',cancel:true}, From 21ab7a81d08109fbf0d61a75e16050c8f533893a Mon Sep 17 00:00:00 2001 From: Vivek Yadav Date: Mon, 16 Jan 2017 12:04:28 +0530 Subject: [PATCH 2/5] valueType added to allow use the input as password valueType is added to allow input box as password or email or number and default is text --- angular-prompt.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-prompt.html b/angular-prompt.html index 6cd0ef9..ce81931 100644 --- a/angular-prompt.html +++ b/angular-prompt.html @@ -12,7 +12,7 @@
- +
@@ -30,4 +30,4 @@ -
\ No newline at end of file +
From 5a9566d0c7d410e19cff47df7dc2d282d4229598 Mon Sep 17 00:00:00 2001 From: Vivek Yadav Date: Mon, 16 Jan 2017 12:06:17 +0530 Subject: [PATCH 3/5] valueType added to allow use the input as password valueType added to allow use the input as password, email, number default is text --- dist/angular-prompt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/angular-prompt.js b/dist/angular-prompt.js index d03b37a..84dd0a4 100644 --- a/dist/angular-prompt.js +++ b/dist/angular-prompt.js @@ -10,6 +10,7 @@ angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal input: false, label: '', value: '', + valueType:'text' values: false, buttons: [ {label:'Cancel',cancel:true}, @@ -120,7 +121,7 @@ angular.module('cgPrompt').run(['$templateCache', function($templateCache) { " \n" + "
\n" + " \n" + - " \n" + + " \n" + "
\n" + " \n" + "\n" + From 29f40f578768b7ed8d873a3bcac70bdf5f57c352 Mon Sep 17 00:00:00 2001 From: Vivek Yadav Date: Mon, 16 Jan 2017 12:08:52 +0530 Subject: [PATCH 4/5] valueType added to allow use the input as password valueType added to allow use the input as password, email, number Default value is text --- dist/angular-prompt.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/angular-prompt.min.js b/dist/angular-prompt.min.js index 168f726..38e18c6 100644 --- a/dist/angular-prompt.min.js +++ b/dist/angular-prompt.min.js @@ -1 +1 @@ -angular.module("cgPrompt",["ui.bootstrap"]),angular.module("cgPrompt").factory("prompt",["$uibModal","$q",function(a,b){var c=function(c){var d={title:"",message:"",input:!1,label:"",value:"",values:!1,buttons:[{label:"Cancel",cancel:!0},{label:"OK",primary:!0}]};void 0===c&&(c={});for(var e in d)void 0===c[e]&&(c[e]=d[e]);var f=b.defer();return a.open({templateUrl:"angular-prompt.html",controller:"cgPromptCtrl",resolve:{options:function(){return c}}}).result.then(function(a){c.input?f.resolve(a.input):f.resolve(a.button)},function(){f.reject()}),f.promise};return c}]),angular.module("cgPrompt").controller("cgPromptCtrl",["$scope","options","$timeout",function(a,b,c){a.input={name:b.value},a.options=b,a.form={},a.buttonClicked=function(c){return c.cancel?void a.$dismiss():b.input&&a.form.cgPromptForm.$invalid?void(a.changed=!0):void a.$close({button:c,input:a.input.name})},a.submit=function(){var b;angular.forEach(a.options.buttons,function(a){a.primary&&(b=a)}),b&&a.buttonClicked(b)},c(function(){var a=document.querySelector("#cgPromptInput");a&&(a.select&&a.select(),a.focus&&a.focus())},100)}]),angular.module("cgPrompt").run(["$templateCache",function(a){"use strict";a.put("angular-prompt.html",'
\n \n \n \n
')}]); \ No newline at end of file +angular.module("cgPrompt",["ui.bootstrap"]),angular.module("cgPrompt").factory("prompt",["$uibModal","$q",function(a,b){var c=function(c){var d={title:"",message:"",input:!1,label:"",value:"",valueType:'text',values:!1,buttons:[{label:"Cancel",cancel:!0},{label:"OK",primary:!0}]};void 0===c&&(c={});for(var e in d)void 0===c[e]&&(c[e]=d[e]);var f=b.defer();return a.open({templateUrl:"angular-prompt.html",controller:"cgPromptCtrl",resolve:{options:function(){return c}}}).result.then(function(a){c.input?f.resolve(a.input):f.resolve(a.button)},function(){f.reject()}),f.promise};return c}]),angular.module("cgPrompt").controller("cgPromptCtrl",["$scope","options","$timeout",function(a,b,c){a.input={name:b.value},a.options=b,a.form={},a.buttonClicked=function(c){return c.cancel?void a.$dismiss():b.input&&a.form.cgPromptForm.$invalid?void(a.changed=!0):void a.$close({button:c,input:a.input.name})},a.submit=function(){var b;angular.forEach(a.options.buttons,function(a){a.primary&&(b=a)}),b&&a.buttonClicked(b)},c(function(){var a=document.querySelector("#cgPromptInput");a&&(a.select&&a.select(),a.focus&&a.focus())},100)}]),angular.module("cgPrompt").run(["$templateCache",function(a){"use strict";a.put("angular-prompt.html",'
\n \n \n \n
')}]); From 7d3ff8ba532a226d44e0a945855372a145ee368b Mon Sep 17 00:00:00 2001 From: Vivek Yadav Date: Mon, 16 Jan 2017 12:15:12 +0530 Subject: [PATCH 5/5] update update --- dist/angular-prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/angular-prompt.js b/dist/angular-prompt.js index 84dd0a4..2a95538 100644 --- a/dist/angular-prompt.js +++ b/dist/angular-prompt.js @@ -10,7 +10,7 @@ angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal input: false, label: '', value: '', - valueType:'text' + valueType:'text', values: false, buttons: [ {label:'Cancel',cancel:true},