Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "exlnt"

Thanks! I have this working, almost, I have one issue.

On my person Index view, from my JTable action column I call the existing ABP supplied ChangePictureModal.

var _changePictureModal = new app.ModalManager({
        viewUrl: abp.appPath + 'Mpa/Profile/ChangePictureModal',
         scriptUrl: abp.appPath + 'Areas/Mpa/Views/Person/_ChangePictureModal.js',
        modalClass: 'ChangeProfilePictureModal'
  });

 if (_permissions.edit) {
      $('<button class="btn btn-default btn-xs" title="' + app.localize('Add photo') + '"><i class="fa fa-camera"></i></button>')
       .appendTo($span)
       .click(function () {
        _changePictureModal.open({ id: data.record.id });
     });
  }

I need to pass my Person "Id" key value to this modal. So as you can see, I am trying to pass it via the open() call.

How do I read this value in the ChangePictureModal.js file?

I have created a copy of this JS file in the view folder for my Person entity. I have changed the app service method so that I can update my Person record with the new pictureId.

Thanks very much, that did it!

Have you had a chance to look into this issue?

I have emailed you a link to the latest version of solution code and mentioned one more issue in my email.

Please ignore this post.

My home record had a null value in the NoteID column and that is why note entity was not loading. :shock:

<cite>ismcagdas: </cite> Hi @exlnt,

Is the code you sent contains this issue as well ? If so, I will check the problem on source code.

Thanks.

Yes that source code has this same issue.

<cite>tteoh: </cite> FYI... Both links were broken.

Links do work, you just need to login into GIT.

<cite>ismcagdas: </cite> Hi,

Validation on the client side does not handled automatically. You need to first call .validate on your form, see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.Web/Areas/Mpa/Views/Users/_CreateOrEditModal.js#L27">https://github.com/aspnetzero/aspnet-ze ... dal.js#L27</a>.

Then before saving your form, you need to check if your form is valid or not <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.Web/Areas/Mpa/Views/Users/_CreateOrEditModal.js#L56">https://github.com/aspnetzero/aspnet-ze ... dal.js#L56</a>.

Thanks.

Yes I am doing that. See my code below.

this.init = function (modalManager) {
            _modalManager = modalManager;

            _$form = _modalManager.getModal().find('form[name=CreateCompany]');
            _$form.validate();
        };

        this.save = function () {
            if (!_$form.valid()) {
                return;
            }

@ ismcagdas - I have also sent you an email on one other issue.

Thank you very much! That did the trick!

I'm still struggling to come to grips with these DTO's. But I'm learning slowly! :D

I just upgraded all my ABP packages to version 1.5 is that release 3.3 here :[https://github.com/aspnetzero/aspnet-zero/releases/tag/v3.3.0])

Also, does this 3.3 release allow me to use VS2017 with my solution now?

That worked!! Thanks very much!

Showing 171 to 180 of 263 entries