davicotico / jquery-menu-editor Goto Github PK
View Code? Open in Web Editor NEWMultilevel Menu Editor for Bootstrap 4.x (Html & Javascript code)
Home Page: https://davidticona.com/demos/jQuery-Menu-Editor/
License: MIT License
Multilevel Menu Editor for Bootstrap 4.x (Html & Javascript code)
Home Page: https://davidticona.com/demos/jQuery-Menu-Editor/
License: MIT License
I updated tooltip in json but it isn't working i dont know why. Can you help ? I checked demo also there itself it is not working.
is it posible to add an extra attribute to the output?
I added an extra field to the add/edit form, but this field will not be added to the JSON output. also, when I edit the added menu item, this field will not restore the value in the form.
Hello,
I am trying to install this package with npm, the command that i use is:
npm install git+https://github.com/davicotico/jQuery-Menu-Editor.git
But its fail with the follow error:
cb() never called!
I receive this error only with this package.
There is any mistakes or there is another way to install it via npm?
This is an awesome plugin but I couldn't find how to disable multilevel nesting and allow only up to one level of nesting.
Mobil menu template bug.
https://i.hizliresim.com/WDoo4P.jpg
how do I solve the problem
it's possible don't drag in a submenu
like this example
Menu1
*submenu1
*Submenu2
Menu2
*Submenus
Is it posible to unfold all the items and remove the fold/unfold buttons?
I pass json like that:
[
{
"text":"Opcion2",
"icon":"fa fa-bar-chart-o",
"href":"http://home.com",
"target":"_top",
"title":"test2"
},
{
"text":"Home",
"icon":"fa fa-home",
"href":"http://home.com",
"target":"_blank",
"title":"test1"
}
]
What I want is to pass data first time when 'Edit' button is clicked. But when I click 'edit' button it does not add json values automatically to the 'target' and 'title' fields during page refresh. Or in other words "target" and "title" fields are always empty on first time 'edit' click.
When do you intend to release an update compatible with bootstrap 5?
any plans to add support for latest versions of bootstrap and fontawesome.
If you have a radio button group in the form, the value does not get copied over to the form when pressing edit.
From looking at the source code, I suspect there may also be a problem if you use a checkbox. This is probably a more serious problem, because checkboxes are more popular than radio groups
Hi,
I was looking at the documentation and I couldn't find an option to add a button against menu items to move them to the top or to the bottom of the list. Can someone help me with this?
Hello, im starting the menu like this:
`
$(document).ready(function(){
$.ajax({
type: "POST",
url: "{{ route('menu.getMenu') }}",
data: {},
success: function(data){
arrayjson = data;
editor.update();
editor.setData(arrayjson);
// console.log(data);
},error: function(data){
console.log(data.responseText);
}
});
})`
And show as like all the menus had children:
But just the last had an child.
If I drag a menu, the bug was fixed:
How should I take the position values?
Like Parent level and Child level
Hi is there a way to after generate menu disable drag and remove buttons?
Do you have full example php pdo insert or update ?
I would love to use this plugin in my project Saltcorn (https://github.com/saltcorn/saltcorn) which is MIT licensed. I don't think I can do this without relicensing my entire project under the GPL - see discussion https://opensource.stackexchange.com/questions/4360/what-are-the-implications-of-licensing-a-javascript-library-under-gpl. Would you be open to changing the licence for jQuery-Menu-Editor to a licence that would allow projects to use it without then needing to apply the GPL to the entire importing project? Of course if you don't want to do this, then I understand.
Getting the following violation running php 7.3.10 with jQuery 3.3.1 on a https:// localhost server.
touchstart
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/574554379596595
jquery-3.3.1.min.js:2
Would be nice if you had the code for saving to a MySQLi database.
Hello,
I would like to restrict the user to just creating a submenu, then Parent-child. How can I do?
In my environment, i get undefined for 'fa' class so my icon classes are set as 'undefined fa-icon-name' which results in no icon being showing up.
So, as a work around, i changed the jquery-menu-editor.js a bit,
iconPicker.on('change', function (e) {
//var iconClass = (e.iconClass!=='') ? iconClass+' ' : '';
var iconClass = "";
if((typeof e.iconClass === 'undefined') || (e.iconClass === ''))
{
console.log('undefined iconclass');
iconClass = "fa ";
}
$("#mnu_icon").val(iconClass+e.icon);
console.log($("#mnu_icon").val());
//console.log()
});
doing this, issue is resolved but i want to know from where iconClass can be set so that issue does not show up with default setup.
Hello, thank you very much for this project. I have a doubt. Is it possible to disable drag and drop and manipulate li just by the buttons?
Thanks.
using Newtonsoft.Json.Linq;
using System;
using System.IO;
namespace ConsoleApp2
{
internal class Program
{
static string DisplayArray(string target, string href, string text, bool li_type=false)
{
if (li_type == false)
{
if (target.ToString() != "_self")
{
return "<li><a target=\"" + target + "\" href=\"" + href + "\" class=\"nav-link text-left\">" + text + "</a></li>\n";
}
else
{
return "<li><a href=\"" + href + "\" class=\"nav-link text-left\">" + text + "</a></li>\n";
}
}
else
{
return "<a href=\"" + href + "\" class=\"nav-link text-left\">" + text + "</a>\n";
}
}
private static void Main(string[] args)
{
string menu = "";
string jsonFile = @"C:\menu.json";
var json = File.ReadAllText(jsonFile);
try
{
var jObject = JObject.Parse(json);
if (jObject != null)
{
JArray experiencesArrary = (JArray)jObject["menuList"];
if (experiencesArrary != null)
{
foreach (var item in experiencesArrary)
{
if (item["children"] != null)
{
menu += "<li class=\"has-children\">\n";
menu += DisplayArray(item["target"].ToString(), item["href"].ToString(), item["text"].ToString());
menu += "<ul class=\"dropdown\">\n";
foreach (var itemChild in item["children"])
{
menu += DisplayArray(itemChild["target"].ToString(), itemChild["href"].ToString(), itemChild["text"].ToString());
}
menu += "</ul>\n";
menu += "</li>";
} else
{
menu += "<li>\n";
menu += DisplayArray(item["target"].ToString(), item["href"].ToString(), item["text"].ToString(),true);
menu += "</li>";
}
}
Console.WriteLine(menu);
}
}
}
catch (Exception)
{
throw;
}
}
}
}
When you have a page with 2 menu editors, using the same buttons and whatever, an event is attached twice to the same element (line 1117), which causes a popup message to appear twice.
Solution: remove the click event listener before setting it.
Not currently possible, it heavily relies on markup, and there is little programmatic control. The current way of manipulating items is by getting the existing menu items, merging that with whatever items you wanna add and push the merged data to the editor via setData
.
Might create a PR for this.
Hi
My menu uses another fields, like display_name, type, url (instead of href), it doesn't use target, for example.
Is it possible to modify the field list without having to hack too much code? Is there an API to which I can pass the fields list?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.