diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-04-28 19:17:58 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-05-05 12:14:43 -0500 |
commit | dd89c28654c92c0922900409b37c1abcefc56c84 (patch) | |
tree | cf6d1d5eedcce59a0cd1fd263c3fe9a7a435b36b /install/ui/details.js | |
parent | 5eb9f088f2c5c902a55aefdf9dd8b2a95e060837 (diff) | |
download | freeipa-dd89c28654c92c0922900409b37c1abcefc56c84.tar.gz freeipa-dd89c28654c92c0922900409b37c1abcefc56c84.tar.xz freeipa-dd89c28654c92c0922900409b37c1abcefc56c84.zip |
Moved entity contents outside navigation.
Previously the entities and navigation are entangled inside a common
DOM structure which limits code reuse. Now they have been moved
into separate structures.
Diffstat (limited to 'install/ui/details.js')
-rw-r--r-- | install/ui/details.js | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/install/ui/details.js b/install/ui/details.js index 1d653c237..433f682f0 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -264,13 +264,9 @@ IPA.details_facet = function(spec) { var that = IPA.facet(spec); - that.label = ( IPA.messages && IPA.messages.facets && IPA.messages.facets.details) || spec.label; - that.is_dirty = spec.is_dirty || is_dirty; - that.create_content = spec.create_content || create_content; - that.setup = spec.setup || setup; - that.load = spec.load || load; + that.label = (IPA.messages && IPA.messages.facets && IPA.messages.facets.details) || spec.label; + that.update = spec.update || IPA.details_update; - that.reset = spec.reset || reset; that.refresh = spec.refresh || IPA.details_refresh; that.sections = []; @@ -323,24 +319,7 @@ IPA.details_facet = function(spec) { } }; - that.create_action_panel = function(container) { - - that.facet_create_action_panel(container); - - var buttons = $('.action-controls', container); - - $('<input/>', { - 'type': 'text', - 'name': 'reset' - }).appendTo(buttons); - - $('<input/>', { - 'type': 'text', - 'name': 'update' - }).appendTo(buttons); - }; - - function create_content(container) { + that.create_content = function(container) { var label = IPA.metadata.objects[that.entity_name].label; @@ -399,9 +378,9 @@ IPA.details_facet = function(spec) { details.append('<hr/>'); } - } + }; - function setup(container) { + that.setup = function(container) { that.facet_setup(container); @@ -468,7 +447,7 @@ IPA.details_facet = function(spec) { section.setup(div); } - } + }; function toggle(section, visible) { var header = $('h2[name='+section.name+']', that.container); @@ -491,7 +470,7 @@ IPA.details_facet = function(spec) { that.new_key = new_key; - function is_dirty() { + that.is_dirty = function() { var i; for ( i =0; i < that.sections.length; i +=1 ){ @@ -501,9 +480,9 @@ IPA.details_facet = function(spec) { } return false; - } + }; - function load(record) { + that.load = function (record) { that.record = record; for (var i=0; i<that.sections.length; i++) { var section = that.sections[i]; @@ -512,15 +491,15 @@ IPA.details_facet = function(spec) { if (that.pkey){ that.entity_header.set_pkey(that.pkey); } - } + }; - function reset() { + that.reset = function() { for (var i=0; i<that.sections.length; i++) { var section = that.sections[i]; section.reset(); } - } + }; that.details_facet_init = that.init; that.details_facet_create_content = that.create_content; |