Skip to content

Commit

Permalink
Added mscAlert.
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed May 20, 2015
1 parent ef64804 commit 002399e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medium-style-confirm",
"version": "0.3.2",
"version": "0.4.0",
"homepage": "http://bitwiser.i/medium-style-confirm/",
"authors": [
"Brijesh Bittu <[email protected]>"
Expand Down
9 changes: 7 additions & 2 deletions js/msc-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@
body.appendChild(ce('p','', options.subtitle));

action.appendChild(okBtn);
action.appendChild(cancelbtn);
if(type !== "alert") {
action.appendChild(cancelbtn);
cancelbtn.addEventListener('click', cancel);
}

okBtn.addEventListener('click', ok);
cancelbtn.addEventListener('click', cancel);

content.appendChild(cTitle);
content.appendChild(body);
Expand Down Expand Up @@ -137,4 +139,7 @@
window.mscPrompt = function(title, sub, onOk, onCancel) {
buildUI(title, sub, onOk, onCancel, "prompt");
};
window.mscAlert = function(title, sub, onOk, onCancel) {
buildUI(title, sub, onOk, onCancel, "alert");
};
})();

0 comments on commit 002399e

Please sign in to comment.