Re: [Freeipa-devel] [PATCH] 313 Removed develop.js.

2011-11-14 Thread Endi Sukma Dewata

On 11/14/2011 10:37 AM, Endi Sukma Dewata wrote:

The develop.js is no longer necessary because the code in it has
been merged into the main code.

An empty extension.js has been added to provide a place for UI
customization.

Ticket #2099


Replaced the regex with a variable IPA.url for detecting live/static 
site. By default the IPA.url is set to /ipa/ui/ which is the standard 
path for live deployment. If the current path matches the IPA.url the UI 
will know that it's running on a live server. Otherwise it will use the 
fixtures.


If the demo site needs to use the same path as the live path, the 
IPA.url can be set to null in the extension.js to force the UI to use 
fixtures.


--
Endi S. Dewata
From b5f0caad052d59dacf1f07f40067a261837b54d1 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata edew...@redhat.com
Date: Wed, 9 Nov 2011 18:48:04 -0600
Subject: [PATCH] Removed develop.js.

The develop.js is no longer necessary because the code in it has
been merged into the main code.

An empty extension.js has been added to provide a place for UI
customization.

Ticket #2099
---
 freeipa.spec.in |4 +++
 install/ui/Makefile.am  |1 +
 install/ui/aci.js   |   12 +
 install/ui/details.js   |9 ---
 install/ui/develop.js   |   13 --
 install/ui/host.js  |   12 +
 install/ui/index.html   |1 -
 install/ui/ipa.js   |   44 ---
 install/ui/jsl.conf |1 -
 install/ui/test/aci_tests.js|   11 +++-
 install/ui/test/details_tests.js|   11 +++-
 install/ui/test/entity_tests.js |   11 
 install/ui/test/ipa_tests.js|   11 
 install/ui/test/navigation_tests.js |   11 +++-
 install/ui/test/widget_tests.js |   11 +++-
 install/ui/webui.js |8 --
 16 files changed, 80 insertions(+), 91 deletions(-)
 create mode 100644 install/ui/extension.js

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 828d308e146c9d2758edcc11e1773f920b46caba..6531cf5dde55bcbf8f57125dfdc8b1e53c7d6e3d 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -516,6 +516,7 @@ fi
 %{_usr}/share/ipa/ui/*.svg
 %{_usr}/share/ipa/ui/*.ttf
 %{_usr}/share/ipa/ui/*.woff
+%config(noreplace) %{_usr}/share/ipa/ui/extension.js
 %dir %{_usr}/share/ipa/ui/images
 %{_usr}/share/ipa/ui/images/*.png
 %{_usr}/share/ipa/ui/images/*.gif
@@ -617,6 +618,9 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/default.conf
 
 %changelog
+* Wed Nov 14 2011 Endi S. Dewata edew...@redhat.com - 2.99.0-11
+- Make sure changes to extension.js are not removed.
+
 * Wed Oct 26 2011 Endi S. Dewata edew...@redhat.com - 2.99.0-10
 - Moved UI images into install/ui/images
 
diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am
index 8e1ec46fbeccf117e5e408d7dfa13857a3549a2d..2ec047c34dd4a31ea4ce452f3a74eeaf0ba2f13a 100644
--- a/install/ui/Makefile.am
+++ b/install/ui/Makefile.am
@@ -18,6 +18,7 @@ app_DATA =\
 	dns.js\
 	entitle.js 			\
 	entity.js 			\
+	extension.js 			\
 	facet.js 			\
 	favicon.ico			\
 	group.js 			\
diff --git a/install/ui/aci.js b/install/ui/aci.js
index cae0670405d6553951b2d5e927ef3cbda7e876e0..b63660da3f7931765e1b6791cfb8c6d03c1d5870 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -36,6 +36,7 @@ IPA.aci.permission_entity = function(spec) {
 columns: [ 'cn' ]
 }).
 details_facet({
+factory: IPA.aci.permission_details_facet,
 sections: [
 {
 name: 'identity',
@@ -90,6 +91,17 @@ IPA.aci.permission_entity = function(spec) {
 return that;
 };
 
+IPA.aci.permission_details_facet = function(spec) {
+
+var that = IPA.details_facet(spec);
+
+that.get_refresh_command_name = function() {
+return that.entity.name+'_show_'+that.pkey;
+};
+
+return that;
+};
+
 IPA.aci.privilege_entity = function(spec) {
 
 var that = IPA.entity(spec);
diff --git a/install/ui/details.js b/install/ui/details.js
index fd3570e1c79911bd62cfe2eee52ec9b4f7c7a71c..440a9b7d9618f279c5c941a51bd0bffd12f4faa6 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -800,20 +800,21 @@ IPA.details_facet = function(spec) {
 command.execute();
 };
 
+that.get_refresh_command_name = function() {
+return that.entity.name+'_show';
+};
+
 that.refresh = function() {
 
 that.pkey = IPA.nav.get_state(that.entity.name+'-pkey');
 
 var command = IPA.command({
+name: that.get_refresh_command_name(),
 entity: that.entity.name,
 method: 'show',
 options: { all: true, rights: true }
 });
 
-if (IPA.details_refresh_devel_hook) {
-IPA.details_refresh_devel_hook(that.entity.name, command, that.pkey);
-}
-
 if (that.pkey) {
 

Re: [Freeipa-devel] [PATCH] 313 Removed develop.js.

2011-11-14 Thread Adam Young

On 11/14/2011 04:35 PM, Endi Sukma Dewata wrote:

On 11/14/2011 10:37 AM, Endi Sukma Dewata wrote:

The develop.js is no longer necessary because the code in it has
been merged into the main code.

An empty extension.js has been added to provide a place for UI
customization.

Ticket #2099


Replaced the regex with a variable IPA.url for detecting live/static 
site. By default the IPA.url is set to /ipa/ui/ which is the 
standard path for live deployment. If the current path matches the 
IPA.url the UI will know that it's running on a live server. Otherwise 
it will use the fixtures.


If the demo site needs to use the same path as the live path, the 
IPA.url can be set to null in the extension.js to force the UI to use 
fixtures.




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

ACK (version 2)  and pushed to master
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel