Giter Site home page Giter Site logo

sidebar-mini init page about stisla HOT 9 CLOSED

stisla avatar stisla commented on May 14, 2024 1
sidebar-mini init page

from stisla.

Comments (9)

ricardocarrer avatar ricardocarrer commented on May 14, 2024 1

from stisla.

marcuxyz avatar marcuxyz commented on May 14, 2024 1

This was implemented , now, await the pr stisla/docs#6 . :) @ricardocarrer

from stisla.

ricardocarrer avatar ricardocarrer commented on May 14, 2024

Did not work :(

from stisla.

nauvalazhar avatar nauvalazhar commented on May 14, 2024

And why you closed this issue? πŸ˜†

from stisla.

ricardocarrer avatar ricardocarrer commented on May 14, 2024

When it starts with the sidebar-mini it gets sidebar_nicescroll active and does not add the tooltip in the single menu. When it expands, the sidebar_nicescroll gets broken, it does not stay the same width as the sidebar. I tried to make some adjustments, but I did not succeed.

Sorry for my english (google translator)

from stisla.

ricardocarrer avatar ricardocarrer commented on May 14, 2024

from stisla.

ricardocarrer avatar ricardocarrer commented on May 14, 2024

Hi!

I think it was!

Transform in function for add tooltip single menu:
//add RC
var add_tooltip_sidebar_mini = function() {
$(".main-sidebar .sidebar-menu > li").each(function() {
let me = $(this);

  if(me.find('> .dropdown-menu').length) {
    me.find('> .dropdown-menu').hide();
    me.find('> .dropdown-menu').prepend('<li class="dropdown-title pt-3">'+ me.find('> a').text() +'</li>');
  }else{
    me.find('> a').attr('data-toggle', 'tooltip');
    me.find('> a').attr('data-original-title', me.find('> a').text());
    $("[data-toggle='tooltip']").tooltip({
      placement: 'right'
    });
  }
});

}

in else toggle_sidebar_mini:

}else{
body.addClass('sidebar-mini');
body.removeClass('sidebar-show');
sidebar_nicescroll.remove();
sidebar_nicescroll = null;

  //add RC
  add_tooltip_sidebar_mini();
}

in toggleLayout, add other else if:

//Add RC
}else if($("body").hasClass('sidebar-mini')){
add_tooltip_sidebar_mini(); //transform in function
if(sidebar_nicescroll != null) {
sidebar_nicescroll.remove();
}
}else{
update_sidebar_nicescroll();
}

from stisla.

nauvalazhar avatar nauvalazhar commented on May 14, 2024

Hm, if you want the sidebar-mini as an initial sidebar. Simply you can trigger the toggle button with JavaScript.

$('[data-toggle="sidebar"]').click();

from stisla.

marcuxyz avatar marcuxyz commented on May 14, 2024

@ricardocarrer i implemented this. I'm Await an issue be approved.

Please look for this: stisla/docs#5

from stisla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.