Base solution for your next web application

Activities of "cangunaydin"

Question

Hi, In Module Zero when you append the bundles and implement it in the layout or in the header layout, it doesn't bundle it. It shows all the scripts in seperate files.

For ex: i have a bundle called ~/Bundles/App/libs/js when i include this bundle in layout.cshtml like this @Scripts.Render("~/Bundles/App/libs/js") it doesn't do the job and i get bunch of script files seperately instead of the bundle do i miss sth here? or do we need some configuration to activate the bundling?

Answer

Hello Halil, if i do BundleTable.EnableOptimizations = true; then it is doing the job otherwise release mode or debugging mode do not make any difference on that. I was expecting the same behavior but it doesn't make any difference, i have fixed that by using the BundleTable.EnableOptimizations

Question

Hi, I have a problem with exception handling sometimes i need to disable javascript error exception handling. For ex. I send some ajax request to another server and i don't have any control on return values so in the return json there is no "success" property. As a result it displays me modal which has error. How i can disable this? Any solution for that?

Answer

Hi, I don't have the path ~/Abp/Framework/scripts/libs/abp.jquery.js

Instead of that i have /Abp/Framework/scripts/libs/angularjs/abp.ng.js and it has this method

handleResponse: function (response, defer) { var originalData = response.data;

        if (originalData.success === true) {
            response.data = originalData.result;
            defer.resolve(response);

            if (originalData.targetUrl) {
                abp.ng.http.handleTargetUrl(originalData.targetUrl);
            }
        } else if(originalData.success === false) {
            var messagePromise = null;

            if (originalData.error) {
                messagePromise = abp.ng.http.showError(originalData.error);
            } else {
                originalData.error = defaultError;
            }

            abp.ng.http.logError(originalData.error);

            response.data = originalData.error;
            defer.reject(response);

            if (originalData.unAuthorizedRequest) {
                abp.ng.http.handleUnAuthorizedRequest(messagePromise, originalData.targetUrl);
            }
        }
    }

This happens when we use ng-file-upload plugin. When you cancel the upload it triggers the modal.

Answer

Thank you for the answer, have a nice year also :)

Answer

Hello, Sorry my bad about ~/Abp/Framework/scripts/libs/abp.jquery.js it is over there but when i add break point, it doesn't get in to the break point instead of that it enters the breakpoint that i have put to abp.ng.js it just enters this function 'responseError': function (ngError) { var error = { message: ngError.data, details: ngError.statusText, responseError: true }

                    abp.ng.http.showError(error);

                    abp.ng.http.logError(error);

                    return $q.reject(ngError);
                }

I have the same problem. Windows defender is blocking it in my pc.

angular-message-format.min.js is the problem i guess. This is the information that i get from windows defender.

/Scripts/angular-message-format.min.js webfile:C:\ProgramData\Microsoft\Windows Defender\LocalCopy{8946D688-A3A0-4642-BA9A-9B3311F3C9B0}-MediaManagerV3.zip|chrome.exe

Category: Trojan Downloader

Description: This program is dangerous and downloads other programs.

Recommended action: Remove this software immediately.

Maybe these links can also help. This is the threat that is blocked by windows defender.

<a class="postlink" href="https://www.microsoft.com/security/portal/threat/encyclopedia/entry.aspx?Name=TrojanDownloader:JS/Nemucod.A!cl&ThreatID=-2147257020">https://www.microsoft.com/security/port ... 2147257020</a>

<a class="postlink" href="https://www.microsoft.com/security/portal/threat/encyclopedia/Entry.aspx?Name=TrojanDownloader:JS/Nemucod.CL">https://www.microsoft.com/security/port ... Nemucod.CL</a>

<a class="postlink" href="https://www.microsoft.com/security/portal/threat/Encyclopedia/Entry.aspx?Name=JS/Nemucod">https://www.microsoft.com/security/port ... JS/Nemucod</a>

Hello, I have a problem with the lists when it is scrollable. When i click the actions button in the bottom of the list it doesn't show the content tab in the right place. You can see the details in the attachment.

How can i fix this? Any workaround for this problem?

Hello. If someone is looking for a workaround to this issue. You can try this solution

in the grid options for ui-grid when you create the cell template for actions button, You need to add "dropdown-append-to-body " to child div of "ui-grid-cell-contents" here is a link for the fix i have found it while i am googling around.

<a class="postlink" href="http://plnkr.co/edit/baiBVqc8DiWG17kztkt5?p=preview">http://plnkr.co/edit/baiBVqc8DiWG17kztkt5?p=preview</a>

Example image from ~/App/common/views/languages/index.js that i have modified is attached

Showing 1 to 10 of 183 entries