Re: [Freeipa-devel] [PATCH] shorten-url

2011-06-28 Thread Endi Sukma Dewata

On 6/28/2011 2:33 PM, Adam Young wrote:

On 06/28/2011 03:13 PM, Adam Young wrote:

One known issue: uses the wrong style for automount tabs, leaving
excess white space


Some issues:

1. Reloading the some pages will bring you to a different page (i.e.
   bookmarking wouldn't work). Try reloading these pages:
   - Groups details/association facet
   - HBAC Rule search facet
   It looks like the state JS variable should be initialized with
   values from the URL.

2. The following statement in navigation.js:123:

   key2.search('^'+entity)

   might match more keys than we want (e.g sudo will match sudorule,
   sudocmd, sudocmdgroup). It might be better to do the matching twice,
   one for exact value matching and the other for value-* prefix.

3. I haven't verified this, but the removeAttribute() is supposed to be
   used with DOM elements. To remove a JS object property we should use:

  delete state[key];

4. As discussed over IRC, the logic for calculating tab depth assumes
   that only the leaf nodes can be hidden. This can be slightly improved
   by moving this code

  if (tab.hidden) {
  depth = depth -1;
  }

   from navigation.js line 258 into 253. This way any hidden tabs along
   the tab hierarchy will not be counted toward depth.

5. There's a whitespace warning.

--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] shorten-url

2011-06-28 Thread Adam Young

On 06/28/2011 04:18 PM, Endi Sukma Dewata wrote:

On 6/28/2011 2:33 PM, Adam Young wrote:

On 06/28/2011 03:13 PM, Adam Young wrote:

One known issue: uses the wrong style for automount tabs, leaving
excess white space


Some issues:

1. Reloading the some pages will bring you to a different page (i.e.
   bookmarking wouldn't work). Try reloading these pages:
   - Groups details/association facet
   - HBAC Rule search facet
   It looks like the state JS variable should be initialized with
   values from the URL.

2. The following statement in navigation.js:123:

   key2.search('^'+entity)

   might match more keys than we want (e.g sudo will match sudorule,
   sudocmd, sudocmdgroup). It might be better to do the matching twice,
   one for exact value matching and the other for value-* prefix.

3. I haven't verified this, but the removeAttribute() is supposed to be
   used with DOM elements. To remove a JS object property we should use:

  delete state[key];

4. As discussed over IRC, the logic for calculating tab depth assumes
   that only the leaf nodes can be hidden. This can be slightly improved
   by moving this code

  if (tab.hidden) {
  depth = depth -1;
  }

   from navigation.js line 258 into 253. This way any hidden tabs along
   the tab hierarchy will not be counted toward depth.

5. There's a whitespace warning.



From ed770e2ddc960fcb5ff1bcfd35b26188182a74ce Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Tue, 28 Jun 2011 13:39:10 -0400
Subject: [PATCH] shorten url cache state in a javascript variable, and leave
 on information about the current entity in the URL hash
 params

https://fedorahosted.org/freeipa/ticket/674

decrement depth for hidden tabs.

Initialize state from url
useing delete for removing state
stricter attribute matching
not incrementing depth for all hidden tabs.
whitespace cleanup
---
 install/ui/association.js|   20 
 install/ui/details.js|8 +++---
 install/ui/dns.js|   10 
 install/ui/entity.js |   12 +-
 install/ui/hbac.js   |8 +++---
 install/ui/navigation.js |   46 +++--
 install/ui/rule.js   |2 +-
 install/ui/search.js |   14 +-
 install/ui/sudo.js   |   12 +-
 install/ui/test/details_tests.js |7 +
 install/ui/user.js   |4 +-
 install/ui/webui.js  |9 +--
 12 files changed, 96 insertions(+), 56 deletions(-)

diff --git a/install/ui/association.js b/install/ui/association.js
index ad2268f5c25523ccc09cbeeaf91fec4ae08cebe4..6f74bf628fbec4c8019b12dfac4edf78d3f6953e 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -514,7 +514,7 @@ IPA.association_table_widget = function (spec) {
 };
 
 that.create_add_dialog = function() {
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.add;
 
@@ -562,7 +562,7 @@ IPA.association_table_widget = function (spec) {
 
 that.add = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -587,7 +587,7 @@ IPA.association_table_widget = function (spec) {
 return;
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.remove;
 
@@ -625,7 +625,7 @@ IPA.association_table_widget = function (spec) {
 
 that.remove = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -651,7 +651,7 @@ IPA.association_table_widget = function (spec) {
 summary.append(error_thrown.name+': '+error_thrown.message);
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 IPA.command({
 entity: that.entity_name,
 method: 'show',
@@ -814,7 +814,7 @@ IPA.association_facet = function (spec) {
 
 that.facet_create_header(container);
 
-that.pkey = $.bbq.getState(that.entity_name+'-pkey');
+that.pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var other_label = IPA.metadata.objects[that.other_entity].label;
 
 if (!that.read_only) {
@@ -891,13 +891,13 @@ IPA.association_facet = function (spec) {
 that.show = 

Re: [Freeipa-devel] [PATCH] shorten-url

2011-06-28 Thread Adam Young

On 06/28/2011 04:51 PM, Adam Young wrote:

On 06/28/2011 04:18 PM, Endi Sukma Dewata wrote:

On 6/28/2011 2:33 PM, Adam Young wrote:

On 06/28/2011 03:13 PM, Adam Young wrote:

One known issue: uses the wrong style for automount tabs, leaving
excess white space


Some issues:

1. Reloading the some pages will bring you to a different page (i.e.
   bookmarking wouldn't work). Try reloading these pages:
   - Groups details/association facet
   - HBAC Rule search facet
   It looks like the state JS variable should be initialized with
   values from the URL.

2. The following statement in navigation.js:123:

   key2.search('^'+entity)

   might match more keys than we want (e.g sudo will match sudorule,
   sudocmd, sudocmdgroup). It might be better to do the matching twice,
   one for exact value matching and the other for value-* prefix.

3. I haven't verified this, but the removeAttribute() is supposed to be
   used with DOM elements. To remove a JS object property we should use:

  delete state[key];

4. As discussed over IRC, the logic for calculating tab depth assumes
   that only the leaf nodes can be hidden. This can be slightly improved
   by moving this code

  if (tab.hidden) {
  depth = depth -1;
  }

   from navigation.js line 258 into 253. This way any hidden tabs along
   the tab hierarchy will not be counted toward depth.

5. There's a whitespace warning.




___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


From 8921081391e05432471796a96108b424ef02a39a Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Tue, 28 Jun 2011 13:39:10 -0400
Subject: [PATCH] shorten url cache state in a javascript variable, and leave
 on information about the current entity in the URL hash
 params

https://fedorahosted.org/freeipa/ticket/674

decrement depth for hidden tabs.

Initialize state from url
useing delete for removing state
stricter attribute matching
not incrementing depth for all hidden tabs.
whitespace cleanup
---
 install/ui/association.js|   20 
 install/ui/details.js|8 +++---
 install/ui/dns.js|   10 
 install/ui/entity.js |   12 +-
 install/ui/hbac.js   |8 +++---
 install/ui/navigation.js |   46 +++--
 install/ui/rule.js   |2 +-
 install/ui/search.js |   14 +-
 install/ui/sudo.js   |   12 +-
 install/ui/test/details_tests.js |6 +
 install/ui/user.js   |4 +-
 install/ui/webui.js  |9 +--
 12 files changed, 95 insertions(+), 56 deletions(-)

diff --git a/install/ui/association.js b/install/ui/association.js
index ad2268f5c25523ccc09cbeeaf91fec4ae08cebe4..6f74bf628fbec4c8019b12dfac4edf78d3f6953e 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -514,7 +514,7 @@ IPA.association_table_widget = function (spec) {
 };
 
 that.create_add_dialog = function() {
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.add;
 
@@ -562,7 +562,7 @@ IPA.association_table_widget = function (spec) {
 
 that.add = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -587,7 +587,7 @@ IPA.association_table_widget = function (spec) {
 return;
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.remove;
 
@@ -625,7 +625,7 @@ IPA.association_table_widget = function (spec) {
 
 that.remove = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -651,7 +651,7 @@ IPA.association_table_widget = function (spec) {
 summary.append(error_thrown.name+': '+error_thrown.message);
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 IPA.command({
 entity: that.entity_name,
 method: 'show',
@@ -814,7 +814,7 @@ IPA.association_facet = function (spec) {
 
 that.facet_create_header(container);
 
-that.pkey = $.bbq.getState(that.entity_name+'-pkey');
+that.pkey = 

Re: [Freeipa-devel] [PATCH] shorten-url

2011-06-28 Thread Adam Young

On 06/28/2011 05:45 PM, Adam Young wrote:

On 06/28/2011 04:51 PM, Adam Young wrote:

On 06/28/2011 04:18 PM, Endi Sukma Dewata wrote:

On 6/28/2011 2:33 PM, Adam Young wrote:

On 06/28/2011 03:13 PM, Adam Young wrote:

One known issue: uses the wrong style for automount tabs, leaving
excess white space


Some issues:

1. Reloading the some pages will bring you to a different page (i.e.
   bookmarking wouldn't work). Try reloading these pages:
   - Groups details/association facet
   - HBAC Rule search facet
   It looks like the state JS variable should be initialized with
   values from the URL.

2. The following statement in navigation.js:123:

   key2.search('^'+entity)

   might match more keys than we want (e.g sudo will match sudorule,
   sudocmd, sudocmdgroup). It might be better to do the matching twice,
   one for exact value matching and the other for value-* prefix.

3. I haven't verified this, but the removeAttribute() is supposed to be
   used with DOM elements. To remove a JS object property we should 
use:


  delete state[key];

4. As discussed over IRC, the logic for calculating tab depth assumes
   that only the leaf nodes can be hidden. This can be slightly 
improved

   by moving this code

  if (tab.hidden) {
  depth = depth -1;
  }

   from navigation.js line 258 into 253. This way any hidden tabs along
   the tab hierarchy will not be counted toward depth.

5. There's a whitespace warning.




___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel



___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


From 0d96b3ddf8edbe7f330fed7919e02981fcc84ef6 Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Tue, 28 Jun 2011 13:39:10 -0400
Subject: [PATCH] shorten url cache state in a javascript variable, and leave
 on information about the current entity in the URL hash
 params

https://fedorahosted.org/freeipa/ticket/674

decrement depth for hidden tabs.

Initialize state from url
useing delete for removing state
stricter attribute matching
not incrementing depth for all hidden tabs.
whitespace cleanup
---
 install/ui/association.js|   20 
 install/ui/details.js|8 +++---
 install/ui/dns.js|   10 
 install/ui/entity.js |   12 +-
 install/ui/hbac.js   |8 +++---
 install/ui/navigation.js |   46 +++--
 install/ui/rule.js   |2 +-
 install/ui/search.js |   14 +-
 install/ui/sudo.js   |   12 +-
 install/ui/test/details_tests.js |6 +
 install/ui/user.js   |4 +-
 install/ui/webui.js  |9 +--
 12 files changed, 95 insertions(+), 56 deletions(-)

diff --git a/install/ui/association.js b/install/ui/association.js
index ad2268f5c25523ccc09cbeeaf91fec4ae08cebe4..6f74bf628fbec4c8019b12dfac4edf78d3f6953e 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -514,7 +514,7 @@ IPA.association_table_widget = function (spec) {
 };
 
 that.create_add_dialog = function() {
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.add;
 
@@ -562,7 +562,7 @@ IPA.association_table_widget = function (spec) {
 
 that.add = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -587,7 +587,7 @@ IPA.association_table_widget = function (spec) {
 return;
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 var label = IPA.metadata.objects[that.other_entity].label;
 var title = IPA.messages.association.remove;
 
@@ -625,7 +625,7 @@ IPA.association_table_widget = function (spec) {
 
 that.remove = function(values, on_success, on_error) {
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 
 var command = IPA.command({
 entity: that.entity_name,
@@ -651,7 +651,7 @@ IPA.association_table_widget = function (spec) {
 summary.append(error_thrown.name+': '+error_thrown.message);
 }
 
-var pkey = $.bbq.getState(that.entity_name+'-pkey');
+var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
 IPA.command({
 entity: that.entity_name,
 method: 'show',
@@ -814,7 +814,7 @@