diff --git a/freeipa.spec.in b/freeipa.spec.in index ff4931fa9..35ff84576 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -415,9 +415,6 @@ fi %{_usr}/share/ipa/ui/*.svg %{_usr}/share/ipa/ui/*.ttf %{_usr}/share/ipa/ui/*.woff -%dir %{_usr}/share/ipa/ui/layouts -%dir %{_usr}/share/ipa/ui/layouts/default -%{_usr}/share/ipa/ui/layouts/default/*.html %dir %{_sysconfdir}/ipa %dir %{_sysconfdir}/ipa/html %config(noreplace) %{_sysconfdir}/ipa/html/ssbrowser.html diff --git a/install/configure.ac b/install/configure.ac index 88bf9f805..8a1dac635 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -73,8 +73,6 @@ AC_CONFIG_FILES([ migration/Makefile share/Makefile ui/Makefile - ui/layouts/Makefile - ui/layouts/default/Makefile tools/Makefile tools/man/Makefile updates/Makefile diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am index b53f439c9..138db15ee 100644 --- a/install/ui/Makefile.am +++ b/install/ui/Makefile.am @@ -3,7 +3,6 @@ AUTOMAKE_OPTIONS = 1.7 NULL = SUBDIRS = \ - layouts \ $(NULL) appdir = $(IPA_DATA_DIR)/ui diff --git a/install/ui/details.js b/install/ui/details.js index 82804b538..45ffa6f16 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -37,7 +37,6 @@ IPA.details_section = function(spec) { that.name = spec.name || ''; that.label = spec.label || ''; - that.template = spec.template; that._entity_name = spec.entity_name; that.fields = $.ordered_map(); @@ -105,8 +104,6 @@ IPA.details_section = function(spec) { that.create = function(container) { - if (that.template) return; - var fields = that.fields.values; for (var i=0; i', { 'id': that.name, 'class': 'entryattrs' diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 5245ba92c..ada30b0f4 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -32,7 +32,6 @@ IPA.dialog = function(spec) { that.name = spec.name; that.title = spec.title; - that.template = spec.template; that._entity_name = spec.entity_name; that.width = spec.width || 400; @@ -254,40 +253,19 @@ IPA.dialog = function(spec) { container.append(that.container); } - if (that.template) { - var template = IPA.get_template(that.template); - that.container.load( - template, - function(data, text_status, xhr) { - that.setup(); - that.container.dialog({ - 'title': that.title, - 'modal': true, - 'width': that.width, - 'height': that.height, - 'buttons': that.buttons, - close: function(event, ui) { - that.close(); - } - }); - } - ); + that.create(); + that.setup(); - } else { - that.create(); - that.setup(); - - that.container.dialog({ - 'title': that.title, - 'modal': true, - 'width': that.width, - 'height': that.height, - 'buttons': that.buttons, - close: function(event, ui) { - that.close(); - } - }); - } + that.container.dialog({ + 'title': that.title, + 'modal': true, + 'width': that.width, + 'height': that.height, + 'buttons': that.buttons, + close: function(event, ui) { + that.close(); + } + }); }; that.option = function(name, value) { diff --git a/install/ui/hbac.js b/install/ui/hbac.js index 1e2cefb8d..be4e736e2 100644 --- a/install/ui/hbac.js +++ b/install/ui/hbac.js @@ -156,22 +156,11 @@ IPA.hbacrule_details_facet = function(spec) { that.init = function() { - var section; - - if (IPA.layout) { - section = that.create_section({ - 'name': 'general', - 'label': IPA.messages.details.general, - 'template': 'hbacrule-details-general.html #contents' - }); - - } else { - section = IPA.hbacrule_details_general_section({ - 'name': 'general', - 'label': IPA.messages.details.general - }); - that.add_section(section); - } + var section = IPA.hbacrule_details_general_section({ + 'name': 'general', + 'label': IPA.messages.details.general + }); + that.add_section(section); section.text({name: 'cn', read_only: true}); section.radio({name: 'accessruletype'}); @@ -180,30 +169,21 @@ IPA.hbacrule_details_facet = function(spec) { var param_info = IPA.get_entity_param('hbacrule', 'usercategory'); - if (IPA.layout) { - section = that.create_section({ - 'name': 'user', - 'label': IPA.messages.objects.hbacrule.user, - 'template': 'hbacrule-details-user.html #contents' - }); - - } else { - section = IPA.rule_details_section({ - 'name': 'user', - 'label': IPA.messages.objects.hbacrule.user, - 'text': param_info.doc+':', - 'field_name': 'usercategory', - 'options': [ - { 'value': 'all', 'label': IPA.messages.objects.hbacrule.anyone }, - { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_users } - ], - 'tables': [ - { 'field_name': 'memberuser_user' }, - { 'field_name': 'memberuser_group' } - ] - }); - that.add_section(section); - } + section = IPA.rule_details_section({ + 'name': 'user', + 'label': IPA.messages.objects.hbacrule.user, + 'text': param_info.doc+':', + 'field_name': 'usercategory', + 'options': [ + { 'value': 'all', 'label': IPA.messages.objects.hbacrule.anyone }, + { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_users } + ], + 'tables': [ + { 'field_name': 'memberuser_user' }, + { 'field_name': 'memberuser_group' } + ] + }); + that.add_section(section); var category = section.add_field(IPA.radio_widget({ name: 'usercategory' @@ -221,30 +201,21 @@ IPA.hbacrule_details_facet = function(spec) { param_info = IPA.get_entity_param('hbacrule', 'hostcategory'); - if (IPA.layout) { - section = that.create_section({ - 'name': 'host', - 'label': IPA.messages.objects.hbacrule.host, - 'template': 'hbacrule-details-host.html #contents' - }); - - } else { - section = IPA.rule_details_section({ - 'name': 'host', - 'label': IPA.messages.objects.hbacrule.host, - 'text': param_info.doc+':', - 'field_name': 'hostcategory', - 'options': [ - { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_host }, - { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_hosts } - ], - 'tables': [ - { 'field_name': 'memberhost_host' }, - { 'field_name': 'memberhost_hostgroup' } - ] - }); - that.add_section(section); - } + section = IPA.rule_details_section({ + 'name': 'host', + 'label': IPA.messages.objects.hbacrule.host, + 'text': param_info.doc+':', + 'field_name': 'hostcategory', + 'options': [ + { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_host }, + { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_hosts } + ], + 'tables': [ + { 'field_name': 'memberhost_host' }, + { 'field_name': 'memberhost_hostgroup' } + ] + }); + that.add_section(section); category = section.add_field(IPA.radio_widget({ name: 'hostcategory' @@ -262,30 +233,21 @@ IPA.hbacrule_details_facet = function(spec) { param_info = IPA.get_entity_param('hbacrule', 'servicecategory'); - if (IPA.layout) { - section = that.create_section({ - 'name': 'service', - 'label': IPA.messages.objects.hbacrule.service, - 'template': 'hbacrule-details-service.html #contents' - }); - - } else { - section = IPA.rule_details_section({ - 'name': 'service', - 'label': IPA.messages.objects.hbacrule.service, - 'text': param_info.doc+':', - 'field_name': 'servicecategory', - 'options': [ - { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_service }, - { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_services } - ], - 'tables': [ - { 'field_name': 'memberservice_hbacsvc' }, - { 'field_name': 'memberservice_hbacsvcgroup' } - ] - }); - that.add_section(section); - } + section = IPA.rule_details_section({ + 'name': 'service', + 'label': IPA.messages.objects.hbacrule.service, + 'text': param_info.doc+':', + 'field_name': 'servicecategory', + 'options': [ + { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_service }, + { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_services } + ], + 'tables': [ + { 'field_name': 'memberservice_hbacsvc' }, + { 'field_name': 'memberservice_hbacsvcgroup' } + ] + }); + that.add_section(section); category = section.add_field(IPA.radio_widget({ name: 'servicecategory' @@ -303,30 +265,21 @@ IPA.hbacrule_details_facet = function(spec) { param_info = IPA.get_entity_param('hbacrule', 'sourcehostcategory'); - if (IPA.layout) { - section = that.create_section({ - 'name': 'sourcehost', - 'label': IPA.messages.objects.hbacrule.sourcehost, - 'template': 'hbacrule-details-sourcehost.html #contents' - }); - - } else { - section = IPA.rule_details_section({ - 'name': 'sourcehost', - 'label': IPA.messages.objects.hbacrule.sourcehost, - 'text': param_info.doc+':', - 'field_name': 'sourcehostcategory', - 'options': [ - { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_host }, - { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_hosts } - ], - 'tables': [ - { 'field_name': 'sourcehost_host' }, - { 'field_name': 'sourcehost_hostgroup' } - ] - }); - that.add_section(section); - } + section = IPA.rule_details_section({ + 'name': 'sourcehost', + 'label': IPA.messages.objects.hbacrule.sourcehost, + 'text': param_info.doc+':', + 'field_name': 'sourcehostcategory', + 'options': [ + { 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_host }, + { 'value': '', 'label': IPA.messages.objects.hbacrule.specified_hosts } + ], + 'tables': [ + { 'field_name': 'sourcehost_host' }, + { 'field_name': 'sourcehost_hostgroup' } + ] + }); + that.add_section(section); category = section.add_field(IPA.radio_widget({ name: 'sourcehostcategory' diff --git a/install/ui/ipa.js b/install/ui/ipa.js index 4b505235b..a6c9694cb 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -52,16 +52,8 @@ var IPA = ( function () { that.entities = $.ordered_map(); that.entity_factories = {}; - that.layout = $.bbq.getState('layout'); - that.layouts_dir = 'layouts'; - that.network_call_count = 0; - that.get_template = function(path) { - var layout = that.layout || 'default'; - return that.layouts_dir+'/'+layout+'/'+path; - }; - /* initialize the IPA JSON-RPC helper * arguments: * url - JSON-RPC URL to use (optional) */ diff --git a/install/ui/layouts/Makefile.am b/install/ui/layouts/Makefile.am deleted file mode 100644 index 711c236f0..000000000 --- a/install/ui/layouts/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -AUTOMAKE_OPTIONS = 1.7 - -NULL = - -SUBDIRS = \ - default \ - $(NULL) - -appdir = $(IPA_DATA_DIR)/ui/layouts -app_DATA = \ - $(NULL) - -EXTRA_DIST = \ - $(app_DATA) \ - $(NULL) - -MAINTAINERCLEANFILES = \ - *~ \ - Makefile.in - $(NULL) - -distclean: diff --git a/install/ui/layouts/default/Makefile.am b/install/ui/layouts/default/Makefile.am deleted file mode 100644 index 82a58c7f6..000000000 --- a/install/ui/layouts/default/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -AUTOMAKE_OPTIONS = 1.7 - -NULL = - -SUBDIRS = \ - $(NULL) - -appdir = $(IPA_DATA_DIR)/ui/layouts/default -app_DATA = \ - hbacrule-details-accesstime.html \ - hbacrule-details-general.html \ - hbacrule-details-host.html \ - hbacrule-details-service.html \ - hbacrule-details-sourcehost.html \ - hbacrule-details-user.html \ - sudorule-details-general.html \ - sudorule-group-dialog.html \ - sudorule-host-dialog.html \ - sudorule-hostgroup-dialog.html \ - sudorule-user-dialog.html \ - $(NULL) - -EXTRA_DIST = \ - $(app_DATA) \ - $(NULL) - -MAINTAINERCLEANFILES = \ - *~ \ - Makefile.in - $(NULL) diff --git a/install/ui/layouts/default/hbacrule-details-accesstime.html b/install/ui/layouts/default/hbacrule-details-accesstime.html deleted file mode 100755 index 8d5e258b3..000000000 --- a/install/ui/layouts/default/hbacrule-details-accesstime.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - When - - - - - -
- - Rule applies when access is being requested at: - Any Time - Specified Times - -
- - - - - - - - - - - - - - - -
- - - Access Time - - - - -
- - - time -
-
-
-
- - \ No newline at end of file diff --git a/install/ui/layouts/default/hbacrule-details-general.html b/install/ui/layouts/default/hbacrule-details-general.html deleted file mode 100755 index 978369090..000000000 --- a/install/ui/layouts/default/hbacrule-details-general.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - General - - - - - -
- - - - - - - - - - - - - - -
- Name: - - - - - - - Rule type: - - Allow - Deny - - -
- Description: - - - - - -
- Rule status: - - - Active - Inactive - - -
-
- - diff --git a/install/ui/layouts/default/hbacrule-details-host.html b/install/ui/layouts/default/hbacrule-details-host.html deleted file mode 100755 index 1ba386dab..000000000 --- a/install/ui/layouts/default/hbacrule-details-host.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - Accessing - - - - - -
- Rule applies when access is requested to: - - Any Host - Specified Hosts and Groups - - -
- - - - - - - - - - - - - - - -
- - - Host - - - - -
- - - host -
-
- - - - - - - - - - - - - - - -
- - - Host Group - - - - -
- - - hostgroups -
-
-
- - \ No newline at end of file diff --git a/install/ui/layouts/default/hbacrule-details-service.html b/install/ui/layouts/default/hbacrule-details-service.html deleted file mode 100755 index 77e8420d3..000000000 --- a/install/ui/layouts/default/hbacrule-details-service.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - Via Service - - - - - -
- Rule applies when access is requested via: - - Any Service - Specified Services and Groups - - -
- - - - - - - - - - - - - - - -
- - - Service - - - - -
- - - service -
-
- - - - - - - - - - - - - - - -
- - - Service Group - - - - -
- - - services -
-
-
- - \ No newline at end of file diff --git a/install/ui/layouts/default/hbacrule-details-sourcehost.html b/install/ui/layouts/default/hbacrule-details-sourcehost.html deleted file mode 100755 index aae1ef380..000000000 --- a/install/ui/layouts/default/hbacrule-details-sourcehost.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - From - - - - - -
- Rule applies when access is being initiated from: - - Any Host - Specified Hosts and Groups - - -
- - - - - - - - - - - - - - - -
- - - Host - - - - -
- - - host -
-
- - - - - - - - - - - - - - - -
- - - Host Group - - - - -
- - - hosts -
-
-
- - \ No newline at end of file diff --git a/install/ui/layouts/default/hbacrule-details-user.html b/install/ui/layouts/default/hbacrule-details-user.html deleted file mode 100755 index 1b58848fe..000000000 --- a/install/ui/layouts/default/hbacrule-details-user.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - Who - - - - - -
- Rule applies when access is requested by: - - Anyone - Specified Users and Groups - - -
- - - - - - - - - - - - - - - -
- - - User - - - - -
- - - user -
-
- - - - - - - - - - - - - - - -
- - - User Group - - - - -
- - - users -
-
-
- - \ No newline at end of file diff --git a/install/ui/layouts/default/sudorule-details-general.html b/install/ui/layouts/default/sudorule-details-general.html deleted file mode 100755 index 728ecf11e..000000000 --- a/install/ui/layouts/default/sudorule-details-general.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - General - - - - - -
- - - - - - - - - - - - - -
- Name: - - - - - -
- Description: - - - - - -
- Rule status: - - - Active - Inactive - - -
-
- - diff --git a/install/ui/layouts/default/sudorule-group-dialog.html b/install/ui/layouts/default/sudorule-group-dialog.html deleted file mode 100755 index d576f1a1f..000000000 --- a/install/ui/layouts/default/sudorule-group-dialog.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - Adder Dialog - - - - - -
- -
- - -
- -
- -
- -
- Available -
- - - - - - - - - - - - - - - - - - - -
- - - Groups -
- - - -
- -
-
- -
-

-

-
- -
- -
- Prospective -
- - - - - - - - - - - - - - - - - - - -
- - - Groups -
- - - -
- -
-
- -
- -
- External -
- - -
- -
-
- - diff --git a/install/ui/layouts/default/sudorule-host-dialog.html b/install/ui/layouts/default/sudorule-host-dialog.html deleted file mode 100755 index 5eec41868..000000000 --- a/install/ui/layouts/default/sudorule-host-dialog.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - Adder Dialog - - - - - -
- -
- - -
- -
- -
- -
- Available -
- - - - - - - - - - - - - - - - - - - -
- - - Hosts -
- - - -
- -
-
- -
-

-

-
- -
- -
- Prospective -
- - - - - - - - - - - - - - - - - - - -
- - - Hosts -
- - - -
- -
-
- -
- -
- External -
- - -
- -
-
- - diff --git a/install/ui/layouts/default/sudorule-hostgroup-dialog.html b/install/ui/layouts/default/sudorule-hostgroup-dialog.html deleted file mode 100755 index 57d72f387..000000000 --- a/install/ui/layouts/default/sudorule-hostgroup-dialog.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - Adder Dialog - - - - - -
- -
- - -
- -
- -
- -
- Available -
- - - - - - - - - - - - - - - - - - - -
- - - Host Groups -
- - - -
- -
-
- -
-

-

-
- -
- -
- Prospective -
- - - - - - - - - - - - - - - - - - - -
- - - Host Groups -
- - - -
- -
-
- -
- -
- External -
- - -
- -
-
- - diff --git a/install/ui/layouts/default/sudorule-user-dialog.html b/install/ui/layouts/default/sudorule-user-dialog.html deleted file mode 100755 index 78687cead..000000000 --- a/install/ui/layouts/default/sudorule-user-dialog.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - Adder Dialog - - - - - -
- -
- - -
- -
- -
- -
- Available -
- - - - - - - - - - - - - - - - - - - -
- - - Users -
- - - -
- -
-
- -
-

-

-
- -
- -
- Prospective -
- - - - - - - - - - - - - - - - - - - -
- - - Users -
- - - -
- -
-
- -
- -
- External -
- - -
- -
-
- - diff --git a/install/ui/rule.js b/install/ui/rule.js index aec86574f..40d05c8da 100644 --- a/install/ui/rule.js +++ b/install/ui/rule.js @@ -36,8 +36,6 @@ IPA.rule_details_section = function(spec) { that.create = function(container) { - if (that.template) return; - if (that.text) container.append(that.text); var field = that.get_field(that.field_name); diff --git a/install/ui/sudo.js b/install/ui/sudo.js index fecb0b070..30479fb11 100644 --- a/install/ui/sudo.js +++ b/install/ui/sudo.js @@ -263,21 +263,11 @@ IPA.sudorule_details_facet = function(spec) { var that = IPA.details_facet(spec); - var section; - - if (IPA.layout) { - section = that.create_section({ - 'name': 'general', - 'label': IPA.messages.details.general, - 'template': 'sudorule-details-general.html #contents' - }); - } else { - section = IPA.sudo.rule_details_general_section({ - 'name': 'general', - 'label': IPA.messages.details.general - }); - that.add_section(section); - } + var section = IPA.sudo.rule_details_general_section({ + 'name': 'general', + 'label': IPA.messages.details.general + }); + that.add_section(section); section.text({name: 'cn', read_only: true}); section.textarea({name: 'description'}); @@ -929,8 +919,6 @@ IPA.sudo.rule_details_command_section = function(spec) { that.create = function(container) { - if (that.template) return; - var field = that.get_field('cmdcategory'); var param_info = IPA.get_entity_param(that.entity_name, 'cmdcategory'); @@ -1098,8 +1086,6 @@ IPA.sudo.rule_details_runas_section = function(spec) { that.create = function(container) { - if (that.template) return; - var field = that.get_field('ipasudorunasusercategory'); var param_info = IPA.get_entity_param(that.entity_name, 'ipasudorunasusercategory'); @@ -1287,18 +1273,12 @@ IPA.sudorule_association_table_widget = function(spec) { var label = IPA.metadata.objects[that.other_entity].label; var title = 'Add '+label+' to '+that.entity_name+' '+pkey; - var template; - if (IPA.layout) { - template = 'sudorule-'+that.other_entity+'-dialog.html #contents'; - } - return IPA.sudo.rule_association_adder_dialog({ 'title': title, 'entity_name': that.entity_name, 'pkey': pkey, 'other_entity': that.other_entity, - 'external': that.external, - 'template': template + 'external': that.external }); };