diff --git a/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/bean/TabInfoBean.java b/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/bean/TabInfoBean.java index 143efd58d6f3cb4edd16b044d69c6dcb826bbb2c..bdada15838291b40358ef8921ace3a15818be6b6 100644 --- a/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/bean/TabInfoBean.java +++ b/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/bean/TabInfoBean.java @@ -1,205 +1,220 @@ -package it.mice.voila.runtime.springmvc.bean; - -import java.io.Serializable; -import java.util.Collection; - -public class TabInfoBean implements Serializable { - /** - * - */ - private static final long serialVersionUID = 3337446545022432232L; - private String tabName; - private String tabContent; - private String tabTitle; - - private String otherParams; - - private String imageOn; - private String imageOff; - private String imageCurrent; - private String imageTodo; - private String imageDone; - - private PageStatus[] hideFor; - - private boolean disabled; - private Collection listEntityTabBase; - - public Collection getListEntityTabBase() { - return listEntityTabBase; - } - - public void setListEntityTabBase(Collection listEntityTabBase) { - this.listEntityTabBase = listEntityTabBase; - } - - public TabInfoBean(String tabName, String tabContent, String tabTitle) { - super(); - this.tabName = tabName; - this.tabContent = tabContent; - this.tabTitle = tabTitle; - } - - public TabInfoBean(String tabName, String tabContent, String tabTitle, PageStatus... hideFor) { - super(); - this.tabName = tabName; - this.tabContent = tabContent; - this.tabTitle = tabTitle; - this.hideFor = hideFor; - } - - public TabInfoBean(String tabName, String tabContent, String tabTitle, String imgOn, String imgOff, boolean disabled) { - this.tabName = tabName; - this.tabContent = tabContent; - this.tabTitle = tabTitle; - this.imageOff = imgOff; - this.imageOn = imgOn; - this.disabled = disabled; - } - - public TabInfoBean(String tabName, String tabContent, String tabTitle, String imgOn, String imgOff, boolean disabled, Collection listEntityTabBase) { - this.listEntityTabBase=listEntityTabBase; - this.tabName = tabName; - this.tabContent = tabContent; - this.tabTitle = tabTitle; - this.imageOff = imgOff; - this.imageOn = imgOn; - this.disabled = disabled; - } - - public String getOtherParams() { - return otherParams; - } - - public void setOtherParams(String otherParams) { - this.otherParams = otherParams; - } - - public String getTabContent() { - return tabContent; - } - - public void setTabContent(String tabContent) { - this.tabContent = tabContent; - } - - public String getTabName() { - return tabName; - } - - public void setTabName(String tabName) { - this.tabName = tabName; - } - - public String getTabTitle() { - return tabTitle; - } - - public void setTabTitle(String tabTitle) { - this.tabTitle = tabTitle; - } - - /** - * @return the imageOn - */ - public String getImageOn() { - return imageOn; - } - - /** - * @param imageOn the imageOn to set - */ - public void setImageOn(String imageOn) { - this.imageOn = imageOn; - } - - /** - * @return the imageOff - */ - public String getImageOff() { - return imageOff; - } - - /** - * @param imageOff the imageOff to set - */ - public void setImageOff(String imageOff) { - this.imageOff = imageOff; - } - - /** - * @return the imageCurrent - */ - public String getImageCurrent() { - return imageCurrent; - } - - /** - * @param imageCurrent the imageCurrent to set - */ - public void setImageCurrent(String imageCurrent) { - this.imageCurrent = imageCurrent; - } - - /** - * @return the imageTodo - */ - public String getImageTodo() { - return imageTodo; - } - - /** - * @param imageTodo the imageTodo to set - */ - public void setImageTodo(String imageTodo) { - this.imageTodo = imageTodo; - } - - /** - * @return the imageDone - */ - public String getImageDone() { - return imageDone; - } - - /** - * @param imageDone the imageDone to set - */ - public void setImageDone(String imageDone) { - this.imageDone = imageDone; - } - - /** - * @return the disabled - */ - public boolean isDisabled() { - return disabled; - } - - /** - * @param disabled the disabled to set - */ - public void setDisabled(boolean disabled) { - this.disabled = disabled; - } - - public PageStatus[] getHideFor() { - return hideFor; - } - - public void setHideFor(PageStatus[] hideFor) { - this.hideFor = hideFor; - } - - public boolean hideFor(PageStatus pageStatus) { - if (getHideFor() == null) { - return false; - } - for (PageStatus ps : getHideFor()) { - if (ps.getName().equals(pageStatus.getName())) { - return true; - } - } - return false; - } -} +package it.mice.voila.runtime.springmvc.bean; + +import java.io.Serializable; +import java.util.Collection; + +public class TabInfoBean implements Serializable { + /** + * + */ + private static final long serialVersionUID = 3337446545022432232L; + private String tabName; + private String tabContent; + private String tabTitle; + + private String otherParams; + + private String imageOn; + private String imageOff; + private String imageCurrent; + private String imageTodo; + private String imageDone; + + private PageStatus[] hideFor; + + private boolean disabled; + private boolean sep = false; + private Collection listEntityTabBase; + + public Collection getListEntityTabBase() { + return listEntityTabBase; + } + + public void setListEntityTabBase(Collection listEntityTabBase) { + this.listEntityTabBase = listEntityTabBase; + } + + public TabInfoBean(String tabName, String tabContent, String tabTitle) { + super(); + this.tabName = tabName; + this.tabContent = tabContent; + this.tabTitle = tabTitle; + } + + public TabInfoBean(String tabName, String tabContent, String tabTitle, PageStatus... hideFor) { + super(); + this.tabName = tabName; + this.tabContent = tabContent; + this.tabTitle = tabTitle; + this.hideFor = hideFor; + } + + public TabInfoBean(String tabName, String tabContent, String tabTitle, String imgOn, String imgOff, boolean disabled) { + this.tabName = tabName; + this.tabContent = tabContent; + this.tabTitle = tabTitle; + this.imageOff = imgOff; + this.imageOn = imgOn; + this.disabled = disabled; + } + + public TabInfoBean(String tabName, String tabContent, String tabTitle, String imgOn, String imgOff, boolean disabled, Collection listEntityTabBase) { + this.listEntityTabBase=listEntityTabBase; + this.tabName = tabName; + this.tabContent = tabContent; + this.tabTitle = tabTitle; + this.imageOff = imgOff; + this.imageOn = imgOn; + this.disabled = disabled; + } + + public String getOtherParams() { + return otherParams; + } + + public void setOtherParams(String otherParams) { + this.otherParams = otherParams; + } + + public String getTabContent() { + return tabContent; + } + + public void setTabContent(String tabContent) { + this.tabContent = tabContent; + } + + public String getTabName() { + return tabName; + } + + public void setTabName(String tabName) { + this.tabName = tabName; + } + + public String getTabTitle() { + return tabTitle; + } + + public void setTabTitle(String tabTitle) { + this.tabTitle = tabTitle; + } + + /** + * @return the imageOn + */ + public String getImageOn() { + return imageOn; + } + + /** + * @param imageOn the imageOn to set + */ + public void setImageOn(String imageOn) { + this.imageOn = imageOn; + } + + /** + * @return the imageOff + */ + public String getImageOff() { + return imageOff; + } + + /** + * @param imageOff the imageOff to set + */ + public void setImageOff(String imageOff) { + this.imageOff = imageOff; + } + + /** + * @return the imageCurrent + */ + public String getImageCurrent() { + return imageCurrent; + } + + /** + * @param imageCurrent the imageCurrent to set + */ + public void setImageCurrent(String imageCurrent) { + this.imageCurrent = imageCurrent; + } + + /** + * @return the imageTodo + */ + public String getImageTodo() { + return imageTodo; + } + + /** + * @param imageTodo the imageTodo to set + */ + public void setImageTodo(String imageTodo) { + this.imageTodo = imageTodo; + } + + /** + * @return the imageDone + */ + public String getImageDone() { + return imageDone; + } + + /** + * @param imageDone the imageDone to set + */ + public void setImageDone(String imageDone) { + this.imageDone = imageDone; + } + + /** + * @return the disabled + */ + public boolean isDisabled() { + return disabled; + } + + /** + * @return the sep + */ + public boolean isSep() { + return sep; + } + + /** + * @param sep the sep to set + */ + public void setSep(boolean sep) { + this.sep = sep; + } + + /** + * @param disabled the disabled to set + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + public PageStatus[] getHideFor() { + return hideFor; + } + + public void setHideFor(PageStatus[] hideFor) { + this.hideFor = hideFor; + } + + public boolean hideFor(PageStatus pageStatus) { + if (getHideFor() == null) { + return false; + } + for (PageStatus ps : getHideFor()) { + if (ps.getName().equals(pageStatus.getName())) { + return true; + } + } + return false; + } +} diff --git a/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/taglibs/TabsTag.java b/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/taglibs/TabsTag.java index 95910a9d3862a770251b0814bcdc10dcb26b699a..85a25acccbdc19dfecd177ddccbddd41ee0e5be1 100644 --- a/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/taglibs/TabsTag.java +++ b/voila-runtime-springmvc/src/main/java/it/mice/voila/runtime/springmvc/taglibs/TabsTag.java @@ -148,6 +148,7 @@ public class TabsTag extends AbstractHtmlElementTag { } else { className = "tab-active"; } + className = addSepClassIfRequired(tabInfoBean, className); tagWriter.writeAttribute("class", className); writeImage(tagWriter, tabInfoBean, title, true, true, className, ctr, stripedTitle); @@ -171,7 +172,10 @@ public class TabsTag extends AbstractHtmlElementTag { } else { className = "tab-disabled"; } + className = addSepClassIfRequired(tabInfoBean, className); tagWriter.writeAttribute("class", className); + } else if (tabInfoBean.isSep()) { + tagWriter.writeAttribute("class", "sep"); } if (!isWizard()) { tagWriter.startTag("a"); @@ -203,6 +207,14 @@ public class TabsTag extends AbstractHtmlElementTag { } + private String addSepClassIfRequired(TabInfoBean tabInfoBean, String className) { + String result = className; + if (tabInfoBean.isSep()) { + result += " sep"; + } + return result; + } + private void writeBootstrapOutput(TagWriter tagWriter) throws JspException { tagWriter.startTag("ul"); tagWriter.writeAttribute("id", "tabPane"); @@ -236,6 +248,7 @@ public class TabsTag extends AbstractHtmlElementTag { className = "active"; } tagWriter.writeAttribute("role", "presentation"); + className = addSepClassIfRequired(tabInfoBean, className); tagWriter.writeAttribute("class", className); //writeImage(tagWriter, tabInfoBean, title, true, true, className, ctr, stripedTitle); @@ -259,7 +272,10 @@ public class TabsTag extends AbstractHtmlElementTag { } else { className = "tab-disabled"; } + className = addSepClassIfRequired(tabInfoBean, className); tagWriter.writeAttribute("class", className); + } else if (tabInfoBean.isSep()) { + tagWriter.writeAttribute("class", "sep"); } if (!isWizard()) { tagWriter.startTag("a"); diff --git a/voila-runtime-style-responsive-adminlte/src/main/resources/META-INF/css/voila-theme.css b/voila-runtime-style-responsive-adminlte/src/main/resources/META-INF/css/voila-theme.css index 0c16a351291ca3f9e98644103e24bd0fb6c09708..0a41ab3f32e76760011c339d3b48404230f394f6 100644 --- a/voila-runtime-style-responsive-adminlte/src/main/resources/META-INF/css/voila-theme.css +++ b/voila-runtime-style-responsive-adminlte/src/main/resources/META-INF/css/voila-theme.css @@ -3769,6 +3769,11 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f8fa', end box-shadow: 1px 1px 6px rgba(128, 228, 220, 0.6); } +.nav-tabs > li.sep > a { + border-left-width: 3px; + margin-left: 8px; +} + .drop-shadow { border: 1px solid #ccc; box-shadow: 0px 0px 10px rgba(128, 228, 220, 0.49);