Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • cchehn 28 posts 69 karma points
    Aug 01, 2018 @ 19:51
    cchehn
    0

    Convert Cogworks.Meganav PropertyEditor to a GridEditor?

    Has anyone tried and had any success adding a GridEditor for the Cogworks.Meganav Plugin? I am not up to speed on plugin development but I did figure out how to declare a new GridEditor aimed at the \views\editor.html I can now add the Meganav editor in the grid editor but then it blows up. The error seems to be scope related and coming from angular-ui-tree.js which I guess is a customized version of the ui-tree?
    The error is:

    $scope.$parentNodesScope.$modelValue.indexOf is not a function on line 63 angular.min.js

    I'm guessing this is related to another thread I read (but didn't completely understand): PropertyEditor as a GridEditor and mediapicker as a prevalue It mentions something about $scope.model vs $scope.control...

    Can anyone point me in the right direction for additional reading and understanding?

    So far the only modification I have made is to add the following to the package.maniufest

    ,
      "gridEditors": [
        {
          "name": "Meganav",
          "alias": "MeganavGE",
          "view": "~/App_Plugins/Meganav/Views/editor.html",
          "icon": "icon-article"
        }
      ] 
    

    This renders the editor but I guess it is all broken because of the scope errors. enter image description here

    The Editor for each item even opens but on Submit you get the following error: "TypeError: Cannot create property 'id' on string '1 column layout'"

    When you try to delete or drag to re-order a nav item it goes back to an indexOf error: TypeError: $scope.$modelValue.indexOf is not a function

    When you try to create a new nav Item the error is: TypeError: $scope.items.push is not a function

    Thanks in Advance!

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Aug 02, 2018 @ 08:04
    Dave Woestenborghs
    0

    Hi ccheln,

    The easiest way to re-use normal property editors in the grid is using a package like Doctype Grid Editor or Leblender

    Dave

  • cchehn 28 posts 69 karma points
    Aug 02, 2018 @ 12:10
    cchehn
    0

    Thanks for the info Dave. I'll check out Leblender since it seems like it might do what I need.

  • cchehn 28 posts 69 karma points
    Aug 02, 2018 @ 12:28
    cchehn
    0

    Edit/Update: While those packages are great and make life much easier for many grid opperations, they don't quite accomplish what I needed. Using the Meganav Property in Leblender runs into what I think is the same scope problem as before. Only now it is obscured by a wrapper.

    "Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'." Original: Thanks for the info Dave. I'll check out Leblender since it seems like it might do what I need.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies