syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreapatrice...@apache.org
Subject syncope git commit: [SYNCOPE-1024] now enduser manages correctly enum keys (where provided)
Date Wed, 01 Mar 2017 09:29:24 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 454af1423 -> b08bc1c4a


[SYNCOPE-1024] now enduser manages correctly enum keys (where provided)


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b08bc1c4
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b08bc1c4
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b08bc1c4

Branch: refs/heads/master
Commit: b08bc1c4a2ea9a552810f899ab4c25d0ddb5901c
Parents: 454af14
Author: Andrea Patricelli <andrea.patricelli@tirasa.net>
Authored: Wed Mar 1 10:21:20 2017 +0100
Committer: Andrea Patricelli <andrea.patricelli@tirasa.net>
Committed: Wed Mar 1 10:28:51 2017 +0100

----------------------------------------------------------------------
 .../META-INF/resources/app/js/controllers/UserController.js | 1 -
 .../resources/app/js/directives/dynamicPlainAttribute.js    | 9 +++++++++
 .../META-INF/resources/app/views/dynamicPlainAttribute.html | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b08bc1c4/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
index 9be5935..4f0cf7a 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
@@ -391,7 +391,6 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope',
'$l
         UserSelfService.update(wrappedUser, $scope.captchaInput.value).then(function (response)
{
           console.debug("Updated user: ", response);
           AuthService.logout().then(function (response) {
-            console.info("LOGOUT SUCCESS: ", response);
             console.info("User " + $scope.user.username + " SUCCESSFULLY_UPDATED");
             $rootScope.currentUser = $scope.user.username;
             $rootScope.currentOp = "SUCCESSFULLY_UPDATED";

http://git-wip-us.apache.org/repos/asf/syncope/blob/b08bc1c4/client/enduser/src/main/resources/META-INF/resources/app/js/directives/dynamicPlainAttribute.js
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/directives/dynamicPlainAttribute.js
b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/dynamicPlainAttribute.js
index 682a2bf..c267087 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/directives/dynamicPlainAttribute.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/directives/dynamicPlainAttribute.js
@@ -38,15 +38,24 @@ angular.module('self')
                     break;
                   case "Enum":
                     $scope.enumerationValues = [];
+                    $scope.enumerationKeys = [];
 
                     //SYNCOPE-911 empty value option on non required attributes 
                     if (schema.mandatoryCondition !== "true") {
                       $scope.enumerationValues.push("");
+                      $scope.enumerationKeys.push("");
                     }
                     var enumerationValuesSplitted = schema.enumerationValues.toString().split(";");
                     for (var i = 0; i < enumerationValuesSplitted.length; i++) {
                       $scope.enumerationValues.push(enumerationValuesSplitted[i]);
                     }
+                    //SYNCOPE-1024 enumeration keys mgmt
+                    if ( schema.enumerationKeys ) {
+                      var enumerationKeysSplitted = schema.enumerationKeys.toString().split(
";" );
+                      for ( var i = 0; i < enumerationKeysSplitted.length; i++ ) {
+                        $scope.enumerationKeys.push( enumerationKeysSplitted[i] );
+                      }
+                    }
                     $scope.user.plainAttrs[schema.key].values[index] = $scope.user.plainAttrs[schema.key].values[index]
                             || $scope.enumerationValues[0];
                     break;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b08bc1c4/client/enduser/src/main/resources/META-INF/resources/app/views/dynamicPlainAttribute.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/dynamicPlainAttribute.html
b/client/enduser/src/main/resources/META-INF/resources/app/views/dynamicPlainAttribute.html
index 68b9f5a..185f97f 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/dynamicPlainAttribute.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/dynamicPlainAttribute.html
@@ -98,7 +98,7 @@ under the License.
             ng-model="user.plainAttrs[schema.key].values[index]"
             ng-required="{{schema.mandatoryCondition}}">
       <option ng-repeat="value in enumerationValues" value="{{value}}">
-        {{schema.enumerationKeys[$index]|| value}}
+        {{enumerationKeys[$index] || value}}
       </option>
     </select>
   </div>


Mime
View raw message