@@ -11,20 +11,36 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
1111 return this . layout ;
1212 }
1313
14- var classStore = pimcore . globalmanager . get ( "object_types_store" ) ;
14+
15+ var inheritancePanel = new Ext . create ( 'Ext.form.FieldSet' , {
16+ title : t ( 'cmf_segmentAssignment_inheritanceSettings' ) ,
17+ items : [
18+ this . getInheritablePanel ( ) , this . getCheckBox ( )
19+ ]
20+ } ) ;
21+
22+ var assignmentPanel = new Ext . create ( 'Ext.form.FieldSet' , {
23+ title : t ( 'cmf_segmentAssignment_assignment' ) ,
24+ items : [
25+ this . getAssignedPanel ( )
26+ ]
27+ } ) ;
1528
1629 return this . layout = new Ext . Panel ( {
1730 title : t ( 'segmentAssignment' ) ,
1831 border : false ,
1932 iconCls : "plugin_cmf_icon_actiontriggerrule_ExecuteSegmentBuilders" ,
33+ bodyStyle :'padding:0 10px 0 10px;' ,
34+ cls : "pimcore_object_panel_edit" ,
2035 tbar : [ ] ,
21- items : [ this . getInheritablePanel ( ) , this . getCheckBox ( ) , this . getAssignedPanel ( ) ]
36+ items : [ inheritancePanel , assignmentPanel ]
2237 } ) ;
2338 } ,
2439
2540 getInheritablePanel : function ( ) {
2641 this . inheritableStore = new Ext . data . Store ( {
2742 autoDestroy : true ,
43+ autoLoad : true ,
2844 proxy : {
2945 type : 'ajax' ,
3046 url : '/admin/customermanagementframework/segment-assignment/inheritable-segments?id=' + this . object . id + '&type=' + this . type ,
@@ -36,16 +52,21 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
3652 fields : [ 'id' , 'name' , 'type' ]
3753 } ) ;
3854
39- this . inheritableStore . load ( ) ;
40-
4155 this . inheritableGrid = Ext . create ( 'Ext.grid.Panel' , {
56+ minHeight : 80 ,
57+ border : true ,
4258 tbar : {
4359 items : [
44- Ext . create ( 'Ext.toolbar.TextItem' , {
45- text : t ( 'inheritableAssignments' )
46- } )
47- ]
60+ {
61+ xtype : "tbtext" ,
62+ text : "<b>" + t ( 'cmf_segmentAssignment_inheritableAssignments' ) + "</b>"
63+ }
64+ ] ,
65+ ctCls : "pimcore_force_auto_width" ,
66+ cls : "pimcore_force_auto_width" ,
67+ minHeight : 36
4868 } ,
69+ bodyCssClass : "pimcore_object_tag_objects" ,
4970 store : this . inheritableStore ,
5071 columns : [
5172 { header : 'Id' , sortable : false , dataIndex : 'id' , flex : 1 } ,
@@ -61,21 +82,20 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
6182 pimcore . helpers . openObject ( data . data . id , data . data . type ) ;
6283 } ) ;
6384
85+
6486 return this . inheritableGrid ;
6587 } ,
6688
6789 getCheckBox : function ( ) {
6890 var inheritableGrid = this . inheritableGrid ;
6991
7092 this . breaksInheritance = Ext . create ( 'Ext.form.FormPanel' , {
71- bodyStyle : {
72- "background-color" : '#ececec'
73- } ,
7493 items : [
7594 {
7695 xtype : 'checkbox' ,
77- boxLabel : t ( 'cmf.breaksInheritance ' ) ,
96+ boxLabel : t ( 'cmf_segmentAssignment_breakInheritance ' ) ,
7897 inputValue : '1' ,
98+ style : "padding-top: 10px" ,
7999 checked : false ,
80100 handler : function ( target , checkedState ) {
81101 inheritableGrid . setDisabled ( checkedState ) ;
@@ -97,7 +117,7 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
97117 checkBox . setValue ( data . breaksInheritance === '1' ) ;
98118 } ,
99119 failure : function ( response ) {
100- pimcore . helpers . showNotification ( t ( "error" ) , t ( "plugin_cmf_segment_assignment_error " ) , "error" , response . responseText ) ;
120+ pimcore . helpers . showNotification ( t ( "error" ) , t ( "cmf_segmentAssignment_segment_assignment_error " ) , "error" , response . responseText ) ;
101121 }
102122 } ) ;
103123
@@ -126,24 +146,33 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
126146 this . assignedStore . load ( ) ;
127147
128148 var assignedGrid = Ext . create ( 'Ext.grid.Panel' , {
149+ minHeight : 90 ,
150+ border : true ,
151+ cls : 'object_field' ,
129152 tbar : {
130153 items : [
131154 Ext . create ( 'Ext.toolbar.Spacer' , {
132155 width : 20 ,
133156 height : 16 ,
134157 cls : "pimcore_icon_droptarget"
135158 } ) ,
136- Ext . create ( 'Ext.toolbar.TextItem' , {
137- text : t ( 'assignedSegments' )
138- } ) ,
159+ {
160+ xtype : "tbtext" ,
161+ text : "<b>" + t ( 'cmf_segmentAssignment_assignedSegments' ) + "</b>"
162+ } ,
163+ "->" ,
139164 {
140165 xtype : "button" ,
141166 iconCls : "pimcore_icon_search" ,
142167 handler : this . openSearchEditor . bind ( this )
143168 }
144- ]
169+ ] ,
170+ ctCls : "pimcore_force_auto_width" ,
171+ cls : "pimcore_force_auto_width"
145172 } ,
173+ bodyCssClass : "pimcore_object_tag_objects" ,
146174 store : this . assignedStore ,
175+
147176 columns : [
148177 { header : 'Id' , sortable : false , dataIndex : 'id' , flex : 1 } ,
149178 { header : 'Name' , sortable : false , dataIndex : 'name' , flex : 3 } ,
@@ -264,7 +293,7 @@ pimcore.plugin.customermanagementframework.segmentAssignmentTab = Class.create({
264293 console . log ( response . responseText ) ;
265294 } ,
266295 failure : function ( response ) {
267- pimcore . helpers . showNotification ( t ( "error" ) , t ( "plugin_cmf_segment_assignment_error " ) , "error" , response . responseText ) ;
296+ pimcore . helpers . showNotification ( t ( "error" ) , t ( "cmf_segmentAssignment_segment_assignment_error " ) , "error" , response . responseText ) ;
268297 }
269298 }
270299 ) ;
0 commit comments