scrivito_sdk 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/scrivito/objs_controller.rb +1 -1
- data/config/ca-bundle.crt +1 -1
- data/config/routes.rb +0 -2
- data/lib/assets/javascripts/scrivito_editing.js +170 -75
- data/lib/assets/stylesheets/scrivito.css +12 -2
- data/lib/assets/stylesheets/scrivito_editing.css +29 -25
- data/lib/scrivito/basic_obj.rb +56 -74
- data/lib/scrivito/basic_widget.rb +1 -15
- data/lib/scrivito/cms_rest_api/widget_extractor.rb +19 -9
- data/lib/scrivito/obj_search_builder.rb +1 -1
- data/lib/scrivito/obj_search_enumerator.rb +1 -2
- data/lib/scrivito/workspace.rb +80 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a05eee1e833b234c31a1535faaa241ce5383135e
|
4
|
+
data.tar.gz: c530d767032174b6843f49dd4683d0c31cb66c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00a45f58c44a5c824a402a835430c81c2f9ab58bc94e7199b37f4b48cffae326ab00115193dff211f47161aa296647496dcbe5ccbc6421c162987fde530c7e7b
|
7
|
+
data.tar.gz: e3bb4db9158ae1e78913540043de36ebe77e2d945e21c4f130764338ec40671d5e2a49fc1dc914318d4c6a97d63b18053fd13eeb0578dc523e1fb32808bef038
|
@@ -2,7 +2,7 @@ module Scrivito
|
|
2
2
|
|
3
3
|
class ObjsController < WebserviceController
|
4
4
|
before_filter :ensure_identical_selected_and_visible_workspace, only: [:create, :update, :copy,
|
5
|
-
:duplicate, :page_class_selection, :
|
5
|
+
:duplicate, :page_class_selection, :widget_class_selection]
|
6
6
|
|
7
7
|
def create
|
8
8
|
created_obj = task_unaware_request(:post,
|
data/config/ca-bundle.crt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
2
|
## /mnt/dcc/Scrival_SDK__Kris__117/repos/scrivito/config/ca-bundle.crt -- Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Converted at: Wed Jun
|
4
|
+
## Converted at: Wed Jun 11 14:25:44 2014 UTC
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
data/config/routes.rb
CHANGED
@@ -9723,7 +9723,7 @@ function program1(depth0,data) {
|
|
9723
9723
|
this.ScrivitoHandlebarsTemplates["menu"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9724
9724
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9725
9725
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
9726
|
-
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
9726
|
+
var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
9727
9727
|
|
9728
9728
|
function program1(depth0,data) {
|
9729
9729
|
|
@@ -9780,9 +9780,13 @@ function program7(depth0,data) {
|
|
9780
9780
|
return escapeExpression(stack1);
|
9781
9781
|
}
|
9782
9782
|
|
9783
|
-
buffer += "<div class=\"scrivito_editing_marker_menu\">\n <ul class=\"scrivito_menu_box
|
9784
|
-
|
9785
|
-
|
9783
|
+
buffer += "<div class=\"scrivito_editing_marker_menu\">\n <ul class=\"scrivito_menu_box scrivito_"
|
9784
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.options),stack1 == null || stack1 === false ? stack1 : stack1.align)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9785
|
+
+ " "
|
9786
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.options),stack1 == null || stack1 === false ? stack1 : stack1.css_class)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9787
|
+
+ "\">\n ";
|
9788
|
+
stack2 = helpers.each.call(depth0, depth0.commands, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
9789
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9786
9790
|
buffer += "\n </ul>\n</div>\n";
|
9787
9791
|
return buffer;
|
9788
9792
|
});
|
@@ -9896,29 +9900,30 @@ function program11(depth0,data) {
|
|
9896
9900
|
this.ScrivitoHandlebarsTemplates["menu_bar_toggle"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9897
9901
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9898
9902
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
9899
|
-
var buffer = "", stack1,
|
9903
|
+
var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression;
|
9900
9904
|
|
9901
9905
|
|
9902
9906
|
buffer += "<div class=\"scrivito_viewmodes scrivito_viewmode_";
|
9903
9907
|
if (stack1 = helpers.mode) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9904
9908
|
else { stack1 = depth0.mode; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9905
9909
|
buffer += escapeExpression(stack1)
|
9906
|
-
+ "_active\">\n <span class=\"scrivito_viewmode_pill\"></span>\n\n <div class=\"scrivito_viewmode_view\">\n <span class=\"scrivito_viewmode_icon
|
9907
|
-
|
9908
|
-
|
9909
|
-
+
|
9910
|
-
|
9911
|
-
|
9912
|
-
+ "
|
9913
|
-
|
9914
|
-
|
9915
|
-
|
9916
|
-
|
9917
|
-
buffer += escapeExpression(
|
9918
|
-
+ "
|
9919
|
-
|
9920
|
-
|
9921
|
-
+
|
9910
|
+
+ "_active\">\n <span class=\"scrivito_viewmode_pill\"></span>\n\n <div class=\"scrivito_viewmode_view\">\n <span class=\"scrivito_viewmode_icon "
|
9911
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_view_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9912
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label\">"
|
9913
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_view_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9914
|
+
+ "</span>\n </div>\n\n <div class=\"scrivito_viewmode_editing\">\n <span class=\"scrivito_viewmode_icon "
|
9915
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_editing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9916
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label\">"
|
9917
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_editing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9918
|
+
+ "</span>\n </div>\n\n <div class=\"scrivito_viewmode_";
|
9919
|
+
if (stack2 = helpers.comparing_mode) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
9920
|
+
else { stack2 = depth0.comparing_mode; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
9921
|
+
buffer += escapeExpression(stack2)
|
9922
|
+
+ "\">\n <span class=\"scrivito_viewmode_icon "
|
9923
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_comparing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9924
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label scrivito_comparing_mode_toggle\">\n "
|
9925
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_comparing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9926
|
+
+ " <i class=\"scrivito_icon\"></i>\n </span>\n </div>\n</div>\n";
|
9922
9927
|
return buffer;
|
9923
9928
|
});
|
9924
9929
|
return this.ScrivitoHandlebarsTemplates["menu_bar_toggle"];
|
@@ -10266,13 +10271,6 @@ $.i18n().load({
|
|
10266
10271
|
'menu_bar.create_new_ws_confirmation_desc': 'Bitte geben Sie den Titel der neuen Arbeitskopie ein.',
|
10267
10272
|
'menu_bar.create_new_ws_confirmation_placeholder': 'Neuer Titel',
|
10268
10273
|
|
10269
|
-
'menu_bar_toggle.editing': 'Bearbeiten',
|
10270
|
-
'menu_bar_toggle.added': 'Hinzugefügt',
|
10271
|
-
'menu_bar_toggle.deleted': 'Gelöscht',
|
10272
|
-
'menu_bar_toggle.diff': 'Vergleichen',
|
10273
|
-
'menu_bar_toggle.view': 'Vorschau',
|
10274
|
-
'menu_bar_toggle.hide': 'Ausblenden',
|
10275
|
-
|
10276
10274
|
'saving_indicator_item.saving': 'Wird gespeichert...',
|
10277
10275
|
'saving_indicator_item.saved': 'Änderungen gespeichert',
|
10278
10276
|
|
@@ -10357,6 +10355,13 @@ $.i18n().load({
|
|
10357
10355
|
'commands.delete_widget.dialog.description': 'Ein gelöschtes Widget kann nicht wiederhergestellt werden.',
|
10358
10356
|
'commands.delete_widget.dialog.confirm': 'Löschen',
|
10359
10357
|
|
10358
|
+
'commands.switch_mode.view': 'Vorschau',
|
10359
|
+
'commands.switch_mode.editing': 'Bearbeiten',
|
10360
|
+
'commands.switch_mode.diff': 'Vergleichen',
|
10361
|
+
'commands.switch_mode.added': 'Hinzugefügt',
|
10362
|
+
'commands.switch_mode.deleted': 'Gelöscht',
|
10363
|
+
'commands.switch_mode.disabled': 'Aktuell ausgewählter Anzeigemodus',
|
10364
|
+
|
10360
10365
|
'image_upload.too_many_files': 'Nur eine Datei erlaubt.',
|
10361
10366
|
|
10362
10367
|
'warn_before_unloading': 'Sie haben nicht gespeicherte Änderungen! Sind Sie sicher, dass sie schließen wollen?'
|
@@ -10418,13 +10423,6 @@ $.i18n().load({
|
|
10418
10423
|
'menu_bar.create_new_ws_confirmation_desc': 'Please enter the title of the new working copy.',
|
10419
10424
|
'menu_bar.create_new_ws_confirmation_placeholder': 'new title',
|
10420
10425
|
|
10421
|
-
'menu_bar_toggle.editing': 'Edit',
|
10422
|
-
'menu_bar_toggle.added': 'Added',
|
10423
|
-
'menu_bar_toggle.deleted': 'Deleted',
|
10424
|
-
'menu_bar_toggle.diff': 'Compare',
|
10425
|
-
'menu_bar_toggle.view': 'Preview',
|
10426
|
-
'menu_bar_toggle.hide': 'Hide',
|
10427
|
-
|
10428
10426
|
'saving_indicator_item.saving': 'Saving...',
|
10429
10427
|
'saving_indicator_item.saved': 'Changes saved',
|
10430
10428
|
|
@@ -10509,6 +10507,13 @@ $.i18n().load({
|
|
10509
10507
|
'commands.delete_widget.dialog.description': 'A deleted widget cannot be restored.',
|
10510
10508
|
'commands.delete_widget.dialog.confirm': 'Delete',
|
10511
10509
|
|
10510
|
+
'commands.switch_mode.view': 'Preview',
|
10511
|
+
'commands.switch_mode.editing': 'Edit',
|
10512
|
+
'commands.switch_mode.diff': 'All changes',
|
10513
|
+
'commands.switch_mode.added': 'Additions',
|
10514
|
+
'commands.switch_mode.deleted': 'Deletions',
|
10515
|
+
'commands.switch_mode.disabled': 'Currently selected display mode',
|
10516
|
+
|
10512
10517
|
'image_upload.too_many_files': 'Only one file allowed.',
|
10513
10518
|
|
10514
10519
|
'warn_before_unloading': 'You have unsaved changes. Are you sure you want to quit?',
|
@@ -10991,6 +10996,21 @@ var scrivito = {};
|
|
10991
10996
|
|
10992
10997
|
write_cookie: function() {
|
10993
10998
|
$.cookie('scrivito_editing_context', serialize(), {path: '/'});
|
10999
|
+
},
|
11000
|
+
|
11001
|
+
comparing_mode: function() {
|
11002
|
+
var storage_key = 'editing_context.comparing_mode';
|
11003
|
+
if (scrivito.editing_context.is_comparing_mode()) {
|
11004
|
+
var mode = scrivito.editing_context.display_mode;
|
11005
|
+
scrivito.storage.set(storage_key, mode);
|
11006
|
+
return mode;
|
11007
|
+
} else {
|
11008
|
+
if (scrivito.storage.has_key(storage_key)) {
|
11009
|
+
return scrivito.storage.get(storage_key);
|
11010
|
+
} else {
|
11011
|
+
return 'diff';
|
11012
|
+
}
|
11013
|
+
}
|
10994
11014
|
}
|
10995
11015
|
}
|
10996
11016
|
});
|
@@ -11289,45 +11309,44 @@ var scrivito = {};
|
|
11289
11309
|
menu_bar_toggle: {
|
11290
11310
|
init: function() {
|
11291
11311
|
scrivito.menu_bar.register_item_renderer(function(menu_bar) {
|
11312
|
+
var comparing_mode = scrivito.editing_context.comparing_mode();
|
11313
|
+
var switch_to_view_mode_command = scrivito.switch_mode_command('view');
|
11314
|
+
var switch_to_editing_mode_command = scrivito.switch_mode_command('editing');
|
11315
|
+
var switch_to_comparing_mode_command = scrivito.switch_mode_command(comparing_mode);
|
11316
|
+
|
11292
11317
|
var template = scrivito.template.render('menu_bar_toggle', {
|
11293
|
-
mode: scrivito.editing_context.display_mode
|
11318
|
+
mode: scrivito.editing_context.display_mode,
|
11319
|
+
comparing_mode: comparing_mode,
|
11320
|
+
switch_to_view_mode_command: switch_to_view_mode_command,
|
11321
|
+
switch_to_editing_mode_command: switch_to_editing_mode_command,
|
11322
|
+
switch_to_comparing_mode_command: switch_to_comparing_mode_command
|
11294
11323
|
});
|
11324
|
+
|
11295
11325
|
var menu_bar_toggle = menu_bar.find('#scrivito_menu_bar_toggle').html(template);
|
11296
11326
|
|
11297
|
-
|
11298
|
-
|
11299
|
-
|
11300
|
-
|
11301
|
-
|
11327
|
+
_.each([
|
11328
|
+
switch_to_view_mode_command,
|
11329
|
+
switch_to_editing_mode_command,
|
11330
|
+
switch_to_comparing_mode_command
|
11331
|
+
], function(command) {
|
11332
|
+
menu_bar_toggle.find('.' + command.id()).on('click', function() {
|
11333
|
+
command.execute();
|
11334
|
+
return false;
|
11335
|
+
});
|
11336
|
+
});
|
11337
|
+
|
11338
|
+
menu_bar_toggle.find('.scrivito_comparing_mode_toggle').on('click', function() {
|
11339
|
+
scrivito.menus.toggle($(this), [
|
11340
|
+
scrivito.switch_mode_command('diff'),
|
11341
|
+
scrivito.switch_mode_command('added'),
|
11342
|
+
scrivito.switch_mode_command('deleted')
|
11343
|
+
], {align: 'left', css_class: 'scrivito_switch_mode_menu'});
|
11344
|
+
return false;
|
11345
|
+
});
|
11302
11346
|
});
|
11303
11347
|
}
|
11304
11348
|
}
|
11305
11349
|
});
|
11306
|
-
|
11307
|
-
var change_mode_on_click = function(menu_bar_toggle, mode) {
|
11308
|
-
var new_class = 'scrivito_viewmode_' + mode + '_active';
|
11309
|
-
var view_modes = menu_bar_toggle.find('.scrivito_viewmodes');
|
11310
|
-
|
11311
|
-
if (!view_modes.hasClass(new_class)) {
|
11312
|
-
menu_bar_toggle.find(".scrivito_viewmode_" + mode).click(function() {
|
11313
|
-
if (mode !== 'view' && !scrivito.editing_context.selected_workspace.is_editable()) {
|
11314
|
-
scrivito.workspace.all_editable().done(function(workspaces) {
|
11315
|
-
scrivito.editable_workspace_dialog.open(workspaces).done(function(workspace_id) {
|
11316
|
-
scrivito.with_saving_overlay(
|
11317
|
-
scrivito.redirect_to(
|
11318
|
-
"?_scrivito_display_mode=" + mode + "&_scrivito_workspace_id=" + workspace_id
|
11319
|
-
)
|
11320
|
-
);
|
11321
|
-
});
|
11322
|
-
});
|
11323
|
-
} else {
|
11324
|
-
scrivito.with_saving_overlay(
|
11325
|
-
scrivito.redirect_to("?_scrivito_display_mode=" + mode)
|
11326
|
-
);
|
11327
|
-
}
|
11328
|
-
});
|
11329
|
-
}
|
11330
|
-
};
|
11331
11350
|
}());
|
11332
11351
|
(function() {
|
11333
11352
|
$.extend(scrivito, {
|
@@ -11471,7 +11490,11 @@ var scrivito = {};
|
|
11471
11490
|
}).done(function(title) {
|
11472
11491
|
scrivito.with_saving_overlay(
|
11473
11492
|
scrivito.workspace.create(title).then(function(new_workspace) {
|
11474
|
-
|
11493
|
+
var path = '?_scrivito_workspace_id=' + new_workspace.id();
|
11494
|
+
if (!scrivito.editing_context.selected_workspace.is_editable()) {
|
11495
|
+
path += '&_scrivito_display_mode=editing';
|
11496
|
+
}
|
11497
|
+
return scrivito.redirect_to(path);
|
11475
11498
|
})
|
11476
11499
|
);
|
11477
11500
|
});
|
@@ -13474,10 +13497,13 @@ $(function() {
|
|
13474
13497
|
(function() {
|
13475
13498
|
$.extend(scrivito, {
|
13476
13499
|
menus: {
|
13477
|
-
open: function(dom_element, commands) {
|
13500
|
+
open: function(dom_element, commands, options) {
|
13478
13501
|
scrivito.menus.close_all();
|
13479
13502
|
|
13480
|
-
var menu = $(scrivito.template.render('menu', {
|
13503
|
+
var menu = $(scrivito.template.render('menu', {
|
13504
|
+
commands: commands,
|
13505
|
+
options: $.extend({align: 'right'}, options || {})
|
13506
|
+
}));
|
13481
13507
|
|
13482
13508
|
menu.data('scrivito-private-menus-target', dom_element);
|
13483
13509
|
dom_element.data('scrivito-private-menus-menu', menu);
|
@@ -13497,12 +13523,12 @@ $(function() {
|
|
13497
13523
|
menu.find('.scrivito_menu_box').fadeIn(500);
|
13498
13524
|
},
|
13499
13525
|
|
13500
|
-
toggle: function(dom_element, commands) {
|
13526
|
+
toggle: function(dom_element, commands, options) {
|
13501
13527
|
var menu = dom_element.data('scrivito-private-menus-menu');
|
13502
13528
|
if (menu) {
|
13503
13529
|
close(menu);
|
13504
13530
|
} else {
|
13505
|
-
scrivito.menus.open(dom_element, commands);
|
13531
|
+
scrivito.menus.open(dom_element, commands, options);
|
13506
13532
|
}
|
13507
13533
|
},
|
13508
13534
|
|
@@ -13588,7 +13614,19 @@ $(window).on('load', function() {
|
|
13588
13614
|
return false;
|
13589
13615
|
});
|
13590
13616
|
|
13591
|
-
|
13617
|
+
var marker_container = cms_element.dom_element();
|
13618
|
+
marker.prependTo(marker_container);
|
13619
|
+
|
13620
|
+
var timer;
|
13621
|
+
marker_container.on('mouseenter', function() {
|
13622
|
+
marker_container.addClass('scrivito_entered');
|
13623
|
+
timer = setTimeout(function() {
|
13624
|
+
marker_container.removeClass('scrivito_entered');
|
13625
|
+
}, 2000);
|
13626
|
+
});
|
13627
|
+
marker_container.on('mouseleave', function() {
|
13628
|
+
clearTimeout(timer);
|
13629
|
+
});
|
13592
13630
|
}
|
13593
13631
|
};
|
13594
13632
|
}());
|
@@ -14120,6 +14158,56 @@ $(window).on('load', function() {
|
|
14120
14158
|
}
|
14121
14159
|
});
|
14122
14160
|
}());
|
14161
|
+
(function() {
|
14162
|
+
$.extend(scrivito, {
|
14163
|
+
switch_mode_command: function(mode) {
|
14164
|
+
var icon;
|
14165
|
+
switch (mode) {
|
14166
|
+
case 'diff':
|
14167
|
+
icon = '';
|
14168
|
+
break;
|
14169
|
+
case 'added':
|
14170
|
+
icon = '';
|
14171
|
+
break;
|
14172
|
+
case 'deleted':
|
14173
|
+
icon = '';
|
14174
|
+
break;
|
14175
|
+
}
|
14176
|
+
|
14177
|
+
return scrivito.command.create_instance({
|
14178
|
+
id: 'switch_to_' + mode + '_mode',
|
14179
|
+
title: scrivito.i18n.translate('commands.switch_mode.' + mode),
|
14180
|
+
icon: icon,
|
14181
|
+
|
14182
|
+
disabled: function() {
|
14183
|
+
if (scrivito.editing_context.display_mode === mode) {
|
14184
|
+
return scrivito.i18n.translate('commands.switch_mode.disabled');
|
14185
|
+
}
|
14186
|
+
},
|
14187
|
+
|
14188
|
+
execute: function() {
|
14189
|
+
if (mode !== 'view' && !scrivito.editing_context.selected_workspace.is_editable()) {
|
14190
|
+
scrivito.workspace.all_editable().done(function(workspaces) {
|
14191
|
+
scrivito.editable_workspace_dialog.open(workspaces).done(function(workspace_id) {
|
14192
|
+
redirect_to(mode, workspace_id);
|
14193
|
+
});
|
14194
|
+
});
|
14195
|
+
} else {
|
14196
|
+
redirect_to(mode);
|
14197
|
+
}
|
14198
|
+
}
|
14199
|
+
});
|
14200
|
+
}
|
14201
|
+
});
|
14202
|
+
|
14203
|
+
var redirect_to = function(mode, workspace_id) {
|
14204
|
+
var path = '?_scrivito_display_mode=' + mode;
|
14205
|
+
if (workspace_id) {
|
14206
|
+
path += '&_scrivito_workspace_id=' + workspace_id;
|
14207
|
+
}
|
14208
|
+
scrivito.with_saving_overlay(scrivito.redirect_to(path));
|
14209
|
+
};
|
14210
|
+
}());
|
14123
14211
|
(function() {
|
14124
14212
|
$.extend(scrivito, {
|
14125
14213
|
widget_details_command: function(widget_element) {
|
@@ -14297,14 +14385,15 @@ $(window).on('load', function() {
|
|
14297
14385
|
}
|
14298
14386
|
});
|
14299
14387
|
scrivito.on('content', function() {
|
14300
|
-
|
14388
|
+
if (scrivito.in_editable_view()) {
|
14389
|
+
create();
|
14390
|
+
}
|
14301
14391
|
});
|
14302
14392
|
},
|
14303
14393
|
|
14304
14394
|
start: function(event, ui) {
|
14305
14395
|
$('body').addClass('scrivito_widget_dragging_active');
|
14306
14396
|
|
14307
|
-
var marker = ui.item.find('.scrivito_editing_marker');
|
14308
14397
|
scrivito.menus.close_all();
|
14309
14398
|
|
14310
14399
|
var widget_element = scrivito.cms_element.from_dom_element(ui.item);
|
@@ -14322,9 +14411,15 @@ $(window).on('load', function() {
|
|
14322
14411
|
$(event.target).sortable('refresh');
|
14323
14412
|
},
|
14324
14413
|
|
14325
|
-
stop: function() {
|
14414
|
+
stop: function(event, ui) {
|
14326
14415
|
$('body').removeClass('scrivito_widget_dragging_active');
|
14327
14416
|
|
14417
|
+
// Dragged the last widget of the widget field and dropped it back to same widget field.
|
14418
|
+
if (ui.item.parent()[0] === ui.sender) {
|
14419
|
+
var widget_field_element = scrivito.cms_element.from_dom_element(ui.item).widget_field();
|
14420
|
+
scrivito.widget_sorting.update_placeholder(widget_field_element);
|
14421
|
+
}
|
14422
|
+
|
14328
14423
|
scrivito.inplace_marker.refresh();
|
14329
14424
|
|
14330
14425
|
_.each(widget_field_dom_elements, function(dom_element) {
|
@@ -21,6 +21,11 @@
|
|
21
21
|
visibility: visible!important;
|
22
22
|
}
|
23
23
|
|
24
|
+
body.scrivito_editing_active .scrivito_empty_widget_field.scrivito_widget_drop_allowed {
|
25
|
+
max-height: 200px;
|
26
|
+
min-height: 100px;
|
27
|
+
}
|
28
|
+
|
24
29
|
[data-scrivito-private-widget-id] .scrivito_empty_widget_field { min-height: 100px; }
|
25
30
|
|
26
31
|
.ui-sortable-helper { opacity:0.5;}
|
@@ -40,9 +45,14 @@ body.scrivito_widget_dragging_active[data-scrivito-display-mode="editing"] *[dat
|
|
40
45
|
box-shadow:0 0 0 2px #439439;
|
41
46
|
}
|
42
47
|
|
48
|
+
body.scrivito_widget_dragging_active[data-scrivito-display-mode="editing"] *[data-scrivito-widget-obj-class] *[data-scrivito-field-type="widget"]:not(.scrivito_empty_widget_field) {
|
49
|
+
min-height: 100px;
|
50
|
+
}
|
51
|
+
|
43
52
|
/* margin for nested widgets */
|
44
53
|
[data-scrivito-display-mode="editing"] *[data-scrivito-widget-obj-class] *[data-scrivito-field-type="widget"],
|
45
54
|
[data-scrivito-display-mode="added"] *[data-scrivito-widget-obj-class] *[data-scrivito-field-type="widget"],
|
55
|
+
[data-scrivito-display-mode="diff"] [data-scrivito-widget-obj-class] *[data-scrivito-field-type="widget"],
|
46
56
|
[data-scrivito-display-mode="deleted"] *[data-scrivito-widget-obj-class] *[data-scrivito-field-type="widget"] { margin-top: 35px;}
|
47
57
|
|
48
58
|
/* highlight cms fields */
|
@@ -155,8 +165,8 @@ body.scrivito_widget_dragging_active[data-scrivito-display-mode="editing"] *[dat
|
|
155
165
|
.scrivito_editing_marker:hover,
|
156
166
|
.scrivito_editing_marker:active { background: #439439; background: rgba(67, 148, 57, 1); }
|
157
167
|
|
158
|
-
[data-scrivito-display-mode="editing"] [data-scrivito-private-child-list-path]:hover .scrivito_editing_marker,
|
159
|
-
[data-scrivito-display-mode="editing"] [data-scrivito-widget-obj-class]:hover .scrivito_editing_marker {
|
168
|
+
[data-scrivito-display-mode="editing"] [data-scrivito-private-child-list-path]:hover > .scrivito_editing_marker,
|
169
|
+
[data-scrivito-display-mode="editing"] [data-scrivito-widget-obj-class]:hover > .scrivito_editing_marker {
|
160
170
|
background: #439439; background: rgba(67, 148, 57, 1);
|
161
171
|
}
|
162
172
|
|