@@ -77,7 +77,7 @@ Vvveb.preservePropertySections = true;
77
77
//icon = use component icon when dragging | html = use component html to create draggable element
78
78
Vvveb . dragIcon = 'icon' ;
79
79
//if empty the html of the component is used to view dropping in real time but for large elements it can jump around for this you can set a html placeholder with this option
80
- Vvveb . dragElementStyle = "background:limegreen;; width:100%;height:3px;border:1px solid limegreen;box-shadow:0px 0px 2px 1px rgba(0,0,0,0.14);overflow:hidden;" ;
80
+ Vvveb . dragElementStyle = "background:limegreen;width:100%;height:3px;border:1px solid limegreen;box-shadow:0px 0px 2px 1px rgba(0,0,0,0.14);overflow:hidden;" ;
81
81
Vvveb . dragHtml = '<div style="' + Vvveb . dragElementStyle + '"></div>' ;
82
82
83
83
Vvveb . baseUrl = document . currentScript ?document . currentScript . src . replace ( / [ ^ \/ ] * ?\. j s $ / , '' ) :'' ;
@@ -1380,6 +1380,7 @@ Vvveb.Builder = {
1380
1380
input : true ,
1381
1381
textarea : true ,
1382
1382
img : true ,
1383
+ svg : true ,
1383
1384
iframe : true ,
1384
1385
embed : true ,
1385
1386
col : true ,
@@ -2358,8 +2359,19 @@ Vvveb.Gui = {
2358
2359
2359
2360
e . preventDefault ( ) ;
2360
2361
2361
- return Vvveb . Builder . saveAjax ( data , function ( data ) {
2362
+ return Vvveb . Builder . saveAjax ( data , function ( savedData ) {
2362
2363
data . title = data . name ;
2364
+
2365
+ if ( typeof savedData === 'object' && savedData !== null ) {
2366
+ Object . assign ( data , savedData ) ;
2367
+ /*
2368
+ data.name = savedData.name ?? data.name;
2369
+ data.url = savedData.url ?? data.url;
2370
+ data.file = savedData.file ?? data.file;
2371
+ data.title = savedData.title ?? data.title;
2372
+ */
2373
+ }
2374
+
2363
2375
Vvveb . FileManager . addPage ( data . name , data ) ;
2364
2376
2365
2377
Vvveb . FileManager . loadPage ( data . name ) ;
@@ -2478,7 +2490,7 @@ Vvveb.StyleManager = {
2478
2490
styles = ( media === "desktop" ) ? style . cssRules [ j ] . style : style . cssRules [ j ] . cssRules [ 0 ] . style ;
2479
2491
2480
2492
if ( media ) {
2481
- this . styles [ media ] = { } ;
2493
+ this . styles [ media ] = this . styles [ media ] ?? { } ;
2482
2494
if ( selector ) {
2483
2495
this . styles [ media ] [ selector ] = { } ;
2484
2496
@@ -3279,6 +3291,12 @@ Vvveb.FileManager = {
3279
3291
} ,
3280
3292
3281
3293
loadPage : function ( name , allowedComponents = false , disableCache = true , loadComponents = false ) {
3294
+ let url = this . pages [ name ] [ 'url' ] ?? "" ;
3295
+
3296
+ if ( ! url ) {
3297
+ return ;
3298
+ }
3299
+
3282
3300
let page = $ ( "[data-page='" + name + "']" , this . tree ) ;
3283
3301
//remove active from current active page
3284
3302
$ ( "[data-page]" , this . tree ) . removeClass ( "active" ) ;
0 commit comments