|
|
@@ -184,19 +184,20 @@ if USE_NEW_EDITOR.get():
|
|
|
<script src="${ static('desktop/js/clusterConfig.js') }"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
- huePubSub.subscribe('get.current.app.name', function () {
|
|
|
- var appName = '';
|
|
|
- if ('${ 'metastore' in apps }' === 'True' && location.href.indexOf('${"metastore" in apps and apps["metastore"].display_name}') !== -1) {
|
|
|
- appName = 'metastore';
|
|
|
- } else if (location.href.indexOf('editor') !== -1) {
|
|
|
- appName = 'editor'
|
|
|
- }
|
|
|
- huePubSub.publish('set.current.app.name', appName);
|
|
|
- });
|
|
|
+ $(document).ready(function () {
|
|
|
+ huePubSub.subscribe('get.current.app.name', function () {
|
|
|
+ var appName = '';
|
|
|
+ if ('${ 'metastore' in apps }' === 'True' && location.href.indexOf('${"metastore" in apps and apps["metastore"].display_name}') !== -1) {
|
|
|
+ appName = 'metastore';
|
|
|
+ } else if (location.href.indexOf('editor') !== -1) {
|
|
|
+ appName = 'editor'
|
|
|
+ }
|
|
|
+ huePubSub.publish('set.current.app.name', appName);
|
|
|
+ });
|
|
|
|
|
|
- // catch leaking links
|
|
|
- huePubSub.subscribe('open.link', function (href) {
|
|
|
- location.href = href;
|
|
|
+ huePubSub.subscribe('open.link', function (href) {
|
|
|
+ location.href = href;
|
|
|
+ });
|
|
|
});
|
|
|
</script>
|
|
|
|