Migrating HTML Buttons to Work in 1.6
I'm following up from my question in another topic to explore this in more detail.
We've been unable to move to 1.6 in our theater because of apparently incompatibilities between the HTML interfaces we cooked up that worked in 1.5, and difficulty creating functional new ones in 1.6, but it would be great to solve that (alas, we're not javascript experts here).
Attached is an example of one of our profiles du-life.zip , we have a few different buttons we use:
The "data-message" buttons from the original html5 examples
"data-message-off"/"data-message-on" buttons which alternate between the two states, giving us toggles with visual feedback, which we custom made and have found really indispensable with our presenter staff
"uv-reset-button" which basically seeks out enabled "data-message-on" buttons and turns them off, allowing for an easy reset of toggled on assets.
We have dozens of HTML pages built like this, and it would be great to get them easily working in 1.6, but since they relied on the uvfleck app, it seems like they really aren't talking right anymore--just copying them (and their subfolder) into an html folder in a profile lets them load up, but they're non-functional. I'm assuming the javascript can be rewritten in the uvTray.js to work right... but what really needs done here to get these to talk to Uniview? It would be great to be able to quickly make these work in 1.6 so we can start migrating!
Служба підтримки клієнтів працює на UserEcho
I did a least effort change to this UI to get your custom event commands for "uv-message-button" to work.
1. First I added the following to index.htm, right below the include of jquery.min.js: <script src="/js/uniview.js"></script>
2. Secondly, I changed "sendMessage(msg);" to "uniview.sendEvent(msg);" on line 296 in uvTray.js
Please see the attached file: html.zip
The uvTray.js file contains a number of calls to sendMessage(...) which all need to be switched out to uniview.sendEvent(...) instead. It should work well for any text commands. I'm lacking your profile data (bookmarks, module setup etc) to verify much more than that toggles and flytos work, but they should all be fine. Placing the html folder in the profile as you suggest is enough once you've made these changes.
As a side-note, uvfleck still technically works (perhaps you're just missing the trailing carriage return and new line that are now required) but I really wouldn't recommend using uvfleck anymore as we've completely dropped support for it in favor of the new, built-in web interface.
Hops that helps!
-Mikael
Dan
If you want to update your old HTML pages one easy way is to replace this file ( https://www.dropbox.com/s/qcsdpg00m6i3amt/uvTray.js?dl=0 ) with your own uv tray.js .
We created this file to fix "forests, Beetles, and the Cycles of Life" presentation but it sould work on similar presentations. Rename the old uv tray.js so you dont lose your old code.