From 98d5269ea8efa4743647d29cbf1b963bede361e2 Mon Sep 17 00:00:00 2001 From: Brijesh Bittu Date: Wed, 20 May 2015 20:04:28 +0530 Subject: [PATCH] added placeholder for prompt --- bower.json | 2 +- js/msc-script.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index a169787..7f3f14e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "medium-style-confirm", - "version": "0.3.0", + "version": "0.3.1", "homepage": "http://bitwiser.i/medium-style-confirm/", "authors": [ "Brijesh Bittu " diff --git a/js/msc-script.js b/js/msc-script.js index 5b75556..4e8f883 100644 --- a/js/msc-script.js +++ b/js/msc-script.js @@ -24,7 +24,8 @@ onOk: null, onCancel: null, okText: 'OK', - cancelText: 'Cancel' + cancelText: 'Cancel', + placeholder: 'Enter value' }; if(typeof title === 'object') { @@ -83,6 +84,7 @@ content.classList.add('msc-confirm--animate'); if(type === "prompt") { input.setAttribute("type", "text"); + input.setAttribute("placeholder", options.placeholder); input.addEventListener("keyup", function(e) { if(e.keyCode === KEY_ENTER) { ok();