forked from pollen8/fabrik
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Fabrik.jLayouts object to js. Add in php via FabrikHTMLHelper::…
…jLayoutJs(). Implemented this in the fileupload element when the js dynamically needs to add progress bars and buttons. Fix Fileupload widget jlayout so that it can be overridden by template jlayouts. Improved fabrik-icon jlayout coverage
- Loading branch information
Showing
7 changed files
with
202 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Default list element render | ||
* Override this file in plugins/fabrik_element/{plugin}/layouts/fabrik-element-{plugin}-list.php | ||
*/ | ||
|
||
defined('JPATH_BASE') or die; | ||
|
||
$d = $displayData; | ||
|
||
$klass = ''; | ||
|
||
$stripped = isset($d->stripped) && $d->stripped === true ? 'progress-striped': ''; | ||
$animated = isset($d->animated) && $d->animated === true ? 'active' : ''; | ||
$value = isset($d->value) ? (int) $d->value : 0; | ||
|
||
if (isset($d->context)) { | ||
switch ($d->context) { | ||
case 'success': | ||
$klass = 'bar-success'; | ||
break; | ||
case 'info': | ||
$klass = 'bar-info'; | ||
break; | ||
case 'warning': | ||
$klass = 'bar-warning'; | ||
break; | ||
case 'danger': | ||
$klass = 'bar-danger'; | ||
break; | ||
|
||
} | ||
} | ||
|
||
?> | ||
<div class="progress <?php echo $stripped;?>"> | ||
<div class="bar <?php echo $klass;?> <?php echo $animated;?>" style="width: <?php echo $value;?>%;"></div> | ||
</div> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.