From 1debf091992d63cf6ed3acce962f94196f18d432 Mon Sep 17 00:00:00 2001 From: manolobevia Date: Fri, 11 Nov 2011 15:15:05 +0000 Subject: [PATCH] NIHVIVO-3299: Refactored markup for manage proxy pages and my account --- webapp/web/css/account/account.css | 10 +- .../web/js/account/accountProxyItemsPanel.js | 4 +- webapp/web/js/account/proxyUtils.js | 3 +- .../accounts/userAccounts-myProxiesPanel.ftl | 28 +-- .../body/manageproxies/manageProxies-list.ftl | 238 ++++++++---------- 5 files changed, 125 insertions(+), 158 deletions(-) diff --git a/webapp/web/css/account/account.css b/webapp/web/css/account/account.css index a99fdf925..688757d1e 100644 --- a/webapp/web/css/account/account.css +++ b/webapp/web/css/account/account.css @@ -386,9 +386,9 @@ a.disable-delete { #search-proxy h4 { margin-bottom: 0; } -.proxy-profile .proxyInfoElement { +/*.proxy-profile .proxyInfoElement { margin-left: 20px; -} +}*/ p.selected-editors { padding-top: 1.2em; border-top: 1px solid #E0DFDF; @@ -432,4 +432,10 @@ section.list-proxy-profile:nth-child(2n) { } a.remove-proxyUri { font-size: .9em; +} + +li.proxyInfoElement { + padding-bottom: 1em; + clear: both; + padding-left: 20px; } \ No newline at end of file diff --git a/webapp/web/js/account/accountProxyItemsPanel.js b/webapp/web/js/account/accountProxyItemsPanel.js index 4014d17d0..9287eb2ae 100644 --- a/webapp/web/js/account/accountProxyItemsPanel.js +++ b/webapp/web/js/account/accountProxyItemsPanel.js @@ -162,7 +162,7 @@ $(document).ready(function() { return; } - $("div[name='proxyProfilesPanel']").each(function(i) { + $("section[name='proxyProfilesPanel']").each(function(i) { var context = { baseUrl: proxyContextInfo.baseUrl, ajaxUrl: proxyContextInfo.ajaxUrl, @@ -172,7 +172,7 @@ $(document).ready(function() { this["proxyItemsPanel"] = new proxyItemsPanel(this, context); }); - $("div[name='proxyProxiesPanel']").each(function(i) { + $("section[name='proxyProxiesPanel']").each(function(i) { var context = { baseUrl: proxyContextInfo.baseUrl, ajaxUrl: proxyContextInfo.ajaxUrl, diff --git a/webapp/web/js/account/proxyUtils.js b/webapp/web/js/account/proxyUtils.js index 5763c710f..ea5f58890 100644 --- a/webapp/web/js/account/proxyUtils.js +++ b/webapp/web/js/account/proxyUtils.js @@ -1,13 +1,12 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ $(document).ready(function(){ - //Remove initial value of input text 'Select an existing last name' $('input[name="proxySelectorAC"]').click(function(){ $(this).val(''); }); - //Alert when user doesn't select an editor and a profile + //Alert when user doesn't select an editor and a profile after submitting from for relating proxy-profiles $('input[name="createRelationship"]').click(function(){ var $proxyUri = $('#add-relation input[name="proxyUri"]').val(); var $profileUri = $('#add-relation input[name="profileUri"]').val(); diff --git a/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl b/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl index 4ebb1da7a..1ef6cb830 100644 --- a/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl +++ b/webapp/web/templates/freemarker/body/accounts/userAccounts-myProxiesPanel.ftl @@ -2,21 +2,17 @@ <#-- Template for setting the account reference field, which can also associate a profile with the user account --> -${stylesheets.add('', - '')} - -
+

Who can edit my profile

Add profile editor

-

 

${myAccountUri}

Selected editors:

<#-- Magic div thst holds all of the proxy data and the template that shows how to display it. --> -
+
    <#list proxies as proxy>

    ${proxy.uri}

    @@ -33,21 +29,18 @@ ${stylesheets.add('
    - - - - - -
    +
  • %label% -
  • + +
    %label% | %classLabel%
    Remove selection -
    +
    -
-
+ + +${stylesheets.add('', + '')} + ${scripts.add('', '', '', diff --git a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl index ceff1be4d..d6f1d0e8e 100644 --- a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl +++ b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl @@ -2,12 +2,6 @@ <#-- Template for displaying list of user accounts --> - -${stylesheets.add('')} -${stylesheets.add('')} -${stylesheets.add('')} -${stylesheets.add('')} -

Manage profile editing

<#if message??> @@ -30,151 +24,126 @@ ${stylesheets.add('Relate profile editors and profiles info icon
-
-
- Select editors - -
- -

 

- - <#-- Magic div that holds all of the proxy data and the template that shows how to display it. --> -
- <#-- - Each proxy will be shown using the HTML inside this div. - It must contain at least: - -- a link with templatePart="remove" - -- a hidden input field with templatePart="uriField" - --> -
- - - - - - -
- %label% - - %label% | %classLabel% -
- Remove selection - -
-
-
-
-
+
+ Select editors - -
- Select profiles - -
- -

 

- - <#-- Magic div thst holds all of the proxy data and the template that shows how to display it. --> -
+
+ +

 

+ + <#-- Magic div that holds all of the proxy data and the template that shows how to display it. --> +
    <#-- - Each proxy will be shown using the HTML inside this element. + Each proxy will be shown using the HTML inside this div. It must contain at least: -- a link with templatePart="remove" -- a hidden input field with templatePart="uriField" --> -
    - - - - - -
    - %label% - - %label% | %classLabel% -
    - Remove selection -
    - -
    -
-
+
+
  • + %label% + +
    + %label% | %classLabel% +
    + Remove selection + +
    +
  • +
    + +
    + + +
    + Select profiles + +
    + +

     

    -
    + <#-- Magic div thst holds all of the proxy data and the template that shows how to display it. --> + + + -

    +

    - <#if page.last != 0> +<#if page.last != 0>

    Profile editors

    +
    - - - - - <#if page.previous??> - | Previous - - ${page.current} of ${page.last} - <#if page.next??> - Next - - - <#if searchTerm?has_content> -

    - Search results for "${searchTerm}" | - View all profile editors -

    - - + + + <#if page.previous??> + | Previous + + ${page.current} of ${page.last} + <#if page.next??> + Next + + + <#if searchTerm?has_content> +

    + Search results for "${searchTerm}" | + View all profile editors +

    +
    -<#-- ---------------------------------> - <#list relationships as r>
    -
    <#assign p = r.proxyInfos[0]> - - - - - -
    - ${p.label} - - ${p.label} | ${p.classLabel} -
    - Delete profile editor - -
    - +
    + ${p.label} +

    + ${p.label} | ${p.classLabel} +
    + Delete profile editor + +

    +
    Add profile -
    +
    -

    -   -

    +

     

    ${r.proxyInfos[0].profileUri}

    -

    Selected profiles:

    <#-- Magic div that holds all of the proxy data and the template that shows how to display it. --> -
    +
      <#list r.profileInfos as p>

      ${p.uri}

      @@ -191,33 +160,25 @@ ${stylesheets.add('
      - - - - - -
      - %label% - - %label% | %classLabel% -
      - Remove selection -
      +
    • + %label% + +
      %label% | %classLabel% +
      Remove selection +
      +
    • +
      -
      -
    + +
    +
    -
    - +
    - - - - +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} + ${scripts.add('', '')} ${scripts.add('',