]> source.dussan.org Git - archiva.git/commitdiff
merge topbar template in menu templates files
authorOlivier Lamy <olamy@apache.org>
Sat, 24 Mar 2012 18:22:59 +0000 (18:22 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 24 Mar 2012 18:22:59 +0000 (18:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1304878 13f79535-47bb-0310-9956-ffa450edef68

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/main.js
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/topbar.html [deleted file]

index f365c8fecb76188364ee177685bbf4013b448973..ed58c9d1b0fd5c2deaaf6bc031a603070f675aa5 100644 (file)
@@ -17,7 +17,6 @@
  * under the License.
  */
 require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(),
-          "text!js/archiva/templates/topbar.html"+appendTemplateUrl(),
           "text!js/archiva/templates/message.html"+appendTemplateUrl(),
           "text!js/archiva/templates/modal.html"+appendTemplateUrl(),
           "text!js/archiva/templates/grids-generics.html"+appendTemplateUrl(),
@@ -27,13 +26,12 @@ require(["text!js/archiva/templates/menu.html"+appendTemplateUrl(),
           "text!js/archiva/templates/repository-groups.html"+appendTemplateUrl(),
           "text!js/archiva/templates/search.html"+appendTemplateUrl(),
           "text!js/archiva/templates/general-admin.html"+appendTemplateUrl()],
-  function(menu,topbar,message,modal,grids_generics,repositories,network_proxies,proxies_connectors,
+  function(menu,message,modal,grids_generics,repositories,network_proxies,proxies_connectors,
            repository_groups,search,general_admin) {
 
     var htmlFragment=$("#html-fragments");
     // template loading
-    $.tmpl( menu ).appendTo(htmlFragment);
-    $.tmpl( topbar ).appendTo(htmlFragment);
+    htmlFragment.append(menu);
     htmlFragment.append(message);
     $.tmpl( modal ).appendTo(htmlFragment);
     htmlFragment.append(grids_generics);
index ac7e7cb4d02bb7b738dc21b1ae5906ee9b44451f..7bbd51d3f896162f8a1e554af67499c768adf80c 100644 (file)
@@ -286,8 +286,8 @@ $(function() {
 
   startArchivaApplication=function(){
     $.log("startArchivaApplication");
-    $('#topbar-menu-container').html($("#topbar-menu"));
-    $('#sidebar-content').html($("#main-menu"));
+    $('#topbar-menu-container').html($("#topbar_menu_tmpl" ).tmpl());//$("#topbar-menu"));
+    $('#sidebar-content').html( $("#main_menu_tmpl").tmpl());
 
     hideElementWithKarma();
     checkSecurityLinks();
index cf1c79a50cb6905d8bc3ce006d541138dfdcc5ce..c5070bb6b5a7e7fd0efb6c2d11325d4756f40e40 100644 (file)
@@ -16,6 +16,7 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
 -->
+<script type="text/html" id="main_menu_tmpl">
   <div id="main-menu">
 
     <ul class="nav nav-list">
     </ul>
 
   </div>
+</script>
+
+<script id="topbar_menu_tmpl" type="text/html">
+    <div id="topbar-menu">
+    <div class="navbar navbar-fixed-top">
+
+      <div style="max-height: 40px" class="navbar-inner">
+        <div class="container-fluid">
+          <div id="organisation-logo" class="pull-left"></div>
+          <div class="nav-collapse">
+          <ul class="nav pull-right">
+            <li id="create-admin-link" class="pull-right" style="display: none">
+              <a href="#" onclick="adminCreateBox();" id="create-admin-link-a">
+                <span class="label label-important">${$.i18n.prop('create.admin.page.link')}</span>
+              </a>
+            </li>
+            <li id="login-link" class="pull-right" style="display: none">
+              <a href="#" onclick="loginBox();" id="login-link-a">
+                <span class="label label-success force-upper-case">${$.i18n.prop('login')}</span>
+              </a>
+            </li>
+            <li id="change-password-link" class="pull-right" style="">
+              <a href="#" onclick="editUserDetailsBox();">${$.i18n.prop('edit.details')}</a>
+            </li>
+            <li id="logout-link" class="pull-right" style="display: none">
+              <a href="#" onclick="logout(true);" id="logout-link-a">
+                <span class="label label-important force-upper-case">${$.i18n.prop('logout')}</span>
+              </a>
+            </li>
+            <li id="register-link" class="pull-right" style="display: none">
+              <a href="#" onclick="registerBox();" id="register-link-a">
+                <span class="label label-info force-upper-case">${$.i18n.prop('register')}</span>
+              </a>
+            </li>
+            <li class="pull-right">
+              <div class="ui-widget">
+                <input type="text" class="ui-autocomplete-input" id="quick-search-autocomplete"
+                       placeholder="${$.i18n.prop('menu.topbar.quicksearch')}" />
+              </div>
+            </li>
+          </ul>
+
+          </div>
+        </div>
+      </div>
+
+    </div>
+    </div>
+</script>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
deleted file mode 100644 (file)
index 4b53177..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-  ~ 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.
--->
-<div id="topbar-menu">
-<div class="navbar navbar-fixed-top">
-
-  <div style="max-height: 40px" class="navbar-inner">
-    <div class="container-fluid">
-      <div id="organisation-logo" class="pull-left"></div>
-      <div class="nav-collapse">
-      <ul class="nav pull-right">
-        <li id="create-admin-link" class="pull-right" style="display: none">
-          <a href="#" onclick="adminCreateBox();" id="create-admin-link-a">
-            <span class="label label-important">${$.i18n.prop('create.admin.page.link')}</span>
-          </a>
-        </li>
-        <li id="login-link" class="pull-right" style="display: none">
-          <a href="#" onclick="loginBox();" id="login-link-a">
-            <span class="label label-success force-upper-case">${$.i18n.prop('login')}</span>
-          </a>
-        </li>
-        <li id="change-password-link" class="pull-right" style="">
-          <a href="#" onclick="editUserDetailsBox();">${$.i18n.prop('edit.details')}</a>
-        </li>
-        <li id="logout-link" class="pull-right" style="display: none">
-          <a href="#" onclick="logout(true);" id="logout-link-a">
-            <span class="label label-important force-upper-case">${$.i18n.prop('logout')}</span>
-          </a>
-        </li>
-        <li id="register-link" class="pull-right" style="display: none">
-          <a href="#" onclick="registerBox();" id="register-link-a">
-            <span class="label label-info force-upper-case">${$.i18n.prop('register')}</span>
-          </a>
-        </li>
-        <li class="pull-right">
-          <div class="ui-widget">
-            <input type="text" class="ui-autocomplete-input" id="quick-search-autocomplete"
-                   placeholder="${$.i18n.prop('menu.topbar.quicksearch')}" />
-          </div>
-        </li>
-      </ul>
-
-      </div>
-    </div>
-  </div>
-
-</div>
-</div>
\ No newline at end of file