Initial commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
@@ -0,0 +1,90 @@
|
||||
<html>
|
||||
|
||||
<!-- these 4 files always have to be included -->
|
||||
<link rel="stylesheet" type="text/css" href="../../lib/css/themes/jquery-ui/redmond/jquery-ui.min.css" />
|
||||
<script type="text/javascript" src="../../lib/js/jquery-1.11.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../socket.io/socket.io.js"></script>
|
||||
<script type="text/javascript" src="../../lib/js/jquery-ui-1.10.3.full.min.js"></script>
|
||||
|
||||
<!-- these two file always have to be included -->
|
||||
<link rel="stylesheet" type="text/css" href="../../css/adapter.css" />
|
||||
<script type="text/javascript" src="../../js/translate.js"></script>
|
||||
<script type="text/javascript" src="../../js/adapter-settings.js"></script>
|
||||
|
||||
<script type="text/javascript" src="words.js"></script>
|
||||
|
||||
<!-- you have to define 2 functions in the global scope: -->
|
||||
<script type="text/javascript">
|
||||
function load(settings, onChange) {
|
||||
// example: select elements with id=key and class=value and insert value
|
||||
if (settings.activate_server === undefined) settings.activate_server = true;
|
||||
for (var key in settings) {
|
||||
// example: select elements with id=key and class=value and insert value
|
||||
if ($('#' + key + '.value').attr('type') == 'checkbox') {
|
||||
$('#' + key + '.value').prop('checked', settings[key]).change(function () {
|
||||
onChange();
|
||||
});
|
||||
} else {
|
||||
$('#' + key + '.value').val(settings[key]).change(function () {
|
||||
onChange();
|
||||
}).keyup(function () {
|
||||
$(this).trigger('change');
|
||||
});
|
||||
}
|
||||
}
|
||||
onChange(false);
|
||||
}
|
||||
|
||||
|
||||
function save(callback) {
|
||||
var obj = {};
|
||||
$('.value').each(function () {
|
||||
var $this = $(this);
|
||||
var id = $this.attr('id');
|
||||
|
||||
if ($this.attr('type') == 'checkbox') {
|
||||
obj[id] = $this.prop('checked');
|
||||
} else {
|
||||
obj[id] = $this.val();
|
||||
}
|
||||
});
|
||||
callback(obj);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- you have to put your config page in a div with id adapter-container -->
|
||||
<div id="adapter-container">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="geofency.png" height="64" width="64" /></td>
|
||||
<td style="padding-top: 20px;padding-left: 10px"><h3 class="translate">Geofency Adapter Settings</h3></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr><td class="translate">atHome</td><td colspan="5"><input class="value number" id="atHome" type="input" size="5" /></td></tr>
|
||||
<tr><td class="translate">activate_server</td><td colspan="2"><input type="checkbox" class="value" id="activate_server" size="5" /></td></tr>
|
||||
<tr><td class="translate">port</td><td colspan="2"><input class="value number" id="port" type="input" size="5" /></td></tr>
|
||||
<tr><td class="translate">ssl</td><td colspan="2"><input type="checkbox" class="value" id="ssl" size="5" /></td></tr>
|
||||
<tr><td class="translate">user</td><td colspan="2"><input class="value number" id="user" type="input" size="5" /></td></tr>
|
||||
<tr><td class="translate">password</td><td colspan="2"><input class="value number" id="pass" type="input" size="5" /></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h3 class="translate">port</h3>
|
||||
<p class="translate">geofency is listening for events on this port</p>
|
||||
<h3 class="translate">user / password</h3>
|
||||
<p class="translate">set username and password for authentication of your geofenca device. Use the same values in your mobile app webhook settings</p>
|
||||
<h3 class="translate">geofency mobile app</h3>
|
||||
<p class="translate">
|
||||
download geofency for your device<br />
|
||||
* see <a target="blank" href="http://www.geofency.com/">Geofency website</a><br />
|
||||
* for any new location -> properties -> webhook settings:<br />
|
||||
-> URL for entry & exit: <your yunkong2 Domain>:<port from above>/<any location name ><br />
|
||||
-> Post Format: JSON-encoded: enabled<br />
|
||||
-> authentication: set user / password from above
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
systemDictionary = {
|
||||
"port": {"de": "Port", "en": "Port", "ru": "Порт"},
|
||||
"activate_server": {"de": "Server aktivieren", "en": "Activate Server", "ru": "Activate Server"},
|
||||
"user": {"de": "Benutzer", "en": "User", "ru": "Пользователь"},
|
||||
"password": {"de": "Passwort", "en": "Password", "ru": "Пароль" },
|
||||
"atHome": {"de": "Ortsname für Zuhause", "en": "Name of home", "ru": "Имя места для дома"},
|
||||
"ssl": {"de": "SSL (https://) verwenden", "en": "Use SLL (https://)", "ru": "Использовать SSL(https://)"}
|
||||
};
|
||||
Reference in New Issue
Block a user