Git Product home page Git Product logo

widgets-for-fhem-tablet-ui's People

Contributors

henryk avatar nesges avatar viegener avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

widgets-for-fhem-tablet-ui's Issues

Setup Demo

Hey,

Ich habe gesehen, dass du die Demo leider offline gehen nehmen musstest. Ich hätte einen Server mit reichlich Kapazität rumstehen, eventuell wäre das eine Lösung für Dich?
Kontaktiere mich am einfachsten mal per Mail [email protected]

some widgets can't coexist due to shared global variable: settimer vs. volume

Some widgets can't coexist because they share a global variable named "base". Specifically settimer won't work if there's a volume or joinedlabel in the same html page.

Steps to reproduce

  1. <div data-type="settimer" data-device="Wecker" data-cmd="set"></div> and <div data-type="joinedlabel" data-device="Twilight" data-glue=" – " data-get='["sr","ss"]'>
  2. Try to set timer by dialing in a time and then clicking the set button

Note: This is kind of a race condition between which widget gets initialized first. It may or may not work (I had one condition where it would work in Firefox but not in Chrome).

Actual results

After step 2 the command "Wecker NaN:NaN" is displayed:
screenshot from 2015-06-11 18 37 23

Expected results

The timer should have been set

Further information

I've traced the problem to line


Identical lines exist in

$ grep -r base=this . | grep -v var
./widget_wind_direction.js:        base=this;
./widget_knob.js:        base=this;
./widget_kodinowplaying.js:        base=this;
./widget_weather.js:        base=this;
./widget_weather.js:        base=this;
./widget_image.js:        base=this;
./widget_thermostat.js:     base=this;
./widget_settimer.js:        base=this;
./widget_volume.js:     base=this;
./widget_simplechart.js:      base=this;
./widget_mpdnowplaying.js:        base=this;
./widget_joinedlabel.js:        base=this;
./widget_klimatrend.js:        base=this;

Because "base" is a global variable, in button_set.famultibutton.toggleOn() (

var parent = $(this).parents('div[data-type="'+base.widgetname+'"]');
), base.widgetname may or may not refer to the intended value. See this screenshot from the Chrome debugger:
screenshot from 2015-06-11 18 32 09

Even though I know where the problem is, I have no earthly idea how to fix it, because the byzantine way that JavaScript pretends to be able to do OO programming with classes and inheritance always makes my brain hurt. Simply prepending base=this with a var doesn't work, because then it would be local to init().

clock broken

Hi,

since the last fhem update i get this:

widget_clock.js:2 Uncaught ReferenceError: loadplugin is not defined(anonymous function) @ widget_clock.js:2
fhem-tablet-ui.js:317 initPage: 465.491ms

weather widget -> TypeError: mapped is undefined

ich versuche aber gerade das weather widget bei mir einzubinden. PROPLANTA liefert bei mir "Schneeregen", damit klappt das mapping nicht: TypeError: mapped is undefined
Wie soll diese Schleife bewirken?
[quote] var mapped = _weather.translationmap[val];
while(typeof mapped != "undefined" && !mapped.match(/^:/)) {
mapped = _weather.translationmap[mapped];
}[/quote]

Danach muss sicherheitshalber nochmal auf (typeof mapped != "undefined") geprüft werden bevor versucht wird, mapped zu benutzen.

iframe problem

Problem is, widget_iframe should be under widget_famultibutton - it's not correct in your hierarchy-view too...

doesn't do anything, but errors, you have to add these lines at the beginning of widget_iframe.js:

function depends_iframe (){
if(typeof Module_famultibutton == 'undefined')
return ["famultibutton"];
};

Bye & thanks for the good work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.