mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00: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 {
|
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.usedWidgets div.Widget,
|
||||||
div.availableWidgets div.Widget {
|
div.availableWidgets div.Widget {
|
||||||
width: 90%;
|
width: 98%;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
@ -61,7 +61,7 @@ WidgetAreaEditor.prototype = {
|
|||||||
for(var i = 0; i < usedWidgets.length; i++) {
|
for(var i = 0; i < usedWidgets.length; i++) {
|
||||||
var widget = usedWidgets[i];
|
var widget = usedWidgets[i];
|
||||||
if(widget.id && (widget.id.indexOf("Widget[") != 0)) {
|
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" />
|
<input type="hidden" id="$Name" name="$IdxField" value="$Value" />
|
||||||
<div class="availableWidgetsHolder">
|
<div class="availableWidgetsHolder">
|
||||||
<h2><% _t('AVAILABLE', 'Available Widgets') %></h2>
|
<h2><% _t('AVAILABLE', 'Available Widgets') %></h2>
|
||||||
|
<p> </p>
|
||||||
<div class="availableWidgets" id="WidgetAreaEditor_availableWidgets">
|
<div class="availableWidgets" id="WidgetAreaEditor_availableWidgets">
|
||||||
<% if AvailableWidgets %>
|
<% if AvailableWidgets %>
|
||||||
<% control AvailableWidgets %>
|
<% control AvailableWidgets %>
|
||||||
@ -16,15 +17,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="usedWidgetsHolder">
|
<div class="usedWidgetsHolder">
|
||||||
<h2><% _t('INUSE', 'Widgets currently used') %></h2>
|
<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">
|
<div class="usedWidgets" id="WidgetAreaEditor_usedWidgets">
|
||||||
<% if UsedWidgets %>
|
<% if UsedWidgets %>
|
||||||
<% control UsedWidgets %>
|
<% control UsedWidgets %>
|
||||||
$EditableSegment
|
$EditableSegment
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="NoWidgets">
|
<div id="NoWidgets"></div>
|
||||||
<p><% _t('TOADD', 'To add widgets, drag them from the left area to here.') %></p>
|
|
||||||
</div>
|
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user