chris1284 / Widgets-for-fhem-tablet-ui

Widgets-for-fhem-tablet-ui
2 stars 0 forks source link

possibility for different lib path #1

Open klauswitt opened 6 years ago

klauswitt commented 6 years ago

Hi Chris,

the actual implementation of swiper.jquery.min.js works with fixed path only. With the following proposal, the library will also load from other paths relative to the ftui.config.basedir. The modification for the css file will also take care to load it before an fhem-tablet-ui-user.css

function depends_uwz() { var deps = []; if (!$.fn.swiper) { var userCSS = $('head').find("[href$='fhem-tablet-ui-user.css']"); if (userCSS.length) userCSS.before('');
else $('head').append('');

    deps.push(ftui.config.basedir + "lib/swiper.jquery.min.js");
}
return deps;

};

chris1284 commented 6 years ago

Der Code hat Syntaxfehler und nach Einbau funktioniert der Swiper nicht sauber