[prev in list] [next in list] [prev in thread] [next in thread]
List: forgerock-openidm-commit
Subject: [CommitOpenIDM] [5370] trunk: OPENIDM-3292
From: anonymous () forgerock ! org
Date: 2015-05-28 19:17:22
Message-ID: 20150528191722.7E3353F8DD () sources ! internal ! forgerock ! com
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[5370] trunk: OPENIDM-3292</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: \
bold} #msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
.info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://sources.forgerock.org/changelog/openidm/?cs=5370">5370</a></dd> \
<dt>Author</dt> <dd>huck.elliott</dd> <dt>Date</dt> <dd>2015-05-28 20:17:22 +0100 \
(Thu, 28 May 2015)</dd> </dl>
<h3>Log Message</h3>
<pre><a href="https://bugster.forgerock.org/jira/browse/OPENIDM-3292">OPENIDM-3292</a>
reviewed at CR-7011
-handle resourceCollection datatype with autocomplete selections
-add Linked Systems tab
-add tabs for arrays of resourceCollections
-add tabs for relationships where the resourceCollection path is the same as the \
parent object (i.e. managed/user parent object and managed/user resourceCollection \
property)
-bring SearchDelegate into common idm space
-make CSS changes to generic list grid to get closer to matching mockups</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkopenidmuiopenidmuiadminpomxml">trunk/openidm-ui/openidm-ui-admin/pom.xml</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsconfigroutesAdminRoutesConfigjs">t \
runk/openidm-ui/openidm-ui-admin/src/main/js/config/routes/AdminRoutesConfig.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsmainjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/main.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmainjs"> \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/main.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmanagedA \
ddEditManagedViewjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/managed/AddEditManagedView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmappingM \
appingRoleEntitlementsViewjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/MappingRoleEntitlementsView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmappingP \
ropertiesViewjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/PropertiesView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncChan \
geAssociationDialogjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/ChangeAssociationDialog.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTest \
SyncDialogjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncDialog.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTest \
SyncGridViewjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncGridView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTest \
SyncViewjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminutilMapp \
ingUtilsjs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/util/MappingUtils.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainresourcescssconfigadminStyleless">tr \
unk/openidm-ui/openidm-ui-admin/src/main/resources/css/config/adminStyle.less</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainresourceslocalesentranslationjson">t \
runk/openidm-ui/openidm-ui-admin/src/main/resources/locales/en/translation.json</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitmanagedobjectsmanagedObjectsTes \
tjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/managedobjects/managedObjectsTest.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommondelega \
tesResourceDelegatejs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/ResourceDelegate.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonmainjs \
">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/main.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresour \
ceGenericEditResourceViewjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/GenericEditResourceView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresour \
ceListResourceViewjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ListResourceView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonutilJS \
ONEditorSetupUtilsjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/JSONEditorSetupUtils.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceEdit \
ResourceViewTemplatehtml">trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/EditResourceViewTemplate.html</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceList \
ResourceViewTemplatehtml">trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ListResourceViewTemplate.html</a></li>
<li><a href="#trunkopenidmuiopenidmuiendusersrcmainjsconfigroutesAdminRoutesConfigjs" \
>trunk/openidm-ui/openidm-ui-enduser/src/main/js/config/routes/AdminRoutesConfig.js</a></li>
>
<li><a href="#trunkopenidmuiopenidmuiendusersrcmainresourcescssuserless">trunk/openidm-ui/openidm-ui-enduser/src/main/resources/css/user.less</a></li>
<li><a href="#trunkopenidmuiopenidmuiendusersrcmainresourceslocalesentranslationjson" \
>trunk/openidm-ui/openidm-ui-enduser/src/main/resources/locales/en/translation.json</a></li>
>
<li><a href="#trunkopenidmzipsrcmainresourcesconfmanagedjson">trunk/openidm-zip/src/main/resources/conf/managed.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommondelegat \
esSearchDelegatejs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/SearchDelegate.js</a></li>
<li>trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/linkedView/</li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonlinked \
ViewLinkedViewjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/linkedView/LinkedView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresour \
ceResourceCollectionArrayViewjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresour \
ceResourceCollectionRelationshipsViewjs">trunk/openidm-ui/openidm-ui-common/src/main/j \
s/org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonutilRe \
sourceCollectionUtilsjs">trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/ResourceCollectionUtils.js</a></li>
<li>trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/linkedView/</li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminlinkedViewLi \
nkedViewhtml">trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/linkedView/LinkedView.html</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceReso \
urceCollectionArrayViewTemplatehtml">trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionArrayViewTemplate.html</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceReso \
urceCollectionRelationshipsViewTemplatehtml">trunk/openidm-ui/openidm-ui-common/src/ma \
in/resources/templates/admin/resource/ResourceCollectionRelationshipsViewTemplate.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadmindelegates \
SearchDelegatejs">trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/delegates/SearchDelegate.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkopenidmuiopenidmuiadminpomxml"></a>
<div class="modfile"><h4>Modified: trunk/openidm-ui/openidm-ui-admin/pom.xml (5369 => \
5370)</h4> <pre class="diff"><span>
<span class="info">--- trunk/openidm-ui/openidm-ui-admin/pom.xml 2015-05-28 07:41:05 \
UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/pom.xml 2015-05-28 19:17:22 UTC (rev 5370)
</span><span class="lines">@@ -121,6 +121,14 @@
</span><span class="cx"> <type>js</type>
</span><span class="cx"> </dependency>
</span><span class="cx">
</span><ins>+ <dependency>
+ <groupId>org.forgerock.commons.ui.libs</groupId>
+ <artifactId>d3</artifactId>
+ <version>3.5.5</version>
+ <classifier>min</classifier>
+ <type>js</type>
+ </dependency>
+
</ins><span class="cx"> </dependencies>
</span><span class="cx">
</span><span class="cx"> <profiles>
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsconfigroutesAdminRoutesConfigjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/config/routes/AdminRoutesConfig.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/config/routes/AdminRoutesConfig.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/config/routes/AdminRoutesConfig.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -138,7 +138,8 @@
</span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", </span><span \
class="cx"> role: "ui-admin", </span><span class="cx"> \
url: /^resource\/(system)\/(.+)\/(.+)\/edit\/(.+)$/, </span><del>- \
pattern: "resource/?/?/?/edit/?" </del><ins>+ pattern: \
"resource/?/?/?/edit/?", + forceUpdate: true
</ins><span class="cx"> },
</span><span class="cx"> "adminNewSystemObjectView" : {
</span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", </span><span \
class="lines">@@ -156,7 +157,8 @@ </span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", </span><span \
class="cx"> role: "ui-admin", </span><span class="cx"> \
url: /^resource\/(managed)\/(.+)\/edit\/(.+)$/, </span><del>- pattern: \
"resource/?/?/edit/?" </del><ins>+ pattern: \
"resource/?/?/edit/?", + forceUpdate: true
</ins><span class="cx"> },
</span><span class="cx"> "adminNewManagedObjectView" : {
</span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", \
</span></span></pre></div> <a id="trunkopenidmuiopenidmuiadminsrcmainjsmainjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/main.js (5369 => 5370)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/main.js 2015-05-28 07:41:05 UTC (rev \
5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/main.js 2015-05-28 19:17:22 UTC \
(rev 5370) </span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> "bootstrap-dialog": \
"libs/bootstrap-dialog-1.34.4-min", </span><span class="cx"> \
placeholder: "libs/jquery.placeholder-2.0.8", </span><span class="cx"> \
selectize : "libs/selectize-0.12.1-min", </span><ins>+ d3 : \
"libs/d3-3.5.5-min", </ins><span class="cx"> moment: \
"libs/moment-2.8.1-min", </span><span class="cx"> AuthnDelegate: \
"org/forgerock/openidm/ui/common/delegates/AuthnDelegate", </span><span \
class="cx"> jsonEditor: "libs/jsoneditor-0.7.9-min", </span><span \
class="lines">@@ -110,6 +111,9 @@ </span><span class="cx"> selectize: {
</span><span class="cx"> deps: ["jquery"]
</span><span class="cx"> },
</span><ins>+ d3: {
+ exports: "d3"
+ },
</ins><span class="cx"> bootstrap: {
</span><span class="cx"> deps: ["jquery"]
</span><span class="cx"> },
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadmindelegatesSearchDelegatejs"></a>
<div class="delfile"><h4>Deleted: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/delegates/SearchDelegate.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/delegates/SearchDelegate.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/delegates/SearchDelegate.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-/**
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2013 ForgeRock AS. All rights reserved.
- */
-
-/*global $, define, _ */
-
-define("org/forgerock/openidm/ui/admin/delegates/SearchDelegate", [
- "org/forgerock/commons/ui/common/util/Constants",
- "org/forgerock/commons/ui/common/main/AbstractDelegate"
-], function(constants, AbstractDelegate) {
-
- var obj = new AbstractDelegate(constants.host + "/openidm");
-
- obj.searchResults = function (resource, props, searchString, comparisonOperator) \
{
- var operator = (comparisonOperator) ? comparisonOperator : "sw",
- maxPageSize = 10,
- conditions = _(props)
- .reject(function(p){ return !p; })
- .map(function(p){
- var op = operator;
-
- if(p === "_id" && op !== \
"neq"){
- op = "eq";
- }
-
- if(op !== "pr") {
- return p + ' ' + op + ' "' + \
encodeURIComponent(searchString) + '"';
- } else {
- return p + ' pr';
- }
- })
- .value();
-
- return this.serviceCall({
- "type": "GET",
- "url": "/" + resource + "?_pageSize=" + \
maxPageSize + "&_queryFilter=" + conditions.join(" or (") + \
new Array(conditions.length).join(")")// [a,b] => "a or (b)"; \
[a,b,c] => "a or (b or (c))"
- }).then(
- function (qry) {
- return _.first(qry.result,maxPageSize);//we never want more than 10 \
results from search in case _pageSize does not work
- },
- function (error){
- console.log(error);
- }
- );
- };
-
- return obj;
-});
</del></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmainjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/main.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/main.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/main.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> "./delegates/SyncDelegate",
</span><span class="cx"> "./delegates/BrowserStorageDelegate",
</span><span class="cx"> "./delegates/ExternalAccessDelegate",
</span><del>- "./delegates/SearchDelegate",
</del><span class="cx"> "./delegates/ReconDelegate",
</span><span class="cx"> "./delegates/SecurityDelegate",
</span><span class="cx"> "./delegates/WorkflowDelegate",
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmanagedAddEditManagedViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/managed/AddEditManagedView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/managed/AddEditManagedView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/managed/AddEditManagedView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -205,6 +205,11 @@
</span><span class="cx"> \
"type": "string", </span><span class="cx"> \
"title": "Path" </span><span class="cx"> \
}, </span><ins>+ "label": {
+ "type": "string",
+ "title": "Label",
+ "description": \
$.t("templates.managed.resourceCollectionRelationshipDescription") + \
}, </ins><span class="cx"> "query": \
{ </span><span class="cx"> \
"type": "object", </span><span class="cx"> \
"title": "Query", </span><span class="lines">@@ -268,7 +273,7 @@
</span><span class="cx"> "title": \
"Searchable", </span><span class="cx"> \
"type": "boolean", </span><span class="cx"> \
"required": true, </span><del>- \
"default": true </del><ins>+ \
"default": false </ins><span class="cx"> \
}, </span><span class="cx"> "required": \
{ </span><span class="cx"> "title": \
"Required", </span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmappingMappingRoleEntitlementsViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/MappingRoleEntitlementsView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/MappingRoleEntitlementsView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/MappingRoleEntitlementsView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> \
define("org/forgerock/openidm/ui/admin/mapping/MappingRoleEntitlementsView", \
[ </span><span class="cx"> \
"org/forgerock/commons/ui/common/main/AbstractView", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/mapping/MappingBaseView", \
</span><del>- "org/forgerock/openidm/ui/admin/delegates/SearchDelegate" \
</del><ins>+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate" \
</ins><span class="cx"> ], function(AbstractView, </span><span class="cx"> \
MappingBaseView, </span><span class="cx"> searchDelegate) {
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminmappingPropertiesViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/PropertiesView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/PropertiesView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/mapping/PropertiesView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> \
"org/forgerock/commons/ui/common/util/UIUtils", </span><span class="cx"> \
"org/forgerock/commons/ui/common/util/Constants", </span><span class="cx"> \
"org/forgerock/openidm/ui/admin/delegates/BrowserStorageDelegate", \
</span><del>- "org/forgerock/openidm/ui/admin/delegates/SearchDelegate", \
</del><ins>+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate", \
</ins><span class="cx"> \
"org/forgerock/openidm/ui/admin/delegates/ConnectorDelegate", </span><span \
class="cx"> "org/forgerock/openidm/ui/common/delegates/ConfigDelegate", \
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/util/MappingUtils", \
</span></span></pre></div> <a \
id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncChangeAssociationDialogjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/ChangeAssociationDialog.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/ChangeAssociationDialog.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/ChangeAssociationDialog.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/mapping/MappingBaseView", </span><span \
class="cx"> "org/forgerock/commons/ui/common/main/Configuration", \
</span><span class="cx"> \
"org/forgerock/commons/ui/common/util/UIUtils", </span><del>- \
"org/forgerock/openidm/ui/admin/delegates/SearchDelegate", </del><ins>+ \
"org/forgerock/openidm/ui/common/delegates/SearchDelegate", </ins><span \
class="cx"> "org/forgerock/openidm/ui/admin/util/MappingUtils", \
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/delegates/SyncDelegate", </span><span \
class="cx"> "bootstrap-dialog", </span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTestSyncDialogjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncDialog.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncDialog.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncDialog.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">
</span><span class="cx"> \
define("org/forgerock/openidm/ui/admin/sync/TestSyncDialog", [ </span><span \
class="cx"> "org/forgerock/commons/ui/common/main/AbstractView", \
</span><del>- "org/forgerock/openidm/ui/admin/delegates/SearchDelegate", \
</del><ins>+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate", \
</ins><span class="cx"> \
"org/forgerock/commons/ui/common/main/Configuration", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/sync/TestSyncGridView", \
</span><span class="cx"> \
"org/forgerock/commons/ui/common/util/UIUtils", </span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTestSyncGridViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncGridView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncGridView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncGridView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> \
define("org/forgerock/openidm/ui/admin/sync/TestSyncGridView", [ \
</span><span class="cx"> \
"org/forgerock/commons/ui/common/main/AbstractView", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/delegates/ReconDelegate", \
</span><del>- "org/forgerock/openidm/ui/admin/delegates/SearchDelegate", \
</del><ins>+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate", \
</ins><span class="cx"> \
"org/forgerock/commons/ui/common/main/Configuration", </span><span \
class="cx"> "org/forgerock/commons/ui/common/components/Messages" \
</span><span class="cx"> ], function (AbstractView, reconDelegate, searchDelegate, \
conf, messagesManager) { </span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminsyncTestSyncViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/sync/TestSyncView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">
</span><span class="cx"> \
define("org/forgerock/openidm/ui/admin/sync/TestSyncView", [ </span><span \
class="cx"> "org/forgerock/commons/ui/common/main/AbstractView", \
</span><del>- "org/forgerock/openidm/ui/admin/delegates/SearchDelegate", \
</del><ins>+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate", \
</ins><span class="cx"> \
"org/forgerock/commons/ui/common/main/Configuration", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/util/MappingUtils", \
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/sync/TestSyncGridView" \
</span></span></pre></div> <a \
id="trunkopenidmuiopenidmuiadminsrcmainjsorgforgerockopenidmuiadminutilMappingUtilsjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/util/MappingUtils.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/util/MappingUtils.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/util/MappingUtils.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> * @author huck.elliott
</span><span class="cx"> */
</span><span class="cx"> \
define("org/forgerock/openidm/ui/admin/util/MappingUtils", [ </span><del>- \
"org/forgerock/openidm/ui/admin/delegates/SearchDelegate", </del><ins>+ \
"org/forgerock/openidm/ui/common/delegates/SearchDelegate", </ins><span \
class="cx"> "org/forgerock/openidm/ui/admin/delegates/BrowserStorageDelegate"
</span><span class="cx"> ],
</span><span class="cx"> function(searchDelegate, browserStorageDelegate) {
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainresourcescssconfigadminStyleless"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/resources/css/config/adminStyle.less (5369 \
=> 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/resources/css/config/adminStyle.less 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/resources/css/config/adminStyle.less 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -149,8 +149,37 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
+/*
+ Graph Display
+*/
+
+
+.reportsGraphBody {
+ overflow:hidden;
+ .node circle {
+ fill: #fff;
+ stroke: @base-theme-color;
+ stroke-width: 3px;
+ }
+
+ .node text { font: 12px; }
+
+ .link {
+ fill: none;
+ stroke: #2a2f32;
+ stroke-width: 2px;
+ }
+}
+
+
+/*
+ generic resource Display
+*/
+
</ins><span class="cx"> .resourcesContainer {
</span><span class="cx"> margin-bottom:25px;
</span><ins>+ padding-top: 10px;
</ins><span class="cx">
</span><span class="cx"> .btn-toolbar, {
</span><span class="cx"> border-bottom: none;
</span><span class="lines">@@ -158,13 +187,126 @@
</span><span class="cx"> margin-bottom: 0px;
</span><span class="cx"> margin-top: 0px;
</span><span class="cx"> }
</span><ins>+
+
+ td.noData {
+ padding: 10px;
+ }
+
+ .ui-widget-content {
+ border-color:transparent !important;
+ }
</ins><span class="cx">
</span><span class="cx"> .ui-jqgrid {
</span><span class="cx"> margin: auto;
</span><span class="cx"> margin-top: 10px;
</span><ins>+ border: 1px solid #eee;
+
+ .ui-state-default {
+ border-color:transparent;
+ }
+ tr.ui-row-ltr td {
+ padding: 14px;
+ }
+ tr.ui-row-ltr :first-child {
+ padding: 12px;
+ }
+ .ui-jqgrid-sortable {
+ text-transform: uppercase;
+ }
+ .ui-jqgrid-pager {
+ background-color: #fff;
+ }
+ thead {
+ border-bottom: 2px solid #ddd;
+ tr td {
+ padding-bottom: 10px;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.editResourceViewContainer {
+ .resource-avatar {
+ display: table;
+ background: @base-theme-color;
+ color: #fff;
+ text-align: center;
+ }
+
+ .profile-header .resource-avatar {
+ width: 70px;
+ height: 70px;
+ border-radius: 70px;
+ line-height: 70px;
+ font-size: 36px;
+ }
+
+ .panel-footer {
+ padding: 10px 15px;
+ border-radius: 0;
+ background-color: transparent;
+ overflow: auto;
+ }
+
+ .page-header h4.page-type {
+ text-transform: uppercase;
+ font-size: 14px;
+ letter-spacing: 1px;
+ margin-bottom: 10px;
+ color: #666;
+ font-weight: 600;
+ margin-top: 0;
+ }
+
+ .page-header .meta {
+ margin: -10px 0 10px;
+ color: #777;
+ text-transform: none;
+ letter-spacing: 0;
+ border-left: 1px solid #ddd;
+ padding-left: 5px;
+ margin-left: 4px;
+ font-weight: 400;
+ display: inline-block;
+ margin-bottom: 0;
+ }
+
+ .tab-content {
+ background-color: #fff;
+ margin-bottom: 50px;
+ }
+
+ .fa-search {
+ margin-top: 10px;
+ }
+
+ .resourceCollectionTab {
+ padding-top: 10px;
+ }
+
+ #resource>div>h3, .tabHeaderTemplate, .tabContentTemplate {
+ display: none !important;
+ }
+
+ .back-bar a {
+ color: #777;
+ }
+
+ #linkToResource span{
+ margin-top: 10px;
+ }
+
+ .well {
+ background-color: transparent;
+ border-color: transparent;
+ }
+
+ li.resourceListItem:hover {
+ background-color: #ededed;
+ }
+}
+
</ins><span class="cx"> .list-table {
</span><span class="cx"> .list-group {
</span><span class="cx"> .list-group-item {
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrcmainresourceslocalesentranslationjson"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/main/resources/locales/en/translation.json \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/main/resources/locales/en/translation.json 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/main/resources/locales/en/translation.json 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -224,17 +224,28 @@
</span><span class="cx"> "UsersTemplate" : {
</span><span class="cx"> "remainingUsers" : "Remaining \
users" </span><span class="cx"> },
</span><ins>+ "LinkedTemplate" : {
+ "linkedResource" : "Linked Resource",
+ "linkedSystems" : "Linked Systems",
+ "noLinkedSystems" : "No Linked Systems \
Available.", + "recordMissing" : "Linked record \
missing." + },
</ins><span class="cx"> "ResourceEdit":
</span><span class="cx"> {
</span><span class="cx"> "confirmDelete": "Are you \
sure you want to delete this __objectTitle__?", </span><span class="cx"> \
"confirmDeleteSelected": "Are you sure you want to delete the selected \
__objectTitle__s?", </span><del>- "backToList": \
"Back to List", </del><ins>+ "backToList": \
"Back to __objectTitle__ List", </ins><span class="cx"> \
"addSuccess": "Successfully added __objectTitle__", </span><span \
class="cx"> "editSuccess": "Successfully updated \
__objectTitle__", </span><span class="cx"> \
"deleteSuccess": "Successfully deleted __objectTitle__", \
</span><span class="cx"> "deleteSelectedSuccess": \
"Successfully deleted selected __objectTitle__s", </span><ins>+ \
"details": "Details", </ins><span class="cx"> \
"noData": "No Data", </span><del>- \
"data": "Data" </del><ins>+ "data": \
"Data", + "search": "Enter search terms to \
find __objectTitle__ ...", + "noPendingChanges": \
"No pending changes", + "new": "New",
+ "linkedSystems": "Linked Systems"
</ins><span class="cx"> },
</span><span class="cx"> "ResourceList":
</span><span class="cx"> {
</span><span class="lines">@@ -309,7 +320,8 @@
</span><span class="cx"> "duplicateNameError" : "Duplicate \
name detected. Please provide a unique name.", </span><span class="cx"> \
"managedSchema": "Schema", </span><span class="cx"> \
"addPropertyScript": "Add script for property events.", \
</span><del>- "addManagedScript": "Add script for managed \
events." </del><ins>+ "addManagedScript": "Add script \
for managed events.", + \
"resourceCollectionRelationshipDescription": "The Label setting \
defines how the UI refers to this relationship. *Note: It is only used when the path \
to this resourceCollection is the same a the parent object's path." </ins><span \
class="cx"> }, </span><span class="cx"> "scriptEditor": {
</span><span class="cx"> "scriptDelete" : "Are you sure \
you want to delete this script?", </span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitmanagedobjectsmanagedObjectsTestjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/managedobjects/managedObjectsTest.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/managedobjects/managedObjectsTest.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/managedobjects/managedObjectsTest.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -77,8 +77,8 @@
</span><span class="cx"> \
QUnit.ok(addEditManagedView.$el.find("#addEditManaged").is(":disabled") \
=== false, "Submit button enabled after new name"); </span><span \
class="cx"> </span><span class="cx"> // Create a complex \
Schema with nested values and set that to the JSONEditor instance </span><del>- \
var jsonEditorFormat = \
{"title":"testTitle","description":"Test \
Description","properties":[{"propertyName":"stringString","title":"Test \
String","description":"Test string \
desciption","viewable":false,"searchable":false,"require \
d":true,"type":""},{"propertyName":"testArrayOfStrings","title":"Test \
Array of String","description":"Description of the test array of \
strings","viewable":true,"searchable":true,"required&quo \
t;:true,"type":{"itemType":""}},{"propertyName":"testBoolean","title":"Test \
Boolean","description":"Test boolean \
description","viewable":false,"searchable":true,"required&
quot;:false,"type":""},{"propertyName":"testInteger","title":"Test \
Integer","description":"Description of the test \
integer","viewable":false,"searchable":false,"required&q \
uot;:false,"type":""},{"propertyName":"testNumber","title":"Test \
Number","description":"Test Number \
description","viewable":true,"searchable":false,"require \
d":false,"type":""},{"propertyName":"testObjectWithComplexProperties","title":"Test \
Object with Complex Properties","description":"The description \
for the test object containing complex \
properties","viewable":false,"searchable":false,"require \
d":false,"type":[{"propertyName":"simpleProp","title":&
quot;","description":"","viewable":false,"se \
archable":false,"required":false,"type":""},{" \
propertyName":"complexArrayProp","title":"","description":"An \
array with an array of \
strings","viewable":false,"searchable":false,"required&q \
uot;:false,"type":{"itemType":{"itemType":""}} \
}]},{"propertyName":"testResourceCollection","title":"Test \
Resource Collection","description":"Description of the test \
resource collection","viewable":false,"searchable":false,&quo \
t;required":false,"type":{"path":"test/path"," \
query":{"queryFilter":"testQueryFilter","fields":["testField"],"sortKeys":["testKey","testKey2&q
uot;]}}}]};
- var jsonSchema = \
{"$schema":"http://forgerock.org/json-schema#","type":&q \
uot;object","title":"testTitle","description":"Test \
Description","properties":{"stringString":{"description":"Test \
string desciption","title":"Test \
String","viewable":false,"searchable":false,"type": \
"string"},"testArrayOfStrings":{"description":"Description \
of the test array of strings","title":"Test Array of \
String","viewable":true,"searchable":true,"type":"string"},"testBoolean":{"description":"Test \
boolean description","title":"Test \
Boolean","viewable":false,"searchable":true,"type":"string"},"testInteger":{"d
escription":"Description of the test \
integer","title":"Test \
Integer","viewable":false,"searchable":false,"type":"string"},"testNumber":{"description":"Test \
Number description","title":"Test \
Number","viewable":true,"searchable":false,"type":& \
quot;string"},"testObjectWithComplexProperties":{"description":"The \
description for the test object containing complex \
properties","title":"Test Object with Complex \
Properties","viewable":false,"searchable":false,"type&qu \
ot;:"string"},"testResourceCollection":{"description":"Description \
of the test resource collection","title":"Test Resource \
Collection","viewable":false,"searchable":false,"resourceCollection":{"pat
h":"test/path","query":{"queryFilter":"testQ \
ueryFilter","fields":["testField"],"sortKeys":[&quo \
t;testKey","testKey2"]}},"type":"string"}},"re \
quired":["stringString","testArrayOfStrings"],"order&quo \
t;:["stringString","testArrayOfStrings","testBoolean",&q \
uot;testInteger","testNumber","testObjectWithComplexProperties","testResourceCollection"]};
</del><ins>+ var jsonEditorFormat = \
{"title":"testTitle","description":"Test \
Description","properties":[{"propertyName":"stringString","title":"Test \
String","description":"Test string \
desciption","viewable":false,"searchable":false,"require \
d":true,"type":""},{"propertyName":"testArrayOfStrings","title":"Test \
Array of String","description":"Description of the test array of \
strings","viewable":true,"searchable":true,"required&quo \
t;:true,"type":{"itemType":""}},{"propertyName":"testBoolean","title":"Test \
Boolean","description":"Test boolean \
description","viewable":false,"searchable":true,"required&q
uot;:false,"type":""},{"propertyName":"testInteger","title":"Test \
Integer","description":"Description of the test \
integer","viewable":false,"searchable":false,"required&q \
uot;:false,"type":""},{"propertyName":"testNumber","title":"Test \
Number","description":"Test Number \
description","viewable":true,"searchable":false,"require \
d":false,"type":""},{"propertyName":"testObjectWithComplexProperties","title":"Test \
Object with Complex Properties","description":"The description \
for the test object containing complex \
properties","viewable":false,"searchable":false,"require \
d":false,"type":[{"propertyName":"simpleProp","title":&q
uot;","description":"","viewable":false,"sea \
rchable":false,"required":false,"type":""},{"p \
ropertyName":"complexArrayProp","title":"","description":"An \
array with an array of \
strings","viewable":false,"searchable":false,"required&q \
uot;:false,"type":{"itemType":{"itemType":""}} \
}]},{"propertyName":"testResourceCollection","title":"Test \
Resource Collection","description":"Description of the test \
resource collection","viewable":false,"searchable":false,&quo \
t;required":false,"type":{"path":"test/path"," \
label":"","query":{"queryFilter":"testQueryFil \
ter","fields":["testField"],"sortKeys":[" \
testKey","testKey2"]}}}]}; + var jsonSchema \
= {"$schema":"http://forgerock.org/json-schema#","type": \
"object","title":"testTitle","description":"Test \
Description","properties":{"stringString":{"description":"Test \
string desciption","title":"Test \
String","viewable":false,"searchable":false,"type": \
"string"},"testArrayOfStrings":{"description":"Description \
of the test array of strings","title":"Test Array of \
String","viewable":true,"searchable":true,"type":"string"},"testBoolean":{"description":"Test \
boolean description","title":"Test \
Boolean","viewable":false,"searchable":true,"type":"string"},"testInteger":{"d
escription":"Description of the test \
integer","title":"Test \
Integer","viewable":false,"searchable":false,"type":"string"},"testNumber":{"description":"Test \
Number description","title":"Test \
Number","viewable":true,"searchable":false,"type":& \
quot;string"},"testObjectWithComplexProperties":{"description":"The \
description for the test object containing complex \
properties","title":"Test Object with Complex \
Properties","viewable":false,"searchable":false,"type&qu \
ot;:"string"},"testResourceCollection":{"description":"Description \
of the test resource collection","title":"Test Resource \
Collection","viewable":false,"searchable":false,"resourceCollection":{"pat
h":"test/path","label":"","query":{&quo \
t;queryFilter":"testQueryFilter","fields":["testField&qu \
ot;],"sortKeys":["testKey","testKey2"]}},"type" \
;:"string"}},"required":["stringString","testArrayO \
fStrings"],"order":["stringString","testArrayOfStrings&q \
uot;,"testBoolean","testInteger","testNumber","testObjectWithComplexProperties","testResourceCollection"]};
</ins><span class="cx">
</span><span class="cx"> \
addEditManagedView.data.managedObjectSchema.setValue(jsonEditorFormat); </span><span \
class="cx"> </span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommondelegatesResourceDelegatejs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/ResourceDelegate.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/ResourceDelegate.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/ResourceDelegate.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -137,6 +137,14 @@
</span><span class="cx"> return configDelegate.readEntity(config);
</span><span class="cx"> });
</span><span class="cx"> };
</span><ins>+
+ obj.linkedView = function(id, resourcePath) {
+ return obj.serviceCall({
+ serviceUrl: constants.host + "/openidm/endpoint/linkedView/" + \
resourcePath, + url: id,
+ type: "GET"
+ });
+ };
</ins><span class="cx">
</span><span class="cx"> return obj;
</span><span class="cx"> });
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommondelegatesSearchDelegatejs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/SearchDelegate.js \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/SearchDelegate.js \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/delegates/SearchDelegate.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2015 ForgeRock AS. All rights reserved.
+ */
+
+/*global $, define, _ */
+
+define("org/forgerock/openidm/ui/common/delegates/SearchDelegate", [
+ "org/forgerock/commons/ui/common/util/Constants",
+ "org/forgerock/commons/ui/common/main/AbstractDelegate"
+], function(constants, AbstractDelegate) {
+
+ var obj = new AbstractDelegate(constants.host + "/openidm");
+
+ obj.searchResults = function (resource, props, searchString, comparisonOperator) \
{ + var operator = (comparisonOperator) ? comparisonOperator : "sw",
+ maxPageSize = 10,
+ conditions = _(props)
+ .reject(function(p){ return !p; })
+ .map(function(p){
+ var op = operator;
+
+ if(p === "_id" && op !== \
"neq"){ + op = "eq";
+ }
+
+ if(op !== "pr") {
+ return p + ' ' + op + ' "' + \
encodeURIComponent(searchString) + '"'; + } else \
{ + return p + ' pr';
+ }
+ })
+ .value();
+
+ return this.serviceCall({
+ "type": "GET",
+ "url": "/" + resource + "?_sortKeys=" + \
props[0] + "&_pageSize=" + maxPageSize + "&_queryFilter=" \
+ conditions.join(" or (") + new \
Array(conditions.length).join(")")// [a,b] => "a or (b)"; \
[a,b,c] => "a or (b or (c))" + }).then(
+ function (qry) {
+ return _.first(qry.result,maxPageSize);//we never want more than 10 \
results from search in case _pageSize does not work + },
+ function (error){
+ console.error(error);
+ }
+ );
+ };
+
+ return obj;
+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonlinkedViewLinkedViewjs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/linkedView/LinkedView.js \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/linkedView/LinkedView.js \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/linkedView/LinkedView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,150 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2015 ForgeRock AS. All rights reserved.
+ *
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * http://forgerock.org/license/CDDLv1.0.html
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at http://forgerock.org/license/CDDLv1.0.html
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ */
+
+/*global define, $, _, JSONEditor */
+
+define("org/forgerock/openidm/ui/common/linkedView/LinkedView", [
+ "org/forgerock/commons/ui/common/main/AbstractView",
+ "org/forgerock/openidm/ui/common/delegates/ResourceDelegate"
+], function(AbstractView, resourceDelegate) {
+
+ var LinkedView = AbstractView.extend({
+ template: "templates/admin/linkedView/LinkedView.html",
+ events: {
+ "change #linkedViewSelect": "changeResource"
+ },
+
+ render: function(args, callback) {
+ resourceDelegate.linkedView(args.id, \
args.resourcePath).then(_.bind(function(linkedData){ +
+ this.data.linkedData = linkedData;
+ this.data.linkedResources = [];
+
+ _.each(this.data.linkedData.linkedTo, function(resource, index){
+ \
this.data.linkedResources.push(this.cleanLinkName(resource.resourceName, \
resource.linkQualifier)); +
+ //This second loop is to ensure that null returned first level \
values actually display in JSON editor + //Without this it will \
not display the textfields + _.each(resource.content, \
function(attribute, key){ + if(attribute === null) {
+ this.data.linkedData.linkedTo[index].content[key] = \
""; + }
+ }, this);
+
+ }, this);
+
+ this.parentRender(_.bind(function() {
+ this.loadEditor(0);
+
+ if(callback) {
+ callback();
+ }
+ }, this));
+ }, this));
+ },
+
+ cleanLinkName: function(name, linkQualifier){
+ var cleanName = name.split("/");
+
+ if(cleanName[0] === "system" || cleanName[0] === \
"managed") { + cleanName.splice(0 ,1);
+ }
+
+ cleanName.pop();
+
+ cleanName = cleanName.join(" ");
+
+ if(linkQualifier) {
+ cleanName = cleanName +" - " +linkQualifier;
+ }
+
+ return cleanName;
+ },
+
+ changeResource: function(event) {
+ event.preventDefault();
+
+ this.loadEditor($(event.target).val());
+ },
+
+ loadEditor: function(selection) {
+ var linkToResource = "#resource/",
+ resourceId;
+
+ if(this.editor) {
+ this.editor.destroy();
+ }
+
+ if(this.data.linkedData.linkedTo.length > 0) {
+
+ this.$el.closest(".container").find("#linkedSystemsTabHeader").show();
+
+ if (this.data.linkedData.linkedTo[selection].content !== null) {
+ resourceId = \
_.last(this.data.linkedData.linkedTo[selection].resourceName.split("/")); + \
linkToResource += this.data.linkedData.linkedTo[selection].resourceName.replace(resourceId, \
"edit/" + resourceId); +
+ \
this.$el.find("#linkToResource").attr("href",linkToResource); + \
+ \
resourceDelegate.getSchema(this.data.linkedData.linkedTo[selection].resourceName.split("/")).then(_.bind(function(schema) \
{ + var propCount = 0;
+ if(schema.order) {
+ _.each(schema.order, function(prop) {
+ schema.properties[prop].propertyOrder = propCount++;
+ });
+ }
+
+ this.editor = new JSONEditor(
+ this.$el.find("#linkedViewContent")[0],
+ {
+ theme: "bootstrap3",
+ iconlib: "fontawesome4",
+ disable_edit_json: true,
+ disable_properties: true,
+ disable_array_delete: true,
+ disable_array_reorder: true,
+ disable_array_add: true,
+ schema: schema,
+ horizontalForm: true
+ }
+ );
+
+ if \
(this.data.linkedData.linkedTo[selection].content._id) { + \
delete this.data.linkedData.linkedTo[selection].content._id; + \
} +
+ \
this.editor.setValue(this.data.linkedData.linkedTo[selection].content); +
+ this.$el.find("#linkedViewContent \
h3:first").hide(); + this.$el.find(".row \
select").hide(); + this.$el.find(".row \
input").attr("disabled", true); + }, this));
+ } else {
+ \
this.$el.find("#linkedViewContent").text($.t("templates.admin.LinkedTemplate.recordMissing") \
+ ': ' + this.data.linkedData.linkedTo[selection].resourceName); + }
+ }
+ }
+ });
+
+ return LinkedView;
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonmainjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/main.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/main.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/main.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> "./resource/EditResourceView",
</span><span class="cx"> "./resource/GenericEditResourceView",
</span><span class="cx"> "./resource/ResourceEditViewRegistry",
</span><ins>+ "./resource/ResourceCollectionArrayView",
</ins><span class="cx">
</span><span class="cx"> "./delegates/ConfigDelegate",
</span><span class="cx"> "./delegates/InternalUserDelegate",
</span><span class="lines">@@ -38,7 +39,6 @@
</span><span class="cx"> "./delegates/SiteConfigurationDelegate",
</span><span class="cx"> "./delegates/OpenAMProxyDelegate",
</span><span class="cx"> "./delegates/ResourceDelegate",
</span><del>- "./delegates/SystemHealthDelegate",
</del><span class="cx">
</span><span class="cx"> "./login/InternalLoginHelper",
</span><span class="cx"> "./login/AuthenticationUnavailable",
</span><span class="lines">@@ -46,9 +46,11 @@
</span><span class="cx"> "./util/Constants",
</span><span class="cx"> "./util/AMLoginUtils",
</span><span class="cx"> "./util/JSONEditorSetupUtils",
</span><del>-
</del><ins>+
</ins><span class="cx"> "./dashboard/DashboardWidgetLoader",
</span><span class="cx"> "./dashboard/widgets/MemoryUsageWidget",
</span><span class="cx"> "./dashboard/widgets/ReconProcessesWidget",
</span><del>- "./dashboard/widgets/CPUUsageWidget"
</del><ins>+ "./dashboard/widgets/CPUUsageWidget",
+
+ "./linkedView/LinkedView"
</ins><span class="cx"> ]);
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresourceGenericEditResourceViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/GenericEditResourceView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/GenericEditResourceView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/GenericEditResourceView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -33,8 +33,27 @@
</span><span class="cx"> \
"org/forgerock/commons/ui/common/util/Constants", </span><span class="cx"> \
"org/forgerock/commons/ui/common/util/UIUtils", </span><span class="cx"> \
"org/forgerock/openidm/ui/common/delegates/ResourceDelegate", </span><del>- \
"org/forgerock/commons/ui/common/components/Messages"
-], function(AbstractView, eventManager, constants, uiUtils, resourceDelegate, \
messagesManager) { </del><ins>+ \
"org/forgerock/openidm/ui/common/delegates/SearchDelegate", + \
"org/forgerock/commons/ui/common/components/Messages", + \
"org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView", + \
"org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView",
+ "org/forgerock/openidm/ui/common/util/ResourceCollectionUtils",
+ "org/forgerock/openidm/ui/common/linkedView/LinkedView",
+ "org/forgerock/commons/ui/common/main/Router"
+], function(
+ AbstractView,
+ eventManager,
+ constants,
+ uiUtils,
+ resourceDelegate,
+ searchDelegate,
+ messagesManager,
+ ResourceCollectionArrayView,
+ ResourceCollectionRelationshipsView,
+ resourceCollectionUtils,
+ LinkedView,
+ router
+ ) {
</ins><span class="cx"> var EditResourceView = AbstractView.extend({
</span><span class="cx"> template: \
"templates/admin/resource/EditResourceViewTemplate.html", </span><span \
class="cx"> </span><span class="lines">@@ -47,7 +66,8 @@
</span><span class="cx"> render: function(args, callback) {
</span><span class="cx"> var resourceReadPromise,
</span><span class="cx"> schemaPromise = \
resourceDelegate.getSchema(args), </span><del>- objectId = (args[0] \
=== "managed") ? args[2] : args[3]; </del><ins>+ objectId = \
(args[0] === "managed") ? args[2] : args[3], + displayField;
</ins><span class="cx">
</span><span class="cx"> this.data.args = args;
</span><span class="cx">
</span><span class="lines">@@ -73,12 +93,46 @@
</span><span class="cx"> $.when(resourceReadPromise, \
schemaPromise).then(_.bind(function(resource, schema){ </span><span class="cx"> \
this.data.objectTitle = schema.title || this.objectName; </span><span class="cx"> \
</span><ins>+ this.data.schema = schema;
+
</ins><span class="cx"> if(this.isSystemResource) {
</span><span class="cx"> this.data.objectTitle = this.objectName;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if(!this.data.newObject) {
+ if(this.isSystemResource) {
+ displayField = _.chain(schema.properties)
+ .map(function(val, key) { val.name = key; \
return val; }) + .where({ nativeName: \
"__NAME__" }) + .value();
+
+ if(displayField) {
+ displayField = displayField[0].name;
+ } else {
+ displayField = _.keys(schema.properties)[0];
+ }
+ } else {
+ displayField = schema.order[0];
+ }
+
+ this.data.objectDisplayText = resource[0][displayField];
+ }
+
+ this.data.backBtnText = \
$.t("templates.admin.ResourceEdit.backToList",{ objectTitle: \
this.data.objectTitle }); +
</ins><span class="cx"> this.parentRender(function(){
</span><span class="cx"> this.setupEditor(resource, schema);
</span><ins>+
+ if(!this.data.newObject) {
+ this.linkedView = new LinkedView();
+ this.linkedView.element = "#linkedView";
+
+ this.linkedView.render({id: resource[0]._id, resourcePath: \
this.data.objectType + "/" + this.objectName + "/" }); + \
} +
+ if(callback) {
+ callback();
+ }
</ins><span class="cx"> });
</span><span class="cx"> },this));
</span><span class="cx"> },
</span><span class="lines">@@ -87,7 +141,7 @@
</span><span class="cx"> filteredProperties,
</span><span class="cx"> filteredObject = resource[0];
</span><span class="cx">
</span><del>- this.oldObject = filteredObject;
</del><ins>+ this.oldObject = $.extend(true, {}, filteredObject);
</ins><span class="cx">
</span><span class="cx"> filteredProperties = \
_.omit(schema.properties,function(p) { return !p.viewable; }); </span><span \
class="cx"> </span><span class="lines">@@ -102,7 +156,8 @@
</span><span class="cx"> disable_array_reorder: true,
</span><span class="cx"> disable_collapse: true,
</span><span class="cx"> disable_properties: true,
</span><del>- show_errors: "never"
</del><ins>+ show_errors: "never",
+ formHorizontal: true
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> if(schema.order){
</span><span class="lines">@@ -122,11 +177,53 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> this.editor = new \
JSONEditor(document.getElementById("resource"), { schema: schema }); \
</span><span class="cx"> this.editor.setValue(filteredObject); \
</span><span class="cx"> this.addTooltips(); </span><ins>+ \
this.convertResourceCollectionFields(filteredObject,schema); +
+ this.editor.on('change', _.bind(function() {
+ this.showPendingChanges();
+ }, this));
</ins><span class="cx"> },
</span><ins>+ showPendingChanges : function() {
+ var changedFields = [],
+ newValue = _.extend({},this.oldObject, this.getFormValue());
+
+ if(_.isEqual(newValue, this.oldObject)) {
+ this.$el.find("#saveBtn").attr("disabled", \
true); + \
this.$el.find("#resetBtn").attr("disabled", true); + \
this.$el.find("#resourceChangesPending").hide(); + } else {
+ if(!this.data.newObject) {
+ _.each(newValue, _.bind(function(val,key) {
+ if((!this.oldObject[key] && val.length) || \
(this.oldObject[key] && !_.isEqual(this.oldObject[key], val))) { + \
if(this.data.schema.properties && this.data.schema.properties[key] && \
this.data.schema.properties[key].title && \
this.data.schema.properties[key].title.length) { + \
changedFields.push(this.data.schema.properties[key].title); + \
} else { + changedFields.push(key);
+ }
+ }
+ }, this));
+
+ if(changedFields.length) {
+ \
this.$el.find("#changedFields").html("<br/>- " + \
changedFields.join("<br/>- ")); +
+ \
this.$el.find("#saveBtn").removeAttr("disabled"); + \
this.$el.find("#resetBtn").removeAttr("disabled"); + \
+ this.$el.find("#resourceChangesPending").show();
+ } else {
+ this.$el.find("#resourceChangesPending").hide();
+ }
+ } else {
+ \
this.$el.find("#saveBtn").removeAttr("disabled"); + \
this.$el.find("#resetBtn").removeAttr("disabled"); + \
+ }
+ }
+ },
</ins><span class="cx"> /* To accommodate a popover the addTooltips function \
transforms the following html: </span><span class="cx"> *
</span><span class="cx"> * <div class=" form-group">
</span><span class="lines">@@ -168,19 +265,10 @@
</span><span class="cx"> template: '<div class="popover \
popover-info" role="tooltip"><div \
class="popover-content"></div></div>' </span><span \
class="cx"> }); </span><span class="cx"> },
</span><del>- save: function(e){
- var formVal = this.editor.getValue(),
- successCallback = _.bind(function(){
- var msg = (this.data.newObject) ? \
"templates.admin.ResourceEdit.addSuccess" : \
"templates.admin.ResourceEdit.editSuccess";
- messagesManager.messages.addMessage({"message": \
$.t(msg,{ objectTitle: this.data.objectTitle })});
- this.backToList();
- }, this);
</del><ins>+ getFormValue : function() {
+ var formVal = this.editor.getValue();
</ins><span class="cx">
</span><del>- e.preventDefault();
-
- if(this.data.newObject){
- resourceDelegate.createResource(this.data.serviceUrl, formVal._id, \
formVal, successCallback);
- } else {
</del><ins>+ if(!this.data.newObject){
</ins><span class="cx"> /*
</span><span class="cx"> The following _.each() was placed here to \
account for JSONEditor.setValue() </span><span class="cx"> turning a \
property that exists but has a null value into an empty text field. </span><span \
class="lines">@@ -189,11 +277,46 @@ </span><span class="cx"> This \
loop filters out previously null values that have not been changed. </span><span \
class="cx"> */ </span><span class="cx"> \
_.each(_.keys(formVal), function(key){ </span><del>- \
if(!_.has(this.oldObject, key) && !formVal[key].length){ </del><ins>+ \
if(!_.has(this.oldObject, key) && (!formVal[key] || !formVal[key].length)){ \
</ins><span class="cx"> delete formVal[key]; </span><span \
class="cx"> } </span><span class="cx"> }, this);
</span><span class="cx">
</span><ins>+ \
_.each(this.$el.find(".resourceCollectionArrayValue"), function(element) { \
+ var propName = $(element).attr("propName"), + \
propVal = $(element).val().split(","); +
+ if($(element).val().length) {
+ formVal[propName] = propVal;
+ } else {
+ formVal[propName] = [];
+ }
+ });
+ }
+
+ return formVal;
+ },
+ save: function(e){
+ var formVal = this.getFormValue(),
+ successCallback = _.bind(function(newObj){
+ var msg = (this.data.newObject) ? \
"templates.admin.ResourceEdit.addSuccess" : \
"templates.admin.ResourceEdit.editSuccess", + \
editRouteName = (!this.isSystemResource) ? "adminEditManagedObjectView" : \
"adminEditSystemObjectView"; +
+ messagesManager.messages.addMessage({"message": \
$.t(msg,{ objectTitle: this.data.objectTitle })}); +
+ if(this.data.newObject) {
+ this.data.args.push(newObj._id);
+ eventManager.sendEvent(constants.EVENT_CHANGE_VIEW, {route: \
router.configuration.routes[editRouteName], args: this.data.args}); + \
} else { + this.backToList();
+ }
+ }, this);
+
+ e.preventDefault();
+
+ if(this.data.newObject){
+ resourceDelegate.createResource(this.data.serviceUrl, formVal._id, \
formVal, successCallback); + } else {
</ins><span class="cx"> if (!this.isSystemResource) {
</span><span class="cx"> \
resourceDelegate.patchResourceDifferences(this.data.serviceUrl, {id: \
this.oldObject._id, rev: this.oldObject._rev}, this.oldObject, formVal, \
successCallback); </span><span class="cx"> } else {
</span><span class="lines">@@ -212,7 +335,7 @@
</span><span class="cx"> },
</span><span class="cx"> reset: function(e){
</span><span class="cx"> e.preventDefault();
</span><del>-
</del><ins>+
</ins><span class="cx"> this.render(this.data.args);
</span><span class="cx"> },
</span><span class="cx"> deleteObject: function(e){
</span><span class="lines">@@ -224,6 +347,115 @@
</span><span class="cx"> this.backToList();
</span><span class="cx"> }, this));
</span><span class="cx"> }, this));
</span><ins>+ },
+ convertResourceCollectionFields: function(filteredObject,schema){
+ var _this = this,
+ getFields,
+ convertField,
+ convertArrayField,
+ showRelationships,
+ addTab;
+
+ getFields = function(properties, parent){
+ _.each(properties,function(prop,key){
+ prop.propName = key;
+ if(prop.type === "object"){
+ if(parent){
+ parent += "\\." + key;
+ } else {
+ parent = "\\." + key;
+ }
+ getFields(prop.properties, parent);
+ }
+
+ if(parent){
+ prop.selector = parent + "\\." + key;
+ } else {
+ prop.selector = "\\." + key;
+ }
+
+ if(prop.type === "array") {
+ if(prop.items.resourceCollection && \
_.has(filteredObject,key)) { + prop.value = \
filteredObject[key]; + convertArrayField(prop);
+ }
+ }
+ if(prop.resourceCollection){
+ convertField(prop);
+
+ if(_this.data.objectType + "/" + \
_this.objectName === prop.resourceCollection.path && \
prop.resourceCollection.label && prop.resourceCollection.label.length) { + \
prop.parentId = prop.resourceCollection.path + "/" + _this.objectId; + \
prop.parentValue = _this.oldObject; + \
showRelationships(prop); + }
+ }
+ });
+ };
+
+ convertField = function(field){
+ var el = $("#0\\.root" + field.selector),
+ autocompleteID = "JSONEditorAutocomplete_" + \
field.selector.replace("\\",""), + \
autocompleteField = $('<select class="form-control selectize" \
type="text" style="display:none !important;" id="' + \
autocompleteID + '"></select>'), + onChange = \
function (value) { + var readPath = \
field.resourceCollection.path + "/" + value; + \
_this.editor.getEditor("root" + \
field.selector.replace("\\","")).setValue(readPath); + \
}; +
+ el.attr("style","display: none \
!important").after(autocompleteField); +
+ \
resourceCollectionUtils.setupAutocompleteField(autocompleteField, field, { onChange: \
onChange }); +
+ if(!_this.data.newObject && el.val().length){
+ resourceDelegate.readResource("/" + \
constants.context,el.val()).then(function(result){ + \
autocompleteField[0].selectize.addOption(result); + \
autocompleteField[0].selectize.setValue(result._id); + });
+ }
+ };
+
+ convertArrayField = function(prop) {
+ _this.editor.getEditor('root' + \
prop.selector.replace("\\","")).destroy(); + \
addTab(prop, { + templateId : "tabContentTemplate",
+ tabView: new ResourceCollectionArrayView(),
+ viewId: "resourceCollectionArray-" + \
prop.propName, + contentId: "resource-" + \
prop.propName, + contentClass: \
"resourceCollectionArray", + headerText: prop.title,
+ onChange: _.bind(_this.showPendingChanges, _this)
+ });
+ };
+
+ showRelationships = function(prop) {
+ addTab(prop, {
+ templateId : "relationshipsTemplate",
+ tabView: new ResourceCollectionRelationshipsView(),
+ viewId: "resourceCollectionRelationship-" + \
prop.propName, + contentId: "relationship-" + \
prop.propName, + contentClass: \
"resourceCollectionRelationships", + headerText: \
prop.resourceCollection.label + });
+ };
+
+ addTab = function(prop, opts) {
+ var tabHeader = \
_this.$el.find("#tabHeaderTemplate").clone(), + \
tabContent = _this.$el.find("#" + opts.templateId).clone(); + \
+ if(!_this.data.newObject) {
+ tabHeader.attr("id", "tabHeader_" + \
opts.contentId); + \
tabHeader.find("a").attr("href","#" + \
opts.contentId).text(opts.headerText); +
+ tabContent.attr("id",opts.contentId);
+ tabContent.find("." + \
opts.contentClass).attr("id", opts.viewId); +
+ \
_this.$el.find("#linkedSystemsTabHeader").before(tabHeader); + \
_this.$el.find("#resource-linkedSystems").before(tabContent); + \
+ opts.tabView.render({ element: "#" + opts.viewId, \
prop: prop, schema: schema, onChange: opts.onChange }); + }
+ };
+
+ getFields(schema.properties);
</ins><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx">
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresourceListResourceViewjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ListResourceView.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ListResourceView.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ListResourceView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">
</span><span class="cx"> uiUtils.buildJQGrid(this, \
this.data.grid_id, { </span><span class="cx"> url: \
this.getURL(), </span><del>- width: 920,
</del><ins>+ width: \
this.$el.find(".resourcesContainer").width() - 40, </ins><span class="cx"> \
shrinkToFit: cols.length <= 6 || false, </span><span class="cx"> \
rowList: [10,20,50], </span><span class="cx"> rowNum: \
(rowNum) ? parseInt(rowNum, 10) : 10, </span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresourceResourceCollectionArrayViewjs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView.js \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView.js \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2015 ForgeRock AS. All rights reserved.
+ *
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * http://forgerock.org/license/CDDLv1.0.html
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at http://forgerock.org/license/CDDLv1.0.html
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ */
+
+/*global define, $, _, Handlebars, form2js */
+
+define("org/forgerock/openidm/ui/common/resource/ResourceCollectionArrayView", \
[ + "org/forgerock/commons/ui/common/main/AbstractView",
+ "org/forgerock/commons/ui/common/util/Constants",
+ "org/forgerock/openidm/ui/common/delegates/ResourceDelegate",
+ "org/forgerock/openidm/ui/common/util/ResourceCollectionUtils",
+ "org/forgerock/openidm/ui/common/resource/GenericEditResourceView"
+], function(AbstractView, constants, resourceDelegate, resourceCollectionUtils) {
+ var ResourceCollectionArrayView = AbstractView.extend({
+ template: \
"templates/admin/resource/ResourceCollectionArrayViewTemplate.html", + \
noBaseTemplate: true, + events: {
+ "click .add-array-item": "addArrayItem",
+ "click .remove-array-item": "removeArrayItem",
+ "click .resourceListItem": "showResource"
+ },
+ render: function (args, callback) {
+ var parentRender = _.bind(function() {
+ this.parentRender(_.bind(function() {
+ this.setupAutocomplete(this.data.prop, this.onChange);
+ this.convertToHuman();
+
+ if(callback) {
+ callback();
+ }
+ }, this));
+ }, this);
+
+ if(args) {
+ this.element = args.element;
+ this.data.prop = args.prop;
+ this.onChange = args.onChange;
+
+ \
resourceDelegate.getSchema(this.data.prop.items.resourceCollection.path.split("/")).then(_.bind(function(schema) \
{ + this.data.propTitle = schema.title || \
this.data.prop.title; +
+ this.data.headerValues = \
resourceCollectionUtils.getHeaderValues(this.data.prop.items.resourceCollection.query.fields, \
schema.properties); +
+ parentRender();
+ }, this));
+ } else {
+ parentRender();
+ }
+ },
+ setupAutocomplete: function(prop) {
+ var autocompleteField = \
this.$el.parent().find("#autoCompleteResourceCollection_" + prop.propName), \
+ onChange = _.bind(function(value) { + var \
newVal = this.data.prop.items.resourceCollection.path + "/" + value; + \
+ if(!_.contains(this.data.prop.value, newVal)) {
+ if(!this.data.prop.value) {
+ this.data.prop.value = [];
+ }
+ this.data.prop.value.push(newVal);
+ }
+ }, this);
+
+ \
resourceCollectionUtils.setupAutocompleteField(autocompleteField, prop, { onChange: \
onChange }); + },
+ convertToHuman: function() {
+ var listElements = this.$el.find(".resourceListItem");
+
+ _.each(listElements, _.bind(function(element) {
+ var path = $(element).attr("resourcePath"),
+ getRowContents = function(txt) {
+ return \
_.map(txt.split(resourceCollectionUtils.displayTextDelimiter), function(val) { + \
return '<div class="col-xs-2">' + val + '</div>'; + \
}).join(""); + };
+ if(path.indexOf(this.data.prop.items.resourceCollection.path) \
=== 0) { + \
if(resourceCollectionUtils.resourceCollectionCache[path]) { + \
$(element).find(".deleteArrayItem").before(getRowContents(resourceCollectionUtils.resourceCollectionCache[path]));
+ } else {
+ resourceDelegate.readResource("/" + \
constants.context, path).then(_.bind(function(result){ + \
var txt = resourceCollectionUtils.getDisplayText(this.data.prop, result); + \
$(element).find(".deleteArrayItem").before(getRowContents(txt)); + \
}, this)); + }
+ } else {
+ \
$(element).find(".deleteArrayItem").before(getRowContents(path)); + \
} + }, this));
+ },
+ addArrayItem: function(e) {
+ if(e) {
+ e.preventDefault();
+ }
+
+ this.render();
+ this.onChange();
+ },
+ removeArrayItem: function(e) {
+ var path = \
$(e.target).closest(".list-group-item").attr("resourcePath"); + \
+ if(e) {
+ e.preventDefault();
+ }
+
+ this.data.prop.value = _.reject(this.data.prop.value, function(val) \
{ return val === path; }); +
+ this.render();
+ this.onChange();
+ },
+ showResource: function(e) {
+ if(!$(e.target).hasClass("fa-times")){
+ \
resourceCollectionUtils.showResource($(e.target).closest(".resourceListItem").attr("resourcePath"));
+ }
+ }
+ });
+
+ return ResourceCollectionArrayView;
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonresourceResourceCollectionRelationshipsViewjs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView.js \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView.js \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,184 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2015 ForgeRock AS. All rights reserved.
+ *
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * http://forgerock.org/license/CDDLv1.0.html
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at http://forgerock.org/license/CDDLv1.0.html
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ */
+
+/*global define, $, _ */
+
+define("org/forgerock/openidm/ui/common/resource/ResourceCollectionRelationshipsView", \
[ + "org/forgerock/commons/ui/common/main/AbstractView",
+ "org/forgerock/commons/ui/common/util/Constants",
+ "org/forgerock/openidm/ui/common/delegates/ResourceDelegate",
+ "org/forgerock/openidm/ui/common/util/ResourceCollectionUtils",
+ "org/forgerock/commons/ui/common/util/ModuleLoader"
+], function(AbstractView, constants, resourceDelegate, resourceCollectionUtils, \
ModuleLoader) { + var ResourceCollectionRelationshipsView = AbstractView.extend({
+ template: \
"templates/admin/resource/ResourceCollectionRelationshipsViewTemplate.html",
+ noBaseTemplate: true,
+ events: {
+ "change [name=viewType]": "toggleView",
+ "click .resourceListItem": "showResource"
+ },
+ toggleView: function(e) {
+ this.$el.find(".listTab").toggle();
+ this.$el.find(".graphTab").toggle();
+ },
+ render: function (args, callback) {
+ this.element = args.element;
+ this.data.prop = args.prop;
+ this.data.schema = args.schema;
+
+ $.when(
+ resourceDelegate.searchResource(
+ args.prop.propName + ' eq "' + args.prop.parentId + \
'"&_pageSize=100&_sortKeys=' + \
args.prop.resourceCollection.query.fields[0], + \
args.prop.resourceCollection.path + ),
+ ModuleLoader.load("d3")
+ ).then(_.bind(function(qry, d3) {
+ var schema = this.data.schema.properties;
+
+ this.d3 = d3;
+ this.data.headerValues = \
resourceCollectionUtils.getHeaderValues(this.data.prop.resourceCollection.query.fields, \
schema); +
+ this.data.relatedTo = _.map(qry[0].result, \
_.bind(function(relationship) { + return _.pick(relationship, \
"_id", this.data.prop.resourceCollection.query.fields); + \
}, this)); +
+ this.parentRender(_.bind(function() {
+ if(this.data.relatedTo.length) {
+ this.parentRender(_.bind(function() {
+ this.loadTree();
+ if(callback) {
+ callback();
+ }
+ }, this));
+ } else {
+ \
this.$el.closest(".container").find(".tab-menu").find("#tabHeader_relationship-" \
+ this.data.prop.propName).hide(); + }
+ if(callback) {
+ callback();
+ }
+ }, this));
+ }, this));
+ },
+ showResource: function(e) {
+ resourceCollectionUtils.showResource($(e.target).closest(".resourceListItem").attr("resourcePath"));
+ },
+ loadTree: function() {
+ var treeData = {
+ "name" : \
resourceCollectionUtils.getDisplayText(this.data.prop, this.data.prop.parentValue), + \
"parent" : "null", + "children" \
: [ +
+ ]
+ },
+ margin = {
+ top: 20,
+ right: 120,
+ bottom: 20,
+ left: 350
+ },
+ width = 1024 - margin.right - margin.left,
+ height = 500 - margin.top - margin.bottom,
+ i = 0,
+ tree = this.d3.layout.tree().size([height, width]),
+ diagonal = this.d3.svg.diagonal().projection(function(d) {
+ return [d.y, d.x];
+ }),
+ svg = this.d3.select("#reportsGraphBody-" + \
this.data.prop.propName ).append("svg") + \
.attr("width", width + margin.right + margin.left) + \
.attr("height", height + margin.top + margin.bottom) + \
.append("g") + .attr("transform", \
"translate(" + margin.left + "," + margin.top + ")"), + \
root = null, + update = function(source) {
+ var nodes = tree.nodes(root).reverse(),
+ links = tree.links(nodes),
+ nodeEnter,
+ node,
+ link;
+
+ //Normalize for fixed-depth.
+ nodes.forEach(function(data) { data.y = data.depth * 180; \
}); +
+ //Declare the nodes
+ node = svg.selectAll("g.node").data(nodes, \
function(data) { + if(!data.id) {
+ data.id = ++i;
+ }
+
+ return data.id;
+ });
+
+ //Enter the nodes.
+ nodeEnter = node.enter().append("g")
+ .attr("class", "node")
+ .attr("transform", function(data) {
+ return "translate(" + data.y + \
"," + data.x + ")"; + });
+
+ //Add Circles
+ nodeEnter.append("circle")
+ .attr("r", 10)
+ .style("fill", "#fff");
+
+ //Add Text
+ nodeEnter.append("svg:a")
+ .attr("xlink:href", function(data){return \
data.url;}) + .append("text")
+ .attr("x", function(data) {
+ return data.children || data._children ? -13 : 13;
+ })
+ .attr("dy", ".35em")
+ .attr("text-anchor", function(data) {
+ return data.children || data._children ? \
"end" : "start"; + })
+ .html(function(data) { return data.name; })
+ .style("fill-opacity", 1);
+
+ //Generate the paths
+ link = svg.selectAll("path.link").data(links, \
function(d) { + return d.target.id;
+ });
+
+ //Add the paths
+ link.enter().insert("path", "g")
+ .attr("class", "link")
+ .attr("d", diagonal);
+ };
+
+ _.each(this.data.relatedTo, _.bind(function(item){
+ treeData.children.push({
+ "name" : \
resourceCollectionUtils.getDisplayText(this.data.prop, item), + \
"parent" : "null", + "url" : \
"#resource/" + this.data.prop.resourceCollection.path + "/edit/" \
+ item._id +"/" + });
+ }, this));
+
+ root = treeData;
+
+ update(root);
+ }
+ });
+
+ return ResourceCollectionRelationshipsView;
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonutilJSONEditorSetupUtilsjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/JSONEditorSetupUtils.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/JSONEditorSetupUtils.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/JSONEditorSetupUtils.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -36,6 +36,12 @@
</span><span class="cx"> if (this.path && this.input && \
this.label && !this.input.id && !this.label.htmlFor) { </span><span \
class="cx"> this.input.id = (this.jsoneditor.options.uuid || \
this.jsoneditor.uuid) + "." + this.path; </span><span class="cx"> \
this.label.htmlFor = (this.jsoneditor.options.uuid || this.jsoneditor.uuid) + \
"." + this.path; </span><ins>+
+ if(this.jsoneditor.options.formHorizontal) {
+ \
$(this.jsoneditor.element).addClass("form-horizontal"); + \
$(this.label).addClass("col-sm-2"); + \
$(this.input).wrap("<div class='col-sm-10'></div>"); + \
} </ins><span class="cx"> }
</span><span class="cx"> return ret;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainjsorgforgerockopenidmuicommonutilResourceCollectionUtilsjs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/ResourceCollectionUtils.js \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/ResourceCollectionUtils.js \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/js/org/forgerock/openidm/ui/common/util/ResourceCollectionUtils.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,143 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2011-2015 ForgeRock AS. All rights reserved.
+ *
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * http://forgerock.org/license/CDDLv1.0.html
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at http://forgerock.org/license/CDDLv1.0.html
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ */
+
+/*global define , _, $, Handlebars */
+/*jslint evil:true */
+
+/**
+ * @author huck.elliott
+ */
+define("org/forgerock/openidm/ui/common/util/ResourceCollectionUtils", [
+ "org/forgerock/commons/ui/common/util/Constants",
+ "org/forgerock/commons/ui/common/main/EventManager",
+ "org/forgerock/openidm/ui/common/delegates/SearchDelegate"
+], function (constants, eventManager, searchDelegate) {
+ var obj = {};
+
+ obj.resourceCollectionCache = {};
+
+ obj.displayTextDelimiter = ", ";
+
+ obj.getDisplayText = function(prop, item){
+ var pathToResource = (prop.items) ? prop.items.resourceCollection.path : \
prop.resourceCollection.path, + resourceKey = pathToResource + \
"/" + item._id, + validDisplayProps = \
_.reject(obj.autocompleteProps(prop),function(p){ + return (p \
&& !p.length) || !eval("item." + p); + }),
+ txt = _.map(validDisplayProps, function(p){
+ return eval("item." + p);
+ }).join(obj.displayTextDelimiter);
+
+ if(!obj.resourceCollectionCache[resourceKey]) {
+ obj.resourceCollectionCache[resourceKey] = txt;
+ }
+
+ return txt;
+ };
+
+ obj.autocompleteProps = function(prop, showRaw) {
+ var fields = (prop.items) ? prop.items.resourceCollection.query.fields : \
prop.resourceCollection.query.fields; +
+ if(showRaw) {
+ return fields;
+ } else {
+ return _.map(fields, function(field) {
+ return field.replace("/",".");
+ });
+ }
+ };
+
+ obj.setupAutocompleteField = function(autocompleteField, prop, opts) {
+ var pathToResource = (prop.items) ? prop.items.resourceCollection.path : \
prop.resourceCollection.path, + defaultOpts = {
+ valueField: '_id',
+ searchField: obj.autocompleteProps(prop),
+ create: false,
+ preload: true,
+ placeholder: $.t("templates.admin.ResourceEdit.search",{ \
objectTitle: prop.title || prop.name }), + render: {
+ item: function(item, escape) {
+ var txt = obj.getDisplayText(prop, item);
+ return "<div>" + txt + \
"</div>"; + },
+ option: function(item, escape) {
+ var txt = obj.getDisplayText(prop, item);
+ return "<div>" + txt + \
"</div>"; + }
+ },
+ load: _.bind(function(query, callback) {
+ searchDelegate.searchResults(pathToResource, \
obj.autocompleteProps(prop, true), query).then(function(result) { + \
var convertNestedProps = function(item) { + \
_.each(obj.autocompleteProps(prop), function(propName) { + \
if(propName.indexOf(".") > -1) { + \
item[propName] = eval("item." + propName); + \
} + });
+ return item;
+ },
+ modifiedResult = _.map(result, function(item){
+ return convertNestedProps(item);
+ });
+
+ callback(modifiedResult);
+ },
+ function(){
+ callback();
+ }
+ );
+ }, this)
+ };
+
+ autocompleteField.selectize(_.extend({}, defaultOpts, opts || {}));
+ };
+
+ obj.getHeaderValues = function(fields, schema) {
+ return _.map(fields, function(field) {
+ var propField = function() {
+ return eval("schema." + \
field.replace("/",".properties.")); + };
+
+ if(schema && propField() && propField().title && \
propField().title.length) { + return propField().title;
+ } else {
+ return field;
+ }
+ });
+ };
+
+ obj.showResource = function(resourcePath) {
+ var args = resourcePath.split("/"),
+ routeName = (args[0] !== "system") ? \
"adminEditManagedObjectView" : "adminEditSystemObjectView"; + \
+ if(args.length >= 3) {
+ eventManager.sendEvent(constants.ROUTE_REQUEST, {routeName: routeName, \
args: args}); + }
+ };
+
+ Handlebars.registerHelper('nestedLookup', function(property,key) {
+ return property[key];
+ });
+
+ return obj;
+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminlinkedViewLinkedViewhtml"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/linkedView/LinkedView.html \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/linkedView/LinkedView.html \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/linkedView/LinkedView.html 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+{{#if linkedResources}}
+<form role="form" class="form-horizontal">
+ <div class="form-group">
+ <label style="margin-left:15px;" class="pull-left \
control-label" for="linkedViewSelect">{{t \
"templates.admin.LinkedTemplate.linkedResource"}}</label> + \
<div class="col-sm-6"> + <select \
class="form-control" id="linkedViewSelect" \
name="linkedViewSelect"> + {{#each_with_index \
linkedResources}} + <option \
value="{{index}}">{{value}}</option> + \
{{/each_with_index}} + </select>
+ <div class="validation-message"></div>
+ </div>
+ <div class="col-sm-1">
+ <a href="#" id="linkToResource" title="View \
Resource"><span class="fa \
fa-external-link"></span></a> + </div>
+ </div>
+</form>
+<div style="clear:both;"></div>
+<div id="linkedViewContent"></div>
+{{else}}
+<h4 class="no-details">
+ {{t "templates.admin.LinkedTemplate.noLinkedSystems"}}
+</h4>
+{{/if}}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceEditResourceViewTemplatehtml"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/EditResourceViewTemplate.html \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/EditResourceViewTemplate.html 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/EditResourceViewTemplate.html 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -1,22 +1,95 @@
</span><del>-<div class="container">
- <div class="page-header resourcesContainer">
- <div class='btn-toolbar pull-right'>
- <div class='btn-group'>
- <a href="#"><button class="btn \
btn-primary" id="saveBtn">{{t \
"common.form.save"}}</button></a>
- {{#unless newObject}}
- <a href="#"><button class="btn \
btn-primary" id="resetBtn">{{t \
"common.form.reset"}}</button></a>
- <a href="#"><button class="btn \
btn-primary" id="deleteBtn">{{t \
"common.form.delete"}}</button></a>
- {{/unless}}
- <a href="#"><button class="btn \
btn-primary" id="backBtn">{{t \
"templates.admin.ResourceEdit.backToList"}}</button></a>
- </div>
</del><ins>+<div class="editResourceViewContainer">
+ <div class="back-bar">
+ <div class="container">
+ <a href="#" \
id="backBtn">{{backBtnText}}</a> </ins><span class="cx"> \
</div> </span><del>- <h3>
- {{#if newObject}}
- {{t "common.form.add"}}
- {{else}}
- {{t "common.form.edit"}}
- {{/if}}
- </h3>
</del><span class="cx"> </div>
</span><del>- <div id="resource" \
class="jsonEditor"></div> </del><ins>+ <div \
class="container"> + <div class="page-header no-border \
profile-header"> + <div class="media ">
+ <div class="media-left media-top">
+ <span class="resource-avatar"><i class="fa \
{{#if newObject}}fa-plus{{else}}fa-cube{{/if}}"></i></span> + \
</div> + <div class="media-body media-top">
+ <h4 class="page-type">{{objectTitle}}</h4>
+ <h1 class="media-heading">
+ {{#if newObject}}{{t \
"templates.admin.ResourceEdit.new"}} \
{{objectTitle}}{{else}}{{objectDisplayText}}{{/if}} + </h1>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="container">
+ <div class=" tab-menu">
+ <ul class="nav nav-tabs" role="tablist">
+ <li class="dropdown pull-right tabdrop hide">
+ <a class="dropdown-toggle" \
data-toggle="dropdown" href="#"><i \
class="icon-align-justify"></i> <i class="fa \
fa-ellipsis-v"></i></a> + <ul \
class="dropdown-menu"></ul> + </li>
+ <li class="active"><a \
href="#resource-details" role="tab" data-toggle="tab" \
aria-expanded="true"><span class="fa \
fa-list"></span> {{t \
"templates.admin.ResourceEdit.details"}}</a></li> + \
<li id="linkedSystemsTabHeader" style="display:none;" {{#if \
newObject}}style="display:none;"{{/if}}><a \
href="#resource-linkedSystems" role="tab" \
data-toggle="tab" aria-expanded="false">{{t \
"templates.admin.ResourceEdit.linkedSystems"}}</a></li> + \
<li id="tabHeaderTemplate"><a href="" \
role="tab" data-toggle="tab" \
aria-expanded="false"></a></li> + </ul>
+ </div>
+ <!-- Tab panes -->
+ <div class="tab-content">
+ <div role="tabpanel" class="tab-pane active" \
id="resource-details"> + <div \
class="tab-pane-body"> + <div \
class="panel-body"> + <div class="panel \
panel-default panel-collapse"> + <div \
class="panel-body"> + <div \
id="resource" class="jsonEditor"></div> + \
</div> + </div>
+ </div>
+ </div>
+ </div>
+ <div role="tabpanel" class="tab-pane" \
id="tabContentTemplate"> + <div \
class="tab-pane-body"> + <div \
class="panel-body"> + <div class="panel \
panel-default panel-collapse"> + <div \
class="panel-body"> + <div \
class="resourceCollectionArray"></div> + \
</div> + </div>
+ </div>
+ </div>
+ </div>
+ <div role="tabpanel" class="tab-pane" \
id="relationshipsTemplate"> + <div \
class="tab-pane-body"> + <div \
class="panel-body"> + <div class="panel \
panel-default panel-collapse"> + <div \
class="panel-body"> + <div \
class="resourceCollectionRelationships"></div> + \
</div> + </div>
+ </div>
+ </div>
+ </div>
+ <div role="tabpanel" class="tab-pane" \
id="resource-linkedSystems"> + <div \
class="tab-pane-body"> + <div \
class="panel-body"> + <div class="panel \
panel-default panel-collapse"> + <div \
class="panel-body"> + <div \
id="linkedView"></div> + </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="panel-footer">
+ <div id="resourceChangesPending" class="alert \
alert-warning" style="display: none;"> + <i \
class="fa fa-exclamation-circle"></i><strong> {{t \
"templates.mapping.changesPending"}}</strong> + \
<span id="changedFields"></span> + </div>
+ <div class="pull-right">
+ {{#unless newObject}}
+ <a href="#" class="btn btn-default" \
id="deleteBtn">{{t "common.form.delete"}}</a> + \
<a href="#" class="btn btn-default" id="resetBtn" \
disabled>{{t "common.form.reset"}}</a> + {{/unless}}
+ <a href="#" class="btn btn-primary" \
id="saveBtn" disabled>{{t "common.form.save"}}</a> + \
</div> + </div>
+ </div>
+ </div>
</ins><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceListResourceViewTemplatehtml"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ListResourceViewTemplate.html \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ListResourceViewTemplate.html 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ListResourceViewTemplate.html 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -6,17 +6,17 @@
</span><span class="cx">
</span><span class="cx"> <div class="btn-toolbar" \
role="toolbar" aria-label="toolbar"> </span><span class="cx"> \
<div class="btn-group" role="group" aria-label="add \
resource"> </span><del>- <a \
href="{{addLinkHref}}" title="{{t "common.form.add"}} \
{{pageTitle}}"><button class="btn btn-primary" \
type="button">{{t "common.form.add"}} \
{{pageTitle}}</button></a> </del><ins>+ <a \
href="{{addLinkHref}}" title="{{t \
"templates.admin.ResourceEdit.new"}} {{pageTitle}}"><button \
class="btn btn-primary" type="button"><span class="fa \
fa-plus"></span> {{t "templates.admin.ResourceEdit.new"}} \
{{pageTitle}}</button></a> </ins><span class="cx"> \
</div> </span><span class="cx"> {{#if hasData}}
</span><del>- <div class="btn-group" \
role="group" aria-label="reload grid">
- <a href="#"><button type="button" \
class="btn btn-primary" id="reloadGridBtn">{{t \
'common.form.reloadGrid'}}</button></a> </del><ins>+ \
<div class="btn-group pull-right" role="group" \
aria-label="delete selected"> + <button \
type="button" class="btn btn-default" \
id="deleteSelected" disabled><span class="fa \
fa-trash"></span>{{t 'common.form.deleteSelected'}}</button> \
</ins><span class="cx"> </div> </span><del>- \
<div class="btn-group" role="group" aria-label="clear \
filters">
- <button type="button" class="btn \
btn-primary" id="clearFiltersBtn">{{t \
'common.form.clearFilters'}}</button> </del><ins>+ <div \
class="btn-group pull-right" role="group" aria-label="clear \
filters"> + <button type="button" \
class="btn btn-default" id="clearFiltersBtn"><span \
class="fa fa-times"></span>{{t \
'common.form.clearFilters'}}</button> </ins><span class="cx"> \
</div> </span><del>- <div class="btn-group" \
role="group" aria-label="delete selected">
- <button type="button" class="btn \
btn-primary" id="deleteSelected" disabled>{{t \
'common.form.deleteSelected'}}</button> </del><ins>+ <div \
class="btn-group pull-right" role="group" aria-label="reload \
grid"> + <a href="#"><button \
type="button" class="btn btn-default" \
id="reloadGridBtn"><span class="fa \
fa-refresh"></span>{{t \
'common.form.reloadGrid'}}</button></a> </ins><span class="cx"> \
</div> </span><span class="cx"> {{/if}}
</span><span class="cx"> </div>
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> </div>
</span><span class="cx"> {{/if}}
</span><span class="cx">
</span><del>- <div class="resourcesContainer">
</del><ins>+ <div class="resourcesContainer panel panel-default">
</ins><span class="cx"> <table id="{{grid_id}}">
</span><del>- <tr><td>{{t \
"templates.admin.ResourceList.noData"}}</td></tr> </del><ins>+ \
<tr><td class="noData">{{t \
"templates.admin.ResourceList.noData"}}</td></tr> </ins><span \
class="cx"> </table> </span><span class="cx"> <div \
id="{{grid_id}}_pager"></div> </span><span class="cx"> \
</div> </span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceResourceCollectionArrayViewTemplatehtml"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionArrayViewTemplate.html \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionArrayViewTemplate.html \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionArrayViewTemplate.html 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<input type="hidden" \
class="resourceCollectionArrayValue" propName="{{prop.propName}}" \
value="{{prop.value}}"/> +<div class="list-table">
+ <ul class="list-group" id="assignments-list">
+ <li class="list-group-header">
+ <div class="row">
+ {{#each headerValues}}
+ <div class="col-xs-2">
+ {{this}}
+ </div>
+ {{/each}}
+ <div class="col-xs-1"> </div>
+ </div>
+ </li>
+ {{#each prop.value}}
+ <li class="list-group-item resourceListItem" \
resourcePath="{{this}}"> + <div class="row">
+ <div class="col-xs-1 pull-right deleteArrayItem">
+ <div class="btn-group pull-right">
+ <button class="btn btn-link \
remove-array-item"><i class="fa \
fa-times"></i></button> + </div>
+ </div>
+ </div>
+ </li>
+ {{/each}}
+ </ul>
+ <div class="add-item-inline">
+ <div class="row">
+ <div class="col-sm-5">
+ <div class="form-group">
+ <select class="form-control selectize" \
type="text" style="display:none !important;" \
id="autoCompleteResourceCollection_{{prop.propName}}"></select> + \
</div> + </div>
+ <div class="col-sm-5">
+ <button class="btn btn-primary add-array-item"><i \
class="fa fa-plus"></i> {{t "common.form.add"}} \
{{propTitle}} </button> + </div>
+ </div>
+ </div>
+</div>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrcmainresourcestemplatesadminresourceResourceCollectionRelationshipsViewTemplatehtml"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionRelationshipsViewTemplate.html \
(0 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionRelationshipsViewTemplate.html \
(rev 0)
+++ trunk/openidm-ui/openidm-ui-common/src/main/resources/templates/admin/resource/ResourceCollectionRelationshipsViewTemplate.html 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+<div class="btn-group btn-group-tabs" \
data-toggle="buttons" role="tablist"> + <label \
class="btn btn-default active"> + <input \
value="graphTab" name="viewType" type="radio" \
role="tab" data-toggle="tab" \
aria-expanded="true"><span class="fa \
fa-line-chart"></span> + </label>
+ <label class="btn btn-default">
+ <input value="listTab" name="viewType" \
type="radio" role="tab" data-toggle="tab"><span \
class="fa fa-list"></span> + </label>
+</div>
+<div class="graphTab">
+ <div class="reportsGraphBody" \
id="reportsGraphBody-{{prop.propName}}"></div> +</div>
+<div style="display:none;" class="listTab">
+ <div class="list-table">
+ <ul class="list-group">
+ <li class="list-group-header">
+ <div class="row">
+ {{#each headerValues}}
+ <div class="col-xs-3">
+ {{this}}
+ </div>
+ {{/each}}
+ </div>
+ </li>
+ {{#each relatedTo}}
+ <li class="list-group-item resourceListItem" \
resourcePath="{{../prop.resourceCollection.path}}/{{this._id}}"> + \
<div class="row"> + {{#each \
../prop.resourceCollection.query.fields}} + <div \
class="col-xs-3"> + {{nestedLookup ../this this}}
+ </div>
+ {{/each}}
+ </div>
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+</div>
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuiendusersrcmainjsconfigroutesAdminRoutesConfigjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-enduser/src/main/js/config/routes/AdminRoutesConfig.js \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-enduser/src/main/js/config/routes/AdminRoutesConfig.js 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-enduser/src/main/js/config/routes/AdminRoutesConfig.js 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -91,7 +91,8 @@
</span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", </span><span \
class="cx"> role: "ui-admin", </span><span class="cx"> \
url: /^resource\/(managed)\/(.+)\/edit\/(.+)$/, </span><del>- pattern: \
"resource/?/?/edit/?" </del><ins>+ pattern: \
"resource/?/?/edit/?", + forceUpdate: true
</ins><span class="cx"> },
</span><span class="cx"> "adminNewManagedObjectView" : {
</span><span class="cx"> view: \
"org/forgerock/openidm/ui/common/resource/EditResourceView", \
</span></span></pre></div> <a \
id="trunkopenidmuiopenidmuiendusersrcmainresourcescssuserless"></a> <div \
class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-enduser/src/main/resources/css/user.less (5369 => \
5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-enduser/src/main/resources/css/user.less 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-enduser/src/main/resources/css/user.less 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -1,22 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx"> Clean up CSS
</span><span class="cx"> */
</span><del>-.resourcesContainer {
- margin-bottom:25px;
</del><span class="cx">
</span><del>- .btn-toolbar, {
- border-bottom: none;
- padding-bottom: 0px;
- margin-bottom: 0px;
- margin-top: 0px;
- }
-
- .ui-jqgrid {
- margin: auto;
- margin-top: 10px;
- }
-}
-
</del><span class="cx"> .checkboxList ol {
</span><span class="cx"> padding-left:20px;
</span><span class="cx"> margin-bottom:0px;
</span><span class="lines">@@ -118,7 +103,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx">
</span><del>-#reportsGraphBody {
</del><ins>+#reportsGraphBody, .reportsGraphBody {
</ins><span class="cx"> overflow:hidden;
</span><span class="cx"> .node circle {
</span><span class="cx"> fill: #fff;
</span><span class="lines">@@ -141,4 +126,138 @@
</span><span class="cx">
</span><span class="cx"> .dialogInner .modal-header {
</span><span class="cx"> padding-bottom:15px;
</span><ins>+}
+/*
+
+ generic resource Display
+*/
+
+.resourcesContainer {
+ margin-bottom:25px;
+ padding-top: 10px;
+
+ .btn-toolbar, {
+ border-bottom: none;
+ padding-bottom: 0px;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ }
+
+
+ td.noData {
+ padding: 10px;
+ }
+
+ .ui-widget-content {
+ border-color:transparent !important;
+ }
+
+ .ui-jqgrid {
+ margin: auto;
+ margin-top: 10px;
+ border: 1px solid #eee;
+
+ .ui-state-default {
+ border-color:transparent;
+ }
+ tr.ui-row-ltr td {
+ padding: 14px;
+ }
+ tr.ui-row-ltr :first-child {
+ padding: 12px;
+ }
+ .ui-jqgrid-sortable {
+ text-transform: uppercase;
+ }
+ .ui-jqgrid-pager {
+ background-color: #fff;
+ }
+ thead {
+ border-bottom: 2px solid #ddd;
+ tr td {
+ padding-bottom: 10px;
+ }
+ }
+ }
+}
+
+.editResourceViewContainer {
+ .resource-avatar {
+ display: table;
+ background: @base-theme-color;
+ color: #fff;
+ text-align: center;
+ }
+
+ .profile-header .resource-avatar {
+ width: 70px;
+ height: 70px;
+ border-radius: 70px;
+ line-height: 70px;
+ font-size: 36px;
+ }
+
+ .panel-footer {
+ padding: 10px 15px;
+ border-radius: 0;
+ background-color: transparent;
+ overflow: auto;
+ }
+
+ .page-header h4.page-type {
+ text-transform: uppercase;
+ font-size: 14px;
+ letter-spacing: 1px;
+ margin-bottom: 10px;
+ color: #666;
+ font-weight: 600;
+ margin-top: 0;
+ }
+
+ .page-header .meta {
+ margin: -10px 0 10px;
+ color: #777;
+ text-transform: none;
+ letter-spacing: 0;
+ border-left: 1px solid #ddd;
+ padding-left: 5px;
+ margin-left: 4px;
+ font-weight: 400;
+ display: inline-block;
+ margin-bottom: 0;
+ }
+
+ .tab-content {
+ background-color: #fff;
+ margin-bottom: 50px;
+ }
+
+ .fa-search {
+ margin-top: 10px;
+ }
+
+ .resourceCollectionTab {
+ padding-top: 10px;
+ }
+
+ #resource>div>h3, .tabHeaderTemplate, .tabContentTemplate {
+ display: none !important;
+ }
+
+ .back-bar a {
+ color: #777;
+ }
+
+ #linkToResource span{
+ margin-top: 10px;
+ }
+
+ .well {
+ background-color: transparent;
+ border-color: transparent;
+ }
+
+ li.resourceListItem:hover {
+ background-color: #ededed;
+ }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiendusersrcmainresourceslocalesentranslationjson"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-enduser/src/main/resources/locales/en/translation.json \
(5369 => 5370)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-enduser/src/main/resources/locales/en/translation.json 2015-05-28 \
07:41:05 UTC (rev 5369)
+++ trunk/openidm-ui/openidm-ui-enduser/src/main/resources/locales/en/translation.json 2015-05-28 \
19:17:22 UTC (rev 5370) </span><span class="lines">@@ -167,12 +167,18 @@
</span><span class="cx"> {
</span><span class="cx"> "confirmDelete": "Are you \
sure you want to delete this __objectTitle__?", </span><span class="cx"> \
"confirmDeleteSelected": "Are you sure you want to delete the selected \
__objectTitle__s?", </span><del>- "backToList": \
"Back to List", </del><ins>+ "backToList": \
"Back to __objectTitle__ List", </ins><span class="cx"> \
"addSuccess": "Successfully added __objectTitle__", </span><span \
class="cx"> "editSuccess": "Successfully updated \
__objectTitle__", </span><span class="cx"> \
"deleteSuccess": "Successfully deleted __objectTitle__", \
</span><span class="cx"> "deleteSelectedSuccess": \
"Successfully deleted selected __objectTitle__s", </span><del>- \
"noData": "No Data" </del><ins>+ \
"details": "Details", + "noData": \
"No Data", + "data": "Data",
+ "search": "Enter search terms to find __objectTitle__ \
...", + "noPendingChanges": "No pending \
changes", + "new": "New",
+ "linkedSystems": "Linked Systems"
</ins><span class="cx"> },
</span><span class="cx"> "ResourceList":
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkopenidmzipsrcmainresourcesconfmanagedjson"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-zip/src/main/resources/conf/managed.json (5369 => 5370)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-zip/src/main/resources/conf/managed.json 2015-05-28 07:41:05 UTC (rev \
5369)
+++ trunk/openidm-zip/src/main/resources/conf/managed.json 2015-05-28 19:17:22 UTC \
(rev 5370) </span><span class="lines">@@ -62,7 +62,8 @@
</span><span class="cx"> "postalCode",
</span><span class="cx"> "country",
</span><span class="cx"> "stateProvince",
</span><del>- "roles"
</del><ins>+ "roles",
+ "manager"
</ins><span class="cx"> ],
</span><span class="cx"> "properties" : {
</span><span class="cx"> "mail" : {
</span><span class="lines">@@ -117,11 +118,11 @@
</span><span class="cx"> "items" : {
</span><span class="cx"> "type" : \
"string", </span><span class="cx"> \
"resourceCollection" : { </span><del>- \
"path" : "managed/roles", </del><ins>+ \
"path" : "managed/role", </ins><span class="cx"> \
"query" : { </span><del>- \
"queryFilter" : "",
- "fields" : [ ],
- "sortKeys" : [ ]
</del><ins>+ "queryFilter" : \
"true", + "fields" : \
["properties/name"], + \
"sortKeys" : ["properties/name"] </ins><span class="cx"> \
} </span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -154,11 +155,13 @@
</span><span class="cx"> "searchable" : false,
</span><span class="cx"> "resourceCollection" : {
</span><span class="cx"> "path" : \
"managed/user", </span><ins>+ "label" \
: "Reports", </ins><span class="cx"> \
"query" : { </span><span class="cx"> \
"queryFilter" : "true", </span><span class="cx"> \
"fields" : [ </span><span class="cx"> \
"userName", </span><del>- \
"mail" </del><ins>+ \
"givenName", + "sn"
</ins><span class="cx"> ],
</span><span class="cx"> "sortKeys" : [
</span><span class="cx"> "userName"
</span></span></pre>
</div>
</div>
<div id="footer">Copyright (c) by ForgeRock. All rights reserved.</div>
</body>
</html>
_______________________________________________
CommitOpenIDM mailing list
CommitOpenIDM@forgerock.org
https://lists.forgerock.org/mailman/listinfo/commitopenidm
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic