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.
Related
I created a custom bundle (content type) and I've created fields
One of those field is a file type field, is a video file, stored in the private storage. I installed the videojs module to allow to watch the video.
I need to show this field twice in the node page. One in the generic file formatter that allows the user to download the file, and I also need to play the video. I decided to set up as generic file formatter and customize the twig template to show again with the video player.
I achieve to show twice with the settings formatter (generic file) with this code in the node--mybundle--full.html.twig template
{{ content.field_sd_video }}
I thought it would be something easy like field+formatter:
{{ content.field_sd_video|videojs_formatter }}
But I can't find what is the simple way to achieve this. May be it's necesary more a tricky way ?
I finally found the solution, I put this code in preprocess node function. It has to be easy, but not easy to know how ;)
function mytheme_preprocess_node(&$variables) {
$variables['video_caption'] = $variables['node']->get('field_video')
->view(array(
'label' => 'hidden',
'type' => 'videojs_player_list'
));
}
and I only has to add this line in twig file:
{{ video_caption }}
in my case node--mybundle--full.html.twig template
For those arrive here looking for something similar
I was inspired by Twig Recipes on page 41
It was usefull for me Twig debugging. Playing with kint and node variable and the classes used to wrap the information. Then I found that the field comes with [FileFieldItemList] and then I found the view method that uses [EntityViewBuilderInterface]
I'm trying to manually position the Shareaholic sharebar WP plugin. I am using a vertical one, and want it to be in a fixed position on the left side of my screen beside my main content area. So far I have figured out how to get it onto my site, but not able to position it. I'm referencing this post of someone who tried to do a similar thing.
I'm using this code to insert it into my single.php
<?php echo do_shortcode('[shareaholic app="share_buttons" id="4766761"]'); ?>
But haven't had any luck with getting css positioning to work, or where exactly to put it in my single.php file
Right now it's just below this code :
<main class='content units <?php avia_layout_class( 'content' ); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
And it's showing up above the post content.
Any suggestions?
Many thanks
Jonny
Custom CSS should be added to your styles.css theme file, but it is recommended to create a child theme when making any adjustments within your theme so that you will not run the risk of losing your customization if/when your theme releases a new version and you update.
I have to download CSS file and apply style sheet to my app. I downloaded this file at the local folder and referenced it as
style.href = "ms-appdata:///local/css//custom.css";
and appended to head as
document.getElementsByTagName('head')[0].appendChild(style);
after document onready event.
Seems it has no effect (but I can see this element in the dom browser).
So is there any restriction for css source: app package, local folder? May be this impossible to reference downloaded CSS due to MS limitations? Or may be I'm doing something wrong? Any suggestions?
Do keep in mind, however, that you can access the document.styleSheets collection and list, add, or remove CSS rules dynamically from JavaScript. You can access the individual rules themselves through the DOM using statements like document.styleSheets[0].cssRules[0].style.color = "red" or you if you've fetched yourself some custom CSS text (dynamically from your other CSS file online) you can add its styles to one of your active style sheets using something like document.styleSheets[0].cssText = "{my CSS code}". Do be sure that you're manipulating the right style sheet by checking the document.styleSheets[0].href.
I think you're out of luck trying to head down that path.
Note that, for security reasons, you cannot navigate to
HTML you have downloaded to this location and you cannot
run any executable or potentially executable code, such
as script or CSS.
Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh781215
Also, this blog post seems possibly helpful: http://palermo4.com/post/How-to-Use-IFrames-in-WinRT-Apps.aspx
Hi I have tried every ways and means to load dojo page into ContentPane.
It seems That I am not able to do that. Correct me if I am wrong.
Looks like the only solution is through the creation and destroy of any widget while running
Clement
The dojo docs for dojox/layout/ContentPane (which allows references to script files) mentions your issue:
NOTE that dojo.require in script in the fetched file isn't recommended Many widgets need to be required at page load to work properly
#see http://dojotoolkit.org/api/1.8/dojox/layout/ContentPane
It looks like you just need to require these files in the parent widget.
The Objective:
Set a different path by default on my Telerik Upload component.
The Problem:
The path should be like "\\Server\Folder" and the porperty ScriptFilePath requires a path starting with ~/. I was looking telerik tutorials but ther's no help about that.
The Code: View
C# MVC3
#(Html.Telerik().Upload()
.Name("attach")
.Multiple(false)
**.ScriptFilesPath("~/")**
.Async(async => async
.Save(Actions.FileLoader_GetFile, Controllers.FileLoader)
.Remove(Actions.FileLoader_Remove, Controllers.FileLoader)
.AutoUpload(true)
))
According with Teklerik, it is not posible.
Is not possible to set a "default' directory for the <input type='file' /> html element, this is restriction by the browsers and there is no way to workaround it.
I suppose that this restriction makes sense since there is no guarantee that the folder set as default for the upload will exist on the given client.