Base solution for your next web application
Open Closed

using sweetalert - where are the files? #135


User avatar
0
cicciottino created

arent't sweetalert needed files included in the taskSystem sample project? i can download them (css and js) from the sweetalert's site but where is the abp.sweet-alert.js file?

than, should i add the abp.sweet-alert.js file to the layout.cshtml? and in what folder i have to put the css and js file in the TaskSystem project?

thanks


8 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    SimpleTaskSystem project has already sweetalert included. See files:

    sweetalert files:

    <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/Scripts/sweetalert">https://github.com/aspnetboilerplate/as ... sweetalert</a>

    abp.sweetalert.js:

    <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/blob/master/SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/Abp/Framework/scripts/libs/abp.sweet-alert.js">https://github.com/aspnetboilerplate/as ... t-alert.js</a>

    Finally, including abp.sweet-alert.js was in angular layout, I moved it to bundle now:

    <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/blob/master/SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App_Start/BundleConfig.cs#L60">https://github.com/aspnetboilerplate/as ... fig.cs#L60</a>

  • User Avatar
    0
    cicciottino created
    1. downloaded the latest version of the project (SimpleTask)
    2. changed the connectionstring to a new empty database
    3. "Play" on visualstudio

    got this javascript error :

    Unhandled exception at line 105, column 5 in
    http://localhost:6247/Abp/Framework/scripts/libs/abp.sweet-alert.js
    
    0x800a138f - Errore di run-time di JavaScript: Impossibile recuperare la proprietà 'on' di un riferimento nullo o non definito
    

    sorry for the italian message bu i think is comprehensible

  • User Avatar
    0
    hikalkan created
    Support Team

    Are you working on SimpleTaskSystem? Did you create database using Update-Database command? Probably tou're getting another exception. See Logs folder in web project.

  • User Avatar
    0
    cicciottino created

    Are you working on SimpleTaskSystem? -----> YES

    Did you create database using Update-Database command? -----> NO, it was beenautomatically generated on the application startup

    Probably tou're getting another exception. See Logs folder in web project.

    it doesn't seem to show "ERROR" level labels, only "DEBUG" and "INFO" into the log file. anyway the messages as well seems to be only idication of successfully task.

    was it important that the database should be generated manually by me with Database-Update command? is it mandatory?

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    "was it important that the database should be generated manually by me with Database-Update command? is it mandatory?"

    No, but I always does it. And don't know potantial problems of EF while automatically creating on startup.

  • User Avatar
    0
    cicciottino created

    the same error even if i genereate the database with Update-Database...

    i downloaded the project after you moved abp.sweet-alert.js to bundle (on github)

    PS: On the Durandal Projet everything works, on the Angular one got this

  • User Avatar
    0
    hikalkan created
    Support Team

    As I see, it can not find abp.event namespace in abp.js. But if you check, it is there. One reason can be caching. Disable script caching of your browser. For chrome, press F12 to open development tools, click settings and check "Disable cache (while DevTools is open)" and refresh the page when devtools are open.

  • User Avatar
    0
    cicciottino created

    yep, it was cache browser fault :-/ thanks