PATH:
home
/
letacommog
/
letaweb
/
scripts
/
libraries
/
ui-iconpicker
/** * ui-iconpicker * * @version v0.1.4 * @author Justin Lau <justin@tclau.com> * @copyright Copyright (c) 2014 Justin Lau <justin@tclau.com> * @license The MIT License (MIT) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the 'Software'), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ (function() { var umd; umd = function(root, factory) { // if (typeof define === "function" && (define.amd != null)) { // return define("values/icon-groups-map", ["angular"], factory); // } else { return factory(root.angular); // } }; umd(this, function(angular) { var module; module = angular.module("ui-iconpicker/values/icon-groups-map", []); return module.value("iconGroupsMap", { "bootstrap": { prefix: "glyphicon glyphicon-", classes: ["asterisk", "plus", "euro", "minus", "cloud", "envelope", "pencil", "glass", "music", "search", "heart", "star", "star-empty", "user", "film", "th-large", "th", "th-list", "ok", "remove", "zoom-in", "zoom-out", "off", "signal", "cog", "trash", "home", "file", "time", "road", "download-alt", "download", "upload", "inbox", "play-circle", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "indent-left", "indent-right", "facetime-video", "picture", "map-marker", "adjust", "tint", "edit", "share", "check", "move", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-sign", "minus-sign", "remove-sign", "ok-sign", "question-sign", "info-sign", "screenshot", "remove-circle", "ok-circle", "ban-circle", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "share-alt", "resize-full", "resize-small", "exclamation-sign", "gift", "leaf", "fire", "eye-open", "eye-close", "warning-sign", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder-close", "folder-open", "resize-vertical", "resize-horizontal", "hdd", "bullhorn", "bell", "certificate", "thumbs-up", "thumbs-down", "hand-right", "hand-left", "hand-up", "hand-down", "circle-arrow-right", "circle-arrow-left", "circle-arrow-up", "circle-arrow-down", "globe", "wrench", "tasks", "filter", "briefcase", "fullscreen", "dashboard", "paperclip", "heart-empty", "link", "phone", "pushpin", "usd", "gbp", "sort", "sort-by-alphabet", "sort-by-alphabet-alt", "sort-by-order", "sort-by-order-alt", "sort-by-attributes", "sort-by-attributes-alt", "unchecked", "expand", "collapse-down", "collapse-up", "log-in", "flash", "log-out", "new-window", "record", "save", "open", "saved", "import", "export", "send", "floppy-disk", "floppy-saved", "floppy-remove", "floppy-save", "floppy-open", "credit-card", "transfer", "cutlery", "header", "compressed", "earphone", "phone-alt", "tower", "stats", "sd-video", "hd-video", "subtitles", "sound-stereo", "sound-dolby", "sound-5-1", "sound-6-1", "sound-7-1", "copyright-mark", "registration-mark", "cloud-download", "cloud-upload", "tree-conifer", "tree-deciduous"] }, "font-awesome": { prefix: "fa fa-lg fa-", classes: ["glass", "music", "search", "envelope-o", "heart", "star", "star-o", "user", "film", "th-large", "th", "th-list", "check", "times", "search-plus", "search-minus", "power-off", "signal", "gear", "cog", "trash-o", "home", "file-o", "clock-o", "road", "download", "arrow-circle-o-down", "arrow-circle-o-up", "inbox", "play-circle-o", "rotate-right", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "dedent", "outdent", "indent", "video-camera", "picture-o", "pencil", "map-marker", "adjust", "tint", "edit", "pencil-square-o", "share-square-o", "check-square-o", "arrows", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-circle", "minus-circle", "times-circle", "check-circle", "question-circle", "info-circle", "crosshairs", "times-circle-o", "check-circle-o", "ban", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "mail-forward", "share", "expand", "compress", "plus", "minus", "asterisk", "exclamation-circle", "gift", "leaf", "fire", "eye", "eye-slash", "warning", "exclamation-triangle", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder", "folder-open", "arrows-v", "arrows-h", "bar-chart-o", "twitter-square", "facebook-square", "camera-retro", "key", "gears", "cogs", "comments", "thumbs-o-up", "thumbs-o-down", "star-half", "heart-o", "sign-out", "linkedin-square", "thumb-tack", "external-link", "sign-in", "trophy", "github-square", "upload", "lemon-o", "phone", "square-o", "bookmark-o", "phone-square", "twitter", "facebook", "github", "unlock", "credit-card", "rss", "hdd-o", "bullhorn", "bell", "certificate", "hand-o-right", "hand-o-left", "hand-o-up", "hand-o-down", "arrow-circle-left", "arrow-circle-right", "arrow-circle-up", "arrow-circle-down", "globe", "wrench", "tasks", "filter", "briefcase", "arrows-alt", "group", "users", "chain", "link", "cloud", "flask", "cut", "scissors", "copy", "files-o", "paperclip", "save", "floppy-o", "square", "bars", "list-ul", "list-ol", "strikethrough", "underline", "table", "magic", "truck", "pinterest", "pinterest-square", "google-plus-square", "google-plus", "money", "caret-down", "caret-up", "caret-left", "caret-right", "columns", "unsorted", "sort", "sort-down", "sort-asc", "sort-up", "sort-desc", "envelope", "linkedin", "rotate-left", "undo", "legal", "gavel", "dashboard", "tachometer", "comment-o", "comments-o", "flash", "bolt", "sitemap", "umbrella", "paste", "clipboard", "lightbulb-o", "exchange", "cloud-download", "cloud-upload", "user-md", "stethoscope", "suitcase", "bell-o", "coffee", "cutlery", "file-text-o", "building-o", "hospital-o", "ambulance", "medkit", "fighter-jet", "beer", "h-square", "plus-square", "angle-double-left", "angle-double-right", "angle-double-up", "angle-double-down", "angle-left", "angle-right", "angle-up", "angle-down", "desktop", "laptop", "tablet", "mobile-phone", "mobile", "circle-o", "quote-left", "quote-right", "spinner", "circle", "mail-reply", "reply", "github-alt", "folder-o", "folder-open-o", "smile-o", "frown-o", "meh-o", "gamepad", "keyboard-o", "flag-o", "flag-checkered", "terminal", "code", "reply-all", "mail-reply-all", "star-half-empty", "star-half-full", "star-half-o", "location-arrow", "crop", "code-fork", "unlink", "chain-broken", "question", "info", "exclamation", "superscript", "subscript", "eraser", "puzzle-piece", "microphone", "microphone-slash", "shield", "calendar-o", "fire-extinguisher", "rocket", "maxcdn", "chevron-circle-left", "chevron-circle-right", "chevron-circle-up", "chevron-circle-down", "html5", "css3", "anchor", "unlock-alt", "bullseye", "ellipsis-h", "ellipsis-v", "rss-square", "play-circle", "ticket", "minus-square", "minus-square-o", "level-up", "level-down", "check-square", "pencil-square", "external-link-square", "share-square", "compass", "toggle-down", "caret-square-o-down", "toggle-up", "caret-square-o-up", "toggle-right", "caret-square-o-right", "euro", "eur", "gbp", "dollar", "usd", "rupee", "inr", "cny", "rmb", "yen", "jpy", "ruble", "rouble", "rub", "won", "krw", "bitcoin", "btc", "file", "file-text", "sort-alpha-asc", "sort-alpha-desc", "sort-amount-asc", "sort-amount-desc", "sort-numeric-asc", "sort-numeric-desc", "thumbs-up", "thumbs-down", "youtube-square", "youtube", "xing", "xing-square", "youtube-play", "dropbox", "stack-overflow", "instagram", "flickr", "adn", "bitbucket", "bitbucket-square", "tumblr", "tumblr-square", "long-arrow-down", "long-arrow-up", "long-arrow-left", "long-arrow-right", "apple", "windows", "android", "linux", "dribbble", "skype", "foursquare", "trello", "female", "male", "gittip", "sun-o", "moon-o", "archive", "bug", "vk", "weibo", "renren", "pagelines", "stack-exchange", "arrow-circle-o-right", "arrow-circle-o-left", "toggle-left", "caret-square-o-left", "dot-circle-o", "wheelchair", "vimeo-square", "turkish-lira", "try", "plus-square-o"] }, "linecons": { prefix: "flaticon-", classes: ["banknote", "big58", "big59", "big60", "blockade", "bubble1", "camera6", "camera7", "cup4", "data3", "diamons", "display14", "fire", "heart3", "lab", "leaf5", "like", "location4", "news", "noodle", "note2", "packet", "paperclip2", "paperplane", "parameters", "pen3", "phone12", "photo3", "search3", "see", "settings3", "shop1", "small56", "small57", "small58", "small59", "small60", "small61", "sound", "stack", "study", "t1", "tag6", "tv1", "user12", "vynil", "wallet", "world5"] }, "typicons": { prefix: "typcn typcn-", classes: ["zoom","zoom-outline","zoom-out","zoom-out-outline","zoom-in","zoom-in-outline","world","world-outline","wine","wi-fi","wi-fi-outline","weather-windy","weather-windy-cloudy","weather-sunny","weather-stormy","weather-snow","weather-shower","weather-partly-sunny","weather-night","weather-downpour","weather-cloudy","waves","waves-outline","watch","warning","warning-outline","volume","volume-up","volume-mute","volume-down","video","video-outline","user","user-outline","user-delete","user-delete-outline","user-add","user-add-outline","upload","upload-outline","tree","trash","times","times-outline","time","ticket","tick","tick-outline","thumbs-up","thumbs-down","thermometer","th-small","th-small-outline","th-menu","th-menu-outline","th-list","th-list-outline","th-large","th-large-outline","tags","tag","tabs-outline","support","stopwatch","starburst","starburst-outline","star","star-outline","spanner","spanner-outline","sort-numerically","sort-numerically-outline","sort-alphabetically","sort-alphabetically-outline","social-vimeo","social-vimeo-circular","social-twitter","social-twitter-circular","social-tumbler","social-tumbler-circular","social-skype","social-skype-outline","social-pinterest","social-pinterest-circular","social-linkedin","social-linkedin-circular","social-last-fm","social-last-fm-circular","social-github","social-github-circular","social-flickr","social-flickr-circular","social-facebook","social-facebook-circular","social-dribbble","social-dribbble-circular","social-at-circular","shopping-cart","shopping-bag","scissors","scissors-outline","rss","rss-outline","refresh","refresh-outline","radar","radar-outline","puzzle","puzzle-outline","printer","power","power-outline","point-of-interest","point-of-interest-outline","plus","plus-outline","plug","plane","plane-outline","pipette","pin","pin-outline","pi","pi-outline","phone","phone-outline","pencil","pen","notes","notes-outline","news","minus","minus-outline","microphone","microphone-outline","messages","message","message-typing","media-stop","media-stop-outline","media-rewind","media-rewind-outline","media-record","media-record-outline","media-play","media-play-outline","media-pause","media-pause-outline","media-fast-forward","media-fast-forward-outline","media-eject","media-eject-outline","map","mail","lock-open","lock-open-outline","lock-closed","lock-closed-outline","location","location-outline","location-arrow","location-arrow-outline","link","link-outline","lightbulb","leaf","key","key-outline","input-checked","input-checked-outline","info","info-outline","info-large","info-large-outline","infinity","infinity-outline","image","image-outline","home","home-outline","heart","heart-outline","headphones","group","group-outline","globe","globe-outline","gift","folder","folder-delete","folder-add","flow-switch","flow-parallel","flow-merge","flow-children","flash","flash-outline","flag","flag-outline","film","feather","eye","eye-outline","export","export-outline","equals","equals-outline","eject","eject-outline","edit","download","download-outline","document","document-text","document-delete","document-add","divide","divide-outline","directions","device-tablet","device-phone","device-laptop","device-desktop","delete","delete-outline","database","cross","credit-card","contacts","compass","cog","cog-outline","coffee","code","code-outline","cloud-storage","clipboard","chevron-right","chevron-right-outline","chevron-left","chevron-left-outline","chart-pie","chart-pie-outline","chart-line","chart-line-outline","chart-bar","chart-bar-outline","chart-area","chart-area-outline","cancel","cancel-outline","camera","camera-outline","calender","calender-outline","calculator","business-card","brush","briefcase","bookmark","book","bell","beer","beaker","battery-mid","battery-low","battery-high","battery-full","battery-charge","backspace","backspace-outline","attachment","attachment-outline","at","arrow-up","arrow-up-thick","arrow-up-outline","arrow-sync","arrow-sync-outline","arrow-shuffle","arrow-right","arrow-right-thick","arrow-right-outline","arrow-repeat","arrow-repeat-outline","arrow-move","arrow-move-outline","arrow-minimise","arrow-minimise-outline","arrow-maximise","arrow-maximise-outline","arrow-loop","arrow-loop-outline","arrow-left","arrow-left-thick","arrow-left-outline","arrow-forward","arrow-forward-outline","arrow-down","arrow-down-thick","arrow-down-outline","arrow-back","arrow-back-outline","archive","anchor","anchor-outline","adjust-contrast","adjust-brightness"] }, "open-iconic": { prefix: "oi oi-", classes: ["zoom-out","zoom-in","yen","x","wrench","wifi","warning","volume-off","volume-low","volume-high","video","vertical-align-top","vertical-align-center","vertical-align-bottom","underline","trash","transfer","timer","thumb-up","thumb-down","text","terminal","task","target","tags","tag","tablet","sun","star","spreadsheet","sort-descending","sort-ascending","signpost","signal","shield","share","share-boxed","script","rss","rss-alt","resize-width","resize-height","resize-both","reload","random","rain","question-mark","puzzle-piece","pulse","project","print","power-standby","plus","play-circle","pin","pie-chart","phone","person","people","pencil","paperclip","musical-note","move","moon","monitor","minus","microphone","menu","medical-cross","media-stop","media-step-forward","media-step-backward","media-skip-forward","media-skip-backward","media-record","media-play","media-pause","map","map-marker","magnifying-glass","loop","loop-square","loop-circular","lock-unlocked","lock-locked","location","list","list-rich","link-intact","link-broken","lightbulb","layers","laptop","key","justify-right","justify-left","justify-center","italic","info","infinity","inbox","image","home","heart","headphones","header","hard-drive","grid-two-up","grid-three-up","grid-four-up","graph","globe","fullscreen-exit","fullscreen-enter","fork","folder","flash","flag","fire","file","eyedropper","eye","external-link","expand-up","expand-right","expand-left","expand-down","excerpt","euro","envelope-open","envelope-closed","ellipses","elevator","eject","droplet","double-quote-serif-right","double-quote-serif-left","double-quote-sans-right","double-quote-sans-left","dollar","document","dial","delete","data-transfer-upload","data-transfer-download","dashboard","crop","credit-card","copywriting","contrast","compass","comment-square","command","collapse-up","collapse-right","collapse-left","collapse-down","cog","code","cloudy","cloud","cloud-upload","cloud-download","clock","clipboard","circle-x","circle-check","chevron-top","chevron-right","chevron-left","chevron-bottom","check","chat","cart","caret-top","caret-right","caret-left","caret-bottom","camera-slr","calendar","calculator","bullhorn","bug","brush","browser","british-pound","briefcase","box","bookmark","book","bolt","bold","bluetooth","bell","beaker","battery-full","battery-empty","basket","bar-chart","ban","badge","audio","audio-spectrum","arrow-top","arrow-thick-top","arrow-thick-right","arrow-thick-left","arrow-thick-bottom","arrow-right","arrow-left","arrow-circle-top","arrow-circle-right","arrow-circle-left","arrow-circle-bottom","arrow-bottom","aperture","align-right","align-left","align-center","action-undo","action-redo","account-logout","account-login"] }, }); }); }).call(this); (function() { var umd; umd = function(root, factory) { return factory(root.angular); }; umd(this, function(angular) { var module; module = angular.module("ui-iconpicker/services/IconGroupCollection", ["ui-iconpicker/values/icon-groups-map"]); return module.factory("IconGroupCollection", [ "iconGroupsMap", function(iconGroupsMap) { var IconGroupCollection; return IconGroupCollection = (function() { function IconGroupCollection(groupIdLiteral) { if (groupIdLiteral == null) { groupIdLiteral = "bootstrap"; } this.iconGroupsMap = {}; this.includeGroups(groupIdLiteral); } IconGroupCollection.prototype.filterByGroups = function(groupIdLiteral) { var group, groupId, groupIds, _ref; if (groupIdLiteral == null) { groupIdLiteral = "bootstrap"; } if (groupIdLiteral !== "all") { groupIds = groupIdLiteral.split(" "); _ref = this.iconGroupsMap; for (groupId in _ref) { group = _ref[groupId]; if (groupIds.indexOf(groupId) !== -1) { delete this.iconGroupsMap[groupId]; } } } return this; }; IconGroupCollection.prototype.includeGroups = function(groupIdLiteral) { var group, groupId, groupIds; if (groupIdLiteral == null) { groupIdLiteral = "bootstrap"; } groupIds = groupIdLiteral.split(" "); for (groupId in iconGroupsMap) { group = iconGroupsMap[groupId]; if (this.iconGroupsMap[groupId] == null) { if (groupIdLiteral === "all" || groupIds.indexOf(groupId) !== -1) { this.iconGroupsMap[groupId] = group; } } } return this; }; IconGroupCollection.prototype.getClassArray = function() { var classes, group, iconClass, id, _i, _len, _ref, _ref1; classes = []; _ref = this.iconGroupsMap; for (id in _ref) { group = _ref[id]; _ref1 = group.classes; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { iconClass = _ref1[_i]; classes.push(group.prefix + iconClass); } } return classes; }; return IconGroupCollection; })(); } ]); }); }).call(this); (function() { var umd; umd = function(root, factory) { return factory(root.angular); }; umd(this, function(angular) { var module; module = angular.module("ui-iconpicker/templates/iconpicker", ["ui.bootstrap"]); return module.run([ "$templateCache", function($templateCache) { return $templateCache.put("templates/iconpicker.html", "<span class=\"btn-group ui-iconpicker\" uib-dropdown is-open=\"isopen\" ng-class=\"{ disabled: disabled }\">\n <button type=\"button\" class=\"btn btn-default\" uib-dropdown-toggle><i class=\"{{ iconClass }}\"></i><span class=\"caret\"></span>\n </button>\n <div class=\"dropdown-menu\" role=\"menu\">\n <input ng-model=\"filterText\" type=\"\text\" class=\"form-control\"><ul><li ng-repeat=\"class in availableIconClasses|filter:filterText\">\n <button class=\"btn btn-default\" type=\"button\" ng-click=\"$parent.iconClass = class\"><span class=\"{{ class }}\"></span></button>\n </li>\n </ul></div>\n <input name=\"{{ name }}\" type=\"hidden\" value=\"{{ iconClass }}\" ng-if=\"name\" />\n</span>"); } ]); }); }).call(this); (function() { var umd; umd = function(root, factory) { return factory(root.angular); }; umd(this, function(angular) { var module; module = angular.module("ui-iconpicker/directives/ui-iconpicker", ["ui-iconpicker/services/IconGroupCollection", "ui-iconpicker/templates/iconpicker"]); return module.directive("uiIconpicker", [ "IconGroupCollection", function(IconGroupCollection) { return { require: '?ngModel', replace: true, restrict: "E", scope: { name: "@", model: "=?ngModel", ngGroups:'=' }, templateUrl: "templates/iconpicker.html", link: function($scope, $element, attrs,ngModel) { var _ref; var groups = attrs.groups || $scope.ngGroups; console.log(groups); $scope.availableIconClasses = (new IconGroupCollection(groups)).getClassArray(); $scope.iconClass = (_ref = (attrs.value|| $scope.model)) != null ? _ref : $scope.availableIconClasses[0]; $scope.isopen = false; $scope.toggleDropdown = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.isopen = !child_scope.isopen; }; if (attrs.ngModel) { $scope.$watch("iconClass", function() { $scope.model = $scope.iconClass; if(ngModel) $scope.$eval(ngModel.$setViewValue($scope.model)); if(attrs.ngChange) { $scope.$parent.$eval(attrs.ngChange); } }); $scope.$watch("ngGroups", function(n,o) { $scope.availableIconClasses = (new IconGroupCollection(n)).getClassArray(); $scope.iconClass = (_ref = (attrs.value|| $scope.model)) != null ? _ref : $scope.availableIconClasses[0]; }); $scope.$watch("model", function() { $scope.iconClass = $scope.model; if(ngModel) $scope.$eval(ngModel.$setViewValue($scope.model)); if(attrs.ngChange) { $scope.$parent.$eval(attrs.ngChange); } }); } $scope.$filterInput = $element.find("input"); $scope.$filterInput.bind('click',function(event) { event.stopPropagation(); }); $scope.$dropdownButton = $element.find("button").eq(0); return $scope.disabled = attrs.disabled != null; } }; } ]); }); }).call(this); (function() { var umd; umd = function(root, factory) { return factory(root.angular); }; umd(this, function(angular) { return angular.module("ui-iconpicker", ["ui-iconpicker/directives/ui-iconpicker"]); }); }) .call(this);
[+]
..
[-] ui-iconpicker.min.js
[edit]
[-] ui-iconpicker.js
[edit]