app/assets/javascripts/fiona7_ui.js in infopark_fiona7-0.71.1.0 vs app/assets/javascripts/fiona7_ui.js in infopark_fiona7-0.71.1.1
- old
+ new
@@ -163,10 +163,14 @@
disabled: function() {
if (action == 'release' && !obj.modification()) {
return scrivito.t('commands.release_obj.not_modified_obj');
}
+ if (action == 'release' && obj.has_restriction()) {
+ return obj.restriction_messages().join("; ");
+
+ }
},
update: function() {
return obj.reload();
},
@@ -175,11 +179,11 @@
/* TODO: implement permission check */
open_confirmation_dialog(action, dialog_icons[action]).done(function(comment) {
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/' + obj.id() + '/release?comment=' + (comment || "")).then(function() {
scrivito.reload();
}).fail(function(error) {
- scrivito.alert_dialog(scrivito.t('commnds.'+action+'_obj.failed'));
+ scrivito.alert_dialog(scrivito.t('commands.'+action+'_obj.failed'));
}));
});
}
});
});
@@ -191,26 +195,9 @@
//scrivito.configure_menu_order(['fiona7.*', '*']);
});
return;
-
- /* patch the create page command to not create incomprehensible paths */
- scrivito.child_list_element.create_instance = function(cms_element) {
- var ret = original_create_instance.call(this, cms_element);
- if (typeof ret === "object") {
- ret.create_child = function(obj_class) {
- var path = (cms_element.path() + '/' + obj_class).replace(/\/\//g, "/");
-
- return scrivito.obj.create({
- _path: path,
- _obj_class: obj_class
- });
- };
- }
- return ret;
- };
-
/* enforce permissions */
var originalGuiStart = scrivito.gui.start;
scrivito.gui.start = function () {
originalGuiStart.call(this, arguments);