Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:yii2:examples [2018/05/16 12:17] smayr [Flash Messages] |
systems:yii2:examples [2018/10/04 17:05] (current) ajdavis [Copy to Clipboard using Javascript] |
||
---|---|---|---|
Line 310: | Line 310: | ||
' | ' | ||
], | ], | ||
- | image: | + | |
+ | intro_image: | ||
+ | [ | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ], | ||
+ | [ | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | // Add image size limit | ||
+ | ' | ||
+ | ' | ||
+ | Yii:: | ||
+ | '' | ||
+ | '" | ||
+ | ], | ||
| | ||
// dates | // dates | ||
Line 971: | Line 989: | ||
<code php> | <code php> | ||
<? | <? | ||
- | use yii\helpers\Url; | + | // Method 1: Button |
- | ... | + | \yii\helpers\Html:: |
- | // Method | + | ' |
- | echo Html:: | + | ' |
+ | ]); | ||
+ | |||
+ | // Method | ||
+ | echo \yii\helpers\Html:: | ||
- | // Method | + | // Method |
- | $url = urldecode(Url:: | + | $url = urldecode(\yii\helpers\Url:: |
- | echo Html:: | + | echo \yii\helpers\Html:: |
| | ||
- | // Method | + | // Method |
- | echo Url:: | + | echo \yii\helpers\Url:: |
?> | ?> | ||
</ | </ | ||
Line 1508: | Line 1530: | ||
=== Modal Window === | === Modal Window === | ||
+ | * See: [[systems: | ||
- | <code php> | ||
- | <?php | ||
- | $itemImage = (!empty($model-> | ||
- | Yii:: | ||
- | '' | ||
- | ); | ||
- | | ||
- | // Image Thumbnail | ||
- | if(!empty($itemImage)) { | ||
- | echo "< | ||
- | } else { | ||
- | echo "< | ||
- | base64_encode(\app\models\Tool:: | ||
- | } | ||
- | |||
- | echo Html:: | ||
- | [' | ||
- | ); | ||
- | |||
- | // Modal to view image | ||
- | yii\bootstrap\Modal:: | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ], | ||
- | ]); | ||
- | |||
- | if(!empty($itemImage)) { | ||
- | echo "< | ||
- | } else { | ||
- | echo "< | ||
- | base64_encode(\app\models\Tool:: | ||
- | } | ||
- | echo '< | ||
- | echo ' | ||
- | echo '</ | ||
- | |||
- | yii\bootstrap\Modal:: | ||
- | ?> | ||
- | </ | ||
== Events == | == Events == | ||
Line 1677: | Line 1658: | ||
' | ' | ||
' | ' | ||
- | ' | + | ' |
+ | //' | ||
], | ], | ||
[ | [ | ||
Line 2977: | Line 2959: | ||
$dataProviderPrice-> | $dataProviderPrice-> | ||
</ | </ | ||
+ | |||
+ | == Copy to Clipboard using Javascript == | ||
+ | |||
+ | # Add a reference to the // | ||
+ | # Add javascript to your page that creates an instance of ClipboardJS: | ||
+ | <code php> | ||
+ | # Add a button that follows this logic: | ||
+ | <code html> | ||
+ | <i class=" | ||
+ | </ |