Browse Source

[core] Change apps margins in case of a top banner

Enrico Berti 10 years ago
parent
commit
73c7f35114

+ 9 - 0
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -15,6 +15,7 @@
 ## limitations under the License.
 ## limitations under the License.
 <%!
 <%!
 from desktop.views import commonheader, commonfooter, commonshare
 from desktop.views import commonheader, commonfooter, commonshare
+from desktop import conf
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 %>
 %>
 
 
@@ -385,6 +386,14 @@ ${ dashboard.import_bindings() }
 <script src="${ static('desktop/ext/js/jquery/plugins/jquery.curvedarrow.js') }" type="text/javascript" charset="utf-8"></script>
 <script src="${ static('desktop/ext/js/jquery/plugins/jquery.curvedarrow.js') }" type="text/javascript" charset="utf-8"></script>
 <script src="${ static('oozie/js/editor2-utils.js') }" type="text/javascript" charset="utf-8"></script>
 <script src="${ static('oozie/js/editor2-utils.js') }" type="text/javascript" charset="utf-8"></script>
 
 
+<style type="text/css">
+% if conf.CUSTOM.BANNER_TOP_HTML.get():
+  .card-toolbar {
+    top: 100px!important;
+  }
+% endif
+</style>
+
 
 
 <script type="text/javascript">
 <script type="text/javascript">
   ${ utils.slaGlobal() }
   ${ utils.slaGlobal() }

+ 15 - 0
apps/search/src/search/templates/search.mako

@@ -16,6 +16,7 @@
 
 
 <%!
 <%!
 from desktop.views import commonheader, commonfooter
 from desktop.views import commonheader, commonfooter
+from desktop import conf
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 %>
 %>
 
 
@@ -1396,6 +1397,20 @@ ${ dashboard.import_layout() }
 ${ dashboard.import_bindings() }
 ${ dashboard.import_bindings() }
 ${ dashboard.import_charts() }
 ${ dashboard.import_charts() }
 
 
+<style type="text/css">
+% if conf.CUSTOM.BANNER_TOP_HTML.get():
+  .search-bar {
+    top: 58px!important;
+  }
+  .card-toolbar {
+    top: 100px!important;
+  }
+  #emptyDashboardEditing {
+    top: 190px!important;
+  }
+% endif
+</style>
+
 <script type="text/javascript" charset="utf-8">
 <script type="text/javascript" charset="utf-8">
 var viewModel;
 var viewModel;
 
 

+ 12 - 0
apps/spark/src/spark/templates/editor.mako

@@ -15,6 +15,7 @@
 ## limitations under the License.
 ## limitations under the License.
 <%!
 <%!
   from desktop.views import commonheader, commonfooter
   from desktop.views import commonheader, commonfooter
+  from desktop import conf
   from django.utils.translation import ugettext as _
   from django.utils.translation import ugettext as _
 %>
 %>
 
 
@@ -107,6 +108,17 @@ ${ commonheader(_('Query'), app_name, user, "68px") | n,unicode }
 <![endif]-->
 <![endif]-->
 <script src="${ static('desktop/ext/js/medium-editor.min.js') }" type="text/javascript" charset="utf-8"></script>
 <script src="${ static('desktop/ext/js/medium-editor.min.js') }" type="text/javascript" charset="utf-8"></script>
 
 
+<style type="text/css">
+% if conf.CUSTOM.BANNER_TOP_HTML.get():
+  .search-bar {
+    top: 58px!important;
+  }
+  .show-assist {
+    top: 110px!important;
+  }
+% endif
+</style>
+
 
 
 <div class="search-bar">
 <div class="search-bar">
   <div class="pull-right" style="padding-right:50px">
   <div class="pull-right" style="padding-right:50px">

+ 9 - 0
apps/sqoop/src/sqoop/templates/app.mako

@@ -15,6 +15,7 @@
 ## limitations under the License.
 ## limitations under the License.
 <%!
 <%!
   from desktop.views import commonheader, commonfooter
   from desktop.views import commonheader, commonfooter
+  from desktop import conf
   from django.utils.translation import ugettext as _
   from django.utils.translation import ugettext as _
   from django.core.urlresolvers import reverse
   from django.core.urlresolvers import reverse
 %>
 %>
@@ -701,6 +702,14 @@ ${ commonheader(None, "sqoop", user) | n,unicode }
 <link href="${ static('desktop/ext/css/bootstrap-editable.css') }" rel="stylesheet">
 <link href="${ static('desktop/ext/css/bootstrap-editable.css') }" rel="stylesheet">
 <link href="${ static('sqoop/css/sqoop.css') }" rel="stylesheet">
 <link href="${ static('sqoop/css/sqoop.css') }" rel="stylesheet">
 
 
+<style type="text/css">
+% if conf.CUSTOM.BANNER_TOP_HTML.get():
+  .top-bar {
+    top: 58px!important;
+  }
+% endif
+</style>
+
 <script type="text/javascript" charset="utf-8">
 <script type="text/javascript" charset="utf-8">
 
 
 var FB_STAT = '${reverse('filebrowser.views.stat', kwargs={'path': '/'})}';
 var FB_STAT = '${reverse('filebrowser.views.stat', kwargs={'path': '/'})}';

+ 15 - 0
desktop/core/src/desktop/templates/common_header.mako

@@ -76,6 +76,21 @@ from django.utils.translation import ugettext as _
       .navbar-fixed-top {
       .navbar-fixed-top {
         top: 58px!important;
         top: 58px!important;
       }
       }
+      % if current_app == "sqoop":
+      .top-bar {
+        top: 58px!important;
+      }
+      % endif
+
+      % if current_app == "spark":
+      .search-bar {
+        top: 58px!important;
+      }
+      .show-assist {
+        top: 110px!important;
+      }
+      % endif
+
     % else:
     % else:
       body {
       body {
         display: none;
         display: none;