Copied to clipboard

Flag this post as spam?

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


  • Senthil Kumaran Chinnathambi 1 post 71 karma points
    Apr 29, 2016 @ 09:26
    Senthil Kumaran Chinnathambi
    0

    How to load CSS frameworks inside customized property editor without affecting Umbraco UI?

    I want to create a customized property editor with drag and drop interface.

    Using asset service I have loaded Materilaize framework and semantic UI in property editor controller js.

    After loading these frameworks, Entire Umbraco UI is not functioning properly. Umbraco UI picked up these loaded CSS framwork styles. How to avoid cascading?

    How to load CSS frameworks without affecting Umbraco UI?

      angular.module("umbraco")
        .controller("SG.LayoutManipulatorController",
    //inject umbracos assetsService
    function ($scope,assetsService) {
    
    //tell the assetsService to load the markdown.editor libs from the markdown editors
    //plugin folder
    assetsService
        .load([
            "/App_Plugins/LayoutManipulator/lib/jquery-2.2.3.min.js",
           "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js"
        ])
        .then(function () {
            //this function will execute when all dependencies have loaded
            alert("editor dependencies loaded");
        });
    
    //load the seperat css for the editor to avoid it blocking our js loading
    
    
    assetsService.loadCss("https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css").then(function () {
                //this function will execute when all dependencies have loaded
                alert("editor dependencies loaded cs");
           });
    });
    
Please Sign in or register to post replies

Write your reply to:

Draft