diff --git a/lib/amd/build/icon_system_fontawesome.min.js b/lib/amd/build/icon_system_fontawesome.min.js index 486881aa3f3..73a476efaed 100644 --- a/lib/amd/build/icon_system_fontawesome.min.js +++ b/lib/amd/build/icon_system_fontawesome.min.js @@ -1 +1 @@ -define(["core/icon_system","jquery","core/ajax","core/mustache","core/localstorage"],function(a,b,c,d,e){var f=null,g=null,h=function(){a.apply(this,arguments)};return h.prototype=Object.create(a.prototype),h.prototype.init=function(){if(f)return b.when();var a=e.get("core/iconmap-fontawesome");return a?(f=a,b.when()):(null===g&&(g=c.call([{methodname:"core_output_load_icon_map",args:{system:"fontawesome"}}],!0,!1)[0]),g.then(function(a){f={},b.each(a,function(a,b){f[b.component+"/"+b.pix]=b.to}.bind(this)),e.set("core/iconmap-fontawesome",f)}.bind(this)))},h.prototype.renderIcon=function(a,b,c,e){var g=f[b+"/"+a];"undefined"==typeof g&&(g=b+"/"+a);var h={key:g,title:c};return d.render(e,h)},h}); \ No newline at end of file +define(["core/icon_system","jquery","core/ajax","core/mustache","core/localstorage"],function(a,b,c,d,e){var f=null,g=null,h=function(){a.apply(this,arguments)};return h.prototype=Object.create(a.prototype),h.prototype.init=function(){if(f)return b.when();var a=e.get("core/iconmap-fontawesome");return a&&(a=JSON.parse(a)),a?(f=a,b.when()):(null===g&&(g=c.call([{methodname:"core_output_load_icon_map",args:{system:"fontawesome"}}],!0,!1)[0]),g.then(function(a){f={},b.each(a,function(a,b){f[b.component+"/"+b.pix]=b.to}.bind(this)),e.set("core/iconmap-fontawesome",JSON.stringify(f))}.bind(this)))},h.prototype.renderIcon=function(a,b,c,e){var g=f[b+"/"+a];"undefined"==typeof g&&(g=b+"/"+a);var h={key:g,title:c};return d.render(e,h)},h}); \ No newline at end of file diff --git a/lib/amd/src/icon_system_fontawesome.js b/lib/amd/src/icon_system_fontawesome.js index 46081a1ef41..3adbb700d4f 100644 --- a/lib/amd/src/icon_system_fontawesome.js +++ b/lib/amd/src/icon_system_fontawesome.js @@ -41,6 +41,9 @@ define(['core/icon_system', 'jquery', 'core/ajax', 'core/mustache', 'core/locals } var map = LocalStorage.get('core/iconmap-fontawesome'); + if (map) { + map = JSON.parse(map); + } if (map) { staticMap = map; @@ -59,7 +62,7 @@ define(['core/icon_system', 'jquery', 'core/ajax', 'core/mustache', 'core/locals $.each(map, function(index, value) { staticMap[value.component + '/' + value.pix] = value.to; }.bind(this)); - LocalStorage.set('core/iconmap-fontawesome', staticMap); + LocalStorage.set('core/iconmap-fontawesome', JSON.stringify(staticMap)); }.bind(this)); };