Commit f23ddfd8 authored by Colin PUY's avatar Colin PUY

refactor(editorHeader) rename editor menu-bar to editor header

parent 62038658
......@@ -21,7 +21,7 @@
'bonitasoft.designer.editor.data-panel',
'bonitasoft.designer.editor.palette',
'bonitasoft.designer.editor.properties-panel',
'bonitasoft.designer.editor.menu-bar',
'bonitasoft.designer.editor.header',
'bonitasoft.designer.editor.whiteboard',
'bonitasoft.designer.assets',
'gettext'
......
<div ui-view="menubar" confirm-on-exit confirm-data="page"></div>
<header ui-view="header" confirm-on-exit confirm-data="page"></header>
<div class="content-wrapper">
<!-- Palette -->
......
.content-wrapper {
position: absolute;
top: @nav-bar-height;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.form-control.form-control--pagename {
width: 250px;
}
#editor-container {
position: absolute;
top: 0;
bottom: 0;
left: @sidebar-palette-width;
right: @sidebar-properties-default-width;
}
.Palette--closed + #editor-container{
left: @sidebar-palette-section-width;
}
.Palette--narrow + #editor-container{
left: @sidebar-palette-width--narrow;
}
.workspace {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#editor {
overflow: auto;
background-color: rgba(239, 241, 245, 0.15);
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: @sidebar-data-default-height;
padding:0 2em;
}
......@@ -16,7 +16,7 @@
'use strict';
angular.module('bonitasoft.designer.editor.menu-bar', [
angular.module('bonitasoft.designer.editor.header', [
'bonitasoft.designer.common.repositories',
'gettext',
'ui.bootstrap',
......
......@@ -2,7 +2,7 @@
'use strict';
class MenuBarCtrl {
class EditorHeaderCtrl {
constructor(mode, artifact, artifactRepo, $uibModal, $stateParams, $state, $window) {
'ngInject';
this.mode = mode;
......@@ -24,7 +24,7 @@
saveAs(page) {
var modalInstance = this.$uibModal.open({
templateUrl: 'js/editor/menu-bar/save-as-popup.html',
templateUrl: 'js/editor/header/save-as-popup.html',
controller: 'SaveAsPopUpController',
controllerAs: 'ctrl',
resolve: {
......@@ -47,7 +47,7 @@
openHelp() {
this.$uibModal.open({
templateUrl: 'js/editor/menu-bar/help-popup.html',
templateUrl: 'js/editor/header/help-popup.html',
size: 'lg',
resolve: {
pageEdition: () => this.mode === 'page'
......@@ -64,7 +64,7 @@
}
angular
.module('bonitasoft.designer.editor.menu-bar')
.controller('MenuBarCtrl', MenuBarCtrl);
.module('bonitasoft.designer.editor.header')
.controller('EditorHeaderCtrl', EditorHeaderCtrl);
})();
......@@ -92,57 +92,3 @@
color: @color-editor-header-placeholder;
}
}
.editor-title {
text-transform: capitalize;
}
.content-wrapper {
position: absolute;
top: @nav-bar-height;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.form-control.form-control--pagename {
width: 250px;
}
#editor-container {
position: absolute;
top: 0;
bottom: 0;
left: @sidebar-palette-width;
right: @sidebar-properties-default-width;
}
.Palette--closed + #editor-container{
left: @sidebar-palette-section-width;
}
.Palette--narrow + #editor-container{
left: @sidebar-palette-width--narrow;
}
.workspace {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#editor {
overflow: auto;
background-color: rgba(239, 241, 245, 0.15);
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: @sidebar-data-default-height;
padding:0 2em;
}
......@@ -17,6 +17,6 @@
}
angular
.module('bonitasoft.designer.editor.menu-bar')
.module('bonitasoft.designer.editor.header')
.controller('SaveAsPopUpController', SaveAsPopUpController);
})();
......@@ -92,10 +92,10 @@
controller: 'DataCtrl',
templateUrl: 'js/editor/data-panel/data.html'
},
'menubar@designer.page': {
controller: 'MenuBarCtrl',
'header@designer.page': {
controller: 'EditorHeaderCtrl',
controllerAs: 'vm',
templateUrl: 'js/editor/menu-bar/menu-bar.html'
templateUrl: 'js/editor/header/header.html'
}
}
},
......
......@@ -10,7 +10,6 @@
@import "forms";
@import "sidebar";
@import "palette";
@import "editor";
@import "bottom-panel";
@import "widget";
@import "preview";
......@@ -19,7 +18,9 @@
@import "drop-row";
@import "alerts";
@import "modal";
@import "../js/editor/editor";
@import "../js/editor/properties-panel/properties-panel";
@import "../js/editor/header/header";
@import "file-upload";
@import "splitter";
@import "widget-editor";
......
......@@ -5,7 +5,7 @@
describe('Menu bar controller', function() {
var pageRepo, scope, controller, $q, $window, $uibModal, modalInstance, $stateParams, $state;
beforeEach(angular.mock.module('bonitasoft.designer.editor.menu-bar', 'mock.modal'));
beforeEach(angular.mock.module('bonitasoft.designer.editor.header', 'mock.modal'));
beforeEach(inject(function($rootScope, $controller, _pageRepo_, _$q_, _$uibModal_, $modalInstance, _$state_) {
pageRepo = _pageRepo_;
......@@ -21,7 +21,7 @@
$state = _$state_;
modalInstance = $modalInstance.fake();
controller = $controller('MenuBarCtrl', {
controller = $controller('EditorHeaderCtrl', {
$window: $window,
selectedResolution: {},
$uibModal: $uibModal,
......@@ -66,7 +66,7 @@
controller.openHelp();
expect($uibModal.open).toHaveBeenCalled();
expect($uibModal.open.calls.mostRecent().args[0].templateUrl).toEqual('js/editor/menu-bar/help-popup.html');
expect($uibModal.open.calls.mostRecent().args[0].templateUrl).toEqual('js/editor/header/help-popup.html');
expect($uibModal.open.calls.mostRecent().args[0].size).toEqual('lg');
});
......@@ -79,7 +79,7 @@
controller.saveAs(page);
expect($uibModal.open).toHaveBeenCalled();
expect($uibModal.open.calls.mostRecent().args[0].templateUrl).toEqual('js/editor/menu-bar/save-as-popup.html');
expect($uibModal.open.calls.mostRecent().args[0].templateUrl).toEqual('js/editor/header/save-as-popup.html');
expect($uibModal.open.calls.mostRecent().args[0].controller).toEqual('SaveAsPopUpController');
modalInstance.close(page);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment