scrivito_sdk 0.16.0 → 0.17.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/default_cms_controller.rb +3 -3
- data/app/controllers/scrivito/objs_controller.rb +18 -7
- data/app/controllers/scrivito/webservice_controller.rb +13 -1
- data/app/controllers/scrivito/workspaces_controller.rb +5 -1
- data/app/helpers/scrivito/cms_asset_helper.rb +8 -1
- data/app/helpers/scrivito/default_cms_routing_helper.rb +2 -4
- data/app/helpers/scrivito/display_helper.rb +0 -7
- data/app/helpers/scrivito/editing_helper.rb +10 -8
- data/app/helpers/scrivito/layout_helper.rb +4 -11
- data/config/ca-bundle.crt +1773 -1416
- data/config/cms_routes.rb +2 -2
- data/config/routes.rb +1 -0
- data/lib/assets/javascripts/scrivito_editing.js +969 -533
- data/lib/assets/stylesheets/scrivito_editing.css +99 -9
- data/lib/generators/cms/migration/templates/migration.erb +34 -6
- data/lib/generators/cms/widget/templates/migration.erb +3 -6
- data/lib/scrivito/attribute.rb +158 -0
- data/lib/scrivito/attribute_collection.rb +72 -0
- data/lib/scrivito/attribute_content.rb +39 -3
- data/lib/scrivito/basic_obj.rb +48 -27
- data/lib/scrivito/basic_widget.rb +15 -5
- data/lib/scrivito/client_config.rb +46 -19
- data/lib/scrivito/cms_field_tag.rb +1 -1
- data/lib/scrivito/cms_rest_api/attribute_serializer.rb +6 -1
- data/lib/scrivito/cms_rest_api/blob_uploader.rb +1 -1
- data/lib/scrivito/configuration.rb +32 -2
- data/lib/scrivito/connection_manager.rb +1 -6
- data/lib/scrivito/content_conversion.rb +11 -7
- data/lib/scrivito/editing_context.rb +12 -0
- data/lib/scrivito/gem_info.rb +13 -0
- data/lib/scrivito/membership.rb +26 -0
- data/lib/scrivito/memberships_collection.rb +78 -0
- data/lib/scrivito/migrations/migration.rb +1 -1
- data/lib/scrivito/migrations/migration_dsl.rb +37 -0
- data/lib/scrivito/obj_class.rb +282 -0
- data/lib/scrivito/obj_data.rb +20 -1
- data/lib/scrivito/obj_params_parser.rb +2 -0
- data/lib/scrivito/obj_search_builder.rb +1 -1
- data/lib/scrivito/obj_search_enumerator.rb +11 -6
- data/lib/scrivito/objs_collection.rb +130 -0
- data/lib/scrivito/restriction_set.rb +54 -0
- data/lib/scrivito/user.rb +114 -0
- data/lib/scrivito/user_definition.rb +159 -0
- data/lib/scrivito/widget_garbage_collection.rb +4 -4
- data/lib/scrivito/workspace.rb +13 -78
- data/lib/scrivito/workspace_data_from_service.rb +2 -0
- metadata +15 -5
data/config/cms_routes.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
|
2
|
+
get '/' => 'scrivito/cms_dispatch#index', as: 'cms_root'
|
3
3
|
|
4
4
|
get '__scrivito/render_widget/:id/show_widget/:widget_id' => 'scrivito/cms_dispatch#show_widget'
|
5
5
|
get '__scrivito/render_widget/:id/widget_details/:widget_id' => 'scrivito/cms_dispatch#widget_details'
|
6
6
|
|
7
|
-
get '/__scrivito/details_page/:
|
7
|
+
get '/__scrivito/details_page/:resource_id' => 'scrivito/cms_dispatch#details_page'
|
8
8
|
|
9
9
|
match ':id(/*slug)',
|
10
10
|
to: 'scrivito/cms_dispatch#index',
|
data/config/routes.rb
CHANGED
@@ -6747,7 +6747,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
6747
6747
|
}
|
6748
6748
|
}).call(this);
|
6749
6749
|
//! moment.js
|
6750
|
-
//! version : 2.
|
6750
|
+
//! version : 2.7.0
|
6751
6751
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
6752
6752
|
//! license : MIT
|
6753
6753
|
//! momentjs.com
|
@@ -6759,7 +6759,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
6759
6759
|
************************************/
|
6760
6760
|
|
6761
6761
|
var moment,
|
6762
|
-
VERSION = "2.
|
6762
|
+
VERSION = "2.7.0",
|
6763
6763
|
// the global-scope this is NOT the global object in Node.js
|
6764
6764
|
globalScope = typeof global !== 'undefined' ? global : this,
|
6765
6765
|
oldGlobalMoment,
|
@@ -6784,6 +6784,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
6784
6784
|
_f : null,
|
6785
6785
|
_l : null,
|
6786
6786
|
_strict : null,
|
6787
|
+
_tzm : null,
|
6787
6788
|
_isUTC : null,
|
6788
6789
|
_offset : null, // optional. Combine with _isUTC
|
6789
6790
|
_pf : null,
|
@@ -6892,6 +6893,16 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
6892
6893
|
// format function strings
|
6893
6894
|
formatFunctions = {},
|
6894
6895
|
|
6896
|
+
// default relative time thresholds
|
6897
|
+
relativeTimeThresholds = {
|
6898
|
+
s: 45, //seconds to minutes
|
6899
|
+
m: 45, //minutes to hours
|
6900
|
+
h: 22, //hours to days
|
6901
|
+
dd: 25, //days to month (month == 1)
|
6902
|
+
dm: 45, //days to months (months > 1)
|
6903
|
+
dy: 345 //days to year
|
6904
|
+
},
|
6905
|
+
|
6895
6906
|
// tokens to ordinalize and pad
|
6896
6907
|
ordinalizeTokens = 'DDD w W M D d'.split(' '),
|
6897
6908
|
paddedTokens = 'M D H h m s w W'.split(' '),
|
@@ -7031,6 +7042,16 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
7031
7042
|
|
7032
7043
|
lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
|
7033
7044
|
|
7045
|
+
// Pick the first defined of two or three arguments. dfl comes from
|
7046
|
+
// default.
|
7047
|
+
function dfl(a, b, c) {
|
7048
|
+
switch (arguments.length) {
|
7049
|
+
case 2: return a != null ? a : b;
|
7050
|
+
case 3: return a != null ? a : b != null ? b : c;
|
7051
|
+
default: throw new Error("Implement me");
|
7052
|
+
}
|
7053
|
+
}
|
7054
|
+
|
7034
7055
|
function defaultParsingFlags() {
|
7035
7056
|
// We need to deep clone this object, and es5 standard is not very
|
7036
7057
|
// helpful.
|
@@ -7899,30 +7920,86 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
7899
7920
|
config._useUTC = true;
|
7900
7921
|
config._tzm = timezoneMinutesFromString(input);
|
7901
7922
|
break;
|
7923
|
+
// WEEKDAY - human
|
7924
|
+
case 'dd':
|
7925
|
+
case 'ddd':
|
7926
|
+
case 'dddd':
|
7927
|
+
a = getLangDefinition(config._l).weekdaysParse(input);
|
7928
|
+
// if we didn't get a weekday name, mark the date as invalid
|
7929
|
+
if (a != null) {
|
7930
|
+
config._w = config._w || {};
|
7931
|
+
config._w['d'] = a;
|
7932
|
+
} else {
|
7933
|
+
config._pf.invalidWeekday = input;
|
7934
|
+
}
|
7935
|
+
break;
|
7936
|
+
// WEEK, WEEK DAY - numeric
|
7902
7937
|
case 'w':
|
7903
7938
|
case 'ww':
|
7904
7939
|
case 'W':
|
7905
7940
|
case 'WW':
|
7906
7941
|
case 'd':
|
7907
|
-
case 'dd':
|
7908
|
-
case 'ddd':
|
7909
|
-
case 'dddd':
|
7910
7942
|
case 'e':
|
7911
7943
|
case 'E':
|
7912
7944
|
token = token.substr(0, 1);
|
7913
7945
|
/* falls through */
|
7914
|
-
case 'gg':
|
7915
7946
|
case 'gggg':
|
7916
|
-
case 'GG':
|
7917
7947
|
case 'GGGG':
|
7918
7948
|
case 'GGGGG':
|
7919
7949
|
token = token.substr(0, 2);
|
7920
7950
|
if (input) {
|
7921
7951
|
config._w = config._w || {};
|
7922
|
-
config._w[token] = input;
|
7952
|
+
config._w[token] = toInt(input);
|
7923
7953
|
}
|
7924
7954
|
break;
|
7955
|
+
case 'gg':
|
7956
|
+
case 'GG':
|
7957
|
+
config._w = config._w || {};
|
7958
|
+
config._w[token] = moment.parseTwoDigitYear(input);
|
7959
|
+
}
|
7960
|
+
}
|
7961
|
+
|
7962
|
+
function dayOfYearFromWeekInfo(config) {
|
7963
|
+
var w, weekYear, week, weekday, dow, doy, temp, lang;
|
7964
|
+
|
7965
|
+
w = config._w;
|
7966
|
+
if (w.GG != null || w.W != null || w.E != null) {
|
7967
|
+
dow = 1;
|
7968
|
+
doy = 4;
|
7969
|
+
|
7970
|
+
// TODO: We need to take the current isoWeekYear, but that depends on
|
7971
|
+
// how we interpret now (local, utc, fixed offset). So create
|
7972
|
+
// a now version of current config (take local/utc/offset flags, and
|
7973
|
+
// create now).
|
7974
|
+
weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
|
7975
|
+
week = dfl(w.W, 1);
|
7976
|
+
weekday = dfl(w.E, 1);
|
7977
|
+
} else {
|
7978
|
+
lang = getLangDefinition(config._l);
|
7979
|
+
dow = lang._week.dow;
|
7980
|
+
doy = lang._week.doy;
|
7981
|
+
|
7982
|
+
weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
|
7983
|
+
week = dfl(w.w, 1);
|
7984
|
+
|
7985
|
+
if (w.d != null) {
|
7986
|
+
// weekday -- low day numbers are considered next week
|
7987
|
+
weekday = w.d;
|
7988
|
+
if (weekday < dow) {
|
7989
|
+
++week;
|
7990
|
+
}
|
7991
|
+
} else if (w.e != null) {
|
7992
|
+
// local weekday -- counting starts from begining of week
|
7993
|
+
weekday = w.e + dow;
|
7994
|
+
} else {
|
7995
|
+
// default to begining of week
|
7996
|
+
weekday = dow;
|
7997
|
+
}
|
7925
7998
|
}
|
7999
|
+
temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
|
8000
|
+
|
8001
|
+
config._a[YEAR] = temp.year;
|
8002
|
+
config._dayOfYear = temp.dayOfYear;
|
7926
8003
|
}
|
7927
8004
|
|
7928
8005
|
// convert an array to a date.
|
@@ -7930,8 +8007,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
7930
8007
|
// note: all values past the year are optional and will default to the lowest possible value.
|
7931
8008
|
// [year, month, day , hour, minute, second, millisecond]
|
7932
8009
|
function dateFromConfig(config) {
|
7933
|
-
var i, date, input = [], currentDate,
|
7934
|
-
yearToUse, fixYear, w, temp, lang, weekday, week;
|
8010
|
+
var i, date, input = [], currentDate, yearToUse;
|
7935
8011
|
|
7936
8012
|
if (config._d) {
|
7937
8013
|
return;
|
@@ -7941,39 +8017,12 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
7941
8017
|
|
7942
8018
|
//compute day of the year from weeks and weekdays
|
7943
8019
|
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
|
7944
|
-
|
7945
|
-
var intVal = parseInt(val, 10);
|
7946
|
-
return val ?
|
7947
|
-
(val.length < 3 ? (intVal > 68 ? 1900 + intVal : 2000 + intVal) : intVal) :
|
7948
|
-
(config._a[YEAR] == null ? moment().weekYear() : config._a[YEAR]);
|
7949
|
-
};
|
7950
|
-
|
7951
|
-
w = config._w;
|
7952
|
-
if (w.GG != null || w.W != null || w.E != null) {
|
7953
|
-
temp = dayOfYearFromWeeks(fixYear(w.GG), w.W || 1, w.E, 4, 1);
|
7954
|
-
}
|
7955
|
-
else {
|
7956
|
-
lang = getLangDefinition(config._l);
|
7957
|
-
weekday = w.d != null ? parseWeekday(w.d, lang) :
|
7958
|
-
(w.e != null ? parseInt(w.e, 10) + lang._week.dow : 0);
|
7959
|
-
|
7960
|
-
week = parseInt(w.w, 10) || 1;
|
7961
|
-
|
7962
|
-
//if we're parsing 'd', then the low day numbers may be next week
|
7963
|
-
if (w.d != null && weekday < lang._week.dow) {
|
7964
|
-
week++;
|
7965
|
-
}
|
7966
|
-
|
7967
|
-
temp = dayOfYearFromWeeks(fixYear(w.gg), week, weekday, lang._week.doy, lang._week.dow);
|
7968
|
-
}
|
7969
|
-
|
7970
|
-
config._a[YEAR] = temp.year;
|
7971
|
-
config._dayOfYear = temp.dayOfYear;
|
8020
|
+
dayOfYearFromWeekInfo(config);
|
7972
8021
|
}
|
7973
8022
|
|
7974
8023
|
//if the day of the year is set, figure out what it is
|
7975
8024
|
if (config._dayOfYear) {
|
7976
|
-
yearToUse = config._a[YEAR]
|
8025
|
+
yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
|
7977
8026
|
|
7978
8027
|
if (config._dayOfYear > daysInYear(yearToUse)) {
|
7979
8028
|
config._pf._overflowDayOfYear = true;
|
@@ -7998,11 +8047,12 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
7998
8047
|
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
|
7999
8048
|
}
|
8000
8049
|
|
8001
|
-
// add the offsets to the time to be parsed so that we can have a clean array for checking isValid
|
8002
|
-
input[HOUR] += toInt((config._tzm || 0) / 60);
|
8003
|
-
input[MINUTE] += toInt((config._tzm || 0) % 60);
|
8004
|
-
|
8005
8050
|
config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
|
8051
|
+
// Apply timezone offset from input. The actual zone can be changed
|
8052
|
+
// with parseZone.
|
8053
|
+
if (config._tzm != null) {
|
8054
|
+
config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
|
8055
|
+
}
|
8006
8056
|
}
|
8007
8057
|
|
8008
8058
|
function dateFromObject(config) {
|
@@ -8042,6 +8092,11 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8042
8092
|
// date from string and format string
|
8043
8093
|
function makeDateFromStringAndFormat(config) {
|
8044
8094
|
|
8095
|
+
if (config._f === moment.ISO_8601) {
|
8096
|
+
parseISO(config);
|
8097
|
+
return;
|
8098
|
+
}
|
8099
|
+
|
8045
8100
|
config._a = [];
|
8046
8101
|
config._pf.empty = true;
|
8047
8102
|
|
@@ -8154,7 +8209,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8154
8209
|
}
|
8155
8210
|
|
8156
8211
|
// date from iso format
|
8157
|
-
function
|
8212
|
+
function parseISO(config) {
|
8158
8213
|
var i, l,
|
8159
8214
|
string = config._i,
|
8160
8215
|
match = isoRegex.exec(string);
|
@@ -8178,8 +8233,16 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8178
8233
|
config._f += "Z";
|
8179
8234
|
}
|
8180
8235
|
makeDateFromStringAndFormat(config);
|
8236
|
+
} else {
|
8237
|
+
config._isValid = false;
|
8181
8238
|
}
|
8182
|
-
|
8239
|
+
}
|
8240
|
+
|
8241
|
+
// date from iso format or fallback
|
8242
|
+
function makeDateFromString(config) {
|
8243
|
+
parseISO(config);
|
8244
|
+
if (config._isValid === false) {
|
8245
|
+
delete config._isValid;
|
8183
8246
|
moment.createFromInputFallback(config);
|
8184
8247
|
}
|
8185
8248
|
}
|
@@ -8260,15 +8323,15 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8260
8323
|
hours = round(minutes / 60),
|
8261
8324
|
days = round(hours / 24),
|
8262
8325
|
years = round(days / 365),
|
8263
|
-
args = seconds <
|
8326
|
+
args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
|
8264
8327
|
minutes === 1 && ['m'] ||
|
8265
|
-
minutes <
|
8328
|
+
minutes < relativeTimeThresholds.m && ['mm', minutes] ||
|
8266
8329
|
hours === 1 && ['h'] ||
|
8267
|
-
hours <
|
8330
|
+
hours < relativeTimeThresholds.h && ['hh', hours] ||
|
8268
8331
|
days === 1 && ['d'] ||
|
8269
|
-
days <=
|
8270
|
-
days <=
|
8271
|
-
days <
|
8332
|
+
days <= relativeTimeThresholds.dd && ['dd', days] ||
|
8333
|
+
days <= relativeTimeThresholds.dm && ['M'] ||
|
8334
|
+
days < relativeTimeThresholds.dy && ['MM', round(days / 30)] ||
|
8272
8335
|
years === 1 && ['y'] || ['yy', years];
|
8273
8336
|
args[2] = withoutSuffix;
|
8274
8337
|
args[3] = milliseconds > 0;
|
@@ -8314,6 +8377,7 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8314
8377
|
function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
|
8315
8378
|
var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
|
8316
8379
|
|
8380
|
+
d = d === 0 ? 7 : d;
|
8317
8381
|
weekday = weekday != null ? weekday : firstDayOfWeek;
|
8318
8382
|
daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
|
8319
8383
|
dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
|
@@ -8389,6 +8453,40 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8389
8453
|
config._d = new Date(config._i);
|
8390
8454
|
});
|
8391
8455
|
|
8456
|
+
// Pick a moment m from moments so that m[fn](other) is true for all
|
8457
|
+
// other. This relies on the function fn to be transitive.
|
8458
|
+
//
|
8459
|
+
// moments should either be an array of moment objects or an array, whose
|
8460
|
+
// first element is an array of moment objects.
|
8461
|
+
function pickBy(fn, moments) {
|
8462
|
+
var res, i;
|
8463
|
+
if (moments.length === 1 && isArray(moments[0])) {
|
8464
|
+
moments = moments[0];
|
8465
|
+
}
|
8466
|
+
if (!moments.length) {
|
8467
|
+
return moment();
|
8468
|
+
}
|
8469
|
+
res = moments[0];
|
8470
|
+
for (i = 1; i < moments.length; ++i) {
|
8471
|
+
if (moments[i][fn](res)) {
|
8472
|
+
res = moments[i];
|
8473
|
+
}
|
8474
|
+
}
|
8475
|
+
return res;
|
8476
|
+
}
|
8477
|
+
|
8478
|
+
moment.min = function () {
|
8479
|
+
var args = [].slice.call(arguments, 0);
|
8480
|
+
|
8481
|
+
return pickBy('isBefore', args);
|
8482
|
+
};
|
8483
|
+
|
8484
|
+
moment.max = function () {
|
8485
|
+
var args = [].slice.call(arguments, 0);
|
8486
|
+
|
8487
|
+
return pickBy('isAfter', args);
|
8488
|
+
};
|
8489
|
+
|
8392
8490
|
// creating with utc
|
8393
8491
|
moment.utc = function (input, format, lang, strict) {
|
8394
8492
|
var c;
|
@@ -8485,6 +8583,9 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8485
8583
|
// default format
|
8486
8584
|
moment.defaultFormat = isoFormat;
|
8487
8585
|
|
8586
|
+
// constant that refers to the ISO standard
|
8587
|
+
moment.ISO_8601 = function () {};
|
8588
|
+
|
8488
8589
|
// Plugins that add properties should also add the key here (null value),
|
8489
8590
|
// so we can properly clone ourselves.
|
8490
8591
|
moment.momentProperties = momentProperties;
|
@@ -8493,6 +8594,15 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8493
8594
|
// It is intended to keep the offset in sync with the timezone.
|
8494
8595
|
moment.updateOffset = function () {};
|
8495
8596
|
|
8597
|
+
// This function allows you to set a threshold for relative time strings
|
8598
|
+
moment.relativeTimeThreshold = function(threshold, limit) {
|
8599
|
+
if (relativeTimeThresholds[threshold] === undefined) {
|
8600
|
+
return false;
|
8601
|
+
}
|
8602
|
+
relativeTimeThresholds[threshold] = limit;
|
8603
|
+
return true;
|
8604
|
+
};
|
8605
|
+
|
8496
8606
|
// This function will load languages and then set the global language. If
|
8497
8607
|
// no arguments are passed in, it will simply return the current global
|
8498
8608
|
// language key.
|
@@ -8648,7 +8758,9 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8648
8758
|
add : function (input, val) {
|
8649
8759
|
var dur;
|
8650
8760
|
// switch args to support add('s', 1) and add(1, 's')
|
8651
|
-
if (typeof input === 'string') {
|
8761
|
+
if (typeof input === 'string' && typeof val === 'string') {
|
8762
|
+
dur = moment.duration(isNaN(+val) ? +input : +val, isNaN(+val) ? val : input);
|
8763
|
+
} else if (typeof input === 'string') {
|
8652
8764
|
dur = moment.duration(+val, input);
|
8653
8765
|
} else {
|
8654
8766
|
dur = moment.duration(input, val);
|
@@ -8660,7 +8772,9 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8660
8772
|
subtract : function (input, val) {
|
8661
8773
|
var dur;
|
8662
8774
|
// switch args to support subtract('s', 1) and subtract(1, 's')
|
8663
|
-
if (typeof input === 'string') {
|
8775
|
+
if (typeof input === 'string' && typeof val === 'string') {
|
8776
|
+
dur = moment.duration(isNaN(+val) ? +input : +val, isNaN(+val) ? val : input);
|
8777
|
+
} else if (typeof input === 'string') {
|
8664
8778
|
dur = moment.duration(+val, input);
|
8665
8779
|
} else {
|
8666
8780
|
dur = moment.duration(input, val);
|
@@ -8711,10 +8825,11 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8711
8825
|
return this.from(moment(), withoutSuffix);
|
8712
8826
|
},
|
8713
8827
|
|
8714
|
-
calendar : function () {
|
8828
|
+
calendar : function (time) {
|
8715
8829
|
// We want to compare the start of today, vs this.
|
8716
8830
|
// Getting start-of-today depends on whether we're zone'd or not.
|
8717
|
-
var
|
8831
|
+
var now = time || moment(),
|
8832
|
+
sod = makeAs(now, this).startOf('day'),
|
8718
8833
|
diff = this.diff(sod, 'days', true),
|
8719
8834
|
format = diff < -6 ? 'sameElse' :
|
8720
8835
|
diff < -1 ? 'lastWeek' :
|
@@ -8809,15 +8924,21 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
8809
8924
|
return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);
|
8810
8925
|
},
|
8811
8926
|
|
8812
|
-
min:
|
8813
|
-
|
8814
|
-
|
8815
|
-
|
8816
|
-
|
8817
|
-
|
8818
|
-
|
8819
|
-
|
8820
|
-
|
8927
|
+
min: deprecate(
|
8928
|
+
"moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",
|
8929
|
+
function (other) {
|
8930
|
+
other = moment.apply(null, arguments);
|
8931
|
+
return other < this ? this : other;
|
8932
|
+
}
|
8933
|
+
),
|
8934
|
+
|
8935
|
+
max: deprecate(
|
8936
|
+
"moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",
|
8937
|
+
function (other) {
|
8938
|
+
other = moment.apply(null, arguments);
|
8939
|
+
return other > this ? this : other;
|
8940
|
+
}
|
8941
|
+
),
|
8821
8942
|
|
8822
8943
|
// keepTime = true means only change the timezone, without affecting
|
8823
8944
|
// the local hour. So 5:31:26 +0300 --[zone(2, true)]--> 5:31:26 +0200
|
@@ -9485,6 +9606,16 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
|
9485
9606
|
|
9486
9607
|
function program1(depth0,data) {
|
9487
9608
|
|
9609
|
+
var buffer = "", stack1;
|
9610
|
+
buffer += "scrivito_";
|
9611
|
+
if (stack1 = helpers.color) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9612
|
+
else { stack1 = depth0.color; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9613
|
+
buffer += escapeExpression(stack1);
|
9614
|
+
return buffer;
|
9615
|
+
}
|
9616
|
+
|
9617
|
+
function program3(depth0,data) {
|
9618
|
+
|
9488
9619
|
var buffer = "", stack1;
|
9489
9620
|
buffer += "\n <p class=\"scrivito_description\">";
|
9490
9621
|
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9494,11 +9625,10 @@ function program1(depth0,data) {
|
|
9494
9625
|
return buffer;
|
9495
9626
|
}
|
9496
9627
|
|
9497
|
-
buffer += "<div class=\"scrivito_confirmation_dialog scrivito_modal_prompt scrivito_center_dialog
|
9498
|
-
|
9499
|
-
|
9500
|
-
buffer +=
|
9501
|
-
+ "\">\n <div class=\"scrivito_modal_header\">\n <i class=\"scrivito_icon\">";
|
9628
|
+
buffer += "<div class=\"scrivito_confirmation_dialog scrivito_modal_prompt scrivito_center_dialog\n ";
|
9629
|
+
stack1 = helpers['if'].call(depth0, depth0.color, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
9630
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9631
|
+
buffer += "\">\n <div class=\"scrivito_modal_header\">\n <i class=\"scrivito_icon\">";
|
9502
9632
|
if (stack1 = helpers.icon) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9503
9633
|
else { stack1 = depth0.icon; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9504
9634
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
@@ -9507,7 +9637,7 @@ function program1(depth0,data) {
|
|
9507
9637
|
else { stack1 = depth0.title; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9508
9638
|
buffer += escapeExpression(stack1)
|
9509
9639
|
+ "</h3>\n ";
|
9510
|
-
stack1 = helpers['if'].call(depth0, depth0.description, {hash:{},inverse:self.noop,fn:self.program(
|
9640
|
+
stack1 = helpers['if'].call(depth0, depth0.description, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
9511
9641
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9512
9642
|
buffer += "\n </div>\n <div class=\"scrivito_modal_footer\">\n <a href=\"#\" class=\"scrivito_button scrivito_";
|
9513
9643
|
if (stack1 = helpers.cancel_button_color) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9535,8 +9665,13 @@ function program1(depth0,data) {
|
|
9535
9665
|
this.ScrivitoHandlebarsTemplates["details_dialog"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9536
9666
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9537
9667
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
9538
|
-
var buffer = "", stack1, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
9668
|
+
var buffer = "", stack1, stack2, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
|
9539
9669
|
|
9670
|
+
function program1(depth0,data) {
|
9671
|
+
|
9672
|
+
|
9673
|
+
return "\n <div class=\"scrivito_button_bar scrivito_obj_menu\"></div>\n ";
|
9674
|
+
}
|
9540
9675
|
|
9541
9676
|
buffer += "<div class=\"scrivito_details_dialog scrivito_modal_medium scrivito_adjust_dialog\">\n\n <div class=\"scrivito_modal_header\">\n <h3><i class=\"scrivito_icon\">";
|
9542
9677
|
if (stack1 = helpers.icon) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9545,7 +9680,10 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
|
9545
9680
|
buffer += "</i>";
|
9546
9681
|
options = {hash:{},data:data};
|
9547
9682
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "details_dialog.title", depth0.title, options) : helperMissing.call(depth0, "translate", "details_dialog.title", depth0.title, options)))
|
9548
|
-
+ "</h3>\n <div class=\"scrivito_details_dialog_saving_indicator\"></div>\n
|
9683
|
+
+ "</h3>\n <div class=\"scrivito_details_dialog_saving_indicator\"></div>\n ";
|
9684
|
+
stack2 = helpers['if'].call(depth0, depth0.obj, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
9685
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9686
|
+
buffer += "\n </div>\n\n <div class=\"scrivito_modal_body scrivito_auto_height\">\n <i class=\"scrivito_icon scrivito_spinning\"></i>\n <div class=\"scrivito_details_dialog_markup\"></div>\n </div>\n\n <div class=\"scrivito_modal_footer\">\n <a href=\"#\" class=\"scrivito_button scrivito_cancel scrivito_green\">";
|
9549
9687
|
options = {hash:{},data:data};
|
9550
9688
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "done", options) : helperMissing.call(depth0, "translate", "done", options)))
|
9551
9689
|
+ "</a>\n </div>\n\n</div>\n";
|
@@ -9723,29 +9861,45 @@ function program1(depth0,data) {
|
|
9723
9861
|
this.ScrivitoHandlebarsTemplates["menu"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9724
9862
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9725
9863
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
9726
|
-
var buffer = "", stack1,
|
9864
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
9727
9865
|
|
9728
9866
|
function program1(depth0,data) {
|
9729
9867
|
|
9868
|
+
var buffer = "", stack1;
|
9869
|
+
buffer += "scrivito_";
|
9870
|
+
if (stack1 = helpers.align) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9871
|
+
else { stack1 = depth0.align; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9872
|
+
buffer += escapeExpression(stack1);
|
9873
|
+
return buffer;
|
9874
|
+
}
|
9875
|
+
|
9876
|
+
function program3(depth0,data) {
|
9877
|
+
|
9878
|
+
|
9879
|
+
return "scrivito_right";
|
9880
|
+
}
|
9881
|
+
|
9882
|
+
function program5(depth0,data) {
|
9883
|
+
|
9730
9884
|
var buffer = "", stack1;
|
9731
9885
|
buffer += "\n ";
|
9732
|
-
stack1 = helpers['if'].call(depth0, depth0.is_present, {hash:{},inverse:self.noop,fn:self.program(
|
9886
|
+
stack1 = helpers['if'].call(depth0, depth0.is_present, {hash:{},inverse:self.noop,fn:self.program(6, program6, data),data:data});
|
9733
9887
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9734
9888
|
buffer += "\n ";
|
9735
9889
|
return buffer;
|
9736
9890
|
}
|
9737
|
-
function
|
9891
|
+
function program6(depth0,data) {
|
9738
9892
|
|
9739
9893
|
var buffer = "", stack1;
|
9740
|
-
buffer += "\n <li class=\"scrivito_menu_item ";
|
9894
|
+
buffer += "\n <li class=\"scrivito_menu_item scrivito_";
|
9741
9895
|
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9742
9896
|
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9743
9897
|
buffer += escapeExpression(stack1)
|
9744
9898
|
+ " ";
|
9745
|
-
stack1 = helpers['if'].call(depth0, depth0.is_disabled, {hash:{},inverse:self.noop,fn:self.program(
|
9899
|
+
stack1 = helpers['if'].call(depth0, depth0.is_disabled, {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
|
9746
9900
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9747
9901
|
buffer += "\">\n <span title=\"";
|
9748
|
-
stack1 = helpers['if'].call(depth0, depth0.is_enabled, {hash:{},inverse:self.program(
|
9902
|
+
stack1 = helpers['if'].call(depth0, depth0.is_enabled, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data});
|
9749
9903
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9750
9904
|
buffer += "\">\n <i class=\"scrivito_icon\">";
|
9751
9905
|
if (stack1 = helpers.icon) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9758,13 +9912,13 @@ function program2(depth0,data) {
|
|
9758
9912
|
+ "\n </span>\n </li>\n ";
|
9759
9913
|
return buffer;
|
9760
9914
|
}
|
9761
|
-
function
|
9915
|
+
function program7(depth0,data) {
|
9762
9916
|
|
9763
9917
|
|
9764
|
-
return "
|
9918
|
+
return "scrivito_disabled";
|
9765
9919
|
}
|
9766
9920
|
|
9767
|
-
function
|
9921
|
+
function program9(depth0,data) {
|
9768
9922
|
|
9769
9923
|
var stack1;
|
9770
9924
|
if (stack1 = helpers.tooltip) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9772,7 +9926,7 @@ function program5(depth0,data) {
|
|
9772
9926
|
return escapeExpression(stack1);
|
9773
9927
|
}
|
9774
9928
|
|
9775
|
-
function
|
9929
|
+
function program11(depth0,data) {
|
9776
9930
|
|
9777
9931
|
var stack1;
|
9778
9932
|
if (stack1 = helpers.reason_for_being_disabled) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -9780,13 +9934,12 @@ function program7(depth0,data) {
|
|
9780
9934
|
return escapeExpression(stack1);
|
9781
9935
|
}
|
9782
9936
|
|
9783
|
-
buffer += "<div class=\"scrivito_editing_marker_menu\">\n <ul class=\"scrivito_menu_box
|
9784
|
-
|
9785
|
-
|
9786
|
-
|
9787
|
-
|
9788
|
-
|
9789
|
-
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9937
|
+
buffer += "<div class=\"scrivito_editing_marker_menu\">\n <ul class=\"scrivito_menu_box ";
|
9938
|
+
stack1 = helpers['if'].call(depth0, depth0.align, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data),data:data});
|
9939
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9940
|
+
buffer += "\">\n ";
|
9941
|
+
stack1 = helpers.each.call(depth0, depth0.commands, {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
9942
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9790
9943
|
buffer += "\n </ul>\n</div>\n";
|
9791
9944
|
return buffer;
|
9792
9945
|
});
|
@@ -9800,13 +9953,46 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
|
9800
9953
|
|
9801
9954
|
|
9802
9955
|
|
9803
|
-
return "<div class=\"scrivito_topbar\">\n <div class=\"scrivito_first_level\">\n <div id=\"scrivito_menu_bar_toggle\" class=\"scrivito_viewmodes_wrapper\"></div>\n <div class=\"scrivito_button_bar scrivito_app scrivito_no_hover\"><span class=\"scrivito_logo\"></span></div>\n <div id=\"scrivito_select_workspace\" class=\"scrivito_button_bar\"></div>\n <div id=\"
|
9956
|
+
return "<div class=\"scrivito_topbar\">\n <div class=\"scrivito_first_level\">\n <div id=\"scrivito_menu_bar_toggle\" class=\"scrivito_viewmodes_wrapper\"></div>\n <div class=\"scrivito_button_bar scrivito_app scrivito_no_hover\"><span class=\"scrivito_logo\"></span></div>\n <div id=\"scrivito_select_workspace\" class=\"scrivito_button_bar\"></div>\n <div id=\"scrivito_current_page_menu\" class=\"scrivito_button_bar scrivito_right\"></div>\n <div id=\"scrivito_menu_bar_saving_indicator\"></div>\n </div>\n</div>\n";
|
9804
9957
|
});
|
9805
9958
|
return this.ScrivitoHandlebarsTemplates["menu_bar"];
|
9806
9959
|
}).call(this);
|
9807
9960
|
(function() {
|
9808
9961
|
this.ScrivitoHandlebarsTemplates || (this.ScrivitoHandlebarsTemplates = {});
|
9809
|
-
this.ScrivitoHandlebarsTemplates["
|
9962
|
+
this.ScrivitoHandlebarsTemplates["menu_bar_toggle"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9963
|
+
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9964
|
+
helpers = helpers || Handlebars.helpers; data = data || {};
|
9965
|
+
var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression;
|
9966
|
+
|
9967
|
+
|
9968
|
+
buffer += "<div class=\"scrivito_viewmodes scrivito_viewmode_";
|
9969
|
+
if (stack1 = helpers.mode) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9970
|
+
else { stack1 = depth0.mode; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9971
|
+
buffer += escapeExpression(stack1)
|
9972
|
+
+ "_active\">\n <span class=\"scrivito_viewmode_pill\"></span>\n\n <div class=\"scrivito_viewmode_view\">\n <span class=\"scrivito_viewmode_icon "
|
9973
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_view_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9974
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label\">"
|
9975
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_view_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9976
|
+
+ "</span>\n </div>\n\n <div class=\"scrivito_viewmode_editing\">\n <span class=\"scrivito_viewmode_icon "
|
9977
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_editing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9978
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label\">"
|
9979
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_editing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9980
|
+
+ "</span>\n </div>\n\n <div class=\"scrivito_viewmode_";
|
9981
|
+
if (stack2 = helpers.comparing_mode) { stack2 = stack2.call(depth0, {hash:{},data:data}); }
|
9982
|
+
else { stack2 = depth0.comparing_mode; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; }
|
9983
|
+
buffer += escapeExpression(stack2)
|
9984
|
+
+ "\">\n <span class=\"scrivito_viewmode_icon "
|
9985
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_comparing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9986
|
+
+ "\"></span>\n <span class=\"scrivito_viewmode_label scrivito_comparing_mode_toggle\">\n "
|
9987
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.switch_to_comparing_mode_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
9988
|
+
+ " <i class=\"scrivito_icon\"></i>\n </span>\n </div>\n</div>\n";
|
9989
|
+
return buffer;
|
9990
|
+
});
|
9991
|
+
return this.ScrivitoHandlebarsTemplates["menu_bar_toggle"];
|
9992
|
+
}).call(this);
|
9993
|
+
(function() {
|
9994
|
+
this.ScrivitoHandlebarsTemplates || (this.ScrivitoHandlebarsTemplates = {});
|
9995
|
+
this.ScrivitoHandlebarsTemplates["obj_menu"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9810
9996
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9811
9997
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
9812
9998
|
var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
@@ -9835,98 +10021,24 @@ function program7(depth0,data) {
|
|
9835
10021
|
return "\n scrivito_conflict\n ";
|
9836
10022
|
}
|
9837
10023
|
|
9838
|
-
|
9839
|
-
|
9840
|
-
|
9841
|
-
|
9842
|
-
stack1 = helpers['if'].call(depth0, depth0.is_present, {hash:{},inverse:self.noop,fn:self.program(10, program10, data),data:data});
|
9843
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9844
|
-
buffer += "\n ";
|
9845
|
-
return buffer;
|
9846
|
-
}
|
9847
|
-
function program10(depth0,data) {
|
9848
|
-
|
9849
|
-
var buffer = "", stack1;
|
9850
|
-
buffer += "\n <li id=\"scrivito_";
|
9851
|
-
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9852
|
-
else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9853
|
-
buffer += escapeExpression(stack1)
|
9854
|
-
+ "\" class=\"scrivito_menu_item ";
|
9855
|
-
stack1 = helpers['if'].call(depth0, depth0.is_disabled, {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data});
|
9856
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9857
|
-
buffer += "\"\n title=\"";
|
9858
|
-
if (stack1 = helpers.reason_for_being_disabled) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9859
|
-
else { stack1 = depth0.reason_for_being_disabled; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9860
|
-
buffer += escapeExpression(stack1)
|
9861
|
-
+ "\">\n <span><i class=\"scrivito_icon\">";
|
9862
|
-
if (stack1 = helpers.icon) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9863
|
-
else { stack1 = depth0.icon; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9864
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9865
|
-
buffer += "</i>";
|
9866
|
-
if (stack1 = helpers.title) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9867
|
-
else { stack1 = depth0.title; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9868
|
-
buffer += escapeExpression(stack1)
|
9869
|
-
+ "</span>\n </li>\n ";
|
9870
|
-
return buffer;
|
9871
|
-
}
|
9872
|
-
function program11(depth0,data) {
|
9873
|
-
|
9874
|
-
|
9875
|
-
return "disabled";
|
9876
|
-
}
|
9877
|
-
|
9878
|
-
buffer += "<i class=\"scrivito_icon\n ";
|
9879
|
-
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.current_page),stack1 == null || stack1 === false ? stack1 : stack1.is_new), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
10024
|
+
buffer += "<i title=\""
|
10025
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.obj),stack1 == null || stack1 === false ? stack1 : stack1.tooltip)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
10026
|
+
+ "\" class=\"scrivito_icon\n ";
|
10027
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.obj),stack1 == null || stack1 === false ? stack1 : stack1.is_new), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
9880
10028
|
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9881
10029
|
buffer += "\n\n ";
|
9882
|
-
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.
|
10030
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.obj),stack1 == null || stack1 === false ? stack1 : stack1.is_edited), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
9883
10031
|
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9884
10032
|
buffer += "\n\n ";
|
9885
|
-
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.
|
10033
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.obj),stack1 == null || stack1 === false ? stack1 : stack1.is_deleted), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
9886
10034
|
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9887
10035
|
buffer += "\n\n ";
|
9888
|
-
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.
|
10036
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.obj),stack1 == null || stack1 === false ? stack1 : stack1.has_conflict), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
|
9889
10037
|
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9890
|
-
buffer += "\n\"></i>\n
|
9891
|
-
stack2 = helpers.each.call(depth0, depth0.commands, {hash:{},inverse:self.noop,fn:self.program(9, program9, data),data:data});
|
9892
|
-
if(stack2 || stack2 === 0) { buffer += stack2; }
|
9893
|
-
buffer += "\n</ul>\n";
|
9894
|
-
return buffer;
|
9895
|
-
});
|
9896
|
-
return this.ScrivitoHandlebarsTemplates["menu_bar_dropdown"];
|
9897
|
-
}).call(this);
|
9898
|
-
(function() {
|
9899
|
-
this.ScrivitoHandlebarsTemplates || (this.ScrivitoHandlebarsTemplates = {});
|
9900
|
-
this.ScrivitoHandlebarsTemplates["menu_bar_toggle"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
9901
|
-
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
9902
|
-
helpers = helpers || Handlebars.helpers; data = data || {};
|
9903
|
-
var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression;
|
9904
|
-
|
9905
|
-
|
9906
|
-
buffer += "<div class=\"scrivito_viewmodes scrivito_viewmode_";
|
9907
|
-
if (stack1 = helpers.mode) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
9908
|
-
else { stack1 = depth0.mode; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
9909
|
-
buffer += escapeExpression(stack1)
|
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";
|
10038
|
+
buffer += "\n\"></i>\n";
|
9927
10039
|
return buffer;
|
9928
10040
|
});
|
9929
|
-
return this.ScrivitoHandlebarsTemplates["
|
10041
|
+
return this.ScrivitoHandlebarsTemplates["obj_menu"];
|
9930
10042
|
}).call(this);
|
9931
10043
|
(function() {
|
9932
10044
|
this.ScrivitoHandlebarsTemplates || (this.ScrivitoHandlebarsTemplates = {});
|
@@ -9956,7 +10068,7 @@ function program1(depth0,data) {
|
|
9956
10068
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
9957
10069
|
buffer += "</i>";
|
9958
10070
|
options = {hash:{},data:data};
|
9959
|
-
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "
|
10071
|
+
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "obj_sorting_dialog.title", options) : helperMissing.call(depth0, "translate", "obj_sorting_dialog.title", options)))
|
9960
10072
|
+ "</h3>\n </div>\n\n <div class=\"scrivito_modal_body scrivito_auto_height\">\n <ul id=\"scrivito_obj_sorting_sortable\">\n ";
|
9961
10073
|
stack2 = helpers.each.call(depth0, depth0.child_list, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
9962
10074
|
if(stack2 || stack2 === 0) { buffer += stack2; }
|
@@ -9992,6 +10104,16 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
|
9992
10104
|
|
9993
10105
|
function program1(depth0,data) {
|
9994
10106
|
|
10107
|
+
var buffer = "", stack1;
|
10108
|
+
buffer += "scrivito_";
|
10109
|
+
if (stack1 = helpers.color) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
10110
|
+
else { stack1 = depth0.color; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
10111
|
+
buffer += escapeExpression(stack1);
|
10112
|
+
return buffer;
|
10113
|
+
}
|
10114
|
+
|
10115
|
+
function program3(depth0,data) {
|
10116
|
+
|
9995
10117
|
var buffer = "", stack1;
|
9996
10118
|
buffer += "\n <p class=\"scrivito_description\">";
|
9997
10119
|
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -10001,7 +10123,10 @@ function program1(depth0,data) {
|
|
10001
10123
|
return buffer;
|
10002
10124
|
}
|
10003
10125
|
|
10004
|
-
buffer += "<div class=\"scrivito_prompt_dialog scrivito_center_dialog scrivito_modal_prompt\
|
10126
|
+
buffer += "<div class=\"scrivito_prompt_dialog scrivito_center_dialog scrivito_modal_prompt\n ";
|
10127
|
+
stack1 = helpers['if'].call(depth0, depth0.color, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
10128
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
10129
|
+
buffer += "\">\n <div class=\"scrivito_modal_header\">\n <i class=\"scrivito_icon\">";
|
10005
10130
|
if (stack1 = helpers.icon) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
10006
10131
|
else { stack1 = depth0.icon; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
10007
10132
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
@@ -10010,7 +10135,7 @@ function program1(depth0,data) {
|
|
10010
10135
|
else { stack1 = depth0.title; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
10011
10136
|
buffer += escapeExpression(stack1)
|
10012
10137
|
+ "</h3>\n ";
|
10013
|
-
stack1 = helpers['if'].call(depth0, depth0.description, {hash:{},inverse:self.noop,fn:self.program(
|
10138
|
+
stack1 = helpers['if'].call(depth0, depth0.description, {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
10014
10139
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
10015
10140
|
buffer += "\n </div>\n <div class=\"scrivito_modal_body\">\n <input type=\"text\" value=\"";
|
10016
10141
|
if (stack1 = helpers.value) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
@@ -10151,36 +10276,44 @@ function program8(depth0,data) {
|
|
10151
10276
|
this.ScrivitoHandlebarsTemplates["workspace_select_menu_bar_item"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
10152
10277
|
this.compilerInfo = [3,'>= 1.0.0-rc.4'];
|
10153
10278
|
helpers = helpers || Handlebars.helpers; data = data || {};
|
10154
|
-
var buffer = "", stack1, stack2, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, functionType="function"
|
10279
|
+
var buffer = "", stack1, stack2, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this, functionType="function";
|
10155
10280
|
|
10156
10281
|
function program1(depth0,data) {
|
10157
10282
|
|
10158
|
-
var buffer = "", stack1, options;
|
10159
|
-
buffer += "\n <li id=\"scrivito_changes_list_toggle\" class=\"scrivito_menu_item\">\n <span>\n <i class=\"scrivito_icon\" title=\"";
|
10283
|
+
var buffer = "", stack1, stack2, options;
|
10284
|
+
buffer += "\n <li class=\"scrivito_menu_separator\"></li>\n <li id=\"scrivito_changes_list_toggle\" class=\"scrivito_menu_item\">\n <span>\n <i class=\"scrivito_icon\" title=\"";
|
10160
10285
|
options = {hash:{},data:data};
|
10161
10286
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "changes_list.menu_item", options) : helperMissing.call(depth0, "translate", "changes_list.menu_item", options)))
|
10162
10287
|
+ "\"></i>\n ";
|
10163
10288
|
options = {hash:{},data:data};
|
10164
10289
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "changes_list.menu_item", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "changes_list.menu_item", depth0.current_short_title, options)))
|
10165
|
-
+ "\n </span>\n </li>\n <li class=\"
|
10166
|
-
|
10167
|
-
|
10168
|
-
|
10169
|
-
|
10170
|
-
|
10171
|
-
+
|
10290
|
+
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item ";
|
10291
|
+
stack2 = helpers['if'].call(depth0, ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.is_disabled), {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
|
10292
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
10293
|
+
buffer += "\">\n <span id='"
|
10294
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
10295
|
+
+ "' title='"
|
10296
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.reason_for_being_disabled)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
10297
|
+
+ "'>\n <i class=\"scrivito_icon\" title=\""
|
10298
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.tooltip)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
10299
|
+
+ "\">\n ";
|
10300
|
+
stack2 = ((stack1 = ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.icon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
10301
|
+
if(stack2 || stack2 === 0) { buffer += stack2; }
|
10302
|
+
buffer += "\n </i>\n "
|
10303
|
+
+ escapeExpression(((stack1 = ((stack1 = depth0.publish_command),stack1 == null || stack1 === false ? stack1 : stack1.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
10304
|
+
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item\">\n <span id='scrivito_rename_current_ws'>\n <i class=\"scrivito_icon\"\n title=\"";
|
10172
10305
|
options = {hash:{},data:data};
|
10173
10306
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.rename_working_copy", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "menu_bar.rename_working_copy", depth0.current_short_title, options)))
|
10174
10307
|
+ " \"></i>\n ";
|
10175
10308
|
options = {hash:{},data:data};
|
10176
10309
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.rename_working_copy", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "menu_bar.rename_working_copy", depth0.current_short_title, options)))
|
10177
|
-
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item\">\n <span id='
|
10310
|
+
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item\">\n <span id='scrivito_rebase_current_ws'>\n <i class=\"scrivito_icon\"\n title=\"";
|
10178
10311
|
options = {hash:{},data:data};
|
10179
10312
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.rebase_working_copy", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "menu_bar.rebase_working_copy", depth0.current_short_title, options)))
|
10180
10313
|
+ " \">\n \n </i>\n ";
|
10181
10314
|
options = {hash:{},data:data};
|
10182
10315
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.rebase_working_copy", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "menu_bar.rebase_working_copy", depth0.current_short_title, options)))
|
10183
|
-
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item\">\n <span id='
|
10316
|
+
+ "\n </span>\n </li>\n <li class=\"scrivito_menu_item\">\n <span id='scrivito_delete_current_ws'>\n <i class=\"scrivito_icon\"\n title=\"";
|
10184
10317
|
options = {hash:{},data:data};
|
10185
10318
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.delete_working_copy", depth0.current_short_title, options) : helperMissing.call(depth0, "translate", "menu_bar.delete_working_copy", depth0.current_short_title, options)))
|
10186
10319
|
+ " \"></i>\n ";
|
@@ -10189,12 +10322,17 @@ function program1(depth0,data) {
|
|
10189
10322
|
+ "\n </span>\n </li>\n ";
|
10190
10323
|
return buffer;
|
10191
10324
|
}
|
10325
|
+
function program2(depth0,data) {
|
10326
|
+
|
10327
|
+
|
10328
|
+
return "scrivito_disabled";
|
10329
|
+
}
|
10192
10330
|
|
10193
10331
|
buffer += "<i class=\"scrivito_icon\"></i>\n<span class=\"scrivito_button_label\">";
|
10194
10332
|
if (stack1 = helpers.current_long_title) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
10195
10333
|
else { stack1 = depth0.current_long_title; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
10196
10334
|
buffer += escapeExpression(stack1)
|
10197
|
-
+ "</span>\n\n<ul class=\"scrivito_menu_box\" style=\"display: none;\">\n <li class=\"scrivito_menu_item\">\n <span id='
|
10335
|
+
+ "</span>\n\n<ul class=\"scrivito_menu_box\" style=\"display: none;\">\n <li class=\"scrivito_menu_item\">\n <span id='scrivito_create_new_ws'>\n <i class=\"scrivito_icon\" title=\"";
|
10198
10336
|
options = {hash:{},data:data};
|
10199
10337
|
buffer += escapeExpression(((stack1 = helpers.translate),stack1 ? stack1.call(depth0, "menu_bar.create_new_working_copy", options) : helperMissing.call(depth0, "translate", "menu_bar.create_new_working_copy", options)))
|
10200
10338
|
+ "\"></i>\n ";
|
@@ -10225,7 +10363,6 @@ $.i18n().load({
|
|
10225
10363
|
'done': 'Fertig',
|
10226
10364
|
'loading': 'Lade...',
|
10227
10365
|
'current_page': 'Aktuelle Seite',
|
10228
|
-
'resource': 'Ressource',
|
10229
10366
|
|
10230
10367
|
'obj.tooltip.is_new': 'Diese Seite ist neu.',
|
10231
10368
|
'obj.tooltip.is_edited': 'Diese Seite wurde geändert.',
|
@@ -10246,14 +10383,29 @@ $.i18n().load({
|
|
10246
10383
|
|
10247
10384
|
'details_dialog.title': '$1 bearbeiten',
|
10248
10385
|
|
10386
|
+
'resource_dialog.title': 'Ressource',
|
10387
|
+
|
10388
|
+
'resource_dialog.commands.revert_obj.title': 'Änderungen an Ressource verwerfen',
|
10389
|
+
'resource_dialog.commands.revert_obj.rtc_workspace': 'Diese Ressource ist Teil der "rtc"-Arbeitskopie, bei der Änderungen nicht verworfen werden können.',
|
10390
|
+
'resource_dialog.commands.revert_obj.new_obj': 'Dies ist eine neue Ressource. Um die Erstellung dieser Ressource rückgängig zu machen, löschen Sie sie bitte.',
|
10391
|
+
'resource_dialog.commands.revert_obj.not_modified_obj': 'Diese Ressource wurde nicht geändert. Daher gibt es nichts zu verwerfen.',
|
10392
|
+
'resource_dialog.commands.revert_obj.dialog.title': 'Wirklich Änderungen an dieser Ressource verwerfen?',
|
10393
|
+
|
10394
|
+
'resource_dialog.commands.restore_obj.title': 'Ressource wiederherstellen',
|
10395
|
+
'resource_dialog.commands.restore_obj.rtc_workspace': 'Diese Ressource ist Teil der "rtc"-Arbeitskopie, bei der gelöschte Seiten nicht wiederhergestellt werden können.',
|
10396
|
+
|
10397
|
+
'resource_dialog.commands.mark_resolved_obj.title': 'Parallele Änderungen an der Ressource überschreiben',
|
10398
|
+
'resource_dialog.commands.mark_resolved_obj.dialog.description': 'Diese Ressource wurde in einer anderen, inzwischen veröffentlichten Arbeitskopie geändert. Bitte bestätigen Sie, dass Ihre Änderungen erhalten und die parallel durchgeführten Änderungen verworfen werden.',
|
10399
|
+
|
10400
|
+
'resource_dialog.commands.delete_obj.title': 'Ressource löschen',
|
10401
|
+
'resource_dialog.commands.delete_obj.dialog.title': 'Wirklich diese Ressource löschen?',
|
10402
|
+
'resource_dialog.commands.delete_obj.dialog.description': 'Änderungen an einer gelöschten Ressource können nicht wiederhergestellt werden.',
|
10403
|
+
|
10249
10404
|
'menu_bar.working_copy': 'Arbeitskopie',
|
10250
10405
|
'menu_bar.empty_workspace_title': '<leerer Titel>',
|
10251
10406
|
'menu_bar.published_workspace_title': 'Veröffentlichte Inhalte',
|
10252
10407
|
'menu_bar.loading_workspaces': 'Lade Arbeitskopien',
|
10253
10408
|
'menu_bar.select_working_copy': '"$1" auswählen',
|
10254
|
-
'menu_bar.publish_working_copy': '"$1" veröffentlichen',
|
10255
|
-
'menu_bar.publish_ws_confirmation': '"$1" veröffentlichen?',
|
10256
|
-
'menu_bar.publish_ws_confirmation_desc': 'Eine Arbeitskopie zu veröffentlichen ist endgültig. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
10257
10409
|
'menu_bar.rebase_working_copy': '"$1" aktualisieren',
|
10258
10410
|
'menu_bar.rename_working_copy': '"$1" umbenennen',
|
10259
10411
|
'menu_bar.rename_working_copy_desc': 'Bitte geben Sie den neuen Titel der Arbeitskopie ein.',
|
@@ -10265,7 +10417,6 @@ $.i18n().load({
|
|
10265
10417
|
'menu_bar.move': 'Verschieben',
|
10266
10418
|
'menu_bar.copy': 'Kopieren',
|
10267
10419
|
'menu_bar.create': 'Anlegen',
|
10268
|
-
'menu_bar.publish': 'Veröffentlichen',
|
10269
10420
|
'menu_bar.create_new_working_copy': 'Arbeitskopie anlegen',
|
10270
10421
|
'menu_bar.create_new_ws_confirmation': 'Arbeitskopie anlegen',
|
10271
10422
|
'menu_bar.create_new_ws_confirmation_desc': 'Bitte geben Sie den Titel der neuen Arbeitskopie ein.',
|
@@ -10274,13 +10425,13 @@ $.i18n().load({
|
|
10274
10425
|
'saving_indicator_item.saving': 'Wird gespeichert...',
|
10275
10426
|
'saving_indicator_item.saved': 'Änderungen gespeichert',
|
10276
10427
|
|
10277
|
-
'
|
10278
|
-
'
|
10279
|
-
'
|
10280
|
-
'
|
10281
|
-
'
|
10282
|
-
'
|
10283
|
-
'
|
10428
|
+
'widget_marker.widget_is_new': 'Widget ist neu',
|
10429
|
+
'widget_marker.widget_is_edited': 'Widget wurde geändert',
|
10430
|
+
'widget_marker.widget_is_edited_and_dragged_here': 'Widget wurde geändert und hierher gezogen',
|
10431
|
+
'widget_marker.widget_is_edited_and_dragged_away': 'Widget wurde geändert und von hier weggezogen',
|
10432
|
+
'widget_marker.widget_is_deleted': 'Widget wurde gelöscht',
|
10433
|
+
'widget_marker.widget_is_dragged_here': 'Widget wurde hierher gezogen',
|
10434
|
+
'widget_marker.widget_is_dragged_away': 'Widget wurde von hier weggezogen',
|
10284
10435
|
|
10285
10436
|
'child_list_menu.description': 'Elemente von $1',
|
10286
10437
|
|
@@ -10310,12 +10461,14 @@ $.i18n().load({
|
|
10310
10461
|
'commands.revert_obj.rtc_workspace': 'Diese Seite ist Teil der "rtc"-Arbeitskopie, bei der Änderungen nicht verworfen werden können.',
|
10311
10462
|
'commands.revert_obj.new_obj': 'Dies ist eine neue Seite. Um die Erstellung dieser Seite rückgängig zu machen, löschen Sie sie bitte.',
|
10312
10463
|
'commands.revert_obj.not_modified_obj': 'Diese Seite wurde nicht geändert. Daher gibt es nichts zu verwerfen.',
|
10464
|
+
'commands.revert_obj.is_binary': 'Verwerfen von Änderungen ist nicht verfügbar für binäre Daten.',
|
10313
10465
|
'commands.revert_obj.dialog.title': 'Wirklich Änderungen an dieser Seite verwerfen?',
|
10314
10466
|
'commands.revert_obj.dialog.description': 'Verworfene Änderungen können nicht wiederhergestellt werden.',
|
10315
10467
|
'commands.revert_obj.dialog.confirm': 'Verwerfen',
|
10316
10468
|
|
10317
10469
|
'commands.restore_obj.title': 'Seite wiederherstellen',
|
10318
10470
|
'commands.restore_obj.rtc_workspace': 'Diese Seite ist Teil der "rtc"-Arbeitskopie, bei der gelöschte Seiten nicht wiederhergestellt werden können.',
|
10471
|
+
'commands.restore_obj.is_binary': 'Wiederherstellen ist nicht verfügbar für binäre Daten.',
|
10319
10472
|
|
10320
10473
|
'commands.mark_resolved_obj.title': 'Parallele Änderungen an der Seite überschreiben',
|
10321
10474
|
'commands.mark_resolved_obj.dialog.title': 'Wirklich parallele Änderungen an der Seite überschreiben?',
|
@@ -10342,6 +10495,8 @@ $.i18n().load({
|
|
10342
10495
|
|
10343
10496
|
'commands.add_widget.title': 'Widget einfügen',
|
10344
10497
|
|
10498
|
+
'obj_sorting_dialog.title': 'Elemente sortieren',
|
10499
|
+
|
10345
10500
|
'commands.widget_details.title': 'Widget-Eigenschaften',
|
10346
10501
|
'commands.widget_details.no_details_view': 'Dieses Widget hat keine Eigenschaften',
|
10347
10502
|
|
@@ -10362,6 +10517,12 @@ $.i18n().load({
|
|
10362
10517
|
'commands.switch_mode.deleted': 'Gelöscht',
|
10363
10518
|
'commands.switch_mode.disabled': 'Aktuell ausgewählter Anzeigemodus',
|
10364
10519
|
|
10520
|
+
'commands.publish_workspace.title': '"$1" veröffentlichen',
|
10521
|
+
'commands.publish_workspace.permission_denied': 'Die Arbeitskopie kann aufgrund fehlender Benutzerrechte nicht veröffentlicht werden.',
|
10522
|
+
'commands.publish_workspace.dialog.confirm': 'Veröffentlichen',
|
10523
|
+
'commands.publish_workspace.dialog.title': '"$1" veröffentlichen?',
|
10524
|
+
'commands.publish_workspace.dialog.description': 'Eine Arbeitskopie zu veröffentlichen ist endgültig. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
10525
|
+
|
10365
10526
|
'image_upload.too_many_files': 'Nur eine Datei erlaubt.',
|
10366
10527
|
|
10367
10528
|
'warn_before_unloading': 'Sie haben nicht gespeicherte Änderungen! Sind Sie sicher, dass sie schließen wollen?'
|
@@ -10377,7 +10538,6 @@ $.i18n().load({
|
|
10377
10538
|
'done': 'Done',
|
10378
10539
|
'loading': 'Loading...',
|
10379
10540
|
'current_page': 'current page',
|
10380
|
-
'resource': 'resource',
|
10381
10541
|
|
10382
10542
|
'obj.tooltip.is_new': 'This page is new.',
|
10383
10543
|
'obj.tooltip.is_edited': 'This page has been modified.',
|
@@ -10398,14 +10558,29 @@ $.i18n().load({
|
|
10398
10558
|
|
10399
10559
|
'details_dialog.title': 'Edit $1',
|
10400
10560
|
|
10561
|
+
'resource_dialog.title': 'resource',
|
10562
|
+
|
10563
|
+
'resource_dialog.commands.revert_obj.title': 'Discard changes to resource',
|
10564
|
+
'resource_dialog.commands.revert_obj.rtc_workspace': 'This resource is part of the "rtc" working copy, for which discarding changes is not supported.',
|
10565
|
+
'resource_dialog.commands.revert_obj.new_obj': 'This is a new resource. To discard the creation of this resource, please delete it.',
|
10566
|
+
'resource_dialog.commands.revert_obj.not_modified_obj': 'This resource has not been modified. Therefore, nothing can be discarded.',
|
10567
|
+
'resource_dialog.commands.revert_obj.dialog.title': 'Really discard changes to this resource?',
|
10568
|
+
|
10569
|
+
'resource_dialog.commands.restore_obj.title': 'Restore resource',
|
10570
|
+
'resource_dialog.commands.restore_obj.rtc_workspace': 'This resource is part of the "rtc" working copy, for which restoring resources is not supported.',
|
10571
|
+
|
10572
|
+
'resource_dialog.commands.mark_resolved_obj.title': 'Override concurrent changes to resource',
|
10573
|
+
'resource_dialog.commands.mark_resolved_obj.dialog.description': 'This resource was altered in a different working copy that has been published. Please confirm that you want to keep your changes and discard the ones concurrently made by others.',
|
10574
|
+
|
10575
|
+
'resource_dialog.commands.delete_obj.title': 'Delete resource',
|
10576
|
+
'resource_dialog.commands.delete_obj.dialog.title': 'Really delete this resource?',
|
10577
|
+
'resource_dialog.commands.delete_obj.dialog.description': 'Changes to a deleted resource cannot be restored.',
|
10578
|
+
|
10401
10579
|
'menu_bar.working_copy': 'Working copy',
|
10402
10580
|
'menu_bar.empty_workspace_title': '<empty title>',
|
10403
10581
|
'menu_bar.published_workspace_title': 'Published content',
|
10404
10582
|
'menu_bar.loading_workspaces': 'Loading working copies',
|
10405
10583
|
'menu_bar.select_working_copy': 'Select "$1"',
|
10406
|
-
'menu_bar.publish_working_copy': 'Publish "$1"',
|
10407
|
-
'menu_bar.publish_ws_confirmation': 'Publish "$1"?',
|
10408
|
-
'menu_bar.publish_ws_confirmation_desc': 'Publishing a working copy is final. This action cannot be undone.',
|
10409
10584
|
'menu_bar.rebase_working_copy': 'Update "$1"',
|
10410
10585
|
'menu_bar.rename_working_copy': 'Rename "$1"',
|
10411
10586
|
'menu_bar.rename_working_copy_desc': 'Please enter the new title of the working copy.',
|
@@ -10417,7 +10592,6 @@ $.i18n().load({
|
|
10417
10592
|
'menu_bar.create': 'Create',
|
10418
10593
|
'menu_bar.move': 'Move',
|
10419
10594
|
'menu_bar.copy': 'Copy',
|
10420
|
-
'menu_bar.publish': 'Publish',
|
10421
10595
|
'menu_bar.create_new_working_copy': 'Create working copy',
|
10422
10596
|
'menu_bar.create_new_ws_confirmation': 'Create a working copy',
|
10423
10597
|
'menu_bar.create_new_ws_confirmation_desc': 'Please enter the title of the new working copy.',
|
@@ -10426,13 +10600,13 @@ $.i18n().load({
|
|
10426
10600
|
'saving_indicator_item.saving': 'Saving...',
|
10427
10601
|
'saving_indicator_item.saved': 'Changes saved',
|
10428
10602
|
|
10429
|
-
'
|
10430
|
-
'
|
10431
|
-
'
|
10432
|
-
'
|
10433
|
-
'
|
10434
|
-
'
|
10435
|
-
'
|
10603
|
+
'widget_marker.widget_is_new': 'Widget is new',
|
10604
|
+
'widget_marker.widget_is_edited': 'Widget has been modified',
|
10605
|
+
'widget_marker.widget_is_edited_and_dragged_here': 'Widget has been modified and dragged here',
|
10606
|
+
'widget_marker.widget_is_edited_and_dragged_away': 'Widget has been modified and dragged away from here',
|
10607
|
+
'widget_marker.widget_is_deleted': 'Widget has been deleted',
|
10608
|
+
'widget_marker.widget_is_dragged_here': 'Widget has been dragged here',
|
10609
|
+
'widget_marker.widget_is_dragged_away': 'Widget has been dragged away from here',
|
10436
10610
|
|
10437
10611
|
'child_list_menu.description': 'Items of $1',
|
10438
10612
|
|
@@ -10461,6 +10635,7 @@ $.i18n().load({
|
|
10461
10635
|
'commands.revert_obj.published_workspace': 'Since this is the published content, nothing has been modified. Therefore, nothing can be discarded.',
|
10462
10636
|
'commands.revert_obj.rtc_workspace': 'This page is part of the "rtc" working copy, for which discarding changes is not supported.',
|
10463
10637
|
'commands.revert_obj.new_obj': 'This is a new page. To discard the creation of this page, please delete it.',
|
10638
|
+
'commands.revert_obj.is_binary': 'Discarding changes is not available for binary content.',
|
10464
10639
|
'commands.revert_obj.not_modified_obj': 'This page has not been modified. Therefore, nothing can be discarded.',
|
10465
10640
|
'commands.revert_obj.dialog.title': 'Really discard changes to this page?',
|
10466
10641
|
'commands.revert_obj.dialog.description': 'Discarded changes cannot be restored.',
|
@@ -10468,6 +10643,7 @@ $.i18n().load({
|
|
10468
10643
|
|
10469
10644
|
'commands.restore_obj.title': 'Restore page',
|
10470
10645
|
'commands.restore_obj.rtc_workspace': 'This page is part of the "rtc" working copy, for which restoring pages is not supported.',
|
10646
|
+
'commands.restore_obj.is_binary': 'Restoring ist not available for binary content.',
|
10471
10647
|
|
10472
10648
|
'commands.mark_resolved_obj.title': 'Override concurrent changes to page',
|
10473
10649
|
'commands.mark_resolved_obj.dialog.confirm': 'Override changes',
|
@@ -10492,6 +10668,8 @@ $.i18n().load({
|
|
10492
10668
|
'commands.sort_items.auto_sort': 'This navigation is sorted automatically.',
|
10493
10669
|
'commands.sort_items.too_less_children': 'This navigation cannot be sorted because it consists of less than two items.',
|
10494
10670
|
|
10671
|
+
'obj_sorting_dialog.title': 'Sort items',
|
10672
|
+
|
10495
10673
|
'commands.add_widget.title': 'Insert widget',
|
10496
10674
|
|
10497
10675
|
'commands.widget_details.title': 'Widget properties',
|
@@ -10514,6 +10692,12 @@ $.i18n().load({
|
|
10514
10692
|
'commands.switch_mode.deleted': 'Deletions',
|
10515
10693
|
'commands.switch_mode.disabled': 'Currently selected display mode',
|
10516
10694
|
|
10695
|
+
'commands.publish_workspace.title': 'Publish "$1"',
|
10696
|
+
'commands.publish_workspace.permission_denied': 'The working copy can not be published due to missing user permissions.',
|
10697
|
+
'commands.publish_workspace.dialog.confirm': 'Publish',
|
10698
|
+
'commands.publish_workspace.dialog.title': 'Publish "$1"?',
|
10699
|
+
'commands.publish_workspace.dialog.description': 'Publishing a working copy is final. This action cannot be undone.',
|
10700
|
+
|
10517
10701
|
'image_upload.too_many_files': 'Only one file allowed.',
|
10518
10702
|
|
10519
10703
|
'warn_before_unloading': 'You have unsaved changes. Are you sure you want to quit?',
|
@@ -10550,6 +10734,12 @@ var scrivito = {};
|
|
10550
10734
|
}
|
10551
10735
|
},
|
10552
10736
|
|
10737
|
+
log_error: function(message, exception) {
|
10738
|
+
if (window.console) {
|
10739
|
+
window.console.error(message, exception);
|
10740
|
+
}
|
10741
|
+
},
|
10742
|
+
|
10553
10743
|
change_location: function(location) {
|
10554
10744
|
// this is a proxy method, so we can stub it easier.
|
10555
10745
|
window.location = location;
|
@@ -10657,6 +10847,11 @@ var scrivito = {};
|
|
10657
10847
|
return hex;
|
10658
10848
|
},
|
10659
10849
|
|
10850
|
+
// 16 chars hex string
|
10851
|
+
random_id: function() {
|
10852
|
+
return scrivito.random_hex() + scrivito.random_hex();
|
10853
|
+
},
|
10854
|
+
|
10660
10855
|
deprecation_warning: function(subject, alternative) {
|
10661
10856
|
var message = 'DEPRECATION WARNING: "' + subject + '" is deprecated.';
|
10662
10857
|
|
@@ -10664,7 +10859,9 @@ var scrivito = {};
|
|
10664
10859
|
message += ' Please use "' + alternative + '" instead.';
|
10665
10860
|
}
|
10666
10861
|
|
10667
|
-
window.console
|
10862
|
+
if (window.console) {
|
10863
|
+
window.console.warn(message);
|
10864
|
+
}
|
10668
10865
|
},
|
10669
10866
|
|
10670
10867
|
on: function(event, callback) {
|
@@ -10744,21 +10941,29 @@ var scrivito = {};
|
|
10744
10941
|
scrivito.config = config;
|
10745
10942
|
|
10746
10943
|
scrivito.editing_context.init(config.editing_context);
|
10944
|
+
scrivito.user_permissions.init(config.user_permissions);
|
10747
10945
|
scrivito.i18n.init(config.i18n);
|
10748
10946
|
scrivito.obj.init(config.obj);
|
10749
|
-
scrivito.resource_dialog.init(config.
|
10947
|
+
scrivito.resource_dialog.init(config.resource_dialog);
|
10750
10948
|
|
10751
10949
|
scrivito.inplace_marker.init();
|
10752
10950
|
scrivito.menu_bar_saving_indicator.init();
|
10753
10951
|
scrivito.menu_bar_toggle.init();
|
10754
|
-
scrivito.
|
10952
|
+
scrivito.current_page_menu.init();
|
10755
10953
|
scrivito.workspace_select.init();
|
10756
10954
|
scrivito.menu_bar.init();
|
10757
|
-
|
10758
|
-
scrivito.
|
10759
|
-
scrivito.
|
10955
|
+
|
10956
|
+
scrivito.child_list_commands.init();
|
10957
|
+
scrivito.widget_commands.init();
|
10958
|
+
scrivito.widget_field_commands.init();
|
10959
|
+
|
10960
|
+
scrivito.child_list_marker.init();
|
10961
|
+
scrivito.widget_field_marker.init();
|
10962
|
+
scrivito.widget_marker.init();
|
10963
|
+
|
10964
|
+
scrivito.widget_reloading.init();
|
10965
|
+
scrivito.widget_sorting.init();
|
10760
10966
|
scrivito.image_upload.init();
|
10761
|
-
scrivito.child_list_menus.init();
|
10762
10967
|
scrivito.reloading.init();
|
10763
10968
|
|
10764
10969
|
window.onbeforeunload = scrivito.warn_before_unloading;
|
@@ -10820,68 +11025,93 @@ var scrivito = {};
|
|
10820
11025
|
}());
|
10821
11026
|
(function() {
|
10822
11027
|
var assert_valid_dom_element = function(dom_element) {
|
10823
|
-
if (dom_element.length
|
10824
|
-
|
10825
|
-
|
10826
|
-
|
10827
|
-
|
10828
|
-
}
|
11028
|
+
if (dom_element.length < 1) {
|
11029
|
+
$.error('Can not call "scrivito" method on an empty element');
|
11030
|
+
}
|
11031
|
+
if (dom_element.length > 1) {
|
11032
|
+
$.error('Can not call "scrivito" method on more than one tag');
|
10829
11033
|
}
|
10830
11034
|
};
|
10831
11035
|
|
10832
|
-
var
|
10833
|
-
var
|
10834
|
-
if (
|
10835
|
-
return
|
11036
|
+
var build_cms_element = function(dom_element) {
|
11037
|
+
var cms_element = scrivito.cms_element.from_dom_element(dom_element);
|
11038
|
+
if (cms_element) {
|
11039
|
+
return cms_element;
|
10836
11040
|
} else {
|
10837
11041
|
$.error('Can not call "scrivito" method on a non-cms tag');
|
10838
11042
|
}
|
10839
11043
|
};
|
10840
11044
|
|
10841
11045
|
var save_content = function(dom_element, content) {
|
10842
|
-
if (
|
10843
|
-
if (
|
10844
|
-
|
11046
|
+
if (dom_element.length > 0) {
|
11047
|
+
if (dom_element.length === 1) {
|
11048
|
+
if (content === undefined) {
|
11049
|
+
$.error('Can not call "save" with no content');
|
11050
|
+
} else {
|
11051
|
+
var cms_element = build_cms_element(dom_element);
|
11052
|
+
return cms_element.save(content).then(function() {
|
11053
|
+
cms_element.set_original_content(content);
|
11054
|
+
});
|
11055
|
+
}
|
10845
11056
|
} else {
|
10846
|
-
|
10847
|
-
return cms_field_element.save(content).then(function() {
|
10848
|
-
cms_field_element.set_original_content(content);
|
10849
|
-
});
|
11057
|
+
$.error('Can not call "scrivito" method on more than one tag');
|
10850
11058
|
}
|
10851
11059
|
}
|
10852
11060
|
};
|
10853
11061
|
|
10854
11062
|
var get_original_content = function(dom_element) {
|
10855
|
-
|
10856
|
-
|
10857
|
-
|
10858
|
-
|
10859
|
-
|
11063
|
+
assert_valid_dom_element(dom_element);
|
11064
|
+
return build_cms_element(dom_element).original_content();
|
11065
|
+
};
|
11066
|
+
|
11067
|
+
var get_menu = function(dom_element) {
|
11068
|
+
assert_valid_dom_element(dom_element);
|
11069
|
+
var cms_element = build_cms_element(dom_element);
|
11070
|
+
return {
|
11071
|
+
add: function(command_options) {
|
11072
|
+
var menu = cms_element.menu();
|
11073
|
+
menu.push(scrivito.command.create_instance(command_options));
|
11074
|
+
cms_element.set_menu(menu);
|
11075
|
+
}
|
11076
|
+
};
|
10860
11077
|
};
|
10861
11078
|
|
10862
11079
|
$.fn.scrivito = function(method, content) {
|
10863
|
-
|
10864
|
-
|
10865
|
-
|
10866
|
-
|
10867
|
-
|
10868
|
-
|
11080
|
+
switch (method) {
|
11081
|
+
case 'save':
|
11082
|
+
return save_content($(this), content);
|
11083
|
+
case 'content':
|
11084
|
+
return get_original_content($(this));
|
11085
|
+
case 'menu':
|
11086
|
+
return get_menu($(this));
|
11087
|
+
default:
|
11088
|
+
$.error('Unknown method "' + method + '"');
|
10869
11089
|
}
|
10870
11090
|
};
|
10871
11091
|
}());
|
10872
11092
|
(function() {
|
10873
11093
|
var callbacks = {};
|
10874
11094
|
|
11095
|
+
// The callback has to be function that takes no arguments
|
11096
|
+
var log_exception_in_callback = function(event_name, callback) {
|
11097
|
+
try {
|
11098
|
+
callback();
|
11099
|
+
} catch(exception) {
|
11100
|
+
var text = "'"+event_name+"' callback threw exception: ";
|
11101
|
+
scrivito.log_error(text, exception);
|
11102
|
+
}
|
11103
|
+
};
|
11104
|
+
|
10875
11105
|
var run_open_callbacks = function() {
|
10876
11106
|
if (callbacks.open) {
|
10877
11107
|
_.each(callbacks.open, function(callback) {
|
10878
|
-
callback
|
11108
|
+
log_exception_in_callback('open', callback);
|
10879
11109
|
});
|
10880
11110
|
}
|
10881
11111
|
|
10882
11112
|
if (scrivito.editing_context.is_editing_mode() && callbacks.editing) {
|
10883
11113
|
_.each(callbacks.editing, function(callback) {
|
10884
|
-
callback
|
11114
|
+
log_exception_in_callback('editing', callback);
|
10885
11115
|
});
|
10886
11116
|
}
|
10887
11117
|
};
|
@@ -10890,7 +11120,9 @@ var scrivito = {};
|
|
10890
11120
|
if (scrivito.editing_context.is_editing_mode() && callbacks.new_content) {
|
10891
11121
|
_.each(callbacks.new_content, function(callback) {
|
10892
11122
|
if (dom_element) {
|
10893
|
-
|
11123
|
+
log_exception_in_callback('new_content', function() {
|
11124
|
+
callback(dom_element);
|
11125
|
+
});
|
10894
11126
|
}
|
10895
11127
|
});
|
10896
11128
|
}
|
@@ -10898,7 +11130,9 @@ var scrivito = {};
|
|
10898
11130
|
if (callbacks.content) {
|
10899
11131
|
_.each(callbacks.content, function(callback) {
|
10900
11132
|
if (dom_element) {
|
10901
|
-
|
11133
|
+
log_exception_in_callback('content', function() {
|
11134
|
+
callback(dom_element);
|
11135
|
+
});
|
10902
11136
|
}
|
10903
11137
|
});
|
10904
11138
|
}
|
@@ -10908,7 +11142,7 @@ var scrivito = {};
|
|
10908
11142
|
gui: {
|
10909
11143
|
start: function() {
|
10910
11144
|
$('body').attr('data-scrivito-display-mode', scrivito.editing_context.display_mode);
|
10911
|
-
$('body').append('<div id="
|
11145
|
+
$('body').append('<div id="scrivito_editing"></div>');
|
10912
11146
|
run_open_callbacks();
|
10913
11147
|
},
|
10914
11148
|
|
@@ -11022,6 +11256,21 @@ var scrivito = {};
|
|
11022
11256
|
});
|
11023
11257
|
};
|
11024
11258
|
}());
|
11259
|
+
(function() {
|
11260
|
+
$.extend(scrivito, {
|
11261
|
+
user_permissions: {
|
11262
|
+
permissions_hash: {},
|
11263
|
+
|
11264
|
+
init: function(permissions_hash) {
|
11265
|
+
scrivito.user_permissions.permissions_hash = permissions_hash;
|
11266
|
+
},
|
11267
|
+
|
11268
|
+
can: function(permission_key) {
|
11269
|
+
return !!scrivito.user_permissions.permissions_hash[permission_key];
|
11270
|
+
}
|
11271
|
+
}
|
11272
|
+
});
|
11273
|
+
}());
|
11025
11274
|
(function() {
|
11026
11275
|
var handle_task = function(task) {
|
11027
11276
|
switch (task.status) {
|
@@ -11336,11 +11585,11 @@ var scrivito = {};
|
|
11336
11585
|
});
|
11337
11586
|
|
11338
11587
|
menu_bar_toggle.find('.scrivito_comparing_mode_toggle').on('click', function() {
|
11339
|
-
scrivito.
|
11588
|
+
scrivito.inline_menus.toggle($(this), [
|
11340
11589
|
scrivito.switch_mode_command('diff'),
|
11341
11590
|
scrivito.switch_mode_command('added'),
|
11342
11591
|
scrivito.switch_mode_command('deleted')
|
11343
|
-
],
|
11592
|
+
], 'left');
|
11344
11593
|
return false;
|
11345
11594
|
});
|
11346
11595
|
});
|
@@ -11350,44 +11599,35 @@ var scrivito = {};
|
|
11350
11599
|
}());
|
11351
11600
|
(function() {
|
11352
11601
|
$.extend(scrivito, {
|
11353
|
-
|
11602
|
+
obj_menu: {
|
11603
|
+
create: function(dom_element, obj, commands, options) {
|
11604
|
+
dom_element.append(scrivito.template.render('obj_menu', {obj: obj}));
|
11605
|
+
dom_element.on('click', function() {
|
11606
|
+
scrivito.inline_menus.toggle(dom_element, commands, options);
|
11607
|
+
return false;
|
11608
|
+
});
|
11609
|
+
}
|
11610
|
+
}
|
11611
|
+
});
|
11612
|
+
}());
|
11613
|
+
(function() {
|
11614
|
+
$.extend(scrivito, {
|
11615
|
+
current_page_menu: {
|
11354
11616
|
init: function() {
|
11355
|
-
scrivito.
|
11356
|
-
|
11357
|
-
|
11358
|
-
|
11359
|
-
|
11360
|
-
|
11361
|
-
|
11362
|
-
|
11363
|
-
|
11364
|
-
|
11365
|
-
|
11366
|
-
|
11367
|
-
|
11368
|
-
var view = scrivito.template.render('menu_bar_dropdown', {
|
11369
|
-
current_page: current_page,
|
11370
|
-
commands: commands
|
11371
|
-
});
|
11372
|
-
|
11373
|
-
var menu_bar_dropdown = menu_bar.find('#scrivito_menu_bar_dropdown').html(view);
|
11374
|
-
|
11375
|
-
if (current_page) {
|
11376
|
-
menu_bar_dropdown.attr('title', current_page.tooltip());
|
11377
|
-
}
|
11378
|
-
|
11379
|
-
menu_bar_dropdown.click(function() {
|
11380
|
-
menu_bar_dropdown.toggleClass('active');
|
11381
|
-
menu_bar_dropdown.find('.scrivito_menu_box').fadeToggle('50');
|
11382
|
-
return false;
|
11383
|
-
});
|
11384
|
-
|
11385
|
-
_.each(commands, function(command) {
|
11386
|
-
menu_bar_dropdown.find('#scrivito_' + command.id()).click(function() {
|
11387
|
-
return command.execute();
|
11388
|
-
});
|
11617
|
+
if (scrivito.obj.current_page) {
|
11618
|
+
scrivito.menu_bar.register_item_renderer(function(menu_bar) {
|
11619
|
+
var current_page = scrivito.obj.current_page;
|
11620
|
+
scrivito.obj_menu.create(menu_bar.find('#scrivito_current_page_menu'), current_page, [
|
11621
|
+
scrivito.obj_details_command(current_page),
|
11622
|
+
scrivito.save_obj_to_clipboard_command(current_page),
|
11623
|
+
scrivito.delete_obj_command(current_page),
|
11624
|
+
scrivito.revert_obj_command(current_page),
|
11625
|
+
scrivito.restore_obj_command(current_page),
|
11626
|
+
scrivito.mark_resolved_obj_command(current_page),
|
11627
|
+
scrivito.duplicate_obj_command(current_page)
|
11628
|
+
]);
|
11389
11629
|
});
|
11390
|
-
}
|
11630
|
+
}
|
11391
11631
|
}
|
11392
11632
|
}
|
11393
11633
|
});
|
@@ -11424,10 +11664,12 @@ var scrivito = {};
|
|
11424
11664
|
|
11425
11665
|
var renderer = function(view) {
|
11426
11666
|
var workspace = scrivito.editing_context.selected_workspace;
|
11667
|
+
|
11427
11668
|
var select_menu_view = $(scrivito.template.render('workspace_select_menu_bar_item', {
|
11428
11669
|
current_workspace: workspace,
|
11429
11670
|
current_short_title: workspace_title_short(workspace),
|
11430
|
-
current_long_title: workspace_title_long(workspace)
|
11671
|
+
current_long_title: workspace_title_long(workspace),
|
11672
|
+
publish_command: scrivito.publish_workspace_command(workspace)
|
11431
11673
|
}));
|
11432
11674
|
|
11433
11675
|
view.find('#scrivito_select_workspace').append(select_menu_view);
|
@@ -11436,10 +11678,10 @@ var scrivito = {};
|
|
11436
11678
|
var default_click_action = function(e) {
|
11437
11679
|
e.preventDefault();
|
11438
11680
|
e.stopPropagation();
|
11439
|
-
|
11681
|
+
scrivito.workspace_select.close_menu();
|
11440
11682
|
};
|
11441
11683
|
|
11442
|
-
$(document).on("click.
|
11684
|
+
$(document).on("click.scrivito_toggle_ws_select", "#scrivito_select_workspace", function(e) {
|
11443
11685
|
default_click_action(e);
|
11444
11686
|
|
11445
11687
|
var replace_with_real_ws = $('#scrivito_select_workspace #scrivito_replace_with_real_ws');
|
@@ -11478,10 +11720,11 @@ var scrivito = {};
|
|
11478
11720
|
}
|
11479
11721
|
});
|
11480
11722
|
|
11481
|
-
$(document).on("click.
|
11723
|
+
$(document).on("click.scrivito_create_ws", "#scrivito_create_new_ws", function(e) {
|
11482
11724
|
default_click_action(e);
|
11483
11725
|
scrivito.prompt_dialog({
|
11484
11726
|
icon: '',
|
11727
|
+
color: 'green',
|
11485
11728
|
title: t('menu_bar.create_new_ws_confirmation'),
|
11486
11729
|
description: t('menu_bar.create_new_ws_confirmation_desc'),
|
11487
11730
|
placeholder: t('menu_bar.create_new_ws_confirmation_placeholder'),
|
@@ -11500,28 +11743,18 @@ var scrivito = {};
|
|
11500
11743
|
});
|
11501
11744
|
});
|
11502
11745
|
|
11503
|
-
$(document).on("click.
|
11504
|
-
|
11505
|
-
|
11506
|
-
|
11507
|
-
|
11508
|
-
confirm_button_color: 'green',
|
11509
|
-
title: t('menu_bar.publish_ws_confirmation', workspace_title_short(
|
11510
|
-
scrivito.editing_context.selected_workspace)),
|
11511
|
-
description: t('menu_bar.publish_ws_confirmation_desc')
|
11512
|
-
}).done(function() {
|
11513
|
-
scrivito.with_saving_overlay(
|
11514
|
-
scrivito.editing_context.selected_workspace.publish().then(function() {
|
11515
|
-
return scrivito.redirect_to('?_scrivito_workspace_id=published');
|
11516
|
-
})
|
11517
|
-
);
|
11518
|
-
});
|
11746
|
+
$(document).on("click.scrivito_publish_ws", "#scrivito_publish_current_ws", function(e) {
|
11747
|
+
scrivito.publish_workspace_command(scrivito.editing_context.selected_workspace).
|
11748
|
+
execute();
|
11749
|
+
|
11750
|
+
return false;
|
11519
11751
|
});
|
11520
11752
|
|
11521
|
-
$(document).on("click.
|
11753
|
+
$(document).on("click.scrivito_rename_ws", "#scrivito_rename_current_ws", function(e) {
|
11522
11754
|
default_click_action(e);
|
11523
11755
|
scrivito.prompt_dialog({
|
11524
11756
|
icon: '',
|
11757
|
+
color: 'green',
|
11525
11758
|
title: t('menu_bar.rename_working_copy', scrivito.editing_context.selected_workspace.title()),
|
11526
11759
|
description: t('menu_bar.rename_working_copy_desc'),
|
11527
11760
|
value: scrivito.editing_context.selected_workspace.title(),
|
@@ -11536,7 +11769,7 @@ var scrivito = {};
|
|
11536
11769
|
});
|
11537
11770
|
});
|
11538
11771
|
|
11539
|
-
$(document).on("click.
|
11772
|
+
$(document).on("click.scrivito_rebase_ws", "#scrivito_rebase_current_ws", function(e) {
|
11540
11773
|
default_click_action(e);
|
11541
11774
|
scrivito.with_saving_overlay(
|
11542
11775
|
scrivito.editing_context.selected_workspace.rebase().then(function() {
|
@@ -11545,7 +11778,7 @@ var scrivito = {};
|
|
11545
11778
|
);
|
11546
11779
|
});
|
11547
11780
|
|
11548
|
-
$(document).on("click.
|
11781
|
+
$(document).on("click.scrivito_delete_ws", "#scrivito_delete_current_ws", function(e) {
|
11549
11782
|
default_click_action(e);
|
11550
11783
|
scrivito.confirmation_dialog({
|
11551
11784
|
color: 'red',
|
@@ -11573,6 +11806,9 @@ var scrivito = {};
|
|
11573
11806
|
workspace_select: {
|
11574
11807
|
init: function() {
|
11575
11808
|
scrivito.menu_bar.register_item_renderer(renderer);
|
11809
|
+
},
|
11810
|
+
close_menu: function() {
|
11811
|
+
$('#scrivito_select_workspace .scrivito_menu_box').fadeToggle('50');
|
11576
11812
|
}
|
11577
11813
|
}
|
11578
11814
|
});
|
@@ -11589,7 +11825,7 @@ var scrivito = {};
|
|
11589
11825
|
selected_workspace_title: scrivito.editing_context.selected_workspace.title()
|
11590
11826
|
}));
|
11591
11827
|
|
11592
|
-
$('#
|
11828
|
+
$('#scrivito_editing').append(view);
|
11593
11829
|
var next_loader = view.find('.scrivito_load_more');
|
11594
11830
|
|
11595
11831
|
target = view.find('#scrivito_changes_table_loaded');
|
@@ -11637,7 +11873,16 @@ var scrivito = {};
|
|
11637
11873
|
'data-scrivito-private-changes-list-obj-modification');
|
11638
11874
|
var obj_is_binary = element.attr('data-scrivito-private-changes-list-obj-is-binary');
|
11639
11875
|
|
11640
|
-
|
11876
|
+
if (can_use_resource_dialog_directly(obj_modification, obj_is_binary)) {
|
11877
|
+
var loaded_obj = _.find(loaded_objs, function(obj) {
|
11878
|
+
return obj.id === obj_id;
|
11879
|
+
});
|
11880
|
+
|
11881
|
+
scrivito.resource_dialog.open(scrivito.obj.create_instance(loaded_obj));
|
11882
|
+
} else {
|
11883
|
+
scrivito.changes_dialog.redirect_to_obj(obj_id, obj_modification, obj_is_binary);
|
11884
|
+
}
|
11885
|
+
|
11641
11886
|
return false;
|
11642
11887
|
});
|
11643
11888
|
});
|
@@ -11663,7 +11908,7 @@ var scrivito = {};
|
|
11663
11908
|
scrivito.dialog.adjust(view);
|
11664
11909
|
});
|
11665
11910
|
|
11666
|
-
return scrivito.with_dialog_behaviour(deferred, {escape: cancel});
|
11911
|
+
return scrivito.with_dialog_behaviour(view, deferred, {escape: cancel});
|
11667
11912
|
},
|
11668
11913
|
|
11669
11914
|
redirect_to_obj: function(obj_id, modification, is_binary) {
|
@@ -11698,13 +11943,20 @@ var scrivito = {};
|
|
11698
11943
|
var load_markup;
|
11699
11944
|
var loading_in_progress;
|
11700
11945
|
|
11946
|
+
var can_use_resource_dialog_directly = function(modification, is_binary) {
|
11947
|
+
return is_binary && (
|
11948
|
+
modification === 'edited' ||
|
11949
|
+
modification === 'deleted' && scrivito.editing_context.is_deleted_mode() ||
|
11950
|
+
modification === 'new' && !scrivito.editing_context.is_deleted_mode());
|
11951
|
+
};
|
11952
|
+
|
11701
11953
|
var basic_batch = function() {
|
11702
11954
|
return scrivito.
|
11703
11955
|
obj_where('_modification', 'equals', ['new', 'edited', 'deleted']).
|
11704
11956
|
batch_size(100).
|
11705
11957
|
order('_last_changed').
|
11706
11958
|
reverse_order().
|
11707
|
-
format('
|
11959
|
+
format('_default').
|
11708
11960
|
include_deleted();
|
11709
11961
|
};
|
11710
11962
|
|
@@ -11820,11 +12072,6 @@ var scrivito = {};
|
|
11820
12072
|
if (cms_element.dom_element().attr('data-scrivito-private-child-list-path')) {
|
11821
12073
|
var that = cms_element;
|
11822
12074
|
|
11823
|
-
var generate_path = function(){
|
11824
|
-
var name = scrivito.random_hex();
|
11825
|
-
return that.path() + '/' + name;
|
11826
|
-
};
|
11827
|
-
|
11828
12075
|
$.extend(that, {
|
11829
12076
|
path: function() {
|
11830
12077
|
return that.dom_element().attr('data-scrivito-private-child-list-path');
|
@@ -11849,19 +12096,17 @@ var scrivito = {};
|
|
11849
12096
|
},
|
11850
12097
|
|
11851
12098
|
create_child: function(obj_class) {
|
11852
|
-
var
|
11853
|
-
|
12099
|
+
var id = scrivito.random_id();
|
11854
12100
|
return scrivito.obj.create({
|
11855
|
-
|
12101
|
+
_id: id,
|
12102
|
+
_path: that.path() + '/' + id,
|
11856
12103
|
_obj_class: obj_class
|
11857
12104
|
});
|
11858
12105
|
},
|
11859
12106
|
|
11860
12107
|
add_child: function(child) {
|
11861
|
-
var path = generate_path();
|
11862
|
-
|
11863
12108
|
return child.save({
|
11864
|
-
_path: path
|
12109
|
+
_path: that.path() + '/' + child.id()
|
11865
12110
|
});
|
11866
12111
|
},
|
11867
12112
|
|
@@ -11901,10 +12146,9 @@ var scrivito = {};
|
|
11901
12146
|
return that;
|
11902
12147
|
}
|
11903
12148
|
},
|
11904
|
-
|
11905
|
-
|
11906
|
-
|
11907
|
-
});
|
12149
|
+
|
12150
|
+
all: function(root_element) {
|
12151
|
+
return scrivito.cms_element.all('[data-scrivito-private-child-list-path]', root_element);
|
11908
12152
|
}
|
11909
12153
|
}
|
11910
12154
|
});
|
@@ -11955,7 +12199,14 @@ $(function() {
|
|
11955
12199
|
return instance;
|
11956
12200
|
},
|
11957
12201
|
|
11958
|
-
definitions: []
|
12202
|
+
definitions: [],
|
12203
|
+
|
12204
|
+
all: function(selector, root_element) {
|
12205
|
+
var dom_elements = (root_element || $('body')).find(selector).addBack(selector);
|
12206
|
+
return _.map(dom_elements, function(dom_element) {
|
12207
|
+
return scrivito.cms_element.from_dom_element($(dom_element));
|
12208
|
+
});
|
12209
|
+
}
|
11959
12210
|
}
|
11960
12211
|
});
|
11961
12212
|
}());
|
@@ -12273,6 +12524,11 @@ $(function() {
|
|
12273
12524
|
return scrivito.ajax('DELETE', 'objs/' + that.id());
|
12274
12525
|
},
|
12275
12526
|
|
12527
|
+
destroy_widget: function(widget_id) {
|
12528
|
+
return scrivito.ajax('PUT',
|
12529
|
+
'objs/' + that.id() + '/destroy_widget?widget_id=' + widget_id);
|
12530
|
+
},
|
12531
|
+
|
12276
12532
|
revert: function() {
|
12277
12533
|
return scrivito.ajax('PUT', 'objs/' + that.id() + '/revert');
|
12278
12534
|
},
|
@@ -12513,6 +12769,7 @@ $(function() {
|
|
12513
12769
|
var field_types = [
|
12514
12770
|
'binary',
|
12515
12771
|
'enum',
|
12772
|
+
'link',
|
12516
12773
|
'linklist',
|
12517
12774
|
'multienum',
|
12518
12775
|
'reference',
|
@@ -12602,7 +12859,7 @@ $(function() {
|
|
12602
12859
|
},
|
12603
12860
|
|
12604
12861
|
destroy: function() {
|
12605
|
-
return that.obj().
|
12862
|
+
return that.obj().destroy_widget(that.id());
|
12606
12863
|
},
|
12607
12864
|
|
12608
12865
|
fetch_details_markup: function() {
|
@@ -12678,6 +12935,10 @@ $(function() {
|
|
12678
12935
|
|
12679
12936
|
return that;
|
12680
12937
|
}
|
12938
|
+
},
|
12939
|
+
|
12940
|
+
all: function(root_element) {
|
12941
|
+
return scrivito.cms_element.all('[data-scrivito-private-widget-id]', root_element);
|
12681
12942
|
}
|
12682
12943
|
}
|
12683
12944
|
});
|
@@ -12707,6 +12968,10 @@ $(function() {
|
|
12707
12968
|
return widget_elements;
|
12708
12969
|
},
|
12709
12970
|
|
12971
|
+
is_empty: function() {
|
12972
|
+
return that.widget_elements().length === 0;
|
12973
|
+
},
|
12974
|
+
|
12710
12975
|
create_widget: function(widget_class, widget_element) {
|
12711
12976
|
var widget_spec = {create: {_obj_class: widget_class}};
|
12712
12977
|
return add_widget(widget_spec, widget_element);
|
@@ -12776,10 +13041,8 @@ $(function() {
|
|
12776
13041
|
}
|
12777
13042
|
},
|
12778
13043
|
|
12779
|
-
all: function() {
|
12780
|
-
return
|
12781
|
-
return scrivito.cms_element.from_dom_element($(dom_element));
|
12782
|
-
});
|
13044
|
+
all: function(root_element) {
|
13045
|
+
return scrivito.cms_element.all('[data-scrivito-field-type="widget"]', root_element);
|
12783
13046
|
}
|
12784
13047
|
}
|
12785
13048
|
});
|
@@ -12931,13 +13194,13 @@ $(function() {
|
|
12931
13194
|
var target_height_for = function(elem, dont_store_height) {
|
12932
13195
|
var parent = elem.parent();
|
12933
13196
|
var heightOfParent = parent.innerHeight();
|
12934
|
-
if (!dont_store_height) { parent.data("
|
13197
|
+
if (!dont_store_height) { parent.data("scrivito_last_inner_height", heightOfParent); }
|
12935
13198
|
var heightOfAllSiblings = _(relevant_siblings_for(elem))
|
12936
13199
|
.chain()
|
12937
13200
|
.map($)
|
12938
13201
|
.reduce(function(sum, sibling) {
|
12939
13202
|
var height = sibling.outerHeight(true);
|
12940
|
-
if (!dont_store_height) { sibling.data("
|
13203
|
+
if (!dont_store_height) { sibling.data("scrivito_last_outer_height", height); }
|
12941
13204
|
return sum + height;
|
12942
13205
|
}, 0).value()
|
12943
13206
|
;
|
@@ -12952,7 +13215,7 @@ $(function() {
|
|
12952
13215
|
var sibling_height_changes = function(elem) {
|
12953
13216
|
return _(relevant_siblings_for(elem)).map(function(sibling) {
|
12954
13217
|
sibling = $(sibling);
|
12955
|
-
var last = sibling.data("
|
13218
|
+
var last = sibling.data("scrivito_last_outer_height");
|
12956
13219
|
var actual = sibling.outerHeight(true);
|
12957
13220
|
if (last !== actual) {
|
12958
13221
|
return scrivito.describe_element(sibling) +
|
@@ -12964,7 +13227,7 @@ $(function() {
|
|
12964
13227
|
|
12965
13228
|
var parent_height_changes = function(elem) {
|
12966
13229
|
var parent = elem.parent();
|
12967
|
-
var last = parent.data("
|
13230
|
+
var last = parent.data("scrivito_last_inner_height");
|
12968
13231
|
var actual = parent.innerHeight();
|
12969
13232
|
if (last !== actual) {
|
12970
13233
|
return scrivito.describe_element(parent) +
|
@@ -13055,43 +13318,43 @@ $(function() {
|
|
13055
13318
|
});
|
13056
13319
|
}());
|
13057
13320
|
(function() {
|
13058
|
-
var view;
|
13059
|
-
|
13060
13321
|
$.extend(scrivito, {
|
13061
|
-
|
13062
|
-
scrivito.
|
13322
|
+
with_dialog_overlay: function(dom_element, promise) {
|
13323
|
+
var overlay = scrivito.dialog_overlay.create(dom_element);
|
13063
13324
|
return promise.always(function() {
|
13064
|
-
scrivito.
|
13325
|
+
scrivito.dialog_overlay.destroy(overlay);
|
13065
13326
|
});
|
13066
13327
|
},
|
13067
13328
|
|
13068
|
-
|
13069
|
-
|
13070
|
-
|
13071
|
-
view = $(scrivito.template.render('overlay'));
|
13072
|
-
$('#ip-editing').append(view);
|
13073
|
-
}
|
13329
|
+
dialog_overlay: {
|
13330
|
+
create: function(dom_element) {
|
13331
|
+
$('.scrivito_overlay').removeClass('scrivito_show');
|
13074
13332
|
|
13075
|
-
scrivito.
|
13076
|
-
|
13333
|
+
var overlay = $(scrivito.template.render('overlay'));
|
13334
|
+
dom_element.before(overlay);
|
13335
|
+
|
13336
|
+
scrivito.transition(overlay, function() {
|
13337
|
+
overlay.addClass('scrivito_show');
|
13077
13338
|
});
|
13339
|
+
|
13340
|
+
return overlay;
|
13078
13341
|
},
|
13079
13342
|
|
13080
|
-
|
13081
|
-
|
13082
|
-
|
13083
|
-
|
13084
|
-
|
13085
|
-
|
13086
|
-
|
13087
|
-
|
13088
|
-
|
13343
|
+
destroy: function(overlay) {
|
13344
|
+
scrivito.transition(overlay, function() {
|
13345
|
+
overlay.removeClass('scrivito_show');
|
13346
|
+
}).then(function() {
|
13347
|
+
overlay.remove();
|
13348
|
+
var last_overlay = $('.scrivito_overlay').last();
|
13349
|
+
if (last_overlay.length) {
|
13350
|
+
last_overlay.addClass('scrivito_show');
|
13351
|
+
}
|
13352
|
+
});
|
13089
13353
|
},
|
13090
13354
|
|
13091
13355
|
// Test purpose only.
|
13092
13356
|
remove_all: function() {
|
13093
13357
|
$('.scrivito_overlay').remove();
|
13094
|
-
view = null;
|
13095
13358
|
}
|
13096
13359
|
}
|
13097
13360
|
});
|
@@ -13111,7 +13374,7 @@ $(function() {
|
|
13111
13374
|
show: function() {
|
13112
13375
|
if (!view) {
|
13113
13376
|
view = $(scrivito.template.render('saving_overlay'));
|
13114
|
-
$('#
|
13377
|
+
$('#scrivito_editing').append(view);
|
13115
13378
|
}
|
13116
13379
|
|
13117
13380
|
scrivito.transition(view, function() {
|
@@ -13227,7 +13490,7 @@ $(function() {
|
|
13227
13490
|
confirm_button_text: scrivito.i18n.translate('confirm')
|
13228
13491
|
}, options || {})));
|
13229
13492
|
|
13230
|
-
$('#
|
13493
|
+
$('#scrivito_editing').append(view);
|
13231
13494
|
|
13232
13495
|
var deferred = $.Deferred();
|
13233
13496
|
|
@@ -13261,7 +13524,7 @@ $(function() {
|
|
13261
13524
|
scrivito.center(view);
|
13262
13525
|
});
|
13263
13526
|
|
13264
|
-
return scrivito.with_dialog_behaviour(deferred, {enter: accept, escape: cancel});
|
13527
|
+
return scrivito.with_dialog_behaviour(view, deferred, {enter: accept, escape: cancel});
|
13265
13528
|
},
|
13266
13529
|
|
13267
13530
|
// Test purpose only.
|
@@ -13285,7 +13548,7 @@ $(function() {
|
|
13285
13548
|
cancel_button_text: scrivito.i18n.translate('cancel')
|
13286
13549
|
}, options || {})));
|
13287
13550
|
|
13288
|
-
$('#
|
13551
|
+
$('#scrivito_editing').append(view);
|
13289
13552
|
|
13290
13553
|
var deferred = $.Deferred();
|
13291
13554
|
|
@@ -13323,7 +13586,7 @@ $(function() {
|
|
13323
13586
|
scrivito.center(view);
|
13324
13587
|
});
|
13325
13588
|
|
13326
|
-
return scrivito.with_dialog_behaviour(deferred, {enter: accept, escape: cancel});
|
13589
|
+
return scrivito.with_dialog_behaviour(view, deferred, {enter: accept, escape: cancel});
|
13327
13590
|
}
|
13328
13591
|
});
|
13329
13592
|
}());
|
@@ -13398,7 +13661,7 @@ $(function() {
|
|
13398
13661
|
});
|
13399
13662
|
});
|
13400
13663
|
|
13401
|
-
$('#
|
13664
|
+
$('#scrivito_editing').append(view);
|
13402
13665
|
|
13403
13666
|
var cancel_action = function(e) {
|
13404
13667
|
e.preventDefault();
|
@@ -13414,20 +13677,24 @@ $(function() {
|
|
13414
13677
|
|
13415
13678
|
scrivito.dialog.adjust(view);
|
13416
13679
|
|
13417
|
-
return scrivito.with_dialog_behaviour(deferred, {escape: cancel_action});
|
13680
|
+
return scrivito.with_dialog_behaviour(view, deferred, {escape: cancel_action});
|
13418
13681
|
}
|
13419
13682
|
});
|
13420
13683
|
}());
|
13421
13684
|
(function() {
|
13422
13685
|
$.extend(scrivito, {
|
13423
13686
|
details_dialog: {
|
13424
|
-
open: function(
|
13687
|
+
open: function(options) {
|
13425
13688
|
var deferred = $.Deferred();
|
13426
13689
|
|
13427
13690
|
var view = $(scrivito.template.render('details_dialog',
|
13428
|
-
{icon:
|
13691
|
+
$.extend({icon: ''}, options || {})));
|
13692
|
+
|
13693
|
+
if (options.obj) {
|
13694
|
+
scrivito.obj_menu.create(view.find('.scrivito_obj_menu'), options.obj, options.commands);
|
13695
|
+
}
|
13429
13696
|
|
13430
|
-
$('#
|
13697
|
+
$('#scrivito_editing').append(view);
|
13431
13698
|
|
13432
13699
|
var saving_indicator = scrivito.saving_indicator.create(
|
13433
13700
|
view.find('.scrivito_details_dialog_saving_indicator'));
|
@@ -13439,7 +13706,7 @@ $(function() {
|
|
13439
13706
|
target.hide();
|
13440
13707
|
spinner.show();
|
13441
13708
|
|
13442
|
-
fetch_markup().then(function(markup) {
|
13709
|
+
options.fetch_markup().then(function(markup) {
|
13443
13710
|
target.html(markup);
|
13444
13711
|
|
13445
13712
|
var size_attr = 'data-scrivito-modal-size';
|
@@ -13476,9 +13743,9 @@ $(function() {
|
|
13476
13743
|
};
|
13477
13744
|
|
13478
13745
|
var cancel = function(e) {
|
13479
|
-
e.preventDefault();
|
13480
13746
|
saving_indicator.destroy();
|
13481
13747
|
close();
|
13748
|
+
return false;
|
13482
13749
|
};
|
13483
13750
|
|
13484
13751
|
view.find('.scrivito_cancel').on('click', cancel);
|
@@ -13489,7 +13756,7 @@ $(function() {
|
|
13489
13756
|
scrivito.dialog.adjust(view);
|
13490
13757
|
});
|
13491
13758
|
|
13492
|
-
return scrivito.with_dialog_behaviour(deferred, {escape: cancel});
|
13759
|
+
return scrivito.with_dialog_behaviour(view, deferred, {escape: cancel});
|
13493
13760
|
}
|
13494
13761
|
}
|
13495
13762
|
});
|
@@ -13497,21 +13764,27 @@ $(function() {
|
|
13497
13764
|
(function() {
|
13498
13765
|
$.extend(scrivito, {
|
13499
13766
|
menus: {
|
13500
|
-
open: function(dom_element, commands
|
13501
|
-
scrivito.
|
13767
|
+
open: function(dom_element, commands) {
|
13768
|
+
scrivito.close_all_menus();
|
13502
13769
|
|
13503
|
-
var menu = $(scrivito.template.render('menu', {
|
13504
|
-
|
13505
|
-
options: $.extend({align: 'right'}, options || {})
|
13506
|
-
}));
|
13770
|
+
var menu = $(scrivito.template.render('menu', {commands: commands}));
|
13771
|
+
dom_element.data('scrivito-private-menu', menu);
|
13507
13772
|
|
13508
|
-
menu.data('scrivito-
|
13509
|
-
|
13773
|
+
menu.data('scrivito-menu-close', function() {
|
13774
|
+
dom_element.removeData('scrivito-private-menu');
|
13775
|
+
menu.fadeOut(500, function() {
|
13776
|
+
menu.remove();
|
13777
|
+
});
|
13778
|
+
});
|
13779
|
+
|
13780
|
+
menu.data('scrivito-menu-update-position', function() {
|
13781
|
+
menu.offset(dom_element.offset());
|
13782
|
+
});
|
13510
13783
|
|
13511
13784
|
_.each(commands, function(command) {
|
13512
|
-
menu.find('.
|
13785
|
+
menu.find('.scrivito_' + command.id()).on('click', function() {
|
13513
13786
|
if (command.is_enabled()) {
|
13514
|
-
|
13787
|
+
menu.data('scrivito-menu-close')();
|
13515
13788
|
}
|
13516
13789
|
command.execute();
|
13517
13790
|
return false;
|
@@ -13519,54 +13792,86 @@ $(function() {
|
|
13519
13792
|
});
|
13520
13793
|
|
13521
13794
|
menu.appendTo($('body'));
|
13522
|
-
menu.
|
13795
|
+
menu.data('scrivito-menu-update-position')(); // Bugfix IE: can't set offset before append.
|
13523
13796
|
menu.find('.scrivito_menu_box').fadeIn(500);
|
13524
13797
|
},
|
13525
13798
|
|
13526
|
-
toggle: function(dom_element, commands
|
13527
|
-
var menu = dom_element.data('scrivito-private-
|
13799
|
+
toggle: function(dom_element, commands) {
|
13800
|
+
var menu = dom_element.data('scrivito-private-menu');
|
13528
13801
|
if (menu) {
|
13529
|
-
|
13802
|
+
menu.data('scrivito-menu-close')();
|
13530
13803
|
} else {
|
13531
|
-
scrivito.menus.open(dom_element, commands
|
13804
|
+
scrivito.menus.open(dom_element, commands);
|
13532
13805
|
}
|
13533
13806
|
},
|
13534
13807
|
|
13535
|
-
|
13536
|
-
|
13537
|
-
|
13538
|
-
|
13539
|
-
|
13540
|
-
|
13541
|
-
refresh_positions: function() {
|
13542
|
-
each_menu(function(menu) {
|
13543
|
-
menu.offset(menu.data('scrivito-private-menus-target').offset());
|
13808
|
+
update_positions: function() {
|
13809
|
+
_.each($('.scrivito_editing_marker_menu'), function(menu) {
|
13810
|
+
var update_position = $(menu).data('scrivito-menu-update-position');
|
13811
|
+
if (update_position) {
|
13812
|
+
update_position();
|
13813
|
+
}
|
13544
13814
|
});
|
13545
13815
|
}
|
13546
13816
|
}
|
13547
13817
|
});
|
13548
|
-
|
13549
|
-
var each_menu = function(callback) {
|
13550
|
-
_.each($('.scrivito_editing_marker_menu'), function(menu) {
|
13551
|
-
callback($(menu));
|
13552
|
-
});
|
13553
|
-
};
|
13554
|
-
|
13555
|
-
var close = function(menu) {
|
13556
|
-
menu.data('scrivito-private-menus-target').removeData('scrivito-private-menus-menu');
|
13557
|
-
menu.fadeOut(500, function() {
|
13558
|
-
menu.remove();
|
13559
|
-
});
|
13560
|
-
};
|
13561
13818
|
}());
|
13562
13819
|
|
13563
13820
|
$(window).on('resize', function() {
|
13564
|
-
scrivito.menus.
|
13821
|
+
scrivito.menus.update_positions();
|
13565
13822
|
});
|
13566
13823
|
|
13567
13824
|
$(window).on('load', function() {
|
13568
|
-
scrivito.menus.
|
13825
|
+
scrivito.menus.update_positions();
|
13569
13826
|
});
|
13827
|
+
(function() {
|
13828
|
+
$.extend(scrivito, {
|
13829
|
+
inline_menus: {
|
13830
|
+
toggle: function(dom_element, commands, align) {
|
13831
|
+
var menu = dom_element.find('.scrivito_editing_marker_menu');
|
13832
|
+
if (menu.length) {
|
13833
|
+
menu.data('scrivito-menu-close')();
|
13834
|
+
} else {
|
13835
|
+
open(dom_element, commands, align);
|
13836
|
+
}
|
13837
|
+
}
|
13838
|
+
}
|
13839
|
+
});
|
13840
|
+
|
13841
|
+
var open = function(dom_element, commands, align) {
|
13842
|
+
scrivito.close_all_menus();
|
13843
|
+
|
13844
|
+
var menu = $(scrivito.template.render('menu', {commands: commands, align: align}));
|
13845
|
+
|
13846
|
+
menu.data('scrivito-menu-close', function() {
|
13847
|
+
menu.find('.scrivito_menu_box').fadeOut(500, function() {
|
13848
|
+
menu.remove();
|
13849
|
+
});
|
13850
|
+
});
|
13851
|
+
|
13852
|
+
_.each(commands, function(command) {
|
13853
|
+
menu.find('.scrivito_menu_item.scrivito_' + command.id()).on('click', function() {
|
13854
|
+
if (command.is_enabled()) {
|
13855
|
+
menu.data('scrivito-menu-close')();
|
13856
|
+
}
|
13857
|
+
command.execute();
|
13858
|
+
return false;
|
13859
|
+
});
|
13860
|
+
});
|
13861
|
+
|
13862
|
+
menu.appendTo(dom_element);
|
13863
|
+
menu.find('.scrivito_menu_box').fadeIn(500);
|
13864
|
+
};
|
13865
|
+
}());
|
13866
|
+
(function() {
|
13867
|
+
$.extend(scrivito, {
|
13868
|
+
close_all_menus: function() {
|
13869
|
+
_.each($('.scrivito_editing_marker_menu'), function(menu) {
|
13870
|
+
$(menu).data('scrivito-menu-close')();
|
13871
|
+
});
|
13872
|
+
}
|
13873
|
+
});
|
13874
|
+
}());
|
13570
13875
|
(function() {
|
13571
13876
|
var callbacks = [];
|
13572
13877
|
|
@@ -13593,7 +13898,7 @@ $(window).on('load', function() {
|
|
13593
13898
|
callback(builder);
|
13594
13899
|
});
|
13595
13900
|
|
13596
|
-
scrivito.menus.
|
13901
|
+
scrivito.menus.update_positions();
|
13597
13902
|
}
|
13598
13903
|
},
|
13599
13904
|
|
@@ -13634,29 +13939,30 @@ $(window).on('load', function() {
|
|
13634
13939
|
$.extend(scrivito, {
|
13635
13940
|
resource_dialog: {
|
13636
13941
|
init: function(config) {
|
13637
|
-
if (config) {
|
13942
|
+
if (config.obj) {
|
13943
|
+
var obj = scrivito.obj.create_instance(config.obj);
|
13638
13944
|
scrivito.gui.on('open', function() {
|
13639
|
-
scrivito.resource_dialog.
|
13945
|
+
scrivito.resource_dialog.open(obj).done(function() {
|
13946
|
+
return scrivito.redirect_to(config.return_to);
|
13947
|
+
});
|
13640
13948
|
});
|
13641
13949
|
}
|
13642
13950
|
},
|
13643
13951
|
|
13644
|
-
open: function(
|
13645
|
-
|
13646
|
-
|
13647
|
-
|
13648
|
-
|
13649
|
-
|
13650
|
-
|
13651
|
-
|
13652
|
-
|
13653
|
-
|
13654
|
-
|
13655
|
-
|
13656
|
-
|
13657
|
-
|
13658
|
-
scrivito.resource_dialog.open(obj_id).done(function() {
|
13659
|
-
return scrivito.redirect_to(redirect_to);
|
13952
|
+
open: function(obj) {
|
13953
|
+
return scrivito.details_dialog.open({
|
13954
|
+
title: scrivito.i18n.translate('resource_dialog.title'),
|
13955
|
+
icon: '',
|
13956
|
+
fetch_markup: function() {
|
13957
|
+
return obj.fetch_details_markup();
|
13958
|
+
},
|
13959
|
+
obj: obj,
|
13960
|
+
commands: [
|
13961
|
+
scrivito.revert_obj_command(obj, 'resource_dialog.commands.revert_obj'),
|
13962
|
+
scrivito.restore_obj_command(obj, 'resource_dialog.commands.restore_obj'),
|
13963
|
+
scrivito.mark_resolved_obj_command(obj, 'resource_dialog.commands.mark_resolved_obj'),
|
13964
|
+
scrivito.delete_obj_command(obj, 'resource_dialog.commands.delete_obj')
|
13965
|
+
]
|
13660
13966
|
});
|
13661
13967
|
}
|
13662
13968
|
}
|
@@ -13805,10 +14111,14 @@ $(window).on('load', function() {
|
|
13805
14111
|
}());
|
13806
14112
|
(function() {
|
13807
14113
|
$.extend(scrivito, {
|
13808
|
-
delete_obj_command: function(obj) {
|
14114
|
+
delete_obj_command: function(obj, translations_namespace) {
|
14115
|
+
if (!translations_namespace) {
|
14116
|
+
translations_namespace = 'commands.delete_obj';
|
14117
|
+
}
|
14118
|
+
|
13809
14119
|
return scrivito.command.create_instance({
|
13810
14120
|
id: 'delete_obj',
|
13811
|
-
title: scrivito.i18n.translate('
|
14121
|
+
title: scrivito.i18n.translate(translations_namespace + '.title'),
|
13812
14122
|
icon: '',
|
13813
14123
|
|
13814
14124
|
present: function() {
|
@@ -13826,8 +14136,8 @@ $(window).on('load', function() {
|
|
13826
14136
|
|
13827
14137
|
execute: function() {
|
13828
14138
|
return scrivito.confirmation_dialog({
|
13829
|
-
title: scrivito.i18n.translate('
|
13830
|
-
description: scrivito.i18n.translate('
|
14139
|
+
title: scrivito.i18n.translate(translations_namespace + '.dialog.title'),
|
14140
|
+
description: scrivito.i18n.translate(translations_namespace + '.dialog.description'),
|
13831
14141
|
icon: '',
|
13832
14142
|
color: 'red',
|
13833
14143
|
confirm_button_text: scrivito.i18n.translate('commands.delete_obj.dialog.confirm'),
|
@@ -13876,13 +14186,11 @@ $(window).on('load', function() {
|
|
13876
14186
|
|
13877
14187
|
scrivito.widget_sorting.update_placeholder(widget_field_element);
|
13878
14188
|
|
13879
|
-
return
|
13880
|
-
|
13881
|
-
|
13882
|
-
|
13883
|
-
|
13884
|
-
}
|
13885
|
-
});
|
14189
|
+
return widget.destroy().then(function() {
|
14190
|
+
if (scrivito.widget_clipboard.is_present() &&
|
14191
|
+
scrivito.widget_clipboard.widget().id() === widget.id()) {
|
14192
|
+
scrivito.widget_clipboard.clear();
|
14193
|
+
}
|
13886
14194
|
});
|
13887
14195
|
});
|
13888
14196
|
}
|
@@ -13922,10 +14230,14 @@ $(window).on('load', function() {
|
|
13922
14230
|
}());
|
13923
14231
|
(function() {
|
13924
14232
|
$.extend(scrivito, {
|
13925
|
-
mark_resolved_obj_command: function(obj) {
|
14233
|
+
mark_resolved_obj_command: function(obj, translations_namespace) {
|
14234
|
+
if (!translations_namespace) {
|
14235
|
+
translations_namespace = 'commands.mark_resolved_obj';
|
14236
|
+
}
|
14237
|
+
|
13926
14238
|
return scrivito.command.create_instance({
|
13927
14239
|
id: 'mark_resolved_obj',
|
13928
|
-
title: scrivito.i18n.translate('
|
14240
|
+
title: scrivito.i18n.translate(translations_namespace + '.title'),
|
13929
14241
|
icon: '',
|
13930
14242
|
|
13931
14243
|
present: function() {
|
@@ -13935,7 +14247,7 @@ $(window).on('load', function() {
|
|
13935
14247
|
execute: function() {
|
13936
14248
|
return scrivito.confirmation_dialog({
|
13937
14249
|
title: scrivito.i18n.translate('commands.mark_resolved_obj.dialog.title'),
|
13938
|
-
description: scrivito.i18n.translate('
|
14250
|
+
description: scrivito.i18n.translate(translations_namespace + '.dialog.description'),
|
13939
14251
|
icon: '',
|
13940
14252
|
color: 'red',
|
13941
14253
|
confirm_button_text: scrivito.i18n.translate('commands.mark_resolved_obj.dialog.confirm'),
|
@@ -13994,13 +14306,14 @@ $(window).on('load', function() {
|
|
13994
14306
|
},
|
13995
14307
|
|
13996
14308
|
execute: function() {
|
13997
|
-
var title = scrivito.i18n.translate('current_page');
|
13998
|
-
var fetch_markup = function() {
|
13999
|
-
return obj.fetch_details_markup();
|
14000
|
-
};
|
14001
|
-
|
14002
14309
|
return scrivito.write_monitor.track_changes(function() {
|
14003
|
-
return scrivito.details_dialog.open(
|
14310
|
+
return scrivito.details_dialog.open({
|
14311
|
+
title: scrivito.i18n.translate('current_page'),
|
14312
|
+
icon: '',
|
14313
|
+
fetch_markup: function() {
|
14314
|
+
return obj.fetch_details_markup();
|
14315
|
+
}
|
14316
|
+
});
|
14004
14317
|
}, function() {
|
14005
14318
|
return scrivito.with_saving_overlay(scrivito.reload());
|
14006
14319
|
});
|
@@ -14011,10 +14324,56 @@ $(window).on('load', function() {
|
|
14011
14324
|
}());
|
14012
14325
|
(function() {
|
14013
14326
|
$.extend(scrivito, {
|
14014
|
-
|
14327
|
+
publish_workspace_command: function(workspace) {
|
14328
|
+
var t = scrivito.i18n.translate;
|
14329
|
+
var workspace_title = workspace.title() ||
|
14330
|
+
t('menu_bar.empty_workspace_title');
|
14331
|
+
|
14332
|
+
return scrivito.command.create_instance({
|
14333
|
+
id: 'scrivito_publish_current_ws',
|
14334
|
+
title: t('commands.publish_workspace.title', workspace_title),
|
14335
|
+
icon: '',
|
14336
|
+
tooltip: t('commands.publish_workspace.title', workspace_title),
|
14337
|
+
disabled: function() {
|
14338
|
+
if (!scrivito.user_permissions.can("publish_workspace")) {
|
14339
|
+
return t('commands.publish_workspace.permission_denied');
|
14340
|
+
}
|
14341
|
+
},
|
14342
|
+
execute: function() {
|
14343
|
+
if (scrivito.user_permissions.can("publish_workspace")) {
|
14344
|
+
scrivito.workspace_select.close_menu();
|
14345
|
+
|
14346
|
+
scrivito.confirmation_dialog({
|
14347
|
+
icon: '',
|
14348
|
+
color: 'green',
|
14349
|
+
confirm_button_text: t('commands.publish_workspace.dialog.confirm'),
|
14350
|
+
confirm_button_color: 'green',
|
14351
|
+
title: t('commands.publish_workspace.dialog.title', workspace_title),
|
14352
|
+
description: t('commands.publish_workspace.dialog.description')
|
14353
|
+
}).done(function() {
|
14354
|
+
scrivito.with_saving_overlay(
|
14355
|
+
workspace.publish().then(function() {
|
14356
|
+
return scrivito.redirect_to('?_scrivito_workspace_id=published');
|
14357
|
+
})
|
14358
|
+
);
|
14359
|
+
});
|
14360
|
+
}
|
14361
|
+
return false;
|
14362
|
+
}
|
14363
|
+
});
|
14364
|
+
}
|
14365
|
+
});
|
14366
|
+
}());
|
14367
|
+
(function() {
|
14368
|
+
$.extend(scrivito, {
|
14369
|
+
restore_obj_command: function(obj, translations_namespace) {
|
14370
|
+
if (!translations_namespace) {
|
14371
|
+
translations_namespace = 'commands.restore_obj';
|
14372
|
+
}
|
14373
|
+
|
14015
14374
|
return scrivito.command.create_instance({
|
14016
14375
|
id: 'restore_obj',
|
14017
|
-
title: scrivito.i18n.translate('
|
14376
|
+
title: scrivito.i18n.translate(translations_namespace + '.title'),
|
14018
14377
|
icon: '',
|
14019
14378
|
|
14020
14379
|
present: function() {
|
@@ -14023,7 +14382,10 @@ $(window).on('load', function() {
|
|
14023
14382
|
|
14024
14383
|
disabled: function() {
|
14025
14384
|
if (scrivito.editing_context.selected_workspace.is_rtc()) {
|
14026
|
-
return scrivito.i18n.translate('
|
14385
|
+
return scrivito.i18n.translate(translations_namespace + '.rtc_workspace');
|
14386
|
+
}
|
14387
|
+
if (obj.is_binary()) {
|
14388
|
+
return scrivito.i18n.translate('commands.restore_obj.is_binary');
|
14027
14389
|
}
|
14028
14390
|
},
|
14029
14391
|
|
@@ -14038,10 +14400,14 @@ $(window).on('load', function() {
|
|
14038
14400
|
}());
|
14039
14401
|
(function() {
|
14040
14402
|
$.extend(scrivito, {
|
14041
|
-
revert_obj_command: function(obj) {
|
14403
|
+
revert_obj_command: function(obj, translations_namespace) {
|
14404
|
+
if (!translations_namespace) {
|
14405
|
+
translations_namespace = 'commands.revert_obj';
|
14406
|
+
}
|
14407
|
+
|
14042
14408
|
return scrivito.command.create_instance({
|
14043
14409
|
id: 'revert_obj',
|
14044
|
-
title: scrivito.i18n.translate('
|
14410
|
+
title: scrivito.i18n.translate(translations_namespace + '.title'),
|
14045
14411
|
icon: '',
|
14046
14412
|
|
14047
14413
|
present: function() {
|
@@ -14053,19 +14419,22 @@ $(window).on('load', function() {
|
|
14053
14419
|
return scrivito.i18n.translate('commands.revert_obj.published_workspace');
|
14054
14420
|
}
|
14055
14421
|
if (scrivito.editing_context.selected_workspace.is_rtc()) {
|
14056
|
-
return scrivito.i18n.translate('
|
14422
|
+
return scrivito.i18n.translate(translations_namespace + '.rtc_workspace');
|
14057
14423
|
}
|
14058
14424
|
if (!obj.modification()) {
|
14059
|
-
return scrivito.i18n.translate('
|
14425
|
+
return scrivito.i18n.translate(translations_namespace + '.not_modified_obj');
|
14060
14426
|
}
|
14061
14427
|
if (obj.is_new()) {
|
14062
|
-
return scrivito.i18n.translate('
|
14428
|
+
return scrivito.i18n.translate(translations_namespace + '.new_obj');
|
14429
|
+
}
|
14430
|
+
if (obj.is_binary()) {
|
14431
|
+
return scrivito.i18n.translate('commands.revert_obj.is_binary');
|
14063
14432
|
}
|
14064
14433
|
},
|
14065
14434
|
|
14066
14435
|
execute: function() {
|
14067
14436
|
return scrivito.confirmation_dialog({
|
14068
|
-
title: scrivito.i18n.translate('
|
14437
|
+
title: scrivito.i18n.translate(translations_namespace + '.dialog.title'),
|
14069
14438
|
description: scrivito.i18n.translate('commands.revert_obj.dialog.description'),
|
14070
14439
|
icon: '',
|
14071
14440
|
color: 'red',
|
@@ -14228,13 +14597,13 @@ $(window).on('load', function() {
|
|
14228
14597
|
},
|
14229
14598
|
|
14230
14599
|
execute: function() {
|
14231
|
-
var dialog_title = widget_element.widget().widget_class_name();
|
14232
|
-
var fetch_markup = function() {
|
14233
|
-
return widget_element.fetch_details_markup();
|
14234
|
-
};
|
14235
|
-
|
14236
14600
|
return scrivito.write_monitor.track_changes(function() {
|
14237
|
-
return scrivito.details_dialog.open(
|
14601
|
+
return scrivito.details_dialog.open({
|
14602
|
+
title: widget_element.widget().widget_class_name(),
|
14603
|
+
fetch_markup: function() {
|
14604
|
+
return widget_element.fetch_details_markup();
|
14605
|
+
}
|
14606
|
+
});
|
14238
14607
|
}, function() {
|
14239
14608
|
widget_element.dom_element().trigger('scrivito_reload');
|
14240
14609
|
});
|
@@ -14245,34 +14614,110 @@ $(window).on('load', function() {
|
|
14245
14614
|
}());
|
14246
14615
|
(function() {
|
14247
14616
|
$.extend(scrivito, {
|
14248
|
-
|
14617
|
+
child_list_commands: {
|
14249
14618
|
init: function() {
|
14250
|
-
scrivito.
|
14251
|
-
|
14252
|
-
_.each(scrivito.
|
14619
|
+
if (scrivito.editing_context.is_editing_mode()) {
|
14620
|
+
scrivito.on('content', function(content) {
|
14621
|
+
_.each(scrivito.child_list_element.all($(content)), function(child_list_element) {
|
14622
|
+
child_list_element.set_menu([
|
14623
|
+
scrivito.add_subpage_command(child_list_element),
|
14624
|
+
scrivito.copy_page_from_clipboard_command(child_list_element),
|
14625
|
+
scrivito.move_page_from_clipboard_command(child_list_element),
|
14626
|
+
scrivito.sort_items_command(child_list_element)
|
14627
|
+
].concat(child_list_element.menu()));
|
14628
|
+
});
|
14629
|
+
});
|
14630
|
+
}
|
14631
|
+
}
|
14632
|
+
}
|
14633
|
+
});
|
14634
|
+
}());
|
14635
|
+
(function() {
|
14636
|
+
$.extend(scrivito, {
|
14637
|
+
widget_commands: {
|
14638
|
+
init: function() {
|
14639
|
+
if (!scrivito.editing_context.is_view_mode()) {
|
14640
|
+
scrivito.on('content', function(content) {
|
14641
|
+
_.each(scrivito.widget_element.all($(content)), function(widget_element) {
|
14642
|
+
var widget_field_element = widget_element.widget_field();
|
14643
|
+
widget_element.set_menu([
|
14644
|
+
scrivito.add_widget_command(widget_field_element, widget_element),
|
14645
|
+
scrivito.widget_details_command(widget_element),
|
14646
|
+
scrivito.save_widget_to_clipboard_command(widget_element),
|
14647
|
+
scrivito.copy_widget_from_clipboard_command(widget_field_element, widget_element),
|
14648
|
+
scrivito.delete_widget_command(widget_field_element, widget_element)
|
14649
|
+
].concat(widget_element.menu()));
|
14650
|
+
});
|
14651
|
+
});
|
14652
|
+
}
|
14653
|
+
}
|
14654
|
+
}
|
14655
|
+
});
|
14656
|
+
}());
|
14657
|
+
(function() {
|
14658
|
+
$.extend(scrivito, {
|
14659
|
+
widget_field_commands: {
|
14660
|
+
init: function() {
|
14661
|
+
if (scrivito.editing_context.is_editing_mode()) {
|
14662
|
+
scrivito.on('content', function(content) {
|
14663
|
+
_.each(scrivito.widget_field_element.all($(content)), function(widget_field_element) {
|
14253
14664
|
widget_field_element.set_menu([
|
14254
14665
|
scrivito.add_widget_command(widget_field_element),
|
14255
14666
|
scrivito.copy_widget_from_clipboard_command(widget_field_element)
|
14256
|
-
]);
|
14257
|
-
|
14258
|
-
|
14259
|
-
|
14667
|
+
].concat(widget_field_element.menu()));
|
14668
|
+
});
|
14669
|
+
});
|
14670
|
+
}
|
14671
|
+
}
|
14672
|
+
}
|
14673
|
+
});
|
14674
|
+
}());
|
14675
|
+
(function() {
|
14676
|
+
$.extend(scrivito, {
|
14677
|
+
child_list_marker: {
|
14678
|
+
init: function() {
|
14679
|
+
scrivito.inplace_marker.define(function(inplace_marker) {
|
14680
|
+
if (scrivito.editing_context.is_editing_mode()) {
|
14681
|
+
_.each(scrivito.child_list_element.all(), function(child_list_element) {
|
14682
|
+
var description = scrivito.i18n.translate('child_list_menu.description',
|
14683
|
+
child_list_element.obj().description_for_editor());
|
14684
|
+
inplace_marker.activate_for(child_list_element, {description: description});
|
14685
|
+
});
|
14686
|
+
}
|
14687
|
+
});
|
14688
|
+
}
|
14689
|
+
}
|
14690
|
+
});
|
14691
|
+
}());
|
14692
|
+
(function() {
|
14693
|
+
$.extend(scrivito, {
|
14694
|
+
widget_field_marker: {
|
14695
|
+
init: function() {
|
14696
|
+
scrivito.inplace_marker.define(function(inplace_marker) {
|
14697
|
+
if (scrivito.editing_context.is_editing_mode()) {
|
14698
|
+
_.each(scrivito.widget_field_element.all(), function(widget_field_element) {
|
14699
|
+
if (widget_field_element.is_empty()) {
|
14260
14700
|
inplace_marker.activate_for(widget_field_element);
|
14261
14701
|
}
|
14262
|
-
|
14702
|
+
});
|
14703
|
+
}
|
14704
|
+
});
|
14705
|
+
}
|
14706
|
+
}
|
14707
|
+
});
|
14708
|
+
}());
|
14709
|
+
(function() {
|
14710
|
+
$.extend(scrivito, {
|
14711
|
+
widget_marker: {
|
14712
|
+
init: function() {
|
14713
|
+
scrivito.inplace_marker.define(function(inplace_marker) {
|
14714
|
+
if (scrivito.editing_context.selected_workspace.is_editable()) {
|
14715
|
+
_.each(scrivito.widget_field_element.all(), function(widget_field_element) {
|
14263
14716
|
_.each(widget_field_element.widget_elements(), function(widget_element) {
|
14264
|
-
widget_element.
|
14265
|
-
scrivito.add_widget_command(widget_field_element, widget_element),
|
14266
|
-
scrivito.widget_details_command(widget_element),
|
14267
|
-
scrivito.save_widget_to_clipboard_command(widget_element),
|
14268
|
-
scrivito.copy_widget_from_clipboard_command(widget_field_element, widget_element),
|
14269
|
-
scrivito.delete_widget_command(widget_field_element, widget_element)
|
14270
|
-
]);
|
14271
|
-
|
14272
|
-
var modification = widget_element.widget().modification() ||
|
14717
|
+
var is_modified = widget_element.widget().modification() ||
|
14273
14718
|
widget_element.widget().container_modification();
|
14274
14719
|
if (scrivito.editing_context.is_editing_mode() ||
|
14275
|
-
scrivito.editing_context.is_comparing_mode() &&
|
14720
|
+
scrivito.editing_context.is_comparing_mode() && is_modified) {
|
14276
14721
|
inplace_marker.activate_for(widget_element,
|
14277
14722
|
inplace_marker_options(widget_element));
|
14278
14723
|
}
|
@@ -14329,7 +14774,7 @@ $(window).on('load', function() {
|
|
14329
14774
|
}
|
14330
14775
|
|
14331
14776
|
if (tooltip_translation_key) {
|
14332
|
-
options.tooltip = scrivito.i18n.translate('
|
14777
|
+
options.tooltip = scrivito.i18n.translate('widget_marker.' + tooltip_translation_key);
|
14333
14778
|
}
|
14334
14779
|
}
|
14335
14780
|
|
@@ -14394,7 +14839,7 @@ $(window).on('load', function() {
|
|
14394
14839
|
start: function(event, ui) {
|
14395
14840
|
$('body').addClass('scrivito_widget_dragging_active');
|
14396
14841
|
|
14397
|
-
scrivito.
|
14842
|
+
scrivito.close_all_menus();
|
14398
14843
|
|
14399
14844
|
var widget_element = scrivito.cms_element.from_dom_element(ui.item);
|
14400
14845
|
var widget_class_name = widget_element.widget().widget_class_name();
|
@@ -14508,31 +14953,6 @@ $(window).on('load', function() {
|
|
14508
14953
|
}
|
14509
14954
|
};
|
14510
14955
|
}());
|
14511
|
-
(function() {
|
14512
|
-
$.extend(scrivito, {
|
14513
|
-
child_list_menus: {
|
14514
|
-
init: function() {
|
14515
|
-
scrivito.inplace_marker.define(function(inplace_marker) {
|
14516
|
-
if (scrivito.editing_context.visible_workspace.is_editable() &&
|
14517
|
-
scrivito.editing_context.is_editing_mode()) {
|
14518
|
-
_.each(scrivito.child_list_element.all(), function(child_list_element) {
|
14519
|
-
child_list_element.set_menu([
|
14520
|
-
scrivito.add_subpage_command(child_list_element),
|
14521
|
-
scrivito.copy_page_from_clipboard_command(child_list_element),
|
14522
|
-
scrivito.move_page_from_clipboard_command(child_list_element),
|
14523
|
-
scrivito.sort_items_command(child_list_element)
|
14524
|
-
]);
|
14525
|
-
|
14526
|
-
var description = scrivito.i18n.translate('child_list_menu.description',
|
14527
|
-
child_list_element.obj().description_for_editor());
|
14528
|
-
inplace_marker.activate_for(child_list_element, {description: description});
|
14529
|
-
});
|
14530
|
-
}
|
14531
|
-
});
|
14532
|
-
}
|
14533
|
-
}
|
14534
|
-
});
|
14535
|
-
}());
|
14536
14956
|
(function() {
|
14537
14957
|
$.extend(scrivito, {
|
14538
14958
|
hotkeys: {
|
@@ -14558,10 +14978,9 @@ $(window).on('load', function() {
|
|
14558
14978
|
}());
|
14559
14979
|
(function() {
|
14560
14980
|
$.extend(scrivito, {
|
14561
|
-
with_dialog_behaviour: function(promise, key_map) {
|
14562
|
-
return scrivito.
|
14563
|
-
|
14564
|
-
);
|
14981
|
+
with_dialog_behaviour: function(dom_element, promise, key_map) {
|
14982
|
+
return scrivito.with_dialog_overlay(dom_element,
|
14983
|
+
scrivito.hotkeys.add_actions_while(promise, key_map));
|
14565
14984
|
}
|
14566
14985
|
});
|
14567
14986
|
}());
|
@@ -14574,6 +14993,7 @@ $(window).on('load', function() {
|
|
14574
14993
|
if (scrivito.in_editable_view()) {
|
14575
14994
|
activate_for_field_type('linklist');
|
14576
14995
|
activate_for_field_type('reference');
|
14996
|
+
activate_for_field_type('link');
|
14577
14997
|
}
|
14578
14998
|
});
|
14579
14999
|
|
@@ -14606,12 +15026,18 @@ $(window).on('load', function() {
|
|
14606
15026
|
|
14607
15027
|
scrivito.with_saving_overlay(create_image(file).then(function(obj) {
|
14608
15028
|
var field_value;
|
14609
|
-
|
14610
|
-
|
14611
|
-
|
14612
|
-
|
14613
|
-
|
14614
|
-
|
15029
|
+
switch(field_type) {
|
15030
|
+
case 'reference':
|
15031
|
+
field_value = obj.id;
|
15032
|
+
break;
|
15033
|
+
case 'linklist':
|
15034
|
+
field_value = [{obj_id: obj.id}];
|
15035
|
+
break;
|
15036
|
+
case 'link':
|
15037
|
+
field_value = {obj_id: obj.id};
|
15038
|
+
break;
|
15039
|
+
default:
|
15040
|
+
$.error('Field type must be "reference", "linklist" or "link".');
|
14615
15041
|
}
|
14616
15042
|
|
14617
15043
|
return dom_element.scrivito('save', field_value).then(function() {
|
@@ -14656,7 +15082,7 @@ $(window).on('load', function() {
|
|
14656
15082
|
workspaces: workspaces
|
14657
15083
|
}));
|
14658
15084
|
|
14659
|
-
$('#
|
15085
|
+
$('#scrivito_editing').append(view);
|
14660
15086
|
|
14661
15087
|
var create_new_ws = false;
|
14662
15088
|
|
@@ -14715,7 +15141,7 @@ $(window).on('load', function() {
|
|
14715
15141
|
view.find('#scrivito_list_of_ws').focus();
|
14716
15142
|
}
|
14717
15143
|
|
14718
|
-
return scrivito.with_dialog_behaviour(deferred, {
|
15144
|
+
return scrivito.with_dialog_behaviour(view, deferred, {
|
14719
15145
|
enter: confirm_action,
|
14720
15146
|
escape: cancel_action
|
14721
15147
|
});
|
@@ -14733,7 +15159,7 @@ $(window).on('load', function() {
|
|
14733
15159
|
child_list: child_list
|
14734
15160
|
}));
|
14735
15161
|
|
14736
|
-
$('#
|
15162
|
+
$('#scrivito_editing').append(view);
|
14737
15163
|
$('#scrivito_obj_sorting_sortable').sortable({
|
14738
15164
|
placeholder: 'scrivito_obj_sorting_placeholder'
|
14739
15165
|
});
|
@@ -14771,7 +15197,7 @@ $(window).on('load', function() {
|
|
14771
15197
|
scrivito.dialog.adjust(view);
|
14772
15198
|
});
|
14773
15199
|
|
14774
|
-
return scrivito.with_dialog_behaviour(deferred, {
|
15200
|
+
return scrivito.with_dialog_behaviour(view, deferred, {
|
14775
15201
|
enter: confirm_action,
|
14776
15202
|
escape: cancel_action
|
14777
15203
|
});
|
@@ -14910,13 +15336,23 @@ $(window).on('load', function() {
|
|
14910
15336
|
|
14911
15337
|
|
14912
15338
|
|
15339
|
+
|
15340
|
+
|
15341
|
+
|
15342
|
+
|
15343
|
+
|
15344
|
+
//
|
14913
15345
|
|
14914
15346
|
//
|
14915
15347
|
|
15348
|
+
|
15349
|
+
|
14916
15350
|
//
|
14917
15351
|
|
14918
15352
|
|
14919
15353
|
|
15354
|
+
//
|
15355
|
+
|
14920
15356
|
|
14921
15357
|
|
14922
15358
|
|