Class FileDropzoneRendererTest.
More...
|
const | STANDARD = "ILIAS\\UI\\Component\\Dropzone\\File\\Standard" |
|
const | WRAPPER = "ILIAS\\UI\\Component\\Dropzone\\File\\Wrapper" |
|
◆ dropzone()
DropzoneRendererTest::dropzone |
( |
| ) |
|
|
protected |
◆ getUIFactory()
DropzoneRendererTest::getUIFactory |
( |
| ) |
|
Definition at line 518 of file DropzoneRendererTest.php.
References $factory, legacy(), and modal().
521 public function button()
523 return new I\Component\Button\Factory(
new I\
Component\SignalGenerator());
525 public function modal()
527 return new I\Component\Modal\Factory(
new I\
Component\SignalGenerator());
529 public function link()
531 return new I\Component\Link\Factory(
new I\
Component\SignalGenerator());
533 public function dropdown()
535 return new I\Component\Dropdown\Factory(
new I\
Component\SignalGenerator());
537 public function symbol() :
C\Symbol\Factory
539 return new I\Component\Symbol\Factory(
545 public function legacy($content)
547 return new I\Component\Legacy\Legacy($content,
new I\
Component\SignalGenerator());
modal()
This second example shows a scenario in which the Close Button is used in an overlay as indicated in ...
◆ setUp()
DropzoneRendererTest::setUp |
( |
| ) |
|
Definition at line 23 of file DropzoneRendererTest.php.
25 $sig_gen = new \ILIAS\UI\Implementation\Component\SignalGenerator();
26 $this->legacy_factory =
new I\Component\Legacy\Factory($sig_gen);
◆ test_implements_factory_interface()
DropzoneRendererTest::test_implements_factory_interface |
( |
| ) |
|
◆ testModifiers()
DropzoneRendererTest::testModifiers |
( |
| ) |
|
Definition at line 492 of file DropzoneRendererTest.php.
References $message, $url, and dropzone().
494 $url =
'https://ilias.de/123?test=8&lorem=ipsum';
495 $message =
'Everything\'s fine here, just drop some files...';
496 $filesize =
new DataSize(1024, DataSize::KB);
497 $file_types = array(
'pdf',
'docx' );
502 ->withUserDefinedFileNamesEnabled(
true)
503 ->withUserDefinedDescriptionEnabled(
true)
504 ->withAllowedFileTypes($file_types)
505 ->withFileSizeLimit($filesize)
506 ->withMaxFiles($allowed_files);
508 $this->assertEquals(
$url, $dropzone->getUploadUrl());
509 $this->assertEquals(
$message, $dropzone->getMessage());
510 $this->assertTrue($dropzone->allowsUserDefinedFileNames());
511 $this->assertTrue($dropzone->allowsUserDefinedFileDescriptions());
512 $this->assertEquals($file_types, $dropzone->getAllowedFileTypes());
513 $this->assertEquals($filesize, $dropzone->getFileSizeLimit());
514 $this->assertEquals(
"1.024 KB", $dropzone->getFileSizeLimit()->__toString());
515 $this->assertEquals($allowed_files, $dropzone->getMaxFiles());
◆ testRenderMetadata()
DropzoneRendererTest::testRenderMetadata |
( |
| ) |
|
Definition at line 215 of file DropzoneRendererTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), dropzone(), and ILIAS_UI_TestBase\getDefaultRenderer().
217 $with_user_defined_names_html = $this->
brutallyTrimHTML(
'<div id="id_1" class="il-dropzone-base"> 218 <div class="clearfix hidden-sm-up"></div> 219 <div class="il-upload-file-list" > 220 <div class="container-fluid il-upload-file-items"> 221 <div class="error-messages" style="display: none;"> 222 <div class="alert alert-danger" role="alert"> 223 <!-- General error messages are inserted here with javascript --> 226 <!-- rows from templates are cloned here with javascript --> 229 <div class="container-fluid" > 230 <!-- hidden Template --> 231 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 232 <div class="col-xs-12 col-no-padding"> 233 <span class="file-info toggle"><a class="glyph" aria-label="collapse_content"><span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span></a><a class="glyph" aria-label="expand_content"><span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span></a></span><!-- Display Filename--> 234 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 236 <!-- Display Filesize--> 237 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 239 <!-- Dropdown with actions--> 240 <span class="pull-right remove"> 241 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li><li><button class="btn btn-link" aria-label="edit_metadata" data-action="">edit_metadata</button></li></ul></div>--> 242 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 245 <div class="progress" style="margin: 10px 0; display: none;"> 246 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 248 <!-- Error Messages --> 249 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 250 <!-- Error message for file is inserted with javascript here --> 252 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 253 <!-- Success message for file is inserted with javascript here --> 256 <div class="form-horizontal metadata" style="display: none;"> 257 <div class="form-group"> 258 <label class="col-sm-3 control-label">filename</label> 259 <div class="col-sm-9"><input type="text" class="form-control filename-input"></div> 264 <!-- li from templates are cloned here with javascript --> 267 <div class="container-fluid"> 268 <div class="il-dropzone standard clearfix row" data-upload-id="id_1"> 269 <div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> 270 <!--col-no-padding--><a href="#" >select_files_from_computer</a> 272 <div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">drag_files_here</span></div> 274 <div class="clearfix hidden-sm-up"></div> 278 $with_user_defined_names = $this->
dropzone()
279 ->standard(
'https://ilias.de/ilias.php')
280 ->withUserDefinedFileNamesEnabled(
true);
282 $this->assertEquals($with_user_defined_names_html, $html);
285 <div id="id_1" class="il-dropzone-base"> 286 <div class="clearfix hidden-sm-up"></div> 287 <div class="il-upload-file-list" > 288 <div class="container-fluid il-upload-file-items"> 289 <div class="error-messages" style="display: none;"> 290 <div class="alert alert-danger" role="alert"> 291 <!-- General error messages are inserted here with javascript --> 294 <!-- rows from templates are cloned here with javascript --> 297 <div class="container-fluid" > 298 <!-- hidden Template --> 299 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 300 <div class="col-xs-12 col-no-padding"> 301 <span class="file-info toggle"><a class="glyph" aria-label="collapse_content"><span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span></a><a class="glyph" aria-label="expand_content"><span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span></a></span><!-- Display Filename--> 302 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 304 <!-- Display Filesize--> 305 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 307 <!-- Dropdown with actions--> 308 <span class="pull-right remove"> 309 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li><li><button class="btn btn-link" aria-label="edit_metadata" data-action="">edit_metadata</button></li></ul></div>--> 310 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 313 <div class="progress" style="margin: 10px 0; display: none;"> 314 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 316 <!-- Error Messages --> 317 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 318 <!-- Error message for file is inserted with javascript here --> 320 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 321 <!-- Success message for file is inserted with javascript here --> 324 <div class="form-horizontal metadata" style="display: none;"> 325 <div class="form-group"> 326 <label class="col-sm-3 control-label" for="description-input">description</label> 327 <div class="col-sm-9"><textarea class="form-control description-input" id="description-input" rows="3"></textarea></div> 332 <!-- li from templates are cloned here with javascript --> 335 <div class="container-fluid"> 336 <div class="il-dropzone standard clearfix row" data-upload-id="id_1"> 337 <div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> 338 <!--col-no-padding--><a href="#" >select_files_from_computer</a> 340 <div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">drag_files_here</span></div> 342 <div class="clearfix hidden-sm-up"></div> 345 $with_user_defined_descriptions = $this->
dropzone()
346 ->standard(
'https://ilias.de/ilias.php')
347 ->withUserDefinedDescriptionEnabled(
true);
349 ->render($with_user_defined_descriptions));
350 $this->assertEquals($with_user_defined_descriptions_html, $html);
353 <div id="id_1" class="il-dropzone-base"> 354 <div class="clearfix hidden-sm-up"></div> 355 <div class="il-upload-file-list" > 356 <div class="container-fluid il-upload-file-items"> 357 <div class="error-messages" style="display: none;"> 358 <div class="alert alert-danger" role="alert"> 359 <!-- General error messages are inserted here with javascript --> 362 <!-- rows from templates are cloned here with javascript --> 365 <div class="container-fluid" > 366 <!-- hidden Template --> 367 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 368 <div class="col-xs-12 col-no-padding"> 369 <span class="file-info toggle"><a class="glyph" aria-label="collapse_content"><span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span></a><a class="glyph" aria-label="expand_content"><span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span></a></span><!-- Display Filename--> 370 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 372 <!-- Display Filesize--> 373 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 375 <!-- Dropdown with actions--> 376 <span class="pull-right remove"> 377 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li><li><button class="btn btn-link" aria-label="edit_metadata" data-action="">edit_metadata</button></li></ul></div>--> 378 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 381 <div class="progress" style="margin: 10px 0; display: none;"> 382 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 384 <!-- Error Messages --> 385 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 386 <!-- Error message for file is inserted with javascript here --> 388 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 389 <!-- Success message for file is inserted with javascript here --> 392 <div class="form-horizontal metadata" style="display: none;"> 393 <div class="form-group"> 394 <label class="col-sm-3 control-label">filename</label> 395 <div class="col-sm-9"><input type="text" class="form-control filename-input"></div> 397 <div class="form-group"> 398 <label class="col-sm-3 control-label" for="description-input">description</label> 399 <div class="col-sm-9"><textarea class="form-control description-input" id="description-input" rows="3"></textarea></div> 404 <!-- li from templates are cloned here with javascript --> 407 <div class="container-fluid"> 408 <div class="il-dropzone standard clearfix row" data-upload-id="id_1"> 409 <div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> 410 <!--col-no-padding--><a href="#" >select_files_from_computer</a> 412 <div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">drag_files_here</span></div> 414 <div class="clearfix hidden-sm-up"></div> 417 $with_user_defined_names_and_descriptions = $this->
dropzone()
418 ->standard(
'https://ilias.de/ilias.php')
419 ->withUserDefinedDescriptionEnabled(
true)
420 ->withUserDefinedFileNamesEnabled(
true);
422 ->render($with_user_defined_names_and_descriptions));
423 $this->assertEquals($with_user_defined_names_and_descriptions_html, $html);
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderStandardDropzone()
DropzoneRendererTest::testRenderStandardDropzone |
( |
| ) |
|
should be rendered with the css class .standard and no content inside the dropzone div.
Definition at line 41 of file DropzoneRendererTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), dropzone(), and ILIAS_UI_TestBase\getDefaultRenderer().
46 <div id="id_1" class="il-dropzone-base"> 47 <div class="clearfix hidden-sm-up"></div> 48 <div class="il-upload-file-list" > 49 <div class="container-fluid il-upload-file-items"> 50 <div class="error-messages" style="display: none;"> 51 <div class="alert alert-danger" role="alert"> 52 <!-- General error messages are inserted here with javascript --> 55 <!-- rows from templates are cloned here with javascript --> 58 <div class="container-fluid" > 59 <!-- hidden Template --> 60 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 61 <div class="col-xs-12 col-no-padding"> 62 <!-- Display Filename--> 63 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 65 <!-- Display Filesize--> 66 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 68 <!-- Dropdown with actions--> 69 <span class="pull-right remove"> 70 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li></ul></div>--> 71 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 74 <div class="progress" style="margin: 10px 0; display: none;"> 75 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 77 <!-- Error Messages --> 78 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 79 <!-- Error message for file is inserted with javascript here --> 81 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 82 <!-- Success message for file is inserted with javascript here --> 86 <!-- li from templates are cloned here with javascript --> 89 <div class="container-fluid"> 90 <div class="il-dropzone standard clearfix row" data-upload-id="id_1"> 91 <div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> 92 <!--col-no-padding--><a href="#" >select_files_from_computer</a> 94 <div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">drag_files_here</span></div> 96 <div class="clearfix hidden-sm-up"></div> 101 $standardDropzone = $this->
dropzone()->standard(
'');
105 $this->assertEquals($expectedHtml, $html);
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderStandardDropzoneWithMessage()
DropzoneRendererTest::testRenderStandardDropzoneWithMessage |
( |
| ) |
|
should be rendered with the css class .standard and a span-tag with the passed in message inside the dropzone div.
Definition at line 113 of file DropzoneRendererTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), dropzone(), and ILIAS_UI_TestBase\getDefaultRenderer().
117 $expectedHtml = $this->
brutallyTrimHTML(
'<div id="id_1" class="il-dropzone-base"><div class="clearfix hidden-sm-up"></div><div class="il-upload-file-list" ><div class="container-fluid il-upload-file-items"><div class="error-messages" style="display: none;"><div class="alert alert-danger" role="alert"><!-- General error messages are inserted here with javascript --></div></div><!-- rows from templates are cloned here with javascript --></div><!-- Templates --><div class="container-fluid" ><!-- hidden Template --><div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"><div class="col-xs-12 col-no-padding"><!-- Display Filename--><span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --></span><!-- Display Filesize--><span class="file-info filesize">100KB<!-- File size is inserted with javascript here --></span><!-- Dropdown with actions--><span class="pull-right remove"><!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li></ul></div>--><button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button></span><!-- Progress Bar--><div class="progress" style="margin: 10px 0; display: none;"><div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div></div><!-- Error Messages --><div class="file-error-message alert alert-danger" role="alert" style="display: none;"><!-- Error message for file is inserted with javascript here --></div><div class="file-success-message alert alert-success" role="alert" style="display: none;"><!-- Success message for file is inserted with javascript here --></div></div></div><!-- li from templates are cloned here with javascript --></div></div><div class="container-fluid"><div class="il-dropzone standard clearfix row" data-upload-id="id_1"><div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> <!--col-no-padding--><a href="#" >select_files_from_computer</a></div><div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">message</span></div></div><div class="clearfix hidden-sm-up"></div></div></div>');
120 $standardDropzone = $this->
dropzone()->standard(
'')->withMessage(
'message');
124 $this->assertEquals($expectedHtml, $html);
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderWrapperDropzone()
DropzoneRendererTest::testRenderWrapperDropzone |
( |
| ) |
|
A wrapper dropzone -----------------------------------------------------------——.
should be rendered with the css class .wrapper and all passed in ILIAS UI components inside the div.
Definition at line 136 of file DropzoneRendererTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), dropzone(), and ILIAS_UI_TestBase\getDefaultRenderer().
140 <div id="id_1" class="il-dropzone-base"> 141 <div class="il-dropzone wrapper" data-upload-id="id_1"> 142 <p>Pretty smart, isn\'t it?</p> 143 <p>Yeah, this is really smart.</p> 145 <div class="modal fade il-modal-roundtrip" tabindex="-1" role="dialog" id="id_4"> 146 <div class="modal-dialog" role="document" data-replace-marker="component"> 147 <div class="modal-content"> 148 <div class="modal-header"> 149 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> 150 <span class="modal-title">upload</span> 152 <div class="modal-body"> 153 <div class="il-upload-file-list" > 154 <div class="container-fluid il-upload-file-items"> 155 <div class="error-messages" style="display: none;"> 156 <div class="alert alert-danger" role="alert"> 157 <!-- General error messages are inserted here with javascript --> 160 <!-- rows from templates are cloned here with javascript --> 163 <div class="container-fluid" > 164 <!-- hidden Template --> 165 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 166 <div class="col-xs-12 col-no-padding"> 167 <!-- Display Filename--> 168 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 170 <!-- Display Filesize--> 171 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 173 <!-- Dropdown with actions--> 174 <span class="pull-right remove"> 175 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li></ul></div>--> 176 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 179 <div class="progress" style="margin: 10px 0; display: none;"> 180 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 182 <!-- Error Messages --> 183 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 184 <!-- Error message for file is inserted with javascript here --> 186 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 187 <!-- Success message for file is inserted with javascript here --> 191 <!-- li from templates are cloned here with javascript --> 195 <div class="modal-footer"><button class="btn btn-default btn-primary" data-action="" disabled="disabled">upload</button><button class="btn btn-default" data-dismiss="modal" aria-label="Close">cancel</button></div> 202 $exampleTextQuestion = $this->legacy_factory->legacy(
"<p>Pretty smart, isn't it?</p>");
203 $exampleTextAnswer = $this->legacy_factory->legacy(
"<p>Yeah, this is really smart.</p>");
204 $wrapperDropzone = $this->
dropzone()->wrapper(
'', [
205 $exampleTextQuestion,
211 $this->assertEquals($expectedHtml, $html);
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testWithButton()
DropzoneRendererTest::testWithButton |
( |
| ) |
|
Definition at line 427 of file DropzoneRendererTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), dropzone(), and ILIAS_UI_TestBase\getDefaultRenderer().
430 <div id="id_1" class="il-dropzone-base"> 431 <div class="clearfix hidden-sm-up"></div> 432 <div class="il-upload-file-list" > 433 <div class="container-fluid il-upload-file-items"> 434 <div class="error-messages" style="display: none;"> 435 <div class="alert alert-danger" role="alert"> 436 <!-- General error messages are inserted here with javascript --> 439 <!-- rows from templates are cloned here with javascript --> 442 <div class="container-fluid" > 443 <!-- hidden Template --> 444 <div class="il-upload-file-item il-upload-file-item-template clearfix row standard hidden"> 445 <div class="col-xs-12 col-no-padding"> 446 <!-- Display Filename--> 447 <span class="file-info filename">FILENAME<!-- File name is inserted with javascript here --> 449 <!-- Display Filesize--> 450 <span class="file-info filesize">100KB<!-- File size is inserted with javascript here --> 452 <!-- Dropdown with actions--> 453 <span class="pull-right remove"> 454 <!--<div class="dropdown"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-label="actions" aria-haspopup="true" aria-expanded="false" > <span class="caret"></span></button><ul class="dropdown-menu"><li><button class="btn btn-link" aria-label="delete_file" data-action="">remove</button></li></ul></div>--> 455 <button type="button" class="close" aria-label="close"><span aria-hidden="true">×</span></button> 458 <div class="progress" style="margin: 10px 0; display: none;"> 459 <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div> 461 <!-- Error Messages --> 462 <div class="file-error-message alert alert-danger" role="alert" style="display: none;"> 463 <!-- Error message for file is inserted with javascript here --> 465 <div class="file-success-message alert alert-success" role="alert" style="display: none;"> 466 <!-- Success message for file is inserted with javascript here --> 470 <!-- li from templates are cloned here with javascript --> 473 <div class="container-fluid"> 474 <div class="il-dropzone standard clearfix row" data-upload-id="id_1"> 475 <div class="col-xs-12 col-md-3 col-sm-12 col-lg-3 dz-default dz-message il-dropzone-standard-select-files-wrapper "> 476 <!--col-no-padding--><a href="#" >select_files_from_computer</a> 478 <div class="col-xs-12 col-md-9 col-sm-12 col-lg-9 col-no-padding"><span class="pull-right dz-default dz-message">drag_files_here</span></div> 480 <div class="clearfix hidden-sm-up"></div> 482 <button class="btn btn-default" data-action="#" id="id_2" disabled="disabled">Label</button> 484 $button =
new I\Component\Button\Standard(
'Label',
'#');
485 $with_button = $this->
dropzone()->standard(
'')->withUploadButton($button);
487 $this->assertEquals($expected_html, $html);
488 $this->assertEquals($button, $with_button->getUploadButton());
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ STANDARD
const DropzoneRendererTest::STANDARD = "ILIAS\\UI\\Component\\Dropzone\\File\\Standard" |
◆ WRAPPER
const DropzoneRendererTest::WRAPPER = "ILIAS\\UI\\Component\\Dropzone\\File\\Wrapper" |
The documentation for this class was generated from the following file: