syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1450280 - in /syncope/trunk/console/src/main: java/org/apache/syncope/console/pages/SchemaModalPage.java resources/org/apache/syncope/console/pages/SchemaModalPage.html
Date Tue, 26 Feb 2013 17:05:16 GMT
Author: massi
Date: Tue Feb 26 17:05:15 2013
New Revision: 1450280

URL: http://svn.apache.org/r1450280
Log:
Added Jexl help tooltip into schema modal page SYNCOPE-210

Modified:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java?rev=1450280&r1=1450279&r2=1450280&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
Tue Feb 26 17:05:15 2013
@@ -30,6 +30,7 @@ import org.apache.syncope.common.to.Sche
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.AttributeSchemaType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.JexlHelpUtil;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
@@ -37,11 +38,13 @@ import org.apache.syncope.console.wicket
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.CompoundPropertyModel;
@@ -89,7 +92,6 @@ public class SchemaModalPage extends Abs
                 getString("conversionPattern"), new PropertyModel<String>(schema, "conversionPattern"));
 
         final IModel<List<String>> validatorsList = new LoadableDetachableModel<List<String>>()
{
-
             private static final long serialVersionUID = 5275935387613157437L;
 
             @Override
@@ -138,7 +140,6 @@ public class SchemaModalPage extends Abs
         }
 
         type.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
             private static final long serialVersionUID = -1107858522700306810L;
 
             @Override
@@ -174,7 +175,6 @@ public class SchemaModalPage extends Abs
         });
 
         final AutoCompleteTextField mandatoryCondition = new AutoCompleteTextField("mandatoryCondition")
{
-
             private static final long serialVersionUID = -2428903969518079100L;
 
             @Override
@@ -197,7 +197,6 @@ public class SchemaModalPage extends Abs
         };
 
         mandatoryCondition.add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
             private static final long serialVersionUID = -1107858522700306810L;
 
             @Override
@@ -205,6 +204,12 @@ public class SchemaModalPage extends Abs
             }
         });
 
+        final WebMarkupContainer pwdJexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
+        schemaForm.add(pwdJexlHelp);
+
+        final AjaxLink pwdQuestionMarkJexlHelp = JexlHelpUtil.getAjaxLink(pwdJexlHelp, "questionMarkJexlHelp");
+        schemaForm.add(pwdQuestionMarkJexlHelp);
+
         final AjaxCheckBoxPanel multivalue = new AjaxCheckBoxPanel("multivalue", getString("multivalue"),
                 new PropertyModel<Boolean>(schema, "multivalue"));
 
@@ -215,7 +220,6 @@ public class SchemaModalPage extends Abs
                 getString("uniqueConstraint"), new PropertyModel<Boolean>(schema, "uniqueConstraint"));
 
         final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit"))
{
-
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
@@ -255,7 +259,6 @@ public class SchemaModalPage extends Abs
         };
 
         final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel"))
{
-
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html?rev=1450280&r1=1450279&r2=1450280&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html
(original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html
Tue Feb 26 17:05:15 2013
@@ -17,128 +17,139 @@ specific language governing permissions 
 under the License.
 -->
 <wicket:head>
-  <style type="text/css">
-    /* Style for autocomplete field */
-    div.wicket-aa {
-      font-family: "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana;
-      font-size: 12px;
-      background-color: white;
-      border-width: 1px;
-      border-color: #cccccc;
-      border-style: solid;
-      padding: 2px;
-      margin: 1px 0 0 0;
-      text-align:left;
-    }
-    div.wicket-aa ul { list-style:none; padding: 2px; margin:0; }
-    div.wicket-aa ul li.selected { background-color: #FFFF00; padding: 2px; margin:0; }
-  </style>
+    <style type="text/css">
+        /* Style for autocomplete field */
+        div.wicket-aa {
+            font-family: "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana;
+            font-size: 12px;
+            background-color: white;
+            border-width: 1px;
+            border-color: #cccccc;
+            border-style: solid;
+            padding: 2px;
+            margin: 1px 0 0 0;
+            text-align:left;
+        }
+        div.wicket-aa ul { list-style:none; padding: 2px; margin:0; }
+        div.wicket-aa ul li.selected { background-color: #FFFF00; padding: 2px; margin:0;
}
+    </style>
 </wicket:head>
 <wicket:extend>
-  <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+    <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
 <div style="margin:10px">
-  <form wicket:id="form">
-    <div id="formtable">
-      <div class="tablerow alt">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="name"><wicket:message key="name"/></label>
+    <form wicket:id="form">
+        <div id="formtable">
+            <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="name"><wicket:message key="name"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="name">[name]</span>
+                </div>
+            </div>
+
+            <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="conversionPattern"><wicket:message key="conversionPattern"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="conversionPattern">[conversionPattern]</span>
+                </div>
+            </div>
+
+            <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="validatorClass"><wicket:message key="validatorClass"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="validatorClass">[validatorClass]</span>
+                </div>
+            </div>
+
+            <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="type"><wicket:message key="type"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="type">[type]</span>
+                </div>
+            </div>
+
+            <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="mandatoryCondition"><wicket:message key="mandatoryCondition"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <input type="text" class="ui-widget-content ui-corner-all"
+                           id="mandatoryCondition" wicket:id="mandatoryCondition"/>
+                    <a wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click
to help"><img src="img/help.png"/></a>
+                    <div class="help">
+                        <div wicket:id="jexlHelp" class="tooltip" style="margin-left:
-140px;">
+                            <wicket:message key="jexl_info"/>
+                            <ul>
+                                <li><wicket:message key="jexl_ex1"/></li>
+                                <li><wicket:message key="jexl_ex2"/></li>
+                            </ul>
+                            <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message
key="jexl_syntax_url"/></a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="enumerationValues"><wicket:message key="enumerationValues"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="enumerationValues">[enumerationValues]</span>
+                </div>
+            </div>
+
+            <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="enumerationKeys"><wicket:message key="enumerationKeys"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="enumerationKeys">[enumerationValues]</span>
+                </div>
+            </div>
+
+            <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="multivalue" class="onerowlabel"><wicket:message
key="multivalue"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="multivalue">[multivalue]</span>
+                </div>
+            </div>
+
+            <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="readonly" class="onerowlabel"><wicket:message key="readonly"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="readonly">[readonly]</span>
+                </div>
+            </div>
+
+            <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                    <label for="uniqueConstraint" class="onerowlabel"><wicket:message
key="uniqueConstraint"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                    <span wicket:id="uniqueConstraint">[uniqueConstraint]</span>
+                </div>
+            </div>
+        </div>
+
+        <div style="margin: 10px 0px 0">
+            <input type="submit"
+                   class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                   wicket:id="apply"/>
+            <input type="button"
+                   class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                   wicket:id="cancel"/>      
         </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="name">[name]</span>
-        </div>
-      </div>
-
-      <div class="tablerow">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="conversionPattern"><wicket:message key="conversionPattern"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="conversionPattern">[conversionPattern]</span>
-        </div>
-      </div>
-
-      <div class="tablerow alt">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="validatorClass"><wicket:message key="validatorClass"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="validatorClass">[validatorClass]</span>
-        </div>
-      </div>
-
-      <div class="tablerow">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="type"><wicket:message key="type"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="type">[type]</span>
-        </div>
-      </div>
-
-      <div class="tablerow alt">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="mandatoryCondition"><wicket:message key="mandatoryCondition"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <input type="text" class="ui-widget-content ui-corner-all"
-                 id="mandatoryCondition" wicket:id="mandatoryCondition"/>
-        </div>
-      </div>
-
-      <div class="tablerow">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="enumerationValues"><wicket:message key="enumerationValues"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="enumerationValues">[enumerationValues]</span>
-        </div>
-      </div>
-
-      <div class="tablerow alt">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="enumerationKeys"><wicket:message key="enumerationKeys"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="enumerationKeys">[enumerationValues]</span>
-        </div>
-      </div>
-
-      <div class="tablerow">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="multivalue" class="onerowlabel"><wicket:message key="multivalue"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="multivalue">[multivalue]</span>
-        </div>
-      </div>
-
-      <div class="tablerow alt">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="readonly" class="onerowlabel"><wicket:message key="readonly"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="readonly">[readonly]</span>
-        </div>
-      </div>
-
-      <div class="tablerow">
-        <div class="tablecolumn_label short_dynamicsize">
-          <label for="uniqueConstraint" class="onerowlabel"><wicket:message key="uniqueConstraint"/></label>
-        </div>
-        <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="uniqueConstraint">[uniqueConstraint]</span>
-        </div>
-      </div>
-    </div>
-
-    <div style="margin: 10px 0px 0">
-      <input type="submit"
-             class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-             wicket:id="apply"/>
-      <input type="button"
-             class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-             wicket:id="cancel"/>      
-    </div>
-  </form>
+    </form>
 </div>
 </wicket:extend>



Mime
View raw message