mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 18:12:28 +00:00
76_SMAPortal: contrib ftui_smaportalspg.css
git-svn-id: https://svn.fhem.de/fhem/trunk@19764 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
76c7967632
commit
7573e11887
@ -14,10 +14,28 @@
|
|||||||
* </li>
|
* </li>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Versionen:
|
||||||
|
*
|
||||||
|
* 1.0.0 02.07.2019 initial version
|
||||||
|
*/
|
||||||
|
|
||||||
/* global ftui:true, Modul_widget:true */
|
/* global ftui:true, Modul_widget:true */
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
function depends_smaportalspg (){
|
||||||
|
var deps = [];
|
||||||
|
|
||||||
|
var userCSS = $('head').find("[href$='css/fhem-tablet-ui.css']");
|
||||||
|
|
||||||
|
if (userCSS.length)
|
||||||
|
userCSS.before('<link rel="stylesheet" href="'+ ftui.config.basedir + 'css/ftui_smaportalspg.css" type="text/css" />')
|
||||||
|
else
|
||||||
|
$('head').append('<link rel="stylesheet" href="'+ ftui.config.basedir + 'css/ftui_smaportalspg.css" type="text/css" />');
|
||||||
|
|
||||||
|
return deps;
|
||||||
|
};
|
||||||
|
|
||||||
var Modul_smaportalspg = function () {
|
var Modul_smaportalspg = function () {
|
||||||
|
|
||||||
function init_attr(elem) {
|
function init_attr(elem) {
|
||||||
@ -56,8 +74,6 @@ var Modul_smaportalspg = function () {
|
|||||||
ftui.sendFhemCommand(cmd)
|
ftui.sendFhemCommand(cmd)
|
||||||
.done(function (data, dev) {
|
.done(function (data, dev) {
|
||||||
//console.log('received update for dynamic html : ', $(this) );
|
//console.log('received update for dynamic html : ', $(this) );
|
||||||
data = '<link rel="stylesheet" href="' + ftui.config.basedir + 'css/ftui_smaportalspg.css" type="text/css" />'
|
|
||||||
+ data;
|
|
||||||
elem.html(data);
|
elem.html(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user