mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
issue 207, fixed a bug for delete widget`s content when save a page
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9427 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9c78242bcd
commit
82d28676bf
2 changed files with 4 additions and 3 deletions
|
|
@ -96,7 +96,7 @@
|
|||
function putDocumentsInPageToArray($target, &$array)
|
||||
{
|
||||
if(!$target) return;
|
||||
preg_match_all('!<img src="./common/img/widget_bg.jpg" ([^>]+)!is', $target, $matches);
|
||||
preg_match_all('!<img hasContent="true" ([^>]+)!is', $target, $matches);
|
||||
$pattern = '!document_srl="(\d+)"!';
|
||||
foreach($matches[1] as $match)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,12 +132,13 @@ function getContentWidgetCode(childObj, widget) {
|
|||
|| name == "widget_padding_left"
|
||||
|| name == "widget_padding_right"
|
||||
|| name == "widget_padding_top"
|
||||
|| name == "widget_padding_bottom") continue;
|
||||
|| name == "widget_padding_bottom"
|
||||
|| name == "hasContent") continue;
|
||||
var value = childObj.attributes[i].nodeValue;
|
||||
if(!value) continue;
|
||||
attrs += name+'="'+escape(value)+'" ';
|
||||
}
|
||||
return '<img class="zbxe_widget_output" widget="widgetContent" style="'+getStyle(childObj)+'" body="'+body+'" document_srl="'+document_srl+'" widget_padding_left="'+getPadding(childObj,'left')+'" widget_padding_right="'+getPadding(childObj, 'right')+'" widget_padding_top="'+getPadding(childObj, 'top')+'" widget_padding_bottom="'+getPadding(childObj,'bottom')+'" '+attrs+' />';
|
||||
return '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="'+getStyle(childObj)+'" body="'+body+'" document_srl="'+document_srl+'" widget_padding_left="'+getPadding(childObj,'left')+'" widget_padding_right="'+getPadding(childObj, 'right')+'" widget_padding_top="'+getPadding(childObj, 'top')+'" widget_padding_bottom="'+getPadding(childObj,'bottom')+'" '+attrs+' />';
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue