@@ -10275,31 +10275,27 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
1027510275 {
1027610276 ( function ( section )
1027710277 {
10278- var title = listEntry . cloneNode ( false ) ;
10279- title . style . fontWeight = 'bold' ;
10280- title . style . backgroundColor = 'light-dark(#e5e5e5, #505759)' ;
10281- title . style . padding = '6px 0px 6px 20px' ;
10278+ var title = document . createElement ( 'div' ) ;
10279+ title . className = 'geMoreShapesSectionHeader' ;
1028210280 mxUtils . write ( title , section . title ) ;
1028310281 list . appendChild ( title ) ;
1028410282
1028510283 for ( var j = 0 ; j < section . entries . length ; j ++ )
1028610284 {
1028710285 ( function ( entry )
1028810286 {
10289- var option = listEntry . cloneNode ( false ) ;
10290- option . style . cursor = 'pointer' ;
10291- option . style . padding = '4px 0px 4px 20px' ;
10292- option . style . whiteSpace = 'nowrap' ;
10293- option . style . overflow = 'hidden' ;
10294- option . style . textOverflow = 'ellipsis' ;
10287+ var option = document . createElement ( 'div' ) ;
10288+ option . className = 'geMoreShapesItem' ;
1029510289 option . setAttribute ( 'title' , entry . title + ' (' + entry . id + ')' ) ;
10296-
10290+
1029710291 var checkbox = document . createElement ( 'input' ) ;
1029810292 checkbox . setAttribute ( 'type' , 'checkbox' ) ;
1029910293 checkbox . checked = editorUi . sidebar . isEntryVisible ( entry . id ) ;
1030010294 checkbox . defaultChecked = checkbox . checked ;
1030110295 option . appendChild ( checkbox ) ;
10302- mxUtils . write ( option , ' ' + entry . title ) ;
10296+ var label = document . createElement ( 'span' ) ;
10297+ mxUtils . write ( label , entry . title ) ;
10298+ option . appendChild ( label ) ;
1030310299
1030410300 list . appendChild ( option ) ;
1030510301
@@ -10345,11 +10341,11 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
1034510341
1034610342 if ( currentListItem != null )
1034710343 {
10348- currentListItem . style . backgroundColor = '' ;
10344+ currentListItem . classList . remove ( 'geMoreShapesItemSelected' ) ;
1034910345 }
10350-
10346+
1035110347 currentListItem = option ;
10352- currentListItem . style . backgroundColor = 'light-dark(#ebf2f9, #000000)' ;
10348+ currentListItem . classList . add ( 'geMoreShapesItemSelected' ) ;
1035310349
1035410350 if ( evt != null )
1035510351 {
@@ -10397,30 +10393,23 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
1039710393 list . style . position = 'absolute' ;
1039810394 list . style . top = '40px' ;
1039910395 list . style . left = '0px' ;
10400- list . style . width = '202px ' ;
10401- list . style . bottom = '60px ' ;
10396+ list . style . width = '220px ' ;
10397+ list . style . bottom = '70px ' ;
1040210398 list . style . overflow = 'auto' ;
10403-
10399+
10400+ preview . className = 'geMoreShapesPreview' ;
1040410401 preview . style . position = 'absolute' ;
10405- preview . style . left = '202px ' ;
10402+ preview . style . left = '220px ' ;
1040610403 preview . style . right = '0px' ;
1040710404 preview . style . top = '40px' ;
10408- preview . style . bottom = '60px ' ;
10405+ preview . style . bottom = '70px ' ;
1040910406 preview . style . overflow = 'auto' ;
10410- preview . style . borderLeftStyle = 'solid' ;
10411- preview . style . borderLeftWidth = '1px' ;
1041210407 preview . style . textAlign = 'center' ;
10413-
10408+
1041410409 var currentListItem = null ;
1041510410 var applyFunctions = [ ] ;
10416-
10417- var listEntry = document . createElement ( 'div' ) ;
10418- listEntry . style . position = 'relative' ;
10419- listEntry . style . left = '0px' ;
10420- listEntry . style . right = '0px' ;
10421-
10411+
1042210412 addEntries ( entries ) ;
10423- div . style . padding = '30px' ;
1042410413
1042510414 div . appendChild ( hd ) ;
1042610415 div . appendChild ( list ) ;
@@ -10429,56 +10418,47 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
1042910418 var buttons = document . createElement ( 'div' ) ;
1043010419 buttons . className = 'geDialogFooter' ;
1043110420 buttons . style . position = 'absolute' ;
10421+ buttons . style . display = 'flex' ;
10422+ buttons . style . alignItems = 'center' ;
1043210423 buttons . style . paddingRight = '16px' ;
10424+ buttons . style . paddingLeft = '16px' ;
1043310425 buttons . style . left = '0px' ;
1043410426 buttons . style . right = '0px' ;
1043510427 buttons . style . bottom = '0px' ;
10436- buttons . style . height = '60px' ;
10437- buttons . style . lineHeight = '52px' ;
10438-
10428+ buttons . style . height = '70px' ;
10429+
10430+ var checksDiv = document . createElement ( 'div' ) ;
10431+ checksDiv . className = 'geMoreShapesFooterChecks' ;
10432+
10433+ var labelsLabel = document . createElement ( 'label' ) ;
10434+ labelsLabel . className = 'geMoreShapesFooterCheck' ;
1043910435 var labels = document . createElement ( 'input' ) ;
1044010436 labels . setAttribute ( 'type' , 'checkbox' ) ;
10441- labels . style . position = 'relative' ;
10442- labels . style . top = '1px' ;
1044310437 labels . checked = editorUi . sidebar . sidebarTitles ;
1044410438 labels . defaultChecked = labels . checked ;
10445- buttons . appendChild ( labels ) ;
10446- var span = document . createElement ( 'span' ) ;
10447- mxUtils . write ( span , ' ' + mxResources . get ( 'labels' ) ) ;
10448- span . style . paddingRight = '20px' ;
10449- buttons . appendChild ( span ) ;
10450-
10451- mxEvent . addListener ( span , 'click' , function ( evt )
10452- {
10453- labels . checked = ! labels . checked ;
10454- mxEvent . consume ( evt ) ;
10455- } ) ;
10439+ labelsLabel . appendChild ( labels ) ;
10440+ var labelsText = document . createElement ( 'span' ) ;
10441+ mxUtils . write ( labelsText , mxResources . get ( 'labels' ) ) ;
10442+ labelsLabel . appendChild ( labelsText ) ;
10443+ checksDiv . appendChild ( labelsLabel ) ;
1045610444
1045710445 var cb = document . createElement ( 'input' ) ;
1045810446 cb . setAttribute ( 'type' , 'checkbox' ) ;
10459-
10447+
1046010448 if ( isLocalStorage || mxClient . IS_CHROMEAPP )
1046110449 {
10462- var span = document . createElement ( 'span' ) ;
10463- span . style . paddingRight = '20px' ;
10464- span . appendChild ( cb ) ;
10465- mxUtils . write ( span , ' ' + mxResources . get ( 'rememberThisSetting' ) ) ;
10466- cb . style . position = 'relative' ;
10467- cb . style . top = '1px' ;
10450+ var rememberLabel = document . createElement ( 'label' ) ;
10451+ rememberLabel . className = 'geMoreShapesFooterCheck' ;
1046810452 cb . checked = true ;
1046910453 cb . defaultChecked = true ;
10470-
10471- mxEvent . addListener ( span , 'click' , function ( evt )
10472- {
10473- if ( mxEvent . getSource ( evt ) != cb )
10474- {
10475- cb . checked = ! cb . checked ;
10476- mxEvent . consume ( evt ) ;
10477- }
10478- } ) ;
10479-
10480- buttons . appendChild ( span ) ;
10454+ rememberLabel . appendChild ( cb ) ;
10455+ var rememberText = document . createElement ( 'span' ) ;
10456+ mxUtils . write ( rememberText , mxResources . get ( 'rememberThisSetting' ) ) ;
10457+ rememberLabel . appendChild ( rememberText ) ;
10458+ checksDiv . appendChild ( rememberLabel ) ;
1048110459 }
10460+
10461+ buttons . appendChild ( checksDiv ) ;
1048210462
1048310463 var cancelBtn = mxUtils . button ( mxResources . get ( 'cancel' ) , function ( )
1048410464 {
@@ -10529,18 +10509,24 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
1052910509 editorUi . setSidebarTitles ( labels . checked , cb . checked ) ;
1053010510 } ) ;
1053110511 applyBtn . className = 'geBtn gePrimaryBtn' ;
10532-
10512+
10513+ var btnsRight = document . createElement ( 'div' ) ;
10514+ btnsRight . style . flex = '1' ;
10515+ btnsRight . style . textAlign = 'right' ;
10516+
1053310517 if ( editorUi . editor . cancelFirst )
1053410518 {
10535- buttons . appendChild ( cancelBtn ) ;
10536- buttons . appendChild ( applyBtn ) ;
10519+ btnsRight . appendChild ( cancelBtn ) ;
10520+ btnsRight . appendChild ( applyBtn ) ;
1053710521 }
1053810522 else
1053910523 {
10540- buttons . appendChild ( applyBtn ) ;
10541- buttons . appendChild ( cancelBtn ) ;
10524+ btnsRight . appendChild ( applyBtn ) ;
10525+ btnsRight . appendChild ( cancelBtn ) ;
1054210526 }
10543-
10527+
10528+ buttons . appendChild ( btnsRight ) ;
10529+
1054410530 div . appendChild ( buttons ) ;
1054510531 }
1054610532 else
0 commit comments