From 244868b826e24dba6ac6487cd66c59ec0bbdaad5 Mon Sep 17 00:00:00 2001 From: Victor Valencia Rico Date: Wed, 20 Nov 2013 18:03:18 -0600 Subject: [PATCH] Reducing the size of the source file and minified file. --- .../js/bootstrap-iconpicker.js | 1328 ++++++++--------- .../js/bootstrap-iconpicker.min.js | 8 +- index.html | 16 + 3 files changed, 687 insertions(+), 665 deletions(-) diff --git a/bootstrap-iconpicker/js/bootstrap-iconpicker.js b/bootstrap-iconpicker/js/bootstrap-iconpicker.js index 0200464..7215c95 100644 --- a/bootstrap-iconpicker/js/bootstrap-iconpicker.js +++ b/bootstrap-iconpicker/js/bootstrap-iconpicker.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: bootstrap-iconpicker.js v1.0.0 + * Bootstrap: bootstrap-iconpicker.js v1.0.0 by @recktoner * https://victor-valencia.github.com/bootstrap-iconpicker * ======================================================================== * Copyright 2013 Victor Valencia Rico. @@ -31,647 +31,647 @@ Iconpicker.ICONSET = { glyphicon : [ - 'glyphicon-adjust', - 'glyphicon-align-center', - 'glyphicon-align-justify', - 'glyphicon-align-left', - 'glyphicon-align-right', - 'glyphicon-arrow-down', - 'glyphicon-arrow-left', - 'glyphicon-arrow-right', - 'glyphicon-arrow-up', - 'glyphicon-asterisk', - 'glyphicon-backward', - 'glyphicon-ban-circle', - 'glyphicon-barcode', - 'glyphicon-bell', - 'glyphicon-bold', - 'glyphicon-book', - 'glyphicon-bookmark', - 'glyphicon-briefcase', - 'glyphicon-bullhorn', - 'glyphicon-calendar', - 'glyphicon-camera', - 'glyphicon-certificate', - 'glyphicon-check', - 'glyphicon-chevron-down', - 'glyphicon-chevron-left', - 'glyphicon-chevron-right', - 'glyphicon-chevron-up', - 'glyphicon-circle-arrow-down', - 'glyphicon-circle-arrow-left', - 'glyphicon-circle-arrow-right', - 'glyphicon-circle-arrow-up', - 'glyphicon-cloud', - 'glyphicon-cloud-download', - 'glyphicon-cloud-upload', - 'glyphicon-cog', - 'glyphicon-collapse-down', - 'glyphicon-collapse-up', - 'glyphicon-comment', - 'glyphicon-compressed', - 'glyphicon-copyright-mark', - 'glyphicon-credit-card', - 'glyphicon-cutlery', - 'glyphicon-dashboard', - 'glyphicon-download', - 'glyphicon-download-alt', - 'glyphicon-earphone', - 'glyphicon-edit', - 'glyphicon-eject', - 'glyphicon-envelope', - 'glyphicon-euro', - 'glyphicon-exclamation-sign', - 'glyphicon-expand', - 'glyphicon-export', - 'glyphicon-eye-close', - 'glyphicon-eye-open', - 'glyphicon-facetime-video', - 'glyphicon-fast-backward', - 'glyphicon-fast-forward', - 'glyphicon-file', - 'glyphicon-film', - 'glyphicon-filter', - 'glyphicon-fire', - 'glyphicon-flag', - 'glyphicon-flash', - 'glyphicon-floppy-disk', - 'glyphicon-floppy-open', - 'glyphicon-floppy-remove', - 'glyphicon-floppy-save', - 'glyphicon-floppy-saved', - 'glyphicon-folder-close', - 'glyphicon-folder-open', - 'glyphicon-font', - 'glyphicon-forward', - 'glyphicon-fullscreen', - 'glyphicon-gbp', - 'glyphicon-gift', - 'glyphicon-glass', - 'glyphicon-globe', - 'glyphicon-hand-down', - 'glyphicon-hand-left', - 'glyphicon-hand-right', - 'glyphicon-hand-up', - 'glyphicon-hd-video', - 'glyphicon-hdd', - 'glyphicon-header', - 'glyphicon-headphones', - 'glyphicon-heart', - 'glyphicon-heart-empty', - 'glyphicon-home', - 'glyphicon-import', - 'glyphicon-inbox', - 'glyphicon-indent-left', - 'glyphicon-indent-right', - 'glyphicon-info-sign', - 'glyphicon-italic', - 'glyphicon-leaf', - 'glyphicon-link', - 'glyphicon-list', - 'glyphicon-list-alt', - 'glyphicon-lock', - 'glyphicon-log-in', - 'glyphicon-log-out', - 'glyphicon-magnet', - 'glyphicon-map-marker', - 'glyphicon-minus', - 'glyphicon-minus-sign', - 'glyphicon-move', - 'glyphicon-music', - 'glyphicon-new-window', - 'glyphicon-off', - 'glyphicon-ok', - 'glyphicon-ok-circle', - 'glyphicon-ok-sign', - 'glyphicon-open', - 'glyphicon-paperclip', - 'glyphicon-pause', - 'glyphicon-pencil', - 'glyphicon-phone', - 'glyphicon-phone-alt', - 'glyphicon-picture', - 'glyphicon-plane', - 'glyphicon-play', - 'glyphicon-play-circle', - 'glyphicon-plus', - 'glyphicon-plus-sign', - 'glyphicon-print', - 'glyphicon-pushpin', - 'glyphicon-qrcode', - 'glyphicon-question-sign', - 'glyphicon-random', - 'glyphicon-record', - 'glyphicon-refresh', - 'glyphicon-registration-mark', - 'glyphicon-remove', - 'glyphicon-remove-circle', - 'glyphicon-remove-sign', - 'glyphicon-repeat', - 'glyphicon-resize-full', - 'glyphicon-resize-horizontal', - 'glyphicon-resize-small', - 'glyphicon-resize-vertical', - 'glyphicon-retweet', - 'glyphicon-road', - 'glyphicon-save', - 'glyphicon-saved', - 'glyphicon-screenshot', - 'glyphicon-sd-video', - 'glyphicon-search', - 'glyphicon-send', - 'glyphicon-share', - 'glyphicon-share-alt', - 'glyphicon-shopping-cart', - 'glyphicon-signal', - 'glyphicon-sort', - 'glyphicon-sort-by-alphabet', - 'glyphicon-sort-by-alphabet-alt', - 'glyphicon-sort-by-attributes', - 'glyphicon-sort-by-attributes-alt', - 'glyphicon-sort-by-order', - 'glyphicon-sort-by-order-alt', - 'glyphicon-sound-5-1', - 'glyphicon-sound-6-1', - 'glyphicon-sound-7-1', - 'glyphicon-sound-dolby', - 'glyphicon-sound-stereo', - 'glyphicon-star', - 'glyphicon-star-empty', - 'glyphicon-stats', - 'glyphicon-step-backward', - 'glyphicon-step-forward', - 'glyphicon-stop', - 'glyphicon-subtitles', - 'glyphicon-tag', - 'glyphicon-tags', - 'glyphicon-tasks', - 'glyphicon-text-height', - 'glyphicon-text-width', - 'glyphicon-th', - 'glyphicon-th-large', - 'glyphicon-th-list', - 'glyphicon-thumbs-down', - 'glyphicon-thumbs-up', - 'glyphicon-time', - 'glyphicon-tint', - 'glyphicon-tower', - 'glyphicon-transfer', - 'glyphicon-trash', - 'glyphicon-tree-conifer', - 'glyphicon-tree-deciduous', - 'glyphicon-unchecked', - 'glyphicon-upload', - 'glyphicon-usd', - 'glyphicon-user', - 'glyphicon-volume-down', - 'glyphicon-volume-off', - 'glyphicon-volume-up', - 'glyphicon-warning-sign', - 'glyphicon-wrench', - 'glyphicon-zoom-in', - 'glyphicon-zoom-out' + 'adjust', + 'align-center', + 'align-justify', + 'align-left', + 'align-right', + 'arrow-down', + 'arrow-left', + 'arrow-right', + 'arrow-up', + 'asterisk', + 'backward', + 'ban-circle', + 'barcode', + 'bell', + 'bold', + 'book', + 'bookmark', + 'briefcase', + 'bullhorn', + 'calendar', + 'camera', + 'certificate', + 'check', + 'chevron-down', + 'chevron-left', + 'chevron-right', + 'chevron-up', + 'circle-arrow-down', + 'circle-arrow-left', + 'circle-arrow-right', + 'circle-arrow-up', + 'cloud', + 'cloud-download', + 'cloud-upload', + 'cog', + 'collapse-down', + 'collapse-up', + 'comment', + 'compressed', + 'copyright-mark', + 'credit-card', + 'cutlery', + 'dashboard', + 'download', + 'download-alt', + 'earphone', + 'edit', + 'eject', + 'envelope', + 'euro', + 'exclamation-sign', + 'expand', + 'export', + 'eye-close', + 'eye-open', + 'facetime-video', + 'fast-backward', + 'fast-forward', + 'file', + 'film', + 'filter', + 'fire', + 'flag', + 'flash', + 'floppy-disk', + 'floppy-open', + 'floppy-remove', + 'floppy-save', + 'floppy-saved', + 'folder-close', + 'folder-open', + 'font', + 'forward', + 'fullscreen', + 'gbp', + 'gift', + 'glass', + 'globe', + 'hand-down', + 'hand-left', + 'hand-right', + 'hand-up', + 'hd-video', + 'hdd', + 'header', + 'headphones', + 'heart', + 'heart-empty', + 'home', + 'import', + 'inbox', + 'indent-left', + 'indent-right', + 'info-sign', + 'italic', + 'leaf', + 'link', + 'list', + 'list-alt', + 'lock', + 'log-in', + 'log-out', + 'magnet', + 'map-marker', + 'minus', + 'minus-sign', + 'move', + 'music', + 'new-window', + 'off', + 'ok', + 'ok-circle', + 'ok-sign', + 'open', + 'paperclip', + 'pause', + 'pencil', + 'phone', + 'phone-alt', + 'picture', + 'plane', + 'play', + 'play-circle', + 'plus', + 'plus-sign', + 'print', + 'pushpin', + 'qrcode', + 'question-sign', + 'random', + 'record', + 'refresh', + 'registration-mark', + 'remove', + 'remove-circle', + 'remove-sign', + 'repeat', + 'resize-full', + 'resize-horizontal', + 'resize-small', + 'resize-vertical', + 'retweet', + 'road', + 'save', + 'saved', + 'screenshot', + 'sd-video', + 'search', + 'send', + 'share', + 'share-alt', + 'shopping-cart', + 'signal', + 'sort', + 'sort-by-alphabet', + 'sort-by-alphabet-alt', + 'sort-by-attributes', + 'sort-by-attributes-alt', + 'sort-by-order', + 'sort-by-order-alt', + 'sound-5-1', + 'sound-6-1', + 'sound-7-1', + 'sound-dolby', + 'sound-stereo', + 'star', + 'star-empty', + 'stats', + 'step-backward', + 'step-forward', + 'stop', + 'subtitles', + 'tag', + 'tags', + 'tasks', + 'text-height', + 'text-width', + 'th', + 'th-large', + 'th-list', + 'thumbs-down', + 'thumbs-up', + 'time', + 'tint', + 'tower', + 'transfer', + 'trash', + 'tree-conifer', + 'tree-deciduous', + 'unchecked', + 'upload', + 'usd', + 'user', + 'volume-down', + 'volume-off', + 'volume-up', + 'warning-sign', + 'wrench', + 'zoom-in', + 'zoom-out' ], - fontawesome : [ - 'fa-adjust', - 'fa-anchor', - 'fa-archive', - //'fa-arrows', - //'fa-arrows-h', - //'fa-arrows-v', - 'fa-asterisk', - 'fa-ban', - 'fa-bar-chart-o', - 'fa-barcode', - //'fa-bars', - 'fa-beer', - 'fa-bell', - 'fa-bell-o', - 'fa-bolt', - 'fa-book', - 'fa-bookmark', - 'fa-bookmark-o', - 'fa-briefcase', - 'fa-bug', - //'fa-building-o', - 'fa-bullhorn', - 'fa-bullseye', - 'fa-calendar', - 'fa-calendar-o', - 'fa-camera', - 'fa-camera-retro', - 'fa-caret-square-o-down', - 'fa-caret-square-o-left', - 'fa-caret-square-o-right', - 'fa-caret-square-o-up', - 'fa-certificate', - 'fa-check', - 'fa-check-circle', - 'fa-check-circle-o', - 'fa-check-square', - 'fa-check-square-o', - 'fa-circle', - 'fa-circle-o', - 'fa-clock-o', - 'fa-cloud', - 'fa-cloud-download', - 'fa-cloud-upload', - 'fa-code', - 'fa-code-fork', - 'fa-coffee', - 'fa-cog', - 'fa-cogs', - 'fa-comment', - 'fa-comment-o', - 'fa-comments', - 'fa-comments-o', - 'fa-compass', - 'fa-credit-card', - 'fa-crop', - 'fa-crosshairs', - 'fa-cutlery', - 'fa-dashboard', - 'fa-desktop', - 'fa-dot-circle-o', - 'fa-download', - 'fa-edit', - //'fa-ellipsis-h', - //'fa-ellipsis-v', - 'fa-envelope', - 'fa-envelope-o', - 'fa-eraser', - 'fa-exchange', - 'fa-exclamation', - 'fa-exclamation-circle', - 'fa-exclamation-triangle', - 'fa-external-link', - 'fa-external-link-square', - 'fa-eye', - 'fa-eye-slash', - 'fa-female', - 'fa-fighter-jet', - 'fa-film', - 'fa-filter', - 'fa-fire', - 'fa-fire-extinguisher', - 'fa-flag', - 'fa-flag-checkered', - 'fa-flag-o', - 'fa-flash', - 'fa-flask', - 'fa-folder', - 'fa-folder-o', - 'fa-folder-open', - 'fa-folder-open-o', - 'fa-frown-o', - 'fa-gamepad', - 'fa-gavel', - 'fa-gear', - 'fa-gears', - 'fa-gift', - 'fa-glass', - 'fa-globe', - 'fa-group', - //'fa-hdd-o', - 'fa-headphones', - 'fa-heart', - 'fa-heart-o', - 'fa-home', - 'fa-inbox', - 'fa-info', - 'fa-info-circle', - 'fa-key', - 'fa-keyboard-o', - 'fa-laptop', - 'fa-leaf', - 'fa-legal', - 'fa-lemon-o', - 'fa-level-down', - 'fa-level-up', - 'fa-lightbulb-o', - 'fa-location-arrow', - 'fa-lock', - 'fa-magic', - 'fa-magnet', - 'fa-mail-forward', - 'fa-mail-reply', - 'fa-mail-reply-all', - 'fa-male', - 'fa-map-marker', - 'fa-meh-o', - 'fa-microphone', - 'fa-microphone-slash', - 'fa-minus', - 'fa-minus-circle', - 'fa-minus-square', - 'fa-minus-square-o', - 'fa-mobile', - 'fa-mobile-phone', - 'fa-money', - 'fa-moon-o', - 'fa-music', - 'fa-pencil', - 'fa-pencil-square', - 'fa-pencil-square-o', - 'fa-phone', - 'fa-phone-square', - 'fa-picture-o', - 'fa-plane', - 'fa-plus', - 'fa-plus-circle', - 'fa-plus-square', - //'fa-plus-square-o', - 'fa-power-off', - 'fa-print', - 'fa-puzzle-piece', - 'fa-qrcode', - 'fa-question', - 'fa-question-circle', - 'fa-quote-left', - 'fa-quote-right', - 'fa-random', - 'fa-refresh', - 'fa-reply', - 'fa-reply-all', - 'fa-retweet', - 'fa-road', - 'fa-rocket', - 'fa-rss', - 'fa-rss-square', - 'fa-search', - 'fa-search-minus', - 'fa-search-plus', - 'fa-share', - 'fa-share-square', - 'fa-share-square-o', - 'fa-shield', - 'fa-shopping-cart', - 'fa-sign-in', - 'fa-sign-out', - 'fa-signal', - 'fa-sitemap', - 'fa-smile-o', - 'fa-sort', - 'fa-sort-alpha-asc', - 'fa-sort-alpha-desc', - 'fa-sort-amount-asc', - 'fa-sort-amount-desc', - 'fa-sort-asc', - 'fa-sort-desc', - 'fa-sort-down', - 'fa-sort-numeric-asc', - 'fa-sort-numeric-desc', - 'fa-sort-up', - 'fa-spinner', - 'fa-square', - 'fa-square-o', - 'fa-star', - 'fa-star-half', - 'fa-star-half-empty', - 'fa-star-half-full', - 'fa-star-half-o', - 'fa-star-o', - 'fa-subscript', - 'fa-suitcase', - 'fa-sun-o', - 'fa-superscript', - 'fa-tablet', - 'fa-tachometer', - 'fa-tag', - 'fa-tags', - 'fa-tasks', - 'fa-terminal', - 'fa-thumb-tack', - 'fa-thumbs-down', - 'fa-thumbs-o-down', - 'fa-thumbs-o-up', - 'fa-thumbs-up', - 'fa-ticket', - 'fa-times', - 'fa-times-circle', - 'fa-times-circle-o', - 'fa-tint', - 'fa-toggle-down', - 'fa-toggle-left', - 'fa-toggle-right', - 'fa-toggle-up', - 'fa-trash-o', - 'fa-trophy', - 'fa-truck', - 'fa-umbrella', - 'fa-unlock', - //'fa-unlock-alt', - 'fa-unsorted', - 'fa-upload', - 'fa-user', - //'fa-users', - 'fa-video-camera', - 'fa-volume-down', - 'fa-volume-off', - 'fa-volume-up', - 'fa-warning', - 'fa-wheelchair', - 'fa-wrench', - 'fa-check-square', - 'fa-check-square-o', - 'fa-circle', - 'fa-circle-o', - 'fa-dot-circle-o', - 'fa-minus-square', - 'fa-minus-square-o', - 'fa-plus-square', - //'fa-plus-square-o', - 'fa-square', - 'fa-square-o', - 'fa-bitcoin', - 'fa-btc', - 'fa-cny', - 'fa-dollar', - 'fa-eur', - 'fa-euro', - 'fa-gbp', - 'fa-inr', - 'fa-jpy', - 'fa-krw', - 'fa-money', - 'fa-rmb', - 'fa-rouble', - 'fa-rub', - 'fa-ruble', - 'fa-rupee', - 'fa-try', - 'fa-turkish-lira', - 'fa-usd', - 'fa-won', - 'fa-yen', - 'fa-align-center', - 'fa-align-justify', - 'fa-align-left', - 'fa-align-right', - 'fa-bold', - 'fa-chain', - 'fa-chain-broken', - 'fa-clipboard', - 'fa-columns', - 'fa-copy', - 'fa-cut', - 'fa-dedent', - 'fa-eraser', - 'fa-file', - 'fa-file-o', - 'fa-file-text', - 'fa-file-text-o', - 'fa-files-o', - 'fa-floppy-o', - 'fa-font', - 'fa-indent', - 'fa-italic', - 'fa-link', - 'fa-list', - 'fa-list-alt', - 'fa-list-ol', - 'fa-list-ul', - 'fa-outdent', - 'fa-paperclip', - 'fa-paste', - 'fa-repeat', - 'fa-rotate-left', - 'fa-rotate-right', - 'fa-save', - 'fa-scissors', - 'fa-strikethrough', - 'fa-table', - 'fa-text-height', - 'fa-text-width', - 'fa-th', - 'fa-th-large', - 'fa-th-list', - 'fa-underline', - 'fa-undo', - 'fa-unlink', - 'fa-angle-double-down', - 'fa-angle-double-left', - 'fa-angle-double-right', - 'fa-angle-double-up', - 'fa-angle-down', - 'fa-angle-left', - 'fa-angle-right', - 'fa-angle-up', - 'fa-arrow-circle-down', - 'fa-arrow-circle-left', - 'fa-arrow-circle-o-down', - 'fa-arrow-circle-o-left', - 'fa-arrow-circle-o-right', - 'fa-arrow-circle-o-up', - 'fa-arrow-circle-right', - 'fa-arrow-circle-up', - 'fa-arrow-down', - 'fa-arrow-left', - 'fa-arrow-right', - 'fa-arrow-up', - //'fa-arrows', - //'fa-arrows-alt', - //'fa-arrows-h', - //'fa-arrows-v', - 'fa-caret-down', - 'fa-caret-left', - 'fa-caret-right', - 'fa-caret-square-o-down', - 'fa-caret-square-o-left', - 'fa-caret-square-o-right', - 'fa-caret-square-o-up', - 'fa-caret-up', - 'fa-chevron-circle-down', - 'fa-chevron-circle-left', - 'fa-chevron-circle-right', - 'fa-chevron-circle-up', - 'fa-chevron-down', - 'fa-chevron-left', - 'fa-chevron-right', - 'fa-chevron-up', - 'fa-hand-o-down', - 'fa-hand-o-left', - 'fa-hand-o-right', - 'fa-hand-o-up', - 'fa-long-arrow-down', - 'fa-long-arrow-left', - 'fa-long-arrow-right', - 'fa-long-arrow-up', - 'fa-toggle-down', - 'fa-toggle-left', - 'fa-toggle-right', - 'fa-toggle-up', - //'fa-arrows-alt', - 'fa-backward', - //'fa-compress', - 'fa-eject', - //'fa-expand', - 'fa-fast-backward', - 'fa-fast-forward', - 'fa-forward', - 'fa-pause', - 'fa-play', - 'fa-play-circle', - 'fa-play-circle-o', - 'fa-step-backward', - 'fa-step-forward', - 'fa-stop', - 'fa-youtube-play', - 'fa-adn', - 'fa-android', - 'fa-apple', - 'fa-bitbucket', - 'fa-bitbucket-square', - 'fa-bitcoin', - 'fa-btc', - 'fa-css3', - 'fa-dribbble', - 'fa-dropbox', - 'fa-facebook', - 'fa-facebook-square', - 'fa-flickr', - 'fa-foursquare', - 'fa-github', - 'fa-github-alt', - 'fa-github-square', - 'fa-gittip', - 'fa-google-plus', - 'fa-google-plus-square', - 'fa-html5', - 'fa-instagram', - 'fa-linkedin', - 'fa-linkedin-square', - 'fa-linux', - 'fa-maxcdn', - 'fa-pagelines', - 'fa-pinterest', - 'fa-pinterest-square', - 'fa-renren', - 'fa-skype', - 'fa-stack-exchange', - 'fa-stack-overflow', - 'fa-trello', - 'fa-tumblr', - 'fa-tumblr-square', - 'fa-twitter', - 'fa-twitter-square', - 'fa-vimeo-square', - 'fa-vk', - 'fa-weibo', - 'fa-windows', - 'fa-xing', - 'fa-xing-square', - 'fa-youtube', - 'fa-youtube-play', - 'fa-youtube-square', - 'fa-ambulance', - 'fa-h-square', - //'fa-hospital-o', - 'fa-medkit', - 'fa-plus-square', - 'fa-stethoscope', - 'fa-user-md', - 'fa-wheelchair' + fa : [ + 'adjust', + 'anchor', + 'archive', + //'arrows', + //'arrows-h', + //'arrows-v', + 'asterisk', + 'ban', + 'bar-chart-o', + 'barcode', + //'bars', + 'beer', + 'bell', + 'bell-o', + 'bolt', + 'book', + 'bookmark', + 'bookmark-o', + 'briefcase', + 'bug', + //'building-o', + 'bullhorn', + 'bullseye', + 'calendar', + 'calendar-o', + 'camera', + 'camera-retro', + 'caret-square-o-down', + 'caret-square-o-left', + 'caret-square-o-right', + 'caret-square-o-up', + 'certificate', + 'check', + 'check-circle', + 'check-circle-o', + 'check-square', + 'check-square-o', + 'circle', + 'circle-o', + 'clock-o', + 'cloud', + 'cloud-download', + 'cloud-upload', + 'code', + 'code-fork', + 'coffee', + 'cog', + 'cogs', + 'comment', + 'comment-o', + 'comments', + 'comments-o', + 'compass', + 'credit-card', + 'crop', + 'crosshairs', + 'cutlery', + 'dashboard', + 'desktop', + 'dot-circle-o', + 'download', + 'edit', + //'ellipsis-h', + //'ellipsis-v', + 'envelope', + 'envelope-o', + 'eraser', + 'exchange', + 'exclamation', + 'exclamation-circle', + 'exclamation-triangle', + 'external-link', + 'external-link-square', + 'eye', + 'eye-slash', + 'female', + 'fighter-jet', + 'film', + 'filter', + 'fire', + 'fire-extinguisher', + 'flag', + 'flag-checkered', + 'flag-o', + 'flash', + 'flask', + 'folder', + 'folder-o', + 'folder-open', + 'folder-open-o', + 'frown-o', + 'gamepad', + 'gavel', + 'gear', + 'gears', + 'gift', + 'glass', + 'globe', + 'group', + //'hdd-o', + 'headphones', + 'heart', + 'heart-o', + 'home', + 'inbox', + 'info', + 'info-circle', + 'key', + 'keyboard-o', + 'laptop', + 'leaf', + 'legal', + 'lemon-o', + 'level-down', + 'level-up', + 'lightbulb-o', + 'location-arrow', + 'lock', + 'magic', + 'magnet', + 'mail-forward', + 'mail-reply', + 'mail-reply-all', + 'male', + 'map-marker', + 'meh-o', + 'microphone', + 'microphone-slash', + 'minus', + 'minus-circle', + 'minus-square', + 'minus-square-o', + 'mobile', + 'mobile-phone', + 'money', + 'moon-o', + 'music', + 'pencil', + 'pencil-square', + 'pencil-square-o', + 'phone', + 'phone-square', + 'picture-o', + 'plane', + 'plus', + 'plus-circle', + 'plus-square', + //'plus-square-o', + 'power-off', + 'print', + 'puzzle-piece', + 'qrcode', + 'question', + 'question-circle', + 'quote-left', + 'quote-right', + 'random', + 'refresh', + 'reply', + 'reply-all', + 'retweet', + 'road', + 'rocket', + 'rss', + 'rss-square', + 'search', + 'search-minus', + 'search-plus', + 'share', + 'share-square', + 'share-square-o', + 'shield', + 'shopping-cart', + 'sign-in', + 'sign-out', + 'signal', + 'sitemap', + 'smile-o', + 'sort', + 'sort-alpha-asc', + 'sort-alpha-desc', + 'sort-amount-asc', + 'sort-amount-desc', + 'sort-asc', + 'sort-desc', + 'sort-down', + 'sort-numeric-asc', + 'sort-numeric-desc', + 'sort-up', + 'spinner', + 'square', + 'square-o', + 'star', + 'star-half', + 'star-half-empty', + 'star-half-full', + 'star-half-o', + 'star-o', + 'subscript', + 'suitcase', + 'sun-o', + 'superscript', + 'tablet', + 'tachometer', + 'tag', + 'tags', + 'tasks', + 'terminal', + 'thumb-tack', + 'thumbs-down', + 'thumbs-o-down', + 'thumbs-o-up', + 'thumbs-up', + 'ticket', + 'times', + 'times-circle', + 'times-circle-o', + 'tint', + 'toggle-down', + 'toggle-left', + 'toggle-right', + 'toggle-up', + 'trash-o', + 'trophy', + 'truck', + 'umbrella', + 'unlock', + //'unlock-alt', + 'unsorted', + 'upload', + 'user', + //'users', + 'video-camera', + 'volume-down', + 'volume-off', + 'volume-up', + 'warning', + 'wheelchair', + 'wrench', + 'check-square', + 'check-square-o', + 'circle', + 'circle-o', + 'dot-circle-o', + 'minus-square', + 'minus-square-o', + 'plus-square', + //'plus-square-o', + 'square', + 'square-o', + 'bitcoin', + 'btc', + 'cny', + 'dollar', + 'eur', + 'euro', + 'gbp', + 'inr', + 'jpy', + 'krw', + 'money', + 'rmb', + 'rouble', + 'rub', + 'ruble', + 'rupee', + 'try', + 'turkish-lira', + 'usd', + 'won', + 'yen', + 'align-center', + 'align-justify', + 'align-left', + 'align-right', + 'bold', + 'chain', + 'chain-broken', + 'clipboard', + 'columns', + 'copy', + 'cut', + 'dedent', + 'eraser', + 'file', + 'file-o', + 'file-text', + 'file-text-o', + 'files-o', + 'floppy-o', + 'font', + 'indent', + 'italic', + 'link', + 'list', + 'list-alt', + 'list-ol', + 'list-ul', + 'outdent', + 'paperclip', + 'paste', + 'repeat', + 'rotate-left', + 'rotate-right', + 'save', + 'scissors', + 'strikethrough', + 'table', + 'text-height', + 'text-width', + 'th', + 'th-large', + 'th-list', + 'underline', + 'undo', + 'unlink', + 'angle-double-down', + 'angle-double-left', + 'angle-double-right', + 'angle-double-up', + 'angle-down', + 'angle-left', + 'angle-right', + 'angle-up', + 'arrow-circle-down', + 'arrow-circle-left', + 'arrow-circle-o-down', + 'arrow-circle-o-left', + 'arrow-circle-o-right', + 'arrow-circle-o-up', + 'arrow-circle-right', + 'arrow-circle-up', + 'arrow-down', + 'arrow-left', + 'arrow-right', + 'arrow-up', + //'arrows', + //'arrows-alt', + //'arrows-h', + //'arrows-v', + 'caret-down', + 'caret-left', + 'caret-right', + 'caret-square-o-down', + 'caret-square-o-left', + 'caret-square-o-right', + 'caret-square-o-up', + 'caret-up', + 'chevron-circle-down', + 'chevron-circle-left', + 'chevron-circle-right', + 'chevron-circle-up', + 'chevron-down', + 'chevron-left', + 'chevron-right', + 'chevron-up', + 'hand-o-down', + 'hand-o-left', + 'hand-o-right', + 'hand-o-up', + 'long-arrow-down', + 'long-arrow-left', + 'long-arrow-right', + 'long-arrow-up', + 'toggle-down', + 'toggle-left', + 'toggle-right', + 'toggle-up', + //'arrows-alt', + 'backward', + //'compress', + 'eject', + //'expand', + 'fast-backward', + 'fast-forward', + 'forward', + 'pause', + 'play', + 'play-circle', + 'play-circle-o', + 'step-backward', + 'step-forward', + 'stop', + 'youtube-play', + 'adn', + 'android', + 'apple', + 'bitbucket', + 'bitbucket-square', + 'bitcoin', + 'btc', + 'css3', + 'dribbble', + 'dropbox', + 'facebook', + 'facebook-square', + 'flickr', + 'foursquare', + 'github', + 'github-alt', + 'github-square', + 'gittip', + 'google-plus', + 'google-plus-square', + 'html5', + 'instagram', + 'linkedin', + 'linkedin-square', + 'linux', + 'maxcdn', + 'pagelines', + 'pinterest', + 'pinterest-square', + 'renren', + 'skype', + 'stack-exchange', + 'stack-overflow', + 'trello', + 'tumblr', + 'tumblr-square', + 'twitter', + 'twitter-square', + 'vimeo-square', + 'vk', + 'weibo', + 'windows', + 'xing', + 'xing-square', + 'youtube', + 'youtube-play', + 'youtube-square', + 'ambulance', + 'h-square', + //'hospital-o', + 'medkit', + 'plus-square', + 'stethoscope', + 'user-md', + 'wheelchair' ] }; @@ -681,8 +681,8 @@ rows: 4, cols: 4, placement: 'right', - }; - + }; + Iconpicker.prototype.createButtonBar = function(){ var op = this.options; var tr = $(''); @@ -708,18 +708,10 @@ var op = this.options; var total_pages = Math.ceil( op.icons.length / (op.cols * op.rows) ); op.table.find('.page-count').html(page + ' / ' + total_pages); - if(page == 1){ - op.table.find('.btn-previous').addClass('disabled'); - } - else{ - op.table.find('.btn-previous').removeClass('disabled'); - } - if(page == total_pages){ - op.table.find('.btn-next').addClass('disabled'); - } - else{ - op.table.find('.btn-next').removeClass('disabled'); - } + var btn_prev = op.table.find('.btn-previous'); + var btn_next = op.table.find('.btn-next'); + (page == 1) ? btn_prev.addClass('disabled'): btn_prev.removeClass('disabled'); + (page == total_pages) ? btn_next.addClass('disabled'): btn_next.removeClass('disabled'); }; Iconpicker.prototype.bindEvents = function(){ @@ -737,23 +729,23 @@ Iconpicker.prototype.select = function(icon){ var op = this.options; - var el = this.$element; - op.selected = $.inArray(icon, op.icons); + var el = this.$element; + op.selected = $.inArray(icon.replace(op.iconClassFix, ''), op.icons); if(op.selected == -1){ op.selected = 0; - icon = op.icons[op.selected]; + icon = op.iconClassFix + op.icons[op.selected]; } if(icon != '' && op.selected >= 0){ op.icon = icon; el.find('input').val(icon); - el.find('i').attr('class', '').addClass((op.iconset == 'glyphicon') ? 'glyphicon' : 'fa').addClass(icon); + el.find('i').attr('class', '').addClass(op.iconClass).addClass(icon); op.table.find('button.btn-warning').removeClass('btn-warning'); } }; Iconpicker.prototype.switchPage = function(icon){ - var op = this.options; - op.selected = $.inArray(icon, op.icons); + var op = this.options; + op.selected = $.inArray(icon.replace(op.iconClassFix, ''), op.icons); if(icon != '' && op.selected >= 0){ var page = Math.ceil( (op.selected + 1) / (op.cols * op.rows) ); this.changeList(page); @@ -772,7 +764,8 @@ var pos = offset + (i * op.cols) + j; var btn = $('').hide(); if(pos < op.icons.length){ - btn = $(''); + var v = op.iconClassFix + op.icons[pos]; + btn = $(''); } var td = $('').append(btn); tr.append(td); @@ -793,13 +786,20 @@ var options = typeof option == 'object' && option; if (!data) $this.data('bs.iconpicker', (data = new Iconpicker(this, options))); var op = data.options; + var ic = (op.iconset == 'fontawesome') ? 'fa' : 'glyphicon'; op = $.extend(op, { - icons: (op.iconset == Iconpicker.DEFAULTS.iconset) ? Iconpicker.ICONSET.glyphicon : Iconpicker.ICONSET.fontawesome, + icons: Iconpicker.ICONSET[ic], + iconClass: ic, + iconClassFix: ic + '-', page: 1, selected: -1, table: $('
') }); - $this.empty().append('').append('').append(''); + var name = ( typeof $this.attr('name') != 'undefined' ) ? 'name="' + $this.attr('name') + '"' : ''; + $this.empty() + .append('') + .append('') + .append(''); $this.addClass('iconpicker'); data.createButtonBar(); data.changeList(1); diff --git a/bootstrap-iconpicker/js/bootstrap-iconpicker.min.js b/bootstrap-iconpicker/js/bootstrap-iconpicker.min.js index d4c903b..dc21aee 100644 --- a/bootstrap-iconpicker/js/bootstrap-iconpicker.min.js +++ b/bootstrap-iconpicker/js/bootstrap-iconpicker.min.js @@ -1 +1,7 @@ -+function($){var Iconpicker=function(element,options){this.$element=$(element);this.options=$.extend({},Iconpicker.DEFAULTS,this.$element.data());this.options=$.extend({},this.options,options)};Iconpicker.ICONSET={glyphicon:["glyphicon-adjust","glyphicon-align-center","glyphicon-align-justify","glyphicon-align-left","glyphicon-align-right","glyphicon-arrow-down","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-asterisk","glyphicon-backward","glyphicon-ban-circle","glyphicon-barcode","glyphicon-bell","glyphicon-bold","glyphicon-book","glyphicon-bookmark","glyphicon-briefcase","glyphicon-bullhorn","glyphicon-calendar","glyphicon-camera","glyphicon-certificate","glyphicon-check","glyphicon-chevron-down","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-chevron-up","glyphicon-circle-arrow-down","glyphicon-circle-arrow-left","glyphicon-circle-arrow-right","glyphicon-circle-arrow-up","glyphicon-cloud","glyphicon-cloud-download","glyphicon-cloud-upload","glyphicon-cog","glyphicon-collapse-down","glyphicon-collapse-up","glyphicon-comment","glyphicon-compressed","glyphicon-copyright-mark","glyphicon-credit-card","glyphicon-cutlery","glyphicon-dashboard","glyphicon-download","glyphicon-download-alt","glyphicon-earphone","glyphicon-edit","glyphicon-eject","glyphicon-envelope","glyphicon-euro","glyphicon-exclamation-sign","glyphicon-expand","glyphicon-export","glyphicon-eye-close","glyphicon-eye-open","glyphicon-facetime-video","glyphicon-fast-backward","glyphicon-fast-forward","glyphicon-file","glyphicon-film","glyphicon-filter","glyphicon-fire","glyphicon-flag","glyphicon-flash","glyphicon-floppy-disk","glyphicon-floppy-open","glyphicon-floppy-remove","glyphicon-floppy-save","glyphicon-floppy-saved","glyphicon-folder-close","glyphicon-folder-open","glyphicon-font","glyphicon-forward","glyphicon-fullscreen","glyphicon-gbp","glyphicon-gift","glyphicon-glass","glyphicon-globe","glyphicon-hand-down","glyphicon-hand-left","glyphicon-hand-right","glyphicon-hand-up","glyphicon-hd-video","glyphicon-hdd","glyphicon-header","glyphicon-headphones","glyphicon-heart","glyphicon-heart-empty","glyphicon-home","glyphicon-import","glyphicon-inbox","glyphicon-indent-left","glyphicon-indent-right","glyphicon-info-sign","glyphicon-italic","glyphicon-leaf","glyphicon-link","glyphicon-list","glyphicon-list-alt","glyphicon-lock","glyphicon-log-in","glyphicon-log-out","glyphicon-magnet","glyphicon-map-marker","glyphicon-minus","glyphicon-minus-sign","glyphicon-move","glyphicon-music","glyphicon-new-window","glyphicon-off","glyphicon-ok","glyphicon-ok-circle","glyphicon-ok-sign","glyphicon-open","glyphicon-paperclip","glyphicon-pause","glyphicon-pencil","glyphicon-phone","glyphicon-phone-alt","glyphicon-picture","glyphicon-plane","glyphicon-play","glyphicon-play-circle","glyphicon-plus","glyphicon-plus-sign","glyphicon-print","glyphicon-pushpin","glyphicon-qrcode","glyphicon-question-sign","glyphicon-random","glyphicon-record","glyphicon-refresh","glyphicon-registration-mark","glyphicon-remove","glyphicon-remove-circle","glyphicon-remove-sign","glyphicon-repeat","glyphicon-resize-full","glyphicon-resize-horizontal","glyphicon-resize-small","glyphicon-resize-vertical","glyphicon-retweet","glyphicon-road","glyphicon-save","glyphicon-saved","glyphicon-screenshot","glyphicon-sd-video","glyphicon-search","glyphicon-send","glyphicon-share","glyphicon-share-alt","glyphicon-shopping-cart","glyphicon-signal","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sound-5-1","glyphicon-sound-6-1","glyphicon-sound-7-1","glyphicon-sound-dolby","glyphicon-sound-stereo","glyphicon-star","glyphicon-star-empty","glyphicon-stats","glyphicon-step-backward","glyphicon-step-forward","glyphicon-stop","glyphicon-subtitles","glyphicon-tag","glyphicon-tags","glyphicon-tasks","glyphicon-text-height","glyphicon-text-width","glyphicon-th","glyphicon-th-large","glyphicon-th-list","glyphicon-thumbs-down","glyphicon-thumbs-up","glyphicon-time","glyphicon-tint","glyphicon-tower","glyphicon-transfer","glyphicon-trash","glyphicon-tree-conifer","glyphicon-tree-deciduous","glyphicon-unchecked","glyphicon-upload","glyphicon-usd","glyphicon-user","glyphicon-volume-down","glyphicon-volume-off","glyphicon-volume-up","glyphicon-warning-sign","glyphicon-wrench","glyphicon-zoom-in","glyphicon-zoom-out"],fontawesome:["fa-adjust","fa-anchor","fa-archive","fa-asterisk","fa-ban","fa-bar-chart-o","fa-barcode","fa-beer","fa-bell","fa-bell-o","fa-bolt","fa-book","fa-bookmark","fa-bookmark-o","fa-briefcase","fa-bug","fa-bullhorn","fa-bullseye","fa-calendar","fa-calendar-o","fa-camera","fa-camera-retro","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-certificate","fa-check","fa-check-circle","fa-check-circle-o","fa-check-square","fa-check-square-o","fa-circle","fa-circle-o","fa-clock-o","fa-cloud","fa-cloud-download","fa-cloud-upload","fa-code","fa-code-fork","fa-coffee","fa-cog","fa-cogs","fa-comment","fa-comment-o","fa-comments","fa-comments-o","fa-compass","fa-credit-card","fa-crop","fa-crosshairs","fa-cutlery","fa-dashboard","fa-desktop","fa-dot-circle-o","fa-download","fa-edit","fa-envelope","fa-envelope-o","fa-eraser","fa-exchange","fa-exclamation","fa-exclamation-circle","fa-exclamation-triangle","fa-external-link","fa-external-link-square","fa-eye","fa-eye-slash","fa-female","fa-fighter-jet","fa-film","fa-filter","fa-fire","fa-fire-extinguisher","fa-flag","fa-flag-checkered","fa-flag-o","fa-flash","fa-flask","fa-folder","fa-folder-o","fa-folder-open","fa-folder-open-o","fa-frown-o","fa-gamepad","fa-gavel","fa-gear","fa-gears","fa-gift","fa-glass","fa-globe","fa-group","fa-headphones","fa-heart","fa-heart-o","fa-home","fa-inbox","fa-info","fa-info-circle","fa-key","fa-keyboard-o","fa-laptop","fa-leaf","fa-legal","fa-lemon-o","fa-level-down","fa-level-up","fa-lightbulb-o","fa-location-arrow","fa-lock","fa-magic","fa-magnet","fa-mail-forward","fa-mail-reply","fa-mail-reply-all","fa-male","fa-map-marker","fa-meh-o","fa-microphone","fa-microphone-slash","fa-minus","fa-minus-circle","fa-minus-square","fa-minus-square-o","fa-mobile","fa-mobile-phone","fa-money","fa-moon-o","fa-music","fa-pencil","fa-pencil-square","fa-pencil-square-o","fa-phone","fa-phone-square","fa-picture-o","fa-plane","fa-plus","fa-plus-circle","fa-plus-square","fa-power-off","fa-print","fa-puzzle-piece","fa-qrcode","fa-question","fa-question-circle","fa-quote-left","fa-quote-right","fa-random","fa-refresh","fa-reply","fa-reply-all","fa-retweet","fa-road","fa-rocket","fa-rss","fa-rss-square","fa-search","fa-search-minus","fa-search-plus","fa-share","fa-share-square","fa-share-square-o","fa-shield","fa-shopping-cart","fa-sign-in","fa-sign-out","fa-signal","fa-sitemap","fa-smile-o","fa-sort","fa-sort-alpha-asc","fa-sort-alpha-desc","fa-sort-amount-asc","fa-sort-amount-desc","fa-sort-asc","fa-sort-desc","fa-sort-down","fa-sort-numeric-asc","fa-sort-numeric-desc","fa-sort-up","fa-spinner","fa-square","fa-square-o","fa-star","fa-star-half","fa-star-half-empty","fa-star-half-full","fa-star-half-o","fa-star-o","fa-subscript","fa-suitcase","fa-sun-o","fa-superscript","fa-tablet","fa-tachometer","fa-tag","fa-tags","fa-tasks","fa-terminal","fa-thumb-tack","fa-thumbs-down","fa-thumbs-o-down","fa-thumbs-o-up","fa-thumbs-up","fa-ticket","fa-times","fa-times-circle","fa-times-circle-o","fa-tint","fa-toggle-down","fa-toggle-left","fa-toggle-right","fa-toggle-up","fa-trash-o","fa-trophy","fa-truck","fa-umbrella","fa-unlock","fa-unsorted","fa-upload","fa-user","fa-video-camera","fa-volume-down","fa-volume-off","fa-volume-up","fa-warning","fa-wheelchair","fa-wrench","fa-check-square","fa-check-square-o","fa-circle","fa-circle-o","fa-dot-circle-o","fa-minus-square","fa-minus-square-o","fa-plus-square","fa-square","fa-square-o","fa-bitcoin","fa-btc","fa-cny","fa-dollar","fa-eur","fa-euro","fa-gbp","fa-inr","fa-jpy","fa-krw","fa-money","fa-rmb","fa-rouble","fa-rub","fa-ruble","fa-rupee","fa-try","fa-turkish-lira","fa-usd","fa-won","fa-yen","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-bold","fa-chain","fa-chain-broken","fa-clipboard","fa-columns","fa-copy","fa-cut","fa-dedent","fa-eraser","fa-file","fa-file-o","fa-file-text","fa-file-text-o","fa-files-o","fa-floppy-o","fa-font","fa-indent","fa-italic","fa-link","fa-list","fa-list-alt","fa-list-ol","fa-list-ul","fa-outdent","fa-paperclip","fa-paste","fa-repeat","fa-rotate-left","fa-rotate-right","fa-save","fa-scissors","fa-strikethrough","fa-table","fa-text-height","fa-text-width","fa-th","fa-th-large","fa-th-list","fa-underline","fa-undo","fa-unlink","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-o-down","fa-arrow-circle-o-left","fa-arrow-circle-o-right","fa-arrow-circle-o-up","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-caret-up","fa-chevron-circle-down","fa-chevron-circle-left","fa-chevron-circle-right","fa-chevron-circle-up","fa-chevron-down","fa-chevron-left","fa-chevron-right","fa-chevron-up","fa-hand-o-down","fa-hand-o-left","fa-hand-o-right","fa-hand-o-up","fa-long-arrow-down","fa-long-arrow-left","fa-long-arrow-right","fa-long-arrow-up","fa-toggle-down","fa-toggle-left","fa-toggle-right","fa-toggle-up","fa-backward","fa-eject","fa-fast-backward","fa-fast-forward","fa-forward","fa-pause","fa-play","fa-play-circle","fa-play-circle-o","fa-step-backward","fa-step-forward","fa-stop","fa-youtube-play","fa-adn","fa-android","fa-apple","fa-bitbucket","fa-bitbucket-square","fa-bitcoin","fa-btc","fa-css3","fa-dribbble","fa-dropbox","fa-facebook","fa-facebook-square","fa-flickr","fa-foursquare","fa-github","fa-github-alt","fa-github-square","fa-gittip","fa-google-plus","fa-google-plus-square","fa-html5","fa-instagram","fa-linkedin","fa-linkedin-square","fa-linux","fa-maxcdn","fa-pagelines","fa-pinterest","fa-pinterest-square","fa-renren","fa-skype","fa-stack-exchange","fa-stack-overflow","fa-trello","fa-tumblr","fa-tumblr-square","fa-twitter","fa-twitter-square","fa-vimeo-square","fa-vk","fa-weibo","fa-windows","fa-xing","fa-xing-square","fa-youtube","fa-youtube-play","fa-youtube-square","fa-ambulance","fa-h-square","fa-medkit","fa-plus-square","fa-stethoscope","fa-user-md","fa-wheelchair"]};Iconpicker.DEFAULTS={iconset:"glyphicon",icon:"",rows:4,cols:4,placement:"right"};Iconpicker.prototype.createButtonBar=function(){var op=this.options;var tr=$("");for(var i=0;i');var td=$('');if(i==0||i==op.cols-1){btn.val((i==0)?-1:1);btn.addClass((i==0)?"btn-previous":"btn-next");btn.find("span").addClass((i==0)?"glyphicon-arrow-left":"glyphicon-arrow-right");td.append(btn);tr.append(td)}else{if(tr.find(".page-count").length==0){td.attr("colspan",op.cols-2).append('');tr.append(td)}}}op.table.find("thead").append(tr)};Iconpicker.prototype.updateButtonBar=function(page){var op=this.options;var total_pages=Math.ceil(op.icons.length/(op.cols*op.rows));op.table.find(".page-count").html(page+" / "+total_pages);if(page==1){op.table.find(".btn-previous").addClass("disabled")}else{op.table.find(".btn-previous").removeClass("disabled")}if(page==total_pages){op.table.find(".btn-next").addClass("disabled")}else{op.table.find(".btn-next").removeClass("disabled")}};Iconpicker.prototype.bindEvents=function(){var op=this.options;var el=this;op.table.find(".btn-previous, .btn-next").off("click").on("click",function(){var inc=parseInt($(this).val());el.changeList(op.page+inc)});op.table.find(".btn-icon").off("click").on("click",function(){el.select($(this).val());el.$element.popover("destroy")})};Iconpicker.prototype.select=function(icon){var op=this.options;var el=this.$element;op.selected=$.inArray(icon,op.icons);if(op.selected==-1){op.selected=0;icon=op.icons[op.selected]}if(icon!=""&&op.selected>=0){op.icon=icon;el.find("input").val(icon);el.find("i").attr("class","").addClass((op.iconset=="glyphicon")?"glyphicon":"fa").addClass(icon);op.table.find("button.btn-warning").removeClass("btn-warning")}};Iconpicker.prototype.switchPage=function(icon){var op=this.options;op.selected=$.inArray(icon,op.icons);if(icon!=""&&op.selected>=0){var page=Math.ceil((op.selected+1)/(op.cols*op.rows));this.changeList(page)}op.table.find("."+icon).parent().addClass("btn-warning")};Iconpicker.prototype.changeList=function(page){var op=this.options;this.updateButtonBar(page);var tbody=op.table.find("tbody").empty();var offset=(page-1)*op.rows*op.cols;for(var i=0;i");for(var j=0;j').hide();if(pos')}var td=$("").append(btn);tr.append(td)}tbody.append(tr)}op.page=page;this.bindEvents()};var old=$.fn.iconpicker;$.fn.iconpicker=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.iconpicker");var options=typeof option=="object"&&option;if(!data){$this.data("bs.iconpicker",(data=new Iconpicker(this,options)))}var op=data.options;op=$.extend(op,{icons:(op.iconset==Iconpicker.DEFAULTS.iconset)?Iconpicker.ICONSET.glyphicon:Iconpicker.ICONSET.fontawesome,page:1,selected:-1,table:$('
')});$this.empty().append("").append('').append('');$this.addClass("iconpicker");data.createButtonBar();data.changeList(1);$this.on("click",function(){$this.popover({animation:false,trigger:"manual",html:true,content:data.options.table,container:"body",placement:data.options.placement}).on("shown.bs.popover",function(){data.switchPage(op.icon);data.bindEvents()});$this.popover("show")});data.select(op.icon)})};$.fn.iconpicker.Constructor=Iconpicker;$.fn.iconpicker.noConflict=function(){$.fn.iconpicker=old;return this};$("body").on("click",function(e){$(".iconpicker").each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&$(".popover").has(e.target).length===0){$(this).popover("destroy")}})});$('button[role="iconpicker"]').iconpicker()}(window.jQuery); \ No newline at end of file +/** +* bootstrap-iconpicker.js v1.0.0 by @recktoner +* https://victor-valencia.github.com/bootstrap-iconpicker +* Copyright 2013 Victor Valencia Rico. +* http://www.apache.org/licenses/LICENSE-2.0 +*/ ++function($){var Iconpicker=function(element,options){this.$element=$(element);this.options=$.extend({},Iconpicker.DEFAULTS,this.$element.data());this.options=$.extend({},this.options,options)};Iconpicker.ICONSET={glyphicon:["adjust","align-center","align-justify","align-left","align-right","arrow-down","arrow-left","arrow-right","arrow-up","asterisk","backward","ban-circle","barcode","bell","bold","book","bookmark","briefcase","bullhorn","calendar","camera","certificate","check","chevron-down","chevron-left","chevron-right","chevron-up","circle-arrow-down","circle-arrow-left","circle-arrow-right","circle-arrow-up","cloud","cloud-download","cloud-upload","cog","collapse-down","collapse-up","comment","compressed","copyright-mark","credit-card","cutlery","dashboard","download","download-alt","earphone","edit","eject","envelope","euro","exclamation-sign","expand","export","eye-close","eye-open","facetime-video","fast-backward","fast-forward","file","film","filter","fire","flag","flash","floppy-disk","floppy-open","floppy-remove","floppy-save","floppy-saved","folder-close","folder-open","font","forward","fullscreen","gbp","gift","glass","globe","hand-down","hand-left","hand-right","hand-up","hd-video","hdd","header","headphones","heart","heart-empty","home","import","inbox","indent-left","indent-right","info-sign","italic","leaf","link","list","list-alt","lock","log-in","log-out","magnet","map-marker","minus","minus-sign","move","music","new-window","off","ok","ok-circle","ok-sign","open","paperclip","pause","pencil","phone","phone-alt","picture","plane","play","play-circle","plus","plus-sign","print","pushpin","qrcode","question-sign","random","record","refresh","registration-mark","remove","remove-circle","remove-sign","repeat","resize-full","resize-horizontal","resize-small","resize-vertical","retweet","road","save","saved","screenshot","sd-video","search","send","share","share-alt","shopping-cart","signal","sort","sort-by-alphabet","sort-by-alphabet-alt","sort-by-attributes","sort-by-attributes-alt","sort-by-order","sort-by-order-alt","sound-5-1","sound-6-1","sound-7-1","sound-dolby","sound-stereo","star","star-empty","stats","step-backward","step-forward","stop","subtitles","tag","tags","tasks","text-height","text-width","th","th-large","th-list","thumbs-down","thumbs-up","time","tint","tower","transfer","trash","tree-conifer","tree-deciduous","unchecked","upload","usd","user","volume-down","volume-off","volume-up","warning-sign","wrench","zoom-in","zoom-out"],fa:["adjust","anchor","archive","asterisk","ban","bar-chart-o","barcode","beer","bell","bell-o","bolt","book","bookmark","bookmark-o","briefcase","bug","bullhorn","bullseye","calendar","calendar-o","camera","camera-retro","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","certificate","check","check-circle","check-circle-o","check-square","check-square-o","circle","circle-o","clock-o","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","comments","comments-o","compass","credit-card","crop","crosshairs","cutlery","dashboard","desktop","dot-circle-o","download","edit","envelope","envelope-o","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","female","fighter-jet","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash","flask","folder","folder-o","folder-open","folder-open-o","frown-o","gamepad","gavel","gear","gears","gift","glass","globe","group","headphones","heart","heart-o","home","inbox","info","info-circle","key","keyboard-o","laptop","leaf","legal","lemon-o","level-down","level-up","lightbulb-o","location-arrow","lock","magic","magnet","mail-forward","mail-reply","mail-reply-all","male","map-marker","meh-o","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone","money","moon-o","music","pencil","pencil-square","pencil-square-o","phone","phone-square","picture-o","plane","plus","plus-circle","plus-square","power-off","print","puzzle-piece","qrcode","question","question-circle","quote-left","quote-right","random","refresh","reply","reply-all","retweet","road","rocket","rss","rss-square","search","search-minus","search-plus","share","share-square","share-square-o","shield","shopping-cart","sign-in","sign-out","signal","sitemap","smile-o","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down","sort-numeric-asc","sort-numeric-desc","sort-up","spinner","square","square-o","star","star-half","star-half-empty","star-half-full","star-half-o","star-o","subscript","suitcase","sun-o","superscript","tablet","tachometer","tag","tags","tasks","terminal","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","tint","toggle-down","toggle-left","toggle-right","toggle-up","trash-o","trophy","truck","umbrella","unlock","unsorted","upload","user","video-camera","volume-down","volume-off","volume-up","warning","wheelchair","wrench","check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","square","square-o","bitcoin","btc","cny","dollar","eur","euro","gbp","inr","jpy","krw","money","rmb","rouble","rub","ruble","rupee","try","turkish-lira","usd","won","yen","align-center","align-justify","align-left","align-right","bold","chain","chain-broken","clipboard","columns","copy","cut","dedent","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paste","repeat","rotate-left","rotate-right","save","scissors","strikethrough","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","arrow-circle-down","arrow-circle-left","arrow-circle-o-down","arrow-circle-o-left","arrow-circle-o-right","arrow-circle-o-up","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","caret-down","caret-left","caret-right","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","caret-up","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","hand-o-down","hand-o-left","hand-o-right","hand-o-up","long-arrow-down","long-arrow-left","long-arrow-right","long-arrow-up","toggle-down","toggle-left","toggle-right","toggle-up","backward","eject","fast-backward","fast-forward","forward","pause","play","play-circle","play-circle-o","step-backward","step-forward","stop","youtube-play","adn","android","apple","bitbucket","bitbucket-square","bitcoin","btc","css3","dribbble","dropbox","facebook","facebook-square","flickr","foursquare","github","github-alt","github-square","gittip","google-plus","google-plus-square","html5","instagram","linkedin","linkedin-square","linux","maxcdn","pagelines","pinterest","pinterest-square","renren","skype","stack-exchange","stack-overflow","trello","tumblr","tumblr-square","twitter","twitter-square","vimeo-square","vk","weibo","windows","xing","xing-square","youtube","youtube-play","youtube-square","ambulance","h-square","medkit","plus-square","stethoscope","user-md","wheelchair"]};Iconpicker.DEFAULTS={iconset:"glyphicon",icon:"",rows:4,cols:4,placement:"right"};Iconpicker.prototype.createButtonBar=function(){var op=this.options;var tr=$("");for(var i=0;i');var td=$('');if(i==0||i==op.cols-1){btn.val((i==0)?-1:1);btn.addClass((i==0)?"btn-previous":"btn-next");btn.find("span").addClass((i==0)?"glyphicon-arrow-left":"glyphicon-arrow-right");td.append(btn);tr.append(td)}else{if(tr.find(".page-count").length==0){td.attr("colspan",op.cols-2).append('');tr.append(td)}}}op.table.find("thead").append(tr)};Iconpicker.prototype.updateButtonBar=function(page){var op=this.options;var total_pages=Math.ceil(op.icons.length/(op.cols*op.rows));op.table.find(".page-count").html(page+" / "+total_pages);var btn_prev=op.table.find(".btn-previous");var btn_next=op.table.find(".btn-next");(page==1)?btn_prev.addClass("disabled"):btn_prev.removeClass("disabled");(page==total_pages)?btn_next.addClass("disabled"):btn_next.removeClass("disabled")};Iconpicker.prototype.bindEvents=function(){var op=this.options;var el=this;op.table.find(".btn-previous, .btn-next").off("click").on("click",function(){var inc=parseInt($(this).val());el.changeList(op.page+inc)});op.table.find(".btn-icon").off("click").on("click",function(){el.select($(this).val());el.$element.popover("destroy")})};Iconpicker.prototype.select=function(icon){var op=this.options;var el=this.$element;op.selected=$.inArray(icon.replace(op.iconClassFix,""),op.icons);if(op.selected==-1){op.selected=0;icon=op.iconClassFix+op.icons[op.selected]}if(icon!=""&&op.selected>=0){op.icon=icon;el.find("input").val(icon);el.find("i").attr("class","").addClass(op.iconClass).addClass(icon);op.table.find("button.btn-warning").removeClass("btn-warning")}};Iconpicker.prototype.switchPage=function(icon){var op=this.options;op.selected=$.inArray(icon.replace(op.iconClassFix,""),op.icons);if(icon!=""&&op.selected>=0){var page=Math.ceil((op.selected+1)/(op.cols*op.rows));this.changeList(page)}op.table.find("."+icon).parent().addClass("btn-warning")};Iconpicker.prototype.changeList=function(page){var op=this.options;this.updateButtonBar(page);var tbody=op.table.find("tbody").empty();var offset=(page-1)*op.rows*op.cols;for(var i=0;i");for(var j=0;j').hide();if(pos')}var td=$("").append(btn);tr.append(td)}tbody.append(tr)}op.page=page;this.bindEvents()};var old=$.fn.iconpicker;$.fn.iconpicker=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.iconpicker");var options=typeof option=="object"&&option;if(!data){$this.data("bs.iconpicker",(data=new Iconpicker(this,options)))}var op=data.options;var ic=(op.iconset=="fontawesome")?"fa":"glyphicon";op=$.extend(op,{icons:Iconpicker.ICONSET[ic],iconClass:ic,iconClassFix:ic+"-",page:1,selected:-1,table:$('
')});var name=(typeof $this.attr("name")!="undefined")?'name="'+$this.attr("name")+'"':"";$this.empty().append("").append('").append('');$this.addClass("iconpicker");data.createButtonBar();data.changeList(1);$this.on("click",function(){$this.popover({animation:false,trigger:"manual",html:true,content:data.options.table,container:"body",placement:data.options.placement}).on("shown.bs.popover",function(){data.switchPage(op.icon);data.bindEvents()});$this.popover("show")});data.select(op.icon)})};$.fn.iconpicker.Constructor=Iconpicker;$.fn.iconpicker.noConflict=function(){$.fn.iconpicker=old;return this};$("body").on("click",function(e){$(".iconpicker").each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0&&$(".popover").has(e.target).length===0){$(this).popover("destroy")}})});$('button[role="iconpicker"]').iconpicker()}(window.jQuery); \ No newline at end of file diff --git a/index.html b/index.html index 2baa1a7..1064f78 100644 --- a/index.html +++ b/index.html @@ -230,6 +230,11 @@

Javascript

+ +

Leave your comments or fixes here

+
+
+
@@ -276,5 +281,16 @@

Javascript

ga('send', 'pageview'); +
+ +