Base solution for your next web application

Activities of "alukaszewski"

Hi Hikalkan, although the code is good for rendering third level menu items - when you navigate to third level URL the parent and grand parent nav-menu <li> is not marked with class=active, so the menu is collapsed.

Hi, How can I update the bootstrap components within my ASPNETZero project to latest pre-release version? Do I just use "Install-Package bootstrap -Pre" or will that not work? I am finding that the standard col size classes are far too outdated and dashboard starts to look silly with large portlets on high resolution displays (Most people have 1920x1080p monitors and even Surface Pro has 2560 width!). 4K screens are now appearing on a few people desks, which have 3000+ resolution!

I tried adding the BootStrapXL.css and although I can reference the col-xl- classes in code, metronic/aspnetzero does not seem to create portlets that work, for instance in xl mode (>1600) each portlet was set to col-xl-2 but they still appear as col-lg-3.

Do you have advice or perhaps customisation for adding xl and xxl col size classes? (xl I think should be >1600 and xxl should be >2500).

Figured it out. I had to republish the site and enable the option to remove extra files. Release version on production server now looking great!

I have removed the mpa/bundles files and also modified the .vbproj file to remove the include entries for the .css files as per the commits in GitHub, but the issue remains. When I publish the Release version I am getting 404 for the "/Bundles/img/sidebar-toggle-light.png", but if I publish the debug version of the project the file url is coming from "/metronic/assets/admin/layout4/img/sidebar-toggle-light.png" and works OK.

Why is the Release version going for the /Bundles folder and not the /metronic folder?

I see that this issue has been resolved in 1.7.0 - how do I know which code or files to replace to fix this issue in 1.6.1.0? Do I need to upgrade all files to 1.7.0 - if so, what about my customisations to PageNames.cs etc.

Andy

Question

I'd like to integrate the JQuery.CounterUp.js module into my solution. I had this working when I was using webforms, but I am struggling with ASPNETZERO.

I have figured out that I should include a @section Scripts in my view page, and I do have some working code in there that uses AJAX to retrieve some data and populate this into the DOM. However, I do not seem to be able to get the CounterUp module working. I added the script src entries for the waypoint and counterup js files into my script section and I have a span class=counter in my DOM, but when I run the page I get:

Error: Unable to get property 'replace' of undefined or null reference

That error is coming from the counterup.js.

Help!?

Any idea?

OK, so I might be on the right track - but can I actually use the customData parameter to add an id="myid" inside the <li> tag, or is customData simply a way of adding attributes in the menu object and not a means to output something in client facing html code?

I wish to be able to use JavaScript document.getElementById function to find an <li> in the DOM, by id, so that I can re-use my existing JavaScript code to inject a sub-item into the menu when the page has loaded. Here is my working function below;

<script type="text/javascript">
        // Add a Dynamic Menu Item linking back to the parent page and make it active.
        var li = document.getElementById('menu-parent01-child01');
        var dynul = document.createElement('ul');
        var dynli = document.createElement('li');
        dynul.classList.add('sub-menu');
        dynli.setAttribute('id', 'menu-parent01-child01-temp01');
        dynli.classList.add('active');
        dynul.appendChild(dynli);
        li.appendChild(dynul);

        dynli.innerHTML = '<i class=icon-bar-chart></i>MenuName';
    </script>

The function above would add a new menu item to the child01 menu item in the menu code I previously posted. or is there an alternative, more modern/MVC solution to finding the current menu item using the abp.application.navigation classes and then the page view adding in a new menu at runtime?

Thanks for your support.

Hi,

In my web forms based version of my application, I have centralised my navigation menu by having the code for it inside a User Control, and I reference the UC on each page. This saves greatly when adding new pages/menu items as I do not need to amend all the existing pages. I realise that ASP.NET Zero accomplishes this centralisation for me, which is a very good thing, however I wish to amend the code for the whole menu tree that gets generated.

Specifically, I wish to be able to identify LI items in the menu system by assigning them an ID=value, so that I can do something with the menu in client-side JavaScript once the page is ready. The code snippet below is what I want to be able to do...

<li class="nav-item" id="menu-parent01">
		                <a href="javascript:;">
                            <i class="icon-puzzle"></i>
                            <span class="title">Parent 01</span>
			                <span class="arrow "></span>
                        </a>
		                <ul class="sub-menu">
			                <li class="nav-item start" id="menu-parent01-child01">
				                <a href="/parent01/child01.aspx">
				                <i class="icon-grid"></i>
				                Child 01</a>
			                </li>
			                <li class="nav-item" id="menu-parent01-child02">
				                <a href="parent01/child02.aspx">
				                <i class="icon-globe"></i>
				                Child 02</a>
			                </li>
			                <li class="nav-item" id="menu-parent01-child03">
				                <a href="parent01/child03.aspx">
    			                	<i class="icon-screen-desktop"></i>
    			                	Child 03</a>
    		                	</li>

Why? In short, I am dynamically adding sub-items to the Nav-Menu using JavaScript, to represent temporary/dynamic pages that exist in my application when the user drills through into data. For instance, when they drill through a list of computer names they get a page containing details of that computer, and the Nav Menu is modified to include a sub-menu item which shows the name of the computer they are looking at.

So, where do I start? I can see that the mpaNavigationProvider.cs provides for a "customData" parameter? Is this where I might be able to add an ID when I perform the .AddItem(new MenuItemDefinition...)

Thanks,

Andy

I just noticed that this issue also manifests itself in the ASP.NET Zero demo we created, so I am glad it is not something I am doing wrong.

I have requested access to the GitHub repository so that I can follow this issue.

Showing 51 to 60 of 65 entries