Two Publish Events Not working on Single Click in Dojo - dojo

Two publishGlobalMessage() events not working at first click on the attach-point mentioned in the code . Publish events are not working on first Click.
The code for the Two publishGlobalMessage() works on the second click only .
Cleared the cache and tried again , but still not finding the solution.
The Code snippet is as:-
on(this._attachpTName", "click", lang.hitch(this.function(){
this._handleClick("targetpage",{page:hash().split(:)[0]}};
_handleClick:function(targetPage,props){
this.publishGlobalMessage("navigate",targetPage,props);
this.publishGlobalMessage("risk/level/selected",icon.riskLevel);
}
Kindly suggest what should be done.

The explicit include of the module in the parent js file helped .
It solved the explicit publish-subscribe problem in the dojo.
Quick fix and this made me solve this problem.

Related

Bootstrap tooltip not showing in ASP.Net MVC application

I've got a rather weird scenario going on here. I am trying to add tooltips to an existing ASP.Net MVC application in which I'm upgrading Bootstrap to 4.6.2. The upgrade was very smooth with no complications; I just want to replace the default display of titles with the nicer looking tooltips, but for some reason they're not appearing. I tried to simplify things by creating a new view to isolate the problem, and still no tooltip. I tried again with completely new solution, and wouldn't you know it, it works! So my question isn't "how do I create tooltips", but "how can I debug what's going on in the failing project?"
Here's what I've discovered so far. I believe you can see everything that's relevant in this screenshot of the nearly-empty view. All the included script files are there in the right order, my script is there, initializing the tooltip, and there are no messages in the console. When I hover over the link, a new <div> element is added to the DOM. In DevTools, I use the arrows to expand the tree, showing everything in the tooltip. The .fade:not(.show) CSS selector is the reason I don't see it. In the working solution, the show class is properly added to the tooltip's <div>.
So, could there be some setting in the existing application preventing the addition of the show class? Is something failing in the tooltip code,causing it to never add the show class without reporting errors? How should I continue debugging this? I tried stepping through the bootstap.js file, but being a JS noob, I'm getting a little lost. The screenshot is from Chrome, but I see the same behavior in Firefox.
This turned out to be one of those embarrassing oversights. My BundleConfig.cs file was still pointing to old Javascript files that were still hanging around after the upgrade. I should have seen it in the version numbers in the <script> tags.

How to use (Is there) code completion without using vue-cli

i try to do my first steps with vue.js.
My Question is:
Is there a possibility for the use of code completion if i dont wat to use the cli.
Therefore i have no .vue-Files.
I just use vue by binding the script (vue.js) over the < script>-tag to my html code.
I created a new javaScript-File (myVue.js) and also include it per script-tag in my html.
Vue itself is working correctly!
My problem is that the plugins i found so far (for sublime etc.) are not working with the .js-files.
Is there a way to use code completion and (correct) syntaxhighlighting in .js-files?
Thanks for having me.

Is it possible to use browser->drag() from dusk with Vuedraggable?

We are using VueDraggable (and Vue) in our front-end and we are testing our front-end with Dusk.
I am currently trying to use $browser->drag('selector', 'selector') from dusk to drag objects from one list to the other, but I don't see anything happening during the test (although it might be the action is not visible) nor is the right result shown, the object does not end up in the indicated list.
I was wondering if anybody made a working example already of using $browser->drag() combined with Vue.draggable? I am asking since I don't know if I am trying the impossible or not.
There is an open issue for this on Dusk's Github. I had to open a new issue that can be found here since the original was closed for comment. The link contains a more thorough explanation, but the short answer and solution are highlighted here:
Problem: Laravel's Dusk does not trigger Vue.draggable events. To simulate a drag-and-drop Dusk does a "mouse down", "move mouse to location", and "mouse up" sequence. In theory this is correct but does not trigger Vue' s events.
Solution: Dusk's method does trigger mouse down and mouse up events, so we can simply use those events to trigger the ones desired.
$("a[draggable='true']").on("mousedown", function(event) {
$(this).trigger("dragstart");
});
$("div[droppable='true']").on("mouseup", function(event) {
$(this).trigger("drop");
});
This JSFiddle is an example of how it would work (though you need to implement it on a Laravel project to truly test, of course!).

X-Editable - How to do "Custom input, several fields"

I am playing around with x-editable and I am wondering how they do the last example in their demo page.
http://vitalets.github.io/x-editable/demo-bs3.html?c=inline (Custom input, several fields)
I can't find any thing that actually shows you the code for each part. I only can dig through it with firebug but that is more time consuming and I rather just see the parts I need.
Any have the pieces of code that does it?
Yes, #marcb is right!
So here: https://github.com/vitalets/x-editable
Or to be exact: https://github.com/vitalets/x-editable/blob/master/src/inputs-ext/address/address.js
The code for this can be found in the X-editable Bootstrap 3 download, under "inputs-ext", and then the "address" folder.

Dynatree checkboxes are not checked anymore

I am finding that the Dynatree checkboxes are images and not real checkboxes. However, I am assuming that the checkbox state when captured properly will be rendered through Javascript properly, and the correct image (partial checked, unchecked or completely checked) will show up.
I am using Dynatree and the correct JSON with all attributes being captured properly. During the time of testing, everything seems to be working fine as expected with correct nodes showing the proper checkbox state.
However, I came back after the weekend and I tried to access the site utilizing the Dynatree; and the checkboxes have disappeared completely.
"select": true,
"hideCheckbox": false,
"unselectable": false,
Anyone using Dynatree with checkboxes facing the same problem and how they resolved the issue.
Please help. Thank you,
It's not the images...You can refer to the following link I am sure it will help and solve your issue :)
http://wwwendt.de/tech/dynatree/doc/samples.html