archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1304878 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: main-tmpl.js main.js templates/menu.html templates/topbar.html
Date Sat, 24 Mar 2012 18:22:59 GMT
Author: olamy
Date: Sat Mar 24 18:22:59 2012
New Revision: 1304878

URL: http://svn.apache.org/viewvc?rev=1304878&view=rev
Log:
merge topbar template in menu templates files

Removed:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js?rev=1304878&r1=1304877&r2=1304878&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
Sat Mar 24 18:22:59 2012
@@ -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
           "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);

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js?rev=1304878&r1=1304877&r2=1304878&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
Sat Mar 24 18:22:59 2012
@@ -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();

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html?rev=1304878&r1=1304877&r2=1304878&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/menu.html
Sat Mar 24 18:22:59 2012
@@ -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">
@@ -72,3 +73,52 @@
     </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



Mime
View raw message