# HG changeset patch # User Thierry Florac # Date 1523517488 -7200 # Node ID 32bf697871ac16a16899a4ae632eabb25b67b600 # Parent 3d097899a717b63324acad54f3a03f98ce684d79 Updated name of portlet ID widget diff -r 3d097899a717 -r 32bf697871ac src/pyams_portal/resources/js/portal.js --- a/src/pyams_portal/resources/js/portal.js Wed Apr 11 11:36:13 2018 +0200 +++ b/src/pyams_portal/resources/js/portal.js Thu Apr 12 09:18:08 2018 +0200 @@ -452,9 +452,7 @@ if (!portlet.hasClass('portlet')) { portlet = portlet.parents('.portlet:first'); } - var slot = portlet.parents('.slot:first'); - var row = slot.parents('.row:first'); - MyAMS.dialog.open('portlet-properties.html?form.widgets.portlet_id=' + portlet.data('ams-portlet-id')); + MyAMS.dialog.open('portlet-properties.html?portlet.widgets.portlet_id=' + portlet.data('ams-portlet-id')); }; }, diff -r 3d097899a717 -r 32bf697871ac src/pyams_portal/resources/js/portal.min.js --- a/src/pyams_portal/resources/js/portal.min.js Wed Apr 11 11:36:13 2018 +0200 +++ b/src/pyams_portal/resources/js/portal.min.js Thu Apr 12 09:18:08 2018 +0200 @@ -1,1 +1,1 @@ -(function(c,b){var d=b.MyAMS;var a={template:{initConfig:function(){var e=c("#portal_config");if(e.data("ams-allowed-change")){c(".rows",e).addClass("sortable");c(".slots",e).addClass("sortable");c(".slot",e).addClass("resizable");c(".portlets",e).addClass("sortable");d.plugins.enabled.sortable(e);d.plugins.enabled.resizable(e);c(".btn-row",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".rows"});c(".rows",e).droppable({accept:".btn-row",drop:a.template.dropRowButton});c(".btn-slot",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".slots"});c(".slots",e).droppable({accept:".btn-slot",drop:a.template.dropSlotButton});c(".btn-portlet",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".portlets"});c(".portlets",e).droppable({accept:".btn-portlet",hoverClass:"portlets-hover",activeClass:"portlets-active",drop:a.template.dropPortletButton})}},selectDisplay:function(){var e=c(this).val();d.ajax.post("get-slots-width.json",{device:e},function(f){var g=c("#portal_config");g.removeClassPrefix("container-");if(e){g.addClass("container-"+e)}c(".slot",g).removeClassPrefix("col-");for(var h in f){if(!f.hasOwnProperty(h)){continue}var i=f[h];var k=c('.slot[data-ams-slot-name="'+h+'"]',g);if(e){k.addClass("col-"+i[e])}else{for(var j in i){if(!i.hasOwnProperty(j)){continue}k.addClass("col-"+j+"-"+i[j])}}}})},addRow:function(){return function(){c(this).parents(".btn-group").removeClass("open");d.ajax.post("add-template-row.json",{},function(e){var f=e.row_id;var g=c(".rows","#portal_config");c("
").addClass("row context-menu").attr("data-ams-row-id",f).append(c("").addClass("row_id label label-success pull-right").text(f)).append(c("
").addClass("slots").sortable({placeholder:"slot-highlight",connectWith:".slots",over:a.template.overSlots,stop:a.template.sortSlots}).droppable({accept:".btn-slot",drop:a.template.dropSlotButton})).contextMenu({menuSelector:"#rowMenu",menuSelected:d.helpers.contextMenuHandler}).appendTo(g);g.sortable("refresh")})}},dropRowButton:function(e,f){if(f.draggable.hasClass("already-dropped")){return}f.draggable.addClass("already-dropped");d.ajax.post("add-template-row.json",{},function(g){var h=g.row_id;var i=c(".rows","#portal_config");f.draggable.removeClassPrefix("btn").removeClassPrefix("ui-").removeClass("already-dropped").removeAttr("style").addClass("row context-menu").attr("data-ams-row-id",h).empty().append(c("").addClass("row_id label label-success pull-right").text(h)).append(c("
").addClass("slots").sortable({placeholder:"slot-highlight",connectWith:".slots",over:a.template.overSlots,stop:a.template.sortSlots}).droppable({accept:".btn-slot",drop:a.template.dropSlotButton})).contextMenu({menuSelector:"#rowMenu",menuSelected:d.helpers.contextMenuHandler});a.template.sortRows();i.sortable("refresh")})},overRows:function(e,f){c(f.placeholder).attr("class",c(f.item).attr("class")).removeClassPrefix("ui-").addClass("row-highlight").css("height",c(f.item).outerHeight())},sortRows:function(g,h){if(h&&h.item.hasClass("already-dropped")){return}var e=c("#portal_config");var f=c(".row",e).listattr("data-ams-row-id");d.ajax.post("set-template-row-order.json",{rows:JSON.stringify(f)},function(i){if(i.status==="success"){c(".row",e).each(function(j){c(this).attr("data-ams-row-id",j);c("span.row_id",c(this)).text(j)})}})},deleteRow:function(){return function(e){d.skin.bigBox({title:d.i18n.WARNING,content:'  '+d.i18n.DELETE_WARNING,buttons:d.i18n.BTN_OK_CANCEL},function(f){if(f===d.i18n.BTN_OK){if(!e.hasClass("row")){e=e.parents(".row")}d.ajax.post("delete-template-row.json",{row_id:e.data("ams-row-id")},function(g){if(g.status==="success"){e.remove();c(".row","#portal_config").each(function(h){c(this).removeData().attr("data-ams-row-id",h);c("span.row_id",c(this)).text(h)})}})}})}},addSlotCallback:function(e){var h=c(".slots",'.row[data-ams-row-id="'+e.row_id+'"]');var g=e.slot_name;var f=c("
").addClass("slot context-menu col col-xs-12 col-sm-12 col-md-12 col-lg-12 resizable").attr("data-ams-slot-name",g).append(c("
").addClass("header padding-x-5").text(g)).append(c("
").addClass("portlets").sortable({placeholder:"portlet-highlight",connectWith:".portlets",over:a.template.overPortlets,stop:a.template.sortPortlets}).droppable({accept:".btn-portlet",hoverClass:"portlets-hover",activeClass:"portlets-active",drop:a.template.dropPortletButton})).append(c("
").addClass("clearfix")).contextMenu({menuSelector:"#slotMenu",menuSelected:d.helpers.contextMenuHandler});var i=c(".btn-slot",h);if(i.exists()){i.replaceWith(f);c(".slot",h).each(function(){c(this).removeData()});a.template.sortSlots()}else{f.appendTo(h)}f.resizable({start:a.template.startSlotResize,stop:a.template.stopSlotResize,handles:"e"});h.sortable("refresh")},dropSlotButton:function(f,g){if(g.draggable.hasClass("already-dropped")){return}g.draggable.addClass("already-dropped");var e=g.helper.parents(".row:first").data("ams-row-id");d.dialog.open("add-template-slot.html?form.widgets.row_id="+e)},startSlotResize:function(f,h){var j=h.element;var i=j.parents(".slots:first");var e=(i.innerWidth()-110)/12;var g=j.height();h.element.resizable("option","grid",[e,g]);h.element.resizable("option","minWidth",e);h.element.resizable("option","minHeight",g);h.element.resizable("option","maxWidth",i.innerWidth());h.element.resizable("option","maxHeight",g)},stopSlotResize:function(h,j){var l=j.element;var k=l.parents(".slots:first");var f=(k.innerWidth()-10)/12;var i=Math.round(c(l).width()/f);var g=c("#device_selector").val();if(!g){var e=c("body").width();if(e>1170){g="lg"}else{if(e>970){g="md"}else{if(e>750){g="sm"}else{g="xs"}}}}d.ajax.post("set-slot-width.json",{slot_name:l.data("ams-slot-name"),device:g,width:i},function(m){l.removeClassPrefix("col-");l.removeAttr("style");var n=l.data("ams-slot-name");var o=m[n];if(g){l.addClass("col-"+g+"-"+o[g])}else{l.addClass("col-"+o[g])}})},editSlot:function(){return function(e){if(!e.hasClass("slot")){e=e.parents(".slot")}d.dialog.open("slot-properties.html?form.widgets.slot_name="+e.data("ams-slot-name"))}},editSlotCallback:function(e){var g=c('.slot[data-ams-slot-name="'+e.slot_name+'"]');g.attr("class","slot context-menu col");var f=c("#device_selector").val();if(f){g.addClass("col-"+e.width[f])}else{for(f in e.width){if(!e.width.hasOwnProperty(f)){continue}g.addClass("col-"+f+"-"+e.width[f])}}},overSlots:function(e,f){c(f.placeholder).attr("class",c(f.item).attr("class")).removeClassPrefix("ui-").addClass("slot-highlight").css("height",c(f.item).outerHeight())},sortSlots:function(g,h){if(h&&h.item.hasClass("already-dropped")){return}var f=c("#portal_config");var e={};c(".row",f).each(function(){var j=c(this);var i=[];c(".slot",j).each(function(){i.push(c(this).data("ams-slot-name"))});e[parseInt(j.attr("data-ams-row-id"))]=i});d.ajax.post("set-template-slot-order.json",{order:JSON.stringify(e)})},deleteSlot:function(){return function(e){d.skin.bigBox({title:d.i18n.WARNING,content:'  '+d.i18n.DELETE_WARNING,buttons:d.i18n.BTN_OK_CANCEL},function(f){if(f===d.i18n.BTN_OK){if(!e.hasClass("slot")){e=e.parents(".slot")}d.ajax.post("delete-template-slot.json",{slot_name:e.data("ams-slot-name")},function(g){if(g.status==="success"){e.remove();c(".slot","#portal_config").each(function(){c(this).removeData()})}})}})}},addPortletCallback:function(e){var f=c(".portlets",'.slot[data-ams-slot-name="'+e.slot_name+'"]');var h=c("
").addClass("portlet context-menu").attr("data-ams-portlet-id",e.portlet_id).append(c("
").addClass("header padding-x-5").text(e.label)).append(c("
").addClass("preview").html(e.preview||"")).contextMenu({menuSelector:"#portletMenu",menuSelected:d.helpers.contextMenuHandler});d.initContent(c(".preview",h));var g=c(".btn-portlet",f);if(g.exists()){g.replaceWith(h);c(".portlet",f).each(function(){c(this).removeData()});a.template.sortPortlets(null,{item:h})}else{h.appendTo(f)}f.sortable("refresh")},dropPortletButton:function(e,g){if(g.draggable.hasClass("already-dropped")){return}g.draggable.addClass("already-dropped");var f=g.draggable;var h=c(this);var i=h.parents(".slot:first");d.ajax.post("drag-template-portlet.json",{portlet_name:f.data("ams-portlet-name"),slot_name:i.data("ams-slot-name")},function(j){d.ajax.handleJSON(j)})},editPortlet:function(){return function(f){if(!f.hasClass("portlet")){f=f.parents(".portlet:first")}var g=f.parents(".slot:first");var e=g.parents(".row:first");d.dialog.open("portlet-properties.html?form.widgets.portlet_id="+f.data("ams-portlet-id"))}},editPortletCallback:function(e){if(e.preview){var f=c("#portal_config");var g=c('.portlet[data-ams-portlet-id="'+e.portlet_id+'"]',f);var h=c(".header",g);if(e.inherit_parent){c("i",h).removeClass("fa-chain-broken")}else{c("i",h).addClass("fa-chain-broken")}c(".preview",g).html(e.preview);d.initContent(c(".preview",g))}},overPortlets:function(e,f){c(f.placeholder).attr("class",c(f.item).attr("class")).removeClassPrefix("ui-").addClass("portlet-highlight").css("height",c(f.item).outerHeight())},sortPortlets:function(f,i){if(i.item.hasClass("already-dropped")){return}var j=i.item;var h=j.parents(".slot");var g=c(".portlet",h);var e={from:j.data("ams-portlet-id"),to:{slot:h.data("ams-slot-name"),portlet_ids:g.listattr("data-ams-portlet-id")}};d.ajax.post("set-template-portlet-order.json",{order:JSON.stringify(e)})},deletePortlet:function(){return function(e){d.skin.bigBox({title:d.i18n.WARNING,content:'  '+d.i18n.DELETE_WARNING,buttons:d.i18n.BTN_OK_CANCEL},function(f){if(f===d.i18n.BTN_OK){if(!e.hasClass("portlet")){e=e.parents(".portlet")}d.ajax.post("delete-template-portlet.json",{portlet_id:e.data("ams-portlet-id")},function(g){if(g.status==="success"){e.remove();c(".portlet","#portal_config").each(function(){c(this).removeData()})}})}})}}}};b.PyAMS_portal=a})(jQuery,this); \ No newline at end of file +!function(t,e){"use strict";var a=e.MyAMS,o={template:{initConfig:function(){var e=t("#portal_config");e.data("ams-allowed-change")&&(t(".rows",e).addClass("sortable"),t(".slots",e).addClass("sortable"),t(".slot",e).addClass("resizable"),t(".portlets",e).addClass("sortable"),a.plugins.enabled.sortable(e),a.plugins.enabled.resizable(e),t(".btn-row",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".rows"}),t(".rows",e).droppable({accept:".btn-row",drop:o.template.dropRowButton}),t(".btn-slot",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".slots"}),t(".slots",e).droppable({accept:".btn-slot",drop:o.template.dropSlotButton}),t(".btn-portlet",".btn-toolbar").draggable({cursor:"move",helper:"clone",revert:"invalid",connectToSortable:".portlets"}),t(".portlets",e).droppable({accept:".btn-portlet",hoverClass:"portlets-hover",activeClass:"portlets-active",drop:o.template.dropPortletButton}))},selectDisplay:function(){var e=t(this).val();a.ajax.post("get-slots-width.json",{device:e},function(a){var o=t("#portal_config");o.removeClassPrefix("container-"),e&&o.addClass("container-"+e),t(".slot",o).removeClassPrefix("col-");for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],r=t('.slot[data-ams-slot-name="'+s+'"]',o);if(e)r.addClass("col-"+l[e]);else for(var n in l)l.hasOwnProperty(n)&&r.addClass("col-"+n+"-"+l[n])}})},addRow:function(){return function(){t(this).parents(".btn-group").removeClass("open"),a.ajax.post("add-template-row.json",{},function(e){var s=e.row_id,l=t(".rows","#portal_config");t("
").addClass("row context-menu").attr("data-ams-row-id",s).append(t("").addClass("row_id label label-success pull-right").text(s)).append(t("
").addClass("slots").sortable({placeholder:"slot-highlight",connectWith:".slots",over:o.template.overSlots,stop:o.template.sortSlots}).droppable({accept:".btn-slot",drop:o.template.dropSlotButton})).contextMenu({menuSelector:"#rowMenu",menuSelected:a.helpers.contextMenuHandler}).appendTo(l),l.sortable("refresh")})}},dropRowButton:function(e,s){s.draggable.hasClass("already-dropped")||(s.draggable.addClass("already-dropped"),a.ajax.post("add-template-row.json",{},function(e){var l=e.row_id,r=t(".rows","#portal_config");s.draggable.removeClassPrefix("btn").removeClassPrefix("ui-").removeClass("already-dropped").removeAttr("style").addClass("row context-menu").attr("data-ams-row-id",l).empty().append(t("").addClass("row_id label label-success pull-right").text(l)).append(t("
").addClass("slots").sortable({placeholder:"slot-highlight",connectWith:".slots",over:o.template.overSlots,stop:o.template.sortSlots}).droppable({accept:".btn-slot",drop:o.template.dropSlotButton})).contextMenu({menuSelector:"#rowMenu",menuSelected:a.helpers.contextMenuHandler}),o.template.sortRows(),r.sortable("refresh")}))},overRows:function(e,a){t(a.placeholder).attr("class",t(a.item).attr("class")).removeClassPrefix("ui-").addClass("row-highlight").css("height",t(a.item).outerHeight())},sortRows:function(e,o){if(!o||!o.item.hasClass("already-dropped")){var s=t("#portal_config"),l=t(".row",s).listattr("data-ams-row-id");a.ajax.post("set-template-row-order.json",{rows:JSON.stringify(l)},function(e){"success"===e.status&&t(".row",s).each(function(e){t(this).attr("data-ams-row-id",e),t("span.row_id",t(this)).text(e)})})}},deleteRow:function(){return function(e){a.skin.bigBox({title:a.i18n.WARNING,content:'  '+a.i18n.DELETE_WARNING,buttons:a.i18n.BTN_OK_CANCEL},function(o){o===a.i18n.BTN_OK&&(e.hasClass("row")||(e=e.parents(".row")),a.ajax.post("delete-template-row.json",{row_id:e.data("ams-row-id")},function(a){"success"===a.status&&(e.remove(),t(".row","#portal_config").each(function(e){t(this).removeData().attr("data-ams-row-id",e),t("span.row_id",t(this)).text(e)}))}))})}},addSlotCallback:function(e){var s=t(".slots",'.row[data-ams-row-id="'+e.row_id+'"]'),l=e.slot_name,r=t("
").addClass("slot context-menu col col-xs-12 col-sm-12 col-md-12 col-lg-12 resizable").attr("data-ams-slot-name",l).append(t("
").addClass("header padding-x-5").text(l)).append(t("
").addClass("portlets").sortable({placeholder:"portlet-highlight",connectWith:".portlets",over:o.template.overPortlets,stop:o.template.sortPortlets}).droppable({accept:".btn-portlet",hoverClass:"portlets-hover",activeClass:"portlets-active",drop:o.template.dropPortletButton})).append(t("
").addClass("clearfix")).contextMenu({menuSelector:"#slotMenu",menuSelected:a.helpers.contextMenuHandler}),n=t(".btn-slot",s);n.exists()?(n.replaceWith(r),t(".slot",s).each(function(){t(this).removeData()}),o.template.sortSlots()):r.appendTo(s),r.resizable({start:o.template.startSlotResize,stop:o.template.stopSlotResize,handles:"e"}),s.sortable("refresh")},dropSlotButton:function(t,e){if(!e.draggable.hasClass("already-dropped")){e.draggable.addClass("already-dropped");var o=e.helper.parents(".row:first").data("ams-row-id");a.dialog.open("add-template-slot.html?form.widgets.row_id="+o)}},startSlotResize:function(t,e){var a=e.element,o=a.parents(".slots:first"),s=(o.innerWidth()-110)/12,l=a.height();e.element.resizable("option","grid",[s,l]),e.element.resizable("option","minWidth",s),e.element.resizable("option","minHeight",l),e.element.resizable("option","maxWidth",o.innerWidth()),e.element.resizable("option","maxHeight",l)},stopSlotResize:function(e,o){var s=o.element,l=(s.parents(".slots:first").innerWidth()-10)/12,r=Math.round(t(s).width()/l),n=t("#device_selector").val();if(!n){var i=t("body").width();n=i>1170?"lg":i>970?"md":i>750?"sm":"xs"}a.ajax.post("set-slot-width.json",{slot_name:s.data("ams-slot-name"),device:n,width:r},function(t){s.removeClassPrefix("col-"),s.removeAttr("style");var e=t[s.data("ams-slot-name")];n?s.addClass("col-"+n+"-"+e[n]):s.addClass("col-"+e[n])})},editSlot:function(){return function(t){t.hasClass("slot")||(t=t.parents(".slot")),a.dialog.open("slot-properties.html?form.widgets.slot_name="+t.data("ams-slot-name"))}},editSlotCallback:function(e){var a=t('.slot[data-ams-slot-name="'+e.slot_name+'"]');a.attr("class","slot context-menu col");var o=t("#device_selector").val();if(o)a.addClass("col-"+e.width[o]);else for(o in e.width)e.width.hasOwnProperty(o)&&a.addClass("col-"+o+"-"+e.width[o])},overSlots:function(e,a){t(a.placeholder).attr("class",t(a.item).attr("class")).removeClassPrefix("ui-").addClass("slot-highlight").css("height",t(a.item).outerHeight())},sortSlots:function(e,o){if(!o||!o.item.hasClass("already-dropped")){var s=t("#portal_config"),l={};t(".row",s).each(function(){var e=t(this),a=[];t(".slot",e).each(function(){a.push(t(this).data("ams-slot-name"))}),l[parseInt(e.attr("data-ams-row-id"))]=a}),a.ajax.post("set-template-slot-order.json",{order:JSON.stringify(l)})}},deleteSlot:function(){return function(e){a.skin.bigBox({title:a.i18n.WARNING,content:'  '+a.i18n.DELETE_WARNING,buttons:a.i18n.BTN_OK_CANCEL},function(o){o===a.i18n.BTN_OK&&(e.hasClass("slot")||(e=e.parents(".slot")),a.ajax.post("delete-template-slot.json",{slot_name:e.data("ams-slot-name")},function(a){"success"===a.status&&(e.remove(),t(".slot","#portal_config").each(function(){t(this).removeData()}))}))})}},addPortletCallback:function(e){var s=t(".portlets",'.slot[data-ams-slot-name="'+e.slot_name+'"]'),l=t("
").addClass("portlet context-menu").attr("data-ams-portlet-id",e.portlet_id).append(t("
").addClass("header padding-x-5").text(e.label)).append(t("
").addClass("preview").html(e.preview||"")).contextMenu({menuSelector:"#portletMenu",menuSelected:a.helpers.contextMenuHandler});a.initContent(t(".preview",l));var r=t(".btn-portlet",s);r.exists()?(r.replaceWith(l),t(".portlet",s).each(function(){t(this).removeData()}),o.template.sortPortlets(null,{item:l})):l.appendTo(s),s.sortable("refresh")},dropPortletButton:function(e,o){if(!o.draggable.hasClass("already-dropped")){o.draggable.addClass("already-dropped");var s=o.draggable,l=t(this).parents(".slot:first");a.ajax.post("drag-template-portlet.json",{portlet_name:s.data("ams-portlet-name"),slot_name:l.data("ams-slot-name")},function(t){a.ajax.handleJSON(t)})}},editPortlet:function(){return function(t){t.hasClass("portlet")||(t=t.parents(".portlet:first")),a.dialog.open("portlet-properties.html?portlet.widgets.portlet_id="+t.data("ams-portlet-id"))}},editPortletCallback:function(e){if(e.preview){var o=t("#portal_config"),s=t('.portlet[data-ams-portlet-id="'+e.portlet_id+'"]',o),l=t(".header",s);e.inherit_parent?t("i",l).removeClass("fa-chain-broken"):t("i",l).addClass("fa-chain-broken"),t(".preview",s).html(e.preview),a.initContent(t(".preview",s))}},overPortlets:function(e,a){t(a.placeholder).attr("class",t(a.item).attr("class")).removeClassPrefix("ui-").addClass("portlet-highlight").css("height",t(a.item).outerHeight())},sortPortlets:function(e,o){if(!o.item.hasClass("already-dropped")){var s=o.item,l=s.parents(".slot"),r=t(".portlet",l),n={from:s.data("ams-portlet-id"),to:{slot:l.data("ams-slot-name"),portlet_ids:r.listattr("data-ams-portlet-id")}};a.ajax.post("set-template-portlet-order.json",{order:JSON.stringify(n)})}},deletePortlet:function(){return function(e){a.skin.bigBox({title:a.i18n.WARNING,content:'  '+a.i18n.DELETE_WARNING,buttons:a.i18n.BTN_OK_CANCEL},function(o){o===a.i18n.BTN_OK&&(e.hasClass("portlet")||(e=e.parents(".portlet")),a.ajax.post("delete-template-portlet.json",{portlet_id:e.data("ams-portlet-id")},function(a){"success"===a.status&&(e.remove(),t(".portlet","#portal_config").each(function(){t(this).removeData()}))}))})}}}};e.PyAMS_portal=o}(jQuery,this); diff -r 3d097899a717 -r 32bf697871ac src/pyams_portal/zmi/layout.py --- a/src/pyams_portal/zmi/layout.py Wed Apr 11 11:36:13 2018 +0200 +++ b/src/pyams_portal/zmi/layout.py Thu Apr 12 09:18:08 2018 +0200 @@ -465,14 +465,14 @@ class PortalTemplatePortletEditForm(AdminDialogEditForm): """Portal template portlet edit form""" - prefix = 'portlet_properties.' + prefix = 'portlet.' dialog_class = 'modal-large' def __call__(self): request = self.request request.registry.notify(PageletCreatedEvent(self)) - portlet_id = int(request.params.get('{0}widgets.portlet_id'.format(self.prefix))) + portlet_id = int(request.params.get('portlet.widgets.portlet_id')) portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id) if portlet_config is None: raise NotFound() @@ -495,7 +495,7 @@ request = self.request request.registry.notify(PageletCreatedEvent(self)) # load portlet config - portlet_id = int(request.params.get('{0}widgets.portlet_id'.format(self.prefix))) + portlet_id = int(request.params.get('portlet.widgets.portlet_id')) portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id) if portlet_config is None: raise NotFound()