only change css file of yii widget, where to save this file - yii

I want to make changes to a css file of a widget (Yii). Where do I have to put only the changed css if i do not want to change the core files?

Ok....
example CGridView widget:
define id for above widget then (example: #id=gridID)
now
your css file: #gridID.grid-view { property: change}

Related

How to add custom header and footer in laravel tcpdf?

How can I add custom header and footer text in tcpdf using laravel controller
Following the TCPDF doc I can create a pdf file fine. but when I want to add custom footer text I didn't do that.
This is the Controller.
How can I add custom footer in tcpdf or you have any solution for the custom footer any other package which I will use custom footer easily please suggest me.
I fixed my problem using mPdf instead of tcpdf. Using mPdf I just called SetFooter() function.
$mpdf = new mPDF();
$mpdf->Bookmark('Start of the document');
$mpdf->WriteHTML('<div>This is body text </div>');
$mpdf->SetFooter('<div>This is custom footer!</div>');
$mpdf->Output();
Now custom footer worked for me!

Stencil - How are new fonts added?

How or where is this variable defined in stencil?
{{ getFontsCollection }}
I'm hoping to include other google fonts in the theme. Are they automatically included if they are listed in schema.json?
According to the Stencil Docs, getFontsCollection is a handlebars injection helper function used to help you load the resource on the page:
{{getFontsCollection}}
The getFontsCollection helper is custom to Stencil. It returns a link tag that loads all selected font collections. It takes no parameters.
The helper method pulls from your global getThemeSettings() which are located in your config.json file. Look for the primary-font and secondary-font fields
"settings": {
"primary-font": "Google_Lato_700,400,300",
"secondary-font": "Google_Droid+Serif_400italic,400,700",
...
}
They are added via the config file

Datetimepicker shows up in a 'naked' way

I want to set up both date and time in a custom field (Yii).
For this i've chosen this datetimepicker.
But as i've loaded it into protected/extentions it now works, but its outlook is somehow 'naked'. I've rounded datepicker's appearence in red.
Its configuraition is:
<?php $form->widget ('ext.CJuiDateTimePicker.CJuiDateTimePicker',
array (
'attribute'=>'start',
'model'=>$model,
'value' => $model->start,
'language' => 'en',
'options'=>array (
// 'timeFormat'=>strtolower(Yii::app()->locale->timeFormat),
'showSecond'=>true,
),
)
); ?>
How to fix it? Am i missing some skin files? How to get them?
I use bootstrap theme FYI.
This is a styling issue .
Download correct Style.css file it will show datepicker correctly .
The issue was that in the Yii app development i was using the NlsClientScript Yii Extention for preventing duplicate scripts loading. So, the datatimepicker's css file has not been loaded into the current nlsXXXXXXX.css file. It turned that this NlsClientScript does manage/aggregate the css files load, the docs saying opposite though...
From documentation:
The extension does not prevent the multiple loading of CSS files.
So I've found the corresponding file, deleted it and reloaded the app.
From documentation:
The extension doesn't watch wether a js/css file has been changed. If you set the merge functionality and some file changed, you need to delete the cached merged file manually, otherwise you'll get the old merged one.

Sencha touch Theming a specific Container in scss

I wanted to know how to theme a specific Container and not every Container in the whole app.
#ext-element-18 x-scroll-container
if I wanted to change a background color of this would it be?
app.scss
#ext-element-18 x-scroll-container{
background-color: #000;
}
this is not working
It's bad pratice to base your CSS on auto-generated id's like ext-element-18. It can change anytime. So what I suggest is you use the cls config
Give a cls attribute to your contrainer :
cls:'my-css-class'
Then use this class in your CSS or SCSS file to customize the component.
If you ever need to reach children of your component you can now do something like
.my-css-class .x-scroll-container{
// custom style
}
This works too;
Ext.get(Ext.fly('ext-groepen_detail-1').query('.x-scroll-container')).elements[0].style.backgroundImage = 'url("http://somedomain/path/to/test logo 2.jpg")';

PDFKit gem can not hide link - Rails 3

Hello people
I was following this tutorial to generate a "pdf" file from a view in my rails app. Everything was ok, until I tried to hide the "link to download". Everytime I generate the PDF file, the link is still shown. I think that the "#media print" style in the css file is not working.
Is there another way to hide the link in the generated pdf file?
Thanks for the help
It is answered here http://railscasts.com/episodes/220-pdfkit. Check section application.css
You need to give an id for the "link to download" then in the CSS file hide the element using display: none. In the above example the id name is pdf_link and css properties are defined like this -
#pdf_link{ display: none; }
That should work.