diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/webapp/control/Day.js b/webapp/control/Day.js index 8106ac1..01c509d 100644 --- a/webapp/control/Day.js +++ b/webapp/control/Day.js @@ -2,6 +2,8 @@ sap.ui.define( ["sap/ui/core/Control"], function(Control) { "use strict"; + + var today = new Date().getDate(); return Control.extend("de.blogspot.openui5.adventcalendar.control.Day", /** @lends de.blogspot.openui5.adventcalendar.control.Day **/ { metadata: { @@ -10,6 +12,10 @@ sap.ui.define( type: "sap.ui.core.CSSColor", defaultValue: "auto" }, + day: { + type: "int", + defaultValue: "25" + }, inactive: { type: "boolean", defaultValue: "false" @@ -35,11 +41,12 @@ sap.ui.define( oRm.writeControlData(oControl); oRm.writeClasses(); oRm.writeStyles(); - if (oControl.getInactive() === true) { + + if (oControl.getInactive() === true || oControl.getProperty("day") > today) { oRm.writeAttribute("data-inactive", oControl.getInactive()); } oRm.writeAttribute("data-bg-color", oControl.getColor()); - oRm.writeAttribute("data-title", oControl.getTitle()); + oRm.writeAttribute("data-title", oControl.getProperty("day") > today ? "" : oControl.getTitle()); oRm.write(">"); oRm.write("
"); diff --git a/webapp/view/App.view.xml b/webapp/view/App.view.xml index fcd2be1..7027a55 100644 --- a/webapp/view/App.view.xml +++ b/webapp/view/App.view.xml @@ -11,78 +11,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - +