summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/automount.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-01-31 17:25:14 +0100
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:17 +0200
commit31d7486b88bc0e30c8a84ab4d2f73c35a700dad8 (patch)
treef28ee432487ef269e285064c5588e4b4168c5205 /install/ui/src/freeipa/automount.js
parent7edf044a440d9a7f60c691811acedfc6a20ecbfe (diff)
downloadfreeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.tar.gz
freeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.tar.xz
freeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.zip
Remove IPA.nav usage, obsolete entity.get_primary_key
https://fedorahosted.org/freeipa/ticket/3236
Diffstat (limited to 'install/ui/src/freeipa/automount.js')
-rw-r--r--install/ui/src/freeipa/automount.js41
1 files changed, 25 insertions, 16 deletions
diff --git a/install/ui/src/freeipa/automount.js b/install/ui/src/freeipa/automount.js
index 6e8547c7f..aead97d16 100644
--- a/install/ui/src/freeipa/automount.js
+++ b/install/ui/src/freeipa/automount.js
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define(['./ipa', './jquery', './details', './search', './association',
- './entity'], function(IPA, $) {
+define(['./ipa', './jquery', './navigation', './details', './search', './association',
+ './entity'], function(IPA, $, navigation) {
IPA.automount = {};
@@ -191,11 +191,15 @@ IPA.automount.key_entity = function(spec) {
show_edit_page : function(entity, result){
var key = result.automountkey[0];
var info = result.automountinformation[0];
- var state = IPA.nav.get_path_state(entity.name);
- state[entity.name + '-facet'] = 'default';
- state[entity.name + '-info'] = info;
- state[entity.name + '-pkey'] = key;
- IPA.nav.push_state(state);
+ var pkeys = that.facet.get_pkeys();
+ pkeys.push(key);
+
+ var args = {
+ info: info,
+ key: key
+ };
+
+ navigation.show_entity(entity.name, 'details', pkeys, args);
return false;
},
fields:['automountkey','automountinformation']
@@ -215,8 +219,8 @@ IPA.automount.key_details_facet = function(spec) {
command.args.pop();
- var key = IPA.nav.get_state(that.entity.name + '-pkey');
- var info = IPA.nav.get_state(that.entity.name + '-info');
+ var key = that.state.key;
+ var info = that.state.info;
command.options.newautomountinformation = command.options.automountinformation;
command.options.automountkey = key;
@@ -231,8 +235,8 @@ IPA.automount.key_details_facet = function(spec) {
command.args.pop();
- var key = IPA.nav.get_state(that.entity.name + '-pkey');
- var info = IPA.nav.get_state(that.entity.name + '-info');
+ var key = that.state.key;
+ var info = that.state.info;
command.options.automountkey = key;
command.options.automountinformation = info;
@@ -260,11 +264,16 @@ IPA.automount_key_column = function(spec) {
href: '#'+key,
text: key,
click: function() {
- var state = IPA.nav.get_path_state(that.entity.name);
- state[that.entity.name + '-facet'] = 'default';
- state[that.entity.name + '-info'] = info;
- state[that.entity.name + '-pkey'] = key;
- IPA.nav.push_state(state);
+
+ var pkeys = that.facet.get_pkeys();
+ pkeys.push(key);
+
+ var args = {
+ info: info,
+ key: key
+ };
+
+ navigation.show_entity(that.entity.name, 'details', pkeys, args);
return false;
}
}).appendTo(container);