How to disable choose file in PrimeNg - primeng

<p-fileUpload mode="basic" [disabled]="true" name="demo[]" url="./upload.php" accept="application/x-pem-file" (onSelect)="myUploader($event, i)" maxFileSize="1000000"></p-fileUpload>
Here disabled is not working as expected, it needs to restrict user click event action

Its a very basic version of file chooser demo for primeng with disabled property, and Its working fine.
working code

Related

Customizing & Styling Angular X-Editable Popover Input

I'm using angular x-editable in my project for an editable popover. I've successfully made changes to the look of my confirmation button to an .svg I wanted to use and removed the Cancel button doing:
app.run(function(editableOptions, editableThemes) {
editableOptions.theme = 'default';
editableThemes[default].cancelTpl = '';
editableThemes[default].submitTpl = '<img class="popoverSubmitBtn"
src="images/confirmationBtn.svg" ng-click="$form.$submit()">';
});
However I am having issues when trying to change editableThemes[default].inputTpl. It seems like changes to inputTpl are not being registered for some reason. What I would like is for the input box that shows in the popover to have a circular 'x' button to clear the current input WITHIN the input text field.
This was actually default behavior in the original x-editable (see here at Twitter typeahead.js demo). While there is an equivalent to use editableOptions.displayClearButton=true, this creates an entire button next to the input box, much like the confirmation button, which is not what I want.
My plan was to use a directive here that provides the 'clear' button and use editableThemes[default].inputTpl = '<input type="text" reset-directive>'; but again, seems like its broken. Even this open issue here leads me to believe it was never working as intended.
Has anyone had any luck with this or knows of any workarounds that may help in my situation?
ALSO- a bit unrelated but on the topic of styling, how do I move the position of where the popover shows up? Currently it's smack-dab in the middle of where my cursor is when I click the text to activate popover, but I would like it a bit higher and to the right.
Got it working. For those with similar issues:
Styling for the popover can be controlled through xeditable.css found in the bower_components directory after installation
While inputTpl isn't functioning the way I expected, I added the
custom directive to the input field using e-* (i.e. e-my-directive) with no issues.

tinyMCE in an angularjs modal dialog only works on the first popup

There is a modal box that is opened from the page multiple times. The tinyMCE control is initiated on the first popup but on subsequent popups, the textarea is not transformed.
I tried using a timer as suggested here stackoverflow/17825282 but got the same result.
Code on Plunker
From docs: https://github.com/angular-ui/ui-tinymce
Be sure not to set an id attribute.)
So just remove id:
<textarea ui-tinymce="" ng-model="tinymceModel">{{SectionTemplate.Preface}}</textarea>
http://plnkr.co/edit/Mv2fLWuKiVjEIy77XNF0?p=preview

Can AngularStrap bs-select be configured to be a dropup?

I tried adding the bootstrap dropup class to a <select> using bs-select. It made the arrow point upwards but the menu was still displayed below the button. Is it possible to make a bs-select menu be displayed above the button, like it is for a regular Bootstrap "dropup" control? I tried to use BootstrapAdditions thinking that might help, but could not get it to work.

CodedUI Test HtmlButton disabled in JS

I'm having an issue in Coded UI where a HTMLButton is disabled until the user selects an item in a list box. At which point the button is enabled via javascript. The problem I'm having is that the recorder is not picking up the change. When I run the test I get a "ActionNotSupportedOnDisabledControlException". I've tried the WaitForControlEnabled, Find and WaitForCotrolReady methods but nothing seems to work. Is there a way I can make the button enabled in code?
First you need to check control is disabled or not visible.
I have faced same issue where control was hidden under another control, so it was not visible directly.
You can enable button by executing Javascript from your Coded UI test/script.
Javascript Code:
document.getElementById<ID>.disabled = false;
document.getElementsByClassName<>.style.visibility='visible';
Test/Script Code:
this.UIMap.Window.ExecuteScript(<above / your JavaScript>);

ng-click stops working when using a kendo grid

I am trying to get a ng-click event to fire correctly when integrating the Angular Kendo UI.
The following Plunker shows a working example, click the button click me and a modal window appears, however if I add the kendo-grid attribute to line 18 of index.html then the pop up does not work. e.g. changing:-
<table>
to:
<table kendo-grid>
Then the modal popup does not work. I suspect that when the grid is rendered then angular loses the binding. Not sure how to fix it. Can anyone help?
The problem is the angularjs-kendo labs master file does not support command binding and a couple of issues have been raised.
Basically you need to take the javascript from the compile-kendo-grid-rows
See working plunker.

Resources