Giter Club home page Giter Club logo

Comments (3)

pihomeserver avatar pihomeserver commented on June 29, 2024 2

Hello
Just add dropdown in the span tag

Le 16 janv. 2015 à 08:43, Daniel Rasinski [email protected] a écrit :

Can u post ur template?

   $templateCache.put("templates/iconpicker.html",
   "<span class='btn-group ui-iconpicker' ng-class='{ disabled: disabled }'>"+
         "<button type='button' data-toggle='dropdown' class='btn btn-default btn-xs'><i class='{{ iconClass }}'></i><span class='fa fa-caret-down'></span>" +
         "</button>" +
         "<ul c

from ui-iconpicker.

tekbuds-manisha avatar tekbuds-manisha commented on June 29, 2024 2

The above fix works for first click, but fails at times. This is the correct fix (correct usage of uib-dropdown):

$templateCache.put("templates/iconpicker.html", "<span class="btn-group ui-iconpicker" uib-dropdown >\n <button type="button" uib-dropdown-toggle ng-disabled='disabled' class='btn btn-default btn-md'><i class="{{ iconClass }}">\n \n <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">\n <li ng-repeat="class in availableIconClasses">\n <button class="btn btn-default" type="button" ng-click="$parent.iconClass = class"><span class="{{ class }}">\n \n \n <input name="{{ name }}" type="hidden" value="{{ iconClass }}" ng-if="name" />\n");

from ui-iconpicker.

risfeng avatar risfeng commented on June 29, 2024 1

Thanks, successful solution.
Only need to add data-toggle='dropdown'to button.

return $templateCache.put("templates/iconpicker.html", "<span class=\"btn-group ui-iconpicker\" ng-class=\"{ disabled: disabled }\">\n <button type=\"button\" data-toggle='dropdown' class='btn btn-default btn-xs'><i class=\"{{ iconClass }}\"></i><span class='fa fa-caret-down'></span>\n </button>\n <ul class=\"dropdown-menu\" role=\"menu\">\n <li ng-repeat=\"class in availableIconClasses\">\n <button class=\"btn btn-default\" type=\"button\" ng-click=\"$parent.iconClass = class\"><span class=\"{{ class }}\"></span></button>\n </li>\n </ul>\n <input name=\"{{ name }}\" type=\"hidden\" value=\"{{ iconClass }}\" ng-if=\"name\" />\n</span>");

from ui-iconpicker.

Related Issues (12)

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.