joni2back / angular-filemanager

JavaScript File Manager Material Design Folder Explorer Navigator Browser Manager in AngularJS with CSS3 Responsive (with FTP in PHP / Java / Node)
https://joni2back.github.io/angular-filemanager/
MIT License
1.76k stars 576 forks source link

Could this work without jQuery? #79

Open iJungleboy opened 8 years ago

iJungleboy commented 8 years ago

I'm the core architect of 2sxc (https://github.com/2sic/2sxc) which is an extension to DNN (a popular .net CMS). I'm considering using the angular-filemanager, as everything we did in 2sxc is now based on angular and it seems a good fit. One of my concerns in jQuery - I've been working hard to avoid using jQuery in our solution and have so far been very successful - but as I see your filemanager seems to need it. Do you think it's really necessary or might not the built in angular-features suffice? What do you think?

joni2back commented 8 years ago

Hi @iJungleboy I'm very interested to remove jQuery of my project.. The uses of jQuery are for:

We can work together to make it work without jQuery?

iJungleboy commented 8 years ago

I believe all this could be done without jQuery - and it would probably be faster, and certainly cleaner (as jQuery tends to promote a unique dev-style :).

  1. for the rare dom-selector it should work well with if(angular) { ...angular.element(...) }
  2. bootstrap modal works easily without it - we use it a lot in 2sxc though we do use https://angular-ui.github.io/bootstrap/ so maybe that's a new dependency for this?
  3. this one may be tricky, as it's one of the things I call the unique dev-style of jQuery. This would probably be better if reworked a bit...
joni2back commented 8 years ago

Exactly!!, or handle modals with raw js to prevent the angular-boostrap module... I'm on vacations this weeks, could you try to make this changes in a fork to propose a PR ? Thanks!!!

iJungleboy commented 8 years ago

I'll see what I can do but am pretty swamped w/2sxc for now. Hope to get to it but can't promise.

iJungleboy commented 8 years ago

I'm reviewing the code and can't actually run it on a normal windows / Visual-Studio environment. This means I would have to spend quite a lot of time just to get it to work - before I could start trying to remove jQuery. Can't prioritize this for now :(

durasj commented 8 years ago

:+1:

v-lukes commented 8 years ago

:+1:

generalconsensus commented 8 years ago

:+1:

joni2back commented 8 years ago

Hands on that!

Anyone can help me to translate this jquery selector to native?

$(window.document).on(
    'contextmenu', 
    '.main-navigation .table-files tr.item-list:has("td"), .item-list', 
    function(){...}
)
durasj commented 8 years ago

If I understand what you want to do, here is how: https://plainjs.com/javascript/events/live-binding-event-handlers-14/ ... plainjs.com is really great if you want to do something in raw js and don't want to spend hours searching

Nevario commented 8 years ago

Is the intention to still allow the use of Angular's built in jQuery (jqLite) or go completely native?

joni2back commented 8 years ago

@NetbearSoftware I tried to move to angular bootstrap but I don't like how it interact with the dom... But this is to take into account.. I'll very appreciate a contribution with this ticket

davistan commented 7 years ago

@joni2back can try using angular approach like https://github.com/Wildhoney/ngContextMenu