diff options
author | Olivier Lamy <olamy@apache.org> | 2012-03-06 18:30:32 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-03-06 18:30:32 +0000 |
commit | 0acf0c9e11580f8f44eb2898add0f8ca79b2e91a (patch) | |
tree | 90f0a52ec80b96d5f8b148e8c57639409df95592 /archiva-modules | |
parent | 12cd17a5d06db78938c4d72d689d2dce03a65aae (diff) | |
download | archiva-0acf0c9e11580f8f44eb2898add0f8ca79b2e91a.tar.gz archiva-0acf0c9e11580f8f44eb2898add0f8ca79b2e91a.zip |
[MRM-1577] rewrite legacy path admin page
add js layout. use a generic naming for small admin screen.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1297636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
5 files changed, 70 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index 7079b3e53..0cd557eab 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -86,6 +86,7 @@ $.ajax( .script(buildLoadJsUrl("jquery.validate.js")).wait() .script("jquery.json-2.3.min.js").wait() .script(buildLoadJsUrl("archiva/main-tmpl.js")).wait() + .script(buildLoadJsUrl("archiva/general-admin.js")) .script(buildLoadJsUrl("archiva/repositories.js")).wait() .script(buildLoadJsUrl("archiva/network-proxies.js")).wait() .script(buildLoadJsUrl("archiva/proxy-connectors.js")).wait() diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js new file mode 100644 index 000000000..9711235e4 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +$(function() { + + //------------------------- + // legacy path part + //------------------------- + + LegacyPathViewModel=function(){ + + } + + displayLegacySupport=function(){ + clearUserMessages(); + var mainContent=$("#main-content"); + + mainContent.html($("#legacy-path-main" ).html()); + + var legacyPathViewModel=new LegacyPathViewModel(); + + ko.applyBindings(legacyPathViewModel,mainContent.find("#legacy-path-screen" ).get(0)) + } + +});
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index 9f372f277..21d31239c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -851,7 +851,7 @@ $(function() { searchViewModel.observableRepoIds(repos); ko.applyBindings(searchViewModel,mainContent.find("#search-artifacts-div").get(0)); mainContent.find("#search-basic-repostories-select" ).chosen(); - if (successCallbackFn) successCallbackFn(); + if (successCallbackFn!=null) successCallbackFn(); } }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/general-admin.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/general-admin.html new file mode 100644 index 000000000..d484b0297 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/general-admin.html @@ -0,0 +1,25 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> +<script id="legacy-path-main" type="text/html"> + <div id="legacy-path-screen" data-bind='template:{name:"legacy-path-div"}'></div> +</script> + +<script id="legacy-path-div" type="text/html"> + foo +</script>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html index d82253abf..1af0b573e 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html @@ -42,6 +42,9 @@ <li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}"> <a href="#" id="menu-network-proxies-list-a" onclick="displayNetworkProxies()">${$.i18n.prop('menu.network-proxies')}</a> </li> + <li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}"> + <a href="#" id="menu-legacy-support-list-a" onclick="displayLegacySupport()">${$.i18n.prop('menu.legacy-support')}</a> + </li> </ul> <ul class="nav nav-list" redback-permissions="{permissions: ['archiva-manage-users']}"> |