mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed bugs with Image upload fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60779 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4acd84a837
commit
1cc1fb2805
@ -23,7 +23,7 @@ Director::addRules(10, array(
|
||||
//'Security/$Action/$ID' => 'Security',
|
||||
'db//$Action' => 'DatabaseAdmin',
|
||||
'$Controller//$Action/$ID/$OtherID' => '*',
|
||||
'images//$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||
'images' => 'Image_Uploader',
|
||||
'' => 'RootURLController',
|
||||
'sitemap.xml' => 'GoogleSitemap',
|
||||
'api/v1' => 'RestfulServer',
|
||||
|
@ -76,6 +76,9 @@ class RequestHandlingData extends ViewableData {
|
||||
foreach($this->stat('url_handlers') as $rule => $action) {
|
||||
if(isset($_REQUEST['debug_request'])) Debug::message("Testing '$rule' with '" . $request->remaining() . "' on $this->class");
|
||||
if($params = $request->match($rule, true)) {
|
||||
// FIXME: This unnecessary coupling was added to fix a bug in Image_Uploader.
|
||||
if($this instanceof Controller) $this->urlParams = $request->allParams();
|
||||
|
||||
if(isset($_REQUEST['debug_request'])) {
|
||||
Debug::message("Rule '$rule' matched to action '$action' on $this->class. Latest request params: " . var_export($request->latestParams(), true));
|
||||
}
|
||||
|
@ -453,6 +453,11 @@ class Image_Saver extends DBField {
|
||||
* @subpackage filesystem
|
||||
*/
|
||||
class Image_Uploader extends Controller {
|
||||
static $url_handlers = array(
|
||||
'$Action!/$Class!/$ID!/$Field!/$FormName!' => '$FormName',
|
||||
'$Action/$Class/$ID/$Field' => 'handleAction',
|
||||
);
|
||||
|
||||
/**
|
||||
* Ensures the css is loaded for the iframe.
|
||||
*/
|
||||
|
@ -10,11 +10,16 @@
|
||||
.SelectionGroup li input {
|
||||
width: 20px;
|
||||
float : left;
|
||||
}
|
||||
|
||||
.mainblock.allassets ul {
|
||||
padding: 0 0 0 10px;
|
||||
height:100px;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
|
||||
.mainblock.allassets ul li {
|
||||
width: 150px;
|
||||
}
|
||||
.SelectionGroup li div.field {
|
||||
display: none;
|
||||
font-size: 1em;
|
||||
|
Loading…
Reference in New Issue
Block a user