From d53c1285f0815b4395d5959b18899e58a20183db Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Mon, 27 Apr 2015 17:19:32 -0400 Subject: [PATCH] #141 Remove bootstrap-iconpicker Using different library instead --- inc/headerAdmin.inc.php | 3 --- js/bootstrap-iconpicker.min.js | 19 ------------------ js/iconset/iconset-fontawesome-4.2.0.min.js | 22 --------------------- js/modsForHesk-javascript.js | 4 ---- language/en/text.php | 2 -- 5 files changed, 50 deletions(-) delete mode 100644 js/bootstrap-iconpicker.min.js delete mode 100644 js/iconset/iconset-fontawesome-4.2.0.min.js diff --git a/inc/headerAdmin.inc.php b/inc/headerAdmin.inc.php index c5584789..8da4f1ba 100644 --- a/inc/headerAdmin.inc.php +++ b/inc/headerAdmin.inc.php @@ -59,14 +59,11 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php'); - - - -1&&n.push(e)}),o.icons=n}},e.prototype.removeAddClass=function(t,e,o){return this.options.table.find(t).removeClass(e).addClass(o),o},e.prototype.reset=function(){this.updatePicker(),this.changeList(1)},e.prototype.select=function(e){var o=this.options,s=this.$element;o.selected=t.inArray(e.replace(o.iconClassFix,""),o.icons),-1===o.selected&&(o.selected=0,e=o.iconClassFix+o.icons[o.selected]),""!==e&&o.selected>=0&&(o.icon=e,s.find("input").val(e),s.find("i").attr("class","").addClass(o.iconClass).addClass(e),s.trigger({type:"change",icon:e}),o.table.find("button."+o.selectedClass).removeClass(o.selectedClass))},e.prototype.switchPage=function(e){var o=this.options;if(o.selected=t.inArray(e.replace(o.iconClassFix,""),o.icons),""!==e&&o.selected>=0){var s=Math.ceil((o.selected+1)/this.totalIconsPerPage());this.changeList(s)}o.table.find("i."+e).parent().addClass(o.selectedClass)},e.prototype.totalPages=function(){return Math.ceil(this.totalIcons()/this.totalIconsPerPage())},e.prototype.totalIcons=function(){return this.options.icons.length},e.prototype.totalIconsPerPage=function(){return this.options.cols*this.options.rows},e.prototype.updateArrows=function(t){var e=this.options,o=this.totalPages();1===t?e.table.find(".btn-previous").addClass("disabled"):e.table.find(".btn-previous").removeClass("disabled"),t===o||0===o?e.table.find(".btn-next").addClass("disabled"):e.table.find(".btn-next").removeClass("disabled")},e.prototype.updateIcons=function(e){for(var o=this.options,s=o.table.find("tbody").empty(),n=(e-1)*this.totalIconsPerPage(),i=0;i"),c=0;c').hide();if(r').show(),o.icon===l&&p.addClass(o.selectedClass).addClass("btn-icon-selected")}a.append(t("").append(p))}s.append(a)}},e.prototype.updateIconsCount=function(){var t=this.options,e=["",' ',' '," ",""];t.table.find("tfoot").empty().append(e.join(""))},e.prototype.updateLabels=function(t){var e=this.options,o=this.totalIcons(),s=this.totalPages();e.table.find(".page-count").html(e.labelHeader.replace("{0}",0===s?0:t).replace("{1}",s));var n=(t-1)*this.totalIconsPerPage(),i=t*this.totalIconsPerPage();e.table.find(".icons-count").html(e.labelFooter.replace("{0}",n+1).replace("{1}",o>i?i:o).replace("{2}",o)),this.updateArrows(t)},e.prototype.updatePagesCount=function(){for(var e=this.options,o=t(""),s=0;s');if(0===s||s===e.cols-1){var i=['"];n.append(i.join("")),o.append(n)}else 0===o.find(".page-count").length&&(n.attr("colspan",e.cols-2).append(''),o.append(n))}e.table.find("thead").empty().append(o)},e.prototype.updatePicker=function(){var t=this.options;if(t.cols<4)throw"Iconpicker => The number of columns must be greater than or equal to 4. [option.cols = "+t.cols+"]";if(t.rows<1)throw"Iconpicker => The number of rows must be greater than or equal to 1. [option.rows = "+t.rows+"]";this.updatePagesCount(),this.updateSearch(),this.updateIconsCount()},e.prototype.updateSearch=function(){var e=this.options,o=["",' ',' '," ",""];o=t(o.join("")),e.search===!0?o.show():o.hide(),e.table.find("thead").append(o)},e.prototype.setArrowClass=function(t){this.options.arrowClass=this.removeAddClass(".btn-arrow",this.options.arrowClass,t)},e.prototype.setArrowNextIconClass=function(t){this.options.arrowNextIconClass=this.removeAddClass(".btn-next > span",this.options.arrowNextIconClass,t)},e.prototype.setArrowPrevIconClass=function(t){this.options.arrowPrevIconClass=this.removeAddClass(".btn-previous > span",this.options.arrowPrevIconClass,t)},e.prototype.setCols=function(t){this.options.cols=t,this.reset()},e.prototype.setIcon=function(t){this.select(t)},e.prototype.setIconset=function(o){var s=this.options;t.isPlainObject(o)?(e.ICONSET._custom=t.extend(e.ICONSET_EMPTY,o),s.iconset="_custom"):s.iconset=e.ICONSET.hasOwnProperty(o)?o:e.DEFAULTS.iconset,s=t.extend(s,e.ICONSET[s.iconset]),this.reset(),this.select(s.icon)},e.prototype.setLabelHeader=function(t){this.options.labelHeader=t,this.updateLabels(this.options.page)},e.prototype.setLabelFooter=function(t){this.options.labelFooter=t,this.updateLabels(this.options.page)},e.prototype.setPlacement=function(t){this.options.placement=t},e.prototype.setRows=function(t){this.options.rows=t,this.reset()},e.prototype.setSearch=function(t){var e=this.options.table.find(".search-control");t===!0?e.show():e.hide(),e.val(""),this.changeList(1),this.options.search=t},e.prototype.setSearchText=function(t){this.options.table.find(".search-control").attr("placeholder",t),this.options.searchText=t},e.prototype.setSelectedClass=function(t){this.options.selectedClass=this.removeAddClass(".btn-icon-selected",this.options.selectedClass,t)},e.prototype.setUnselectedClass=function(t){this.options.unselectedClass=this.removeAddClass(".btn-icon",this.options.unselectedClass,t)};var o=t.fn.iconpicker;t.fn.iconpicker=function(o,s){return this.each(function(){var n=t(this),i=n.data("bs.iconpicker"),a="object"==typeof o&&o;if(i||n.data("bs.iconpicker",i=new e(this,a)),"string"==typeof o){if("undefined"==typeof i[o])throw'Iconpicker => The "'+o+'" method does not exists.';i[o](s)}else{var c=i.options;c=t.extend(c,{page:1,selected:-1,table:t('
')});var r="undefined"!=typeof n.attr("name")?'name="'+n.attr("name")+'"':"";n.empty().append("").append('").append(''),n.addClass("iconpicker"),i.setIconset(c.iconset),n.on("click",function(t){t.preventDefault(),n.popover({animation:!1,trigger:"manual",html:!0,content:c.table,container:"body",placement:c.placement}).on("shown.bs.popover",function(){i.switchPage(c.icon),i.bindEvents()}),n.data("bs.popover").tip().addClass("iconpicker-popover"),n.popover("show")})}})},t.fn.iconpicker.Constructor=e,t.fn.iconpicker.noConflict=function(){return t.fn.iconpicker=o,this},t(document).on("click","body",function(e){t(".iconpicker").each(function(){t(this).is(e.target)||0!==t(this).has(e.target).length||0!==t(".popover").has(e.target).length||t(this).popover("destroy")})}),t('button[role="iconpicker"]').iconpicker()}(jQuery); \ No newline at end of file diff --git a/js/iconset/iconset-fontawesome-4.2.0.min.js b/js/iconset/iconset-fontawesome-4.2.0.min.js deleted file mode 100644 index 347aa8f8..00000000 --- a/js/iconset/iconset-fontawesome-4.2.0.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/* ======================================================================== - * Bootstrap: iconset-fontawesome-4.2.0.js by @recktoner - * https://victor-valencia.github.com/bootstrap-iconpicker - * - * Iconset: Font Awesome 4.2.0 - * http://fortawesome.github.io/Font-Awesome/ - * ======================================================================== - * Copyright 2013-2014 Victor Valencia Rico. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ -!function(e){e.iconset_fontawesome={iconClass:"fa",iconClassFix:"fa-",icons:["adjust","anchor","archive","area-chart","arrows","arrows-h","arrows-v","automobile","asterisk","at","ban","bank","bar-chart-o","barcode","bars","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","bolt","bomb","book","bookmark","bookmark-o","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab","calculator","calendar","calendar-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cc","cc-amex","cc-discover","cc-mastercard","cc-paypal","cc-stripe","cc-visa","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-thin","clock-o","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","comments","comments-o","compass","copyright","credit-card","crop","crosshairs","cube","cubes","cutlery","dashboard","desktop","dashboard","database","desktop","dot-circle-o","download","edit","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o","file-pdf-o","file-photo-o","file-picture-o","file-powerpoint-o","file-sound-o","file-video-o","file-word-o","file-zip-o","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear","gears","gift","glass","globe","graduation-cap","group","hdd-o","headphones","heart","heart-o","history","home","image","inbox","info","info-circle","institution","key","keyboard-o","language","laptop","leaf","legal","lemon-o","level-down","level-up","life-bouy","life-ring","life-saver","lightbulb-o","line-chart","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","mortar-board","music","navicon","newspaper-o","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","phone","phone-square","photo","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","power-off","print","puzzle-piece","qrcode","question","question-circle","quote-left","quote-right","random","refresh","reorder","reply","reply-all","retweet","road","rocket","rss","rss-square","search","search-minus","search-plus","send","send-o","share","share-alt","share-alt-square","share-square","share-square-o","shield","shopping-cart","sign-in","sign-out","signal","sitemap","sliders","smile-o","soccer-ball-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","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty","star-half-full","star-half-o","star-o","suitcase","sun-o","support","tablet","tachometer","tag","tags","tasks","taxi","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-off","toggle-on","toggle-right","toggle-up","trash","trash-o","tree","trophy","truck","tty","umbrella","university","unlock","unlock-alt","unsorted","upload","user","users","video-camera","volume-down","volume-off","volume-up","warning","wheelchair","wifi","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","ils","inr","jpy","krw","money","rmb","rouble","rub","ruble","rupee","shekel","sheqel","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","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste","repeat","rotate-left","rotate-right","save","scissors","strikethrough","subscript","superscript","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","angellist","apple","behance","behance-square","bitbucket","bitbucket-square","bitcoin","btc","css3","delicious","digg","dribbble","dropbox","drupal","empire","facebook","facebook-square","flickr","foursquare","ge","git","git-square","github","github-alt","github-square","gittip","google","google-plus","google-plus-square","google-wallet","hacker-news","html5","instagram","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","linkedin","linkedin-square","linux","maxcdn","meanpath","openid","pagelines","paypal","pied-piper","pied-piper-alt","pinterest","pinterest-square","qq","ra","rebel","reddit","reddit-square","renren","share-alt","share-alt-square","skype","slack","slideshare","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","tencent-weibo","trello","tumblr","tumblr-square","twitch","twitter","twitter-square","vimeo-square","vine","vk","wechat","weibo","weixin","windows","wordpress","xing","xing-square","yahoo","yelp","youtube","youtube-play","youtube-square","ambulance","h-square","hospital-o","medkit","plus-square","stethoscope","user-md","wheelchair"]}}(jQuery); \ No newline at end of file diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index 714ffdc4..35215178 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -30,10 +30,6 @@ var loadJquery = function() format: "yyyy-mm-dd" }); }); - - $('.iconpicker-container').iconpicker({ - iconset: 'fontawesome' - }); }; function selectAll(id) { diff --git a/language/en/text.php b/language/en/text.php index d0e33981..22a5abc2 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -23,8 +23,6 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------'; // ADDED OR MODIFIED IN Mods for HESK 2.1.0 $hesklang['e_mfh_settings'] = 'You will not be able to save your settings unless this file is writable by the script (CHMOD to 666)!'; -$hesklang['sm_icon'] = 'Icon'; -$hesklang['sm_icon_type'] = 'Icon Type'; // ADDED OR MODIFIED IN Mods For HESK 2.0.0 $hesklang['saved_ticket_tpl'] = 'Saved Templates';