From e01f5601b89723e60db6a0e23797a779aaa82fc4 Mon Sep 17 00:00:00 2001 From: motss Date: Sun, 27 Sep 2015 00:07:22 +0800 Subject: [PATCH] Added 'with-backdrop' and updated demo after fixes on paper-dialog-behavior#1.0.5 and iron-overlay-behavior#1.0.8 --- README.md | 2 ++ bower.json | 2 +- demo/index.html | 36 +++++++++++++++++++++++++++++++++--- jv-datepicker.html | 2 ++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b5f8676e..b90f8ba9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Example: + + `jv-datepicker` provides a regular datepicker element. While `jv-datepicker-dialog` has a `jv-datepicker` being wrapped inside a dialog. diff --git a/bower.json b/bower.json index 12143d71..6eedf9a4 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jv-datepicker", - "version": "1.5.4", + "version": "1.6.0", "authors": [ "motss " ], diff --git a/demo/index.html b/demo/index.html index 89ba8d81..f1755a31 100644 --- a/demo/index.html +++ b/demo/index.html @@ -79,7 +79,7 @@ border: 1px solid #cfd8dc; color: #607d8b; display: block; - height: 32px; + height: 36px; -webkit-flex-shrink: 0; flex-shrink: 0; padding: 10px 4px; @@ -134,8 +134,10 @@

Simple Styled

- light theme - dark theme + light theme + dark theme + with-backdrop + Simple
@@ -229,6 +231,16 @@

Element's Boilerplate

{{takeElement}} //Note: Toggle between non-dialog and dialog element. +
+ + modal + +
+
+ + withBackdrop + +
startDay @@ -259,6 +271,10 @@

Element's Boilerplate

+ + Element's Boilerplate app.takeFormat = false; app.takeBindDate = false; app.takeFormatDate = false; + app.takeModal = true; + app.takeBackdrop = false; app.takeElement = 'jv-datepicker-dialog'; app.genCode = function(ev){ @@ -312,6 +330,12 @@

Element's Boilerplate

switch (toggleId) { case 'dialog': app.takeElement = toggleCheck? 'jv-datepicker-dialog': 'jv-datepicker'; + if (!toggleCheck) { + app.takeModal = app.takeBackdrop = !toggleCheck; + newCodeStr = modifyCode(toggleCheck, newCodeStr, ' with-backdrop'); + }else { + app.takeBackdrop = false; + } newCodeStr = modifyCode(toggleCheck, newCodeStr, '', true); newCodeStr = modifyCode(toggleCheck, newCodeStr, ' modal'); break; @@ -330,6 +354,12 @@

Element's Boilerplate

case 'fire': newCodeStr = modifyCode(toggleCheck, newCodeStr, ' on-format-date=""'); break; + case 'modal': + newCodeStr = modifyCode(toggleCheck, newCodeStr, ' modal'); + break; + case 'backdrop': + newCodeStr = modifyCode(toggleCheck, newCodeStr, ' with-backdrop'); + break; default: } if(newCodeStr) { diff --git a/jv-datepicker.html b/jv-datepicker.html index 2eaa5418..3fbc091f 100644 --- a/jv-datepicker.html +++ b/jv-datepicker.html @@ -13,6 +13,8 @@ + + `jv-datepicker` provides a regular datepicker element. While `jv-datepicker-dialog` has a `jv-datepicker` being wrapped inside a dialog.