mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merged revisions 50812 via svnmerge from
http://svn.silverstripe.com/open/modules/cms/branches/2.2.2 ........ r50812 | sminnee | 2008-03-11 10:34:32 +1300 (Tue, 11 Mar 2008) | 1 line #2285 - Fixed widget editor ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@50854 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0ea65564f7
commit
32024b451c
@ -12,12 +12,16 @@ div.usedWidgetsHolder {
|
||||
}
|
||||
|
||||
div.usedWidgets {
|
||||
min-height: 100px;
|
||||
border: 1px #CCC dotted;
|
||||
padding: 5px;
|
||||
}
|
||||
#NoWidgets {
|
||||
padding: 50px; /* Make this nice and big and easily 'droppable' */
|
||||
}
|
||||
|
||||
div.usedWidgets div.Widget,
|
||||
div.availableWidgets div.Widget {
|
||||
width: 90%;
|
||||
width: 98%;
|
||||
border: 1px solid #ddd;
|
||||
border-top: none;
|
||||
margin-bottom: 5px;
|
||||
|
@ -61,7 +61,7 @@ WidgetAreaEditor.prototype = {
|
||||
for(var i = 0; i < usedWidgets.length; i++) {
|
||||
var widget = usedWidgets[i];
|
||||
if(widget.id && (widget.id.indexOf("Widget[") != 0)) {
|
||||
new Ajax.Request(widget.id + "/EditableSegment", {onSuccess : $('WidgetAreaEditor_usedWidgets').parentNode.parentNode.insertWidgetEditor.bind(this)});
|
||||
new Ajax.Request('Widget_Controller/EditableSegment/' + widget.id, {onSuccess : $('WidgetAreaEditor_usedWidgets').parentNode.parentNode.insertWidgetEditor.bind(this)});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2,6 +2,7 @@
|
||||
<input type="hidden" id="$Name" name="$IdxField" value="$Value" />
|
||||
<div class="availableWidgetsHolder">
|
||||
<h2><% _t('AVAILABLE', 'Available Widgets') %></h2>
|
||||
<p> </p>
|
||||
<div class="availableWidgets" id="WidgetAreaEditor_availableWidgets">
|
||||
<% if AvailableWidgets %>
|
||||
<% control AvailableWidgets %>
|
||||
@ -16,15 +17,15 @@
|
||||
</div>
|
||||
<div class="usedWidgetsHolder">
|
||||
<h2><% _t('INUSE', 'Widgets currently used') %></h2>
|
||||
<p><% _t('TOADD', 'To add widgets, drag them from the left area to here.') %></p>
|
||||
|
||||
<div class="usedWidgets" id="WidgetAreaEditor_usedWidgets">
|
||||
<% if UsedWidgets %>
|
||||
<% control UsedWidgets %>
|
||||
$EditableSegment
|
||||
<% end_control %>
|
||||
<% else %>
|
||||
<div id="NoWidgets">
|
||||
<p><% _t('TOADD', 'To add widgets, drag them from the left area to here.') %></p>
|
||||
</div>
|
||||
<div id="NoWidgets"></div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user