]> source.dussan.org Git - archiva.git/commitdiff
add layout/files for search/browse screens
authorOlivier Lamy <olamy@apache.org>
Wed, 15 Feb 2012 17:41:36 +0000 (17:41 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 15 Feb 2012 17:41:36 +0000 (17:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1244604 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html [new file with mode: 0644]

index 740d9ea7449ffb8f31e8b41858f6eba8c6d12a0e..76e2ad8ee01b8022ff5116d9a70dcda69e312433 100644 (file)
@@ -87,6 +87,7 @@ $.ajax(
            .script(buildLoadJsUrl("archiva/proxy-connectors.js")).wait()
            .script(buildLoadJsUrl("redback/operation.js")).wait()
            .script(buildLoadJsUrl("archiva/repository-groups.js")).wait()
+           .script(buildLoadJsUrl("archiva/search.js")).wait()
            .script(buildLoadJsUrl("redback/redback-tmpl.js")).wait()
            .script(buildLoadJsUrl("bootstrap.js"))
            .script(buildLoadJsUrl("knockout.simpleGrid.js"))
index 743f009fddacca9a80f938c5c5ffdede900c92df..e44dd0707dbb80f4d857fd42025faea2353d8de6 100644 (file)
@@ -24,9 +24,10 @@ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(),
           "text!js/archiva/templates/repositories.html?"+appendTemplateUrl(),
           "text!js/archiva/templates/network-proxies.html?"+appendTemplateUrl(),
           "text!js/archiva/templates/proxy-connectors.html?"+appendTemplateUrl(),
-          "text!js/archiva/templates/repository-groups.html?"+appendTemplateUrl()],
+          "text!js/archiva/templates/repository-groups.html?"+appendTemplateUrl(),
+          "text!js/archiva/templates/search.html?"+appendTemplateUrl()],
   function(menu,topbar,message,modal,grids_generics,repositories,network_proxies,proxies_connectors,
-           repository_groups) {
+           repository_groups,search) {
 
     // template loading
     $.tmpl( menu ).appendTo("#html-fragments");
@@ -38,6 +39,7 @@ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(),
     $("#html-fragments").append(network_proxies);
     $("#html-fragments").append(proxies_connectors);
     $("#html-fragments").append(repository_groups);
+    $("#html-fragments").append(search);
     $.log("main-tmpl.js loaded");
   }
 );
\ 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
new file mode 100644 (file)
index 0000000..b8dcdaa
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * 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() {
+  displayBrowse=function(){
+    $("#main-content" ).html("coming soon :-)");
+  }
+
+  displaySearch=function(){
+    $("#main-content" ).html("coming soon :-)");
+  }
+});
\ No newline at end of file
index c9584125ab44b982723d404243f27e8dd4bff9f8..27b45443e98b7a8739a9a8119e71e6d6fd071214 100644 (file)
 -->
   <div id="main-menu" redback-permissions="{permissions: ['archiva-manage-users','archiva-manage-configuration']}" style="display: none">
 
+    <ul class="nav nav-list">
+      <li class="nav-header">${$.i18n.prop('menu.find')}</li>
+      <li>
+        <a href="#" id="menu-find-search-a" onclick="displaySearch(this)">${$.i18n.prop('menu.find.search')}</a>
+      </li>
+      <li>
+        <a href="#" id="menu-find-browse-a" onclick="displayBrowse()">${$.i18n.prop('menu.find.browse')}</a>
+      </li>
+    </ul>
+
     <ul class="nav nav-list" redback-permissions="{permissions: ['archiva-manage-users']}">
       <li class="nav-header">${$.i18n.prop('menu.manage')}</li>
       <li style="display: none" redback-permissions="{permissions: ['archiva-manage-users']}">
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
new file mode 100644 (file)
index 0000000..9ba7181
--- /dev/null
@@ -0,0 +1,18 @@
+<!--
+  ~ 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.
+-->
\ No newline at end of file