浏览代码

configeditor fixes

jrivard 10 年之前
父节点
当前提交
a30f054e43

+ 0 - 1
pwm/servlet/src/password/pwm/util/intruder/IntruderManager.java

@@ -100,7 +100,6 @@ public class IntruderManager implements Serializable, PwmService {
         if (!pwmApplication.getConfig().readSettingAsBoolean(PwmSetting.INTRUDER_ENABLE)) {
             final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_SERVICE_NOT_AVAILABLE,"intruder module not enabled");
             LOGGER.error(errorInformation.toDebugStr());
-            startupError = errorInformation;
             status = STATUS.CLOSED;
             return;
         }

+ 3 - 0
pwm/servlet/web/WEB-INF/jsp/helpdesk.jsp

@@ -41,6 +41,9 @@
             <br/>
             <table class="noborder" style="margin-left: auto; margin-right: auto; width:100px; table-layout: fixed" >
                 <tr>
+                    <td style="width:15px">
+                        <span class="fa fa-search"></span>
+                    </td>
                     <td style="width:400px">
                             <input type="search" id="username" name="username" class="helpdesk-input-username" style="width: 400px" <pwm:autofocus/>
                                    value="<%=helpdeskBean.getSearchString()!=null?helpdeskBean.getSearchString():""%>" />

+ 3 - 0
pwm/servlet/web/WEB-INF/jsp/peoplesearch.jsp

@@ -60,6 +60,9 @@
             <br/>
             <table class="noborder" style="margin-left: auto; margin-right: auto; width:100px; table-layout: fixed" >
                 <tr>
+                    <td style="width:15px">
+                        <span class="fa fa-search"></span>
+                    </td>
                     <td style="width:400px">
                         <input type="search" id="username" name="username" class="peoplesearch-input-username" <pwm:autofocus/> autocomplete="off"/>
                     </td>

+ 13 - 1
pwm/servlet/web/public/resources/configStyle.css

@@ -490,4 +490,16 @@ input[type=range]:focus::-ms-fill-lower {
 }
 input[type=range]:focus::-ms-fill-upper {
     background: #ccc;
-}
+}
+
+button {
+    border-style:none;
+    padding: 4px 12px;
+    margin: 9px 7px;
+    text-decoration: none;
+    color: #3e374c;
+    background: white;
+    cursor: pointer;
+}.button:disabled {
+     color: #9e9e9e;
+ }

+ 15 - 9
pwm/servlet/web/public/resources/js/configeditor-settings.js

@@ -103,7 +103,7 @@ LocalizedStringValueHandler.drawRow = function(parentDiv, settingKey, localeStri
     tableHtml += '<td id="button-' + inputID + '" style="border-width:0; width: 15px"><span class="fa fa-edit"/></ta>';
 
     tableHtml += '<td id="panel-' + inputID + '">';
-    tableHtml += '<div class="configStringPanel">' + ((value != null && value.length > 0) ? value : '&nbsp;') + '</div>';
+    tableHtml += '<div id="value-' + inputID + '" class="configStringPanel"></div>';
     tableHtml += '</td>';
 
     var defaultLocale = (localeString == null || localeString.length < 1);
@@ -122,6 +122,7 @@ LocalizedStringValueHandler.drawRow = function(parentDiv, settingKey, localeStri
     PWM_MAIN.addEventHandler("button-" + settingKey + '-' + localeString + "-deleteRow","click",function(){
         LocalizedStringValueHandler.removeLocaleSetting(settingKey, localeString);
     });
+    UILibrary.addTextValueToElement('value-' + inputID, (value != null && value.length > 0) ? value : ' ');
 
     var editFunction = function() {
         UILibrary.stringEditorDialog({
@@ -253,14 +254,11 @@ StringArrayValueHandler.drawRow = function(settingKey, iteration, value, itemCou
 
     var inputID = 'value-' + settingKey + '-' + iteration;
 
-    // clear the old dijit node (if it exists)
-    PWM_MAIN.clearDijitWidget(inputID);
-
     var valueRow = document.createElement("tr");
     valueRow.setAttribute("style", "border-width: 0");
     valueRow.setAttribute("id",inputID + "_row");
 
-    var rowHtml = '<td style=""><div class="configStringPanel" id="' + inputID + '">' + value + '</div></td>';
+    var rowHtml = '<td style=""><div class="configStringPanel" id="' + inputID + '"></div></td>';
 
     var downButtonID = 'button-' + settingKey + '-' + iteration + '-moveDown';
     rowHtml += '<td style="border:0">';
@@ -287,6 +285,7 @@ StringArrayValueHandler.drawRow = function(settingKey, iteration, value, itemCou
     valueRow.innerHTML = rowHtml;
     parentDivElement.appendChild(valueRow);
 
+    UILibrary.addTextValueToElement(inputID, value);
     if (syntax != 'PROFILE') {
         PWM_MAIN.addEventHandler(inputID,'click',function(){
             StringArrayValueHandler.valueHandler(settingKey,iteration);
@@ -1436,7 +1435,7 @@ ActionHandler.drawRow = function(parentDiv, settingKey, iteration, value) {
         PWM_VAR['clientSettingCache'][settingKey][iteration]['description'] = PWM_MAIN.getObject('input-' + inputID + '-description').value;
         ActionHandler.writeFormSetting(settingKey);
     });
-    PWM_MAIN.addEventHandler('select-' + inputID + '-type','input',function(){
+    PWM_MAIN.addEventHandler('select-' + inputID + '-type','change',function(){
         PWM_VAR['clientSettingCache'][settingKey][iteration]['type'] = PWM_MAIN.getObject('select-' + inputID + '-type').value;
         ActionHandler.writeFormSetting(settingKey);
     });
@@ -1551,7 +1550,7 @@ ActionHandler.showOptionsDialog = function(keyName, iteration) {
                     ActionHandler.showHeadersDialog(keyName,iteration);
                 });
                 if (PWM_VAR['clientSettingCache'][keyName][iteration]['type'] == 'webservice') {
-                    PWM_MAIN.addEventHandler('select-' + inputID + '-method','input',function(){
+                    PWM_MAIN.addEventHandler('select-' + inputID + '-method','change',function(){
                         var value = PWM_MAIN.getObject('select-' + inputID + '-method').value;
                         if (value == 'get') {
                             PWM_VAR['clientSettingCache'][keyName][iteration]['body'] = '';
@@ -1559,7 +1558,7 @@ ActionHandler.showOptionsDialog = function(keyName, iteration) {
                         PWM_VAR['clientSettingCache'][keyName][iteration]['method'] = value;
                         ActionHandler.writeFormSetting(keyName, function(){ ActionHandler.showOptionsDialog(keyName,iteration)});
                     });
-                    PWM_MAIN.addEventHandler('select-' + inputID + '-bodyEncoding','input',function(){
+                    PWM_MAIN.addEventHandler('select-' + inputID + '-bodyEncoding','change',function(){
                         PWM_VAR['clientSettingCache'][keyName][iteration]['bodyEncoding'] = PWM_MAIN.getObject('select-' + inputID + '-bodyEncoding').value;
                         ActionHandler.writeFormSetting(keyName);
                     });
@@ -1580,7 +1579,7 @@ ActionHandler.showOptionsDialog = function(keyName, iteration) {
                         PWM_VAR['clientSettingCache'][keyName][iteration]['attributeValue'] = PWM_MAIN.getObject('input-' + inputID + '-attributeValue').value;
                         ActionHandler.writeFormSetting(keyName);
                     });
-                    PWM_MAIN.addEventHandler('select-' + inputID + '-ldapMethod','input',function(){
+                    PWM_MAIN.addEventHandler('select-' + inputID + '-ldapMethod','change',function(){
                         PWM_VAR['clientSettingCache'][keyName][iteration]['ldapMethod'] = PWM_MAIN.getObject('select-' + inputID + '-ldapMethod').value;
                         ActionHandler.writeFormSetting(keyName);
                     });
@@ -2859,5 +2858,12 @@ UILibrary.stringEditorDialog = function(options){
             });
         }
     });
+};
 
+UILibrary.addTextValueToElement = function(elementID, input) {
+    var element = PWM_MAIN.getObject(elementID);
+    if (element) {
+        element.innerHTML = '';
+        element.appendChild(document.createTextNode(input));
+    }
 };

+ 1 - 1
pwm/servlet/web/public/resources/js/configmanager.js

@@ -375,7 +375,7 @@ PWM_CONFIG.heartbeatCheck = function() {
     var errorFunction = function(e) {
         handleErrorFunction('I/O error communicating with server.');
     };
-    var url = PWM_GLOBAL['url-restservice'] + "/app-data/client?checkForHealtbeat=true";
+    var url = PWM_GLOBAL['url-restservice'] + "/app-data/client?heartbeat=true";
     PWM_MAIN.ajaxRequest(url,loadFunction,{errorFunction:errorFunction,method:'GET'});
 };
 

+ 7 - 0
pwm/servlet/web/public/resources/js/helpdesk.js

@@ -239,6 +239,13 @@ PWM_HELPDESK.processHelpdeskSearch = function() {
             if (sizeExceeded) {
                 PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
                 PWM_MAIN.showTooltip({id:'maxResultsIndicator',position:'below',text:PWM_MAIN.showString('Display_SearchResultsExceeded')})
+            } else if (PWM_MAIN.isEmpty(data['data']['searchResults']) && validationProps['usernameField'].length > 0) {
+                PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
+                PWM_MAIN.showTooltip({
+                    id: 'maxResultsIndicator',
+                    position: 'below',
+                    text: PWM_MAIN.showString('Display_SearchResultsNone')
+                })
             } else {
                 PWM_MAIN.getObject('maxResultsIndicator').style.display = 'none';
             }

+ 13 - 2
pwm/servlet/web/public/resources/js/peoplesearch.js

@@ -65,7 +65,18 @@ PWM_PS.processPeopleSearch = function() {
 
             if (sizeExceeded) {
                 PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
-                PWM_MAIN.showTooltip({id:'maxResultsIndicator',position:'below',text:PWM_MAIN.showString('Display_SearchResultsExceeded')})
+                PWM_MAIN.showTooltip({
+                    id: 'maxResultsIndicator',
+                    position: 'below',
+                    text: PWM_MAIN.showString('Display_SearchResultsExceeded')
+                })
+            } else if (PWM_MAIN.isEmpty(data['data']['searchResults']) && validationProps['usernameField'].length > 0) {
+                PWM_MAIN.getObject('maxResultsIndicator').style.display = 'inherit';
+                PWM_MAIN.showTooltip({
+                    id: 'maxResultsIndicator',
+                    position: 'below',
+                    text: PWM_MAIN.showString('Display_SearchResultsNone')
+                })
             } else {
                 PWM_MAIN.getObject('maxResultsIndicator').style.display = 'none';
             }
@@ -83,7 +94,7 @@ PWM_PS.convertDetailResultToHtml = function(data) {
         htmlBody += '<div id="userPhotoParentDiv"><img style="' + styleAttr + '" src="' + blankSrc + '"></div>';
     }
     htmlBody += '<div id="peopleSearch-userDetailWrapper">';
-    htmlBody += '<table style="max-height: 450px; overflow-y: auto">';
+    htmlBody += '<table class="peopleSearch-userDetails">';
     for (var iter in data['detail']) {
         (function(iterCount){
             var attributeData = data['detail'][iterCount];

+ 6 - 0
pwm/servlet/web/public/resources/style.css

@@ -806,3 +806,9 @@ progress:not([value]) {
 @keyframes fadein { from { opacity:0; } to { opacity:1; } }
 @-moz-keyframes fadein { from { opacity:0 } to { opacity:1 } }
 @-webkit-keyframes fadein { from { opacity:0 } to { opacity:1 } }
+
+
+.peopleSearch-userDetails {
+    max-height: 450px;
+    overflow-y: auto;
+}