|
1 | | -<div id="settings_plugin_netconnectd_dialog" data-bind="allowBindings: true" class="scrollable" style="padding-bottom:2em; overflow-y: auto; height: calc(100vh - 100px);"> |
| 1 | +<div id="settings_plugin_netconnectd_dialog" data-bind="allowBindings: true" class="scrollable" |
| 2 | + style="padding-bottom:2em; overflow-y: auto; height: calc(100vh - 100px);"> |
2 | 3 | <h3>{{ _('Network Connection') }}</h3> |
3 | 4 |
|
4 | 5 | <p> |
|
9 | 10 | </p> |
10 | 11 | <div class="pull-right" data-bind="visible: enableQualitySorting"> |
11 | 12 | <small> |
12 | | - {{ _('Sort by') }}: <a href="#" data-bind="click: function() { listHelper.changeSorting('ssid'); }">{{ _('SSID') }} ({{ _('ascending') }})</a> | <a href="#" data-bind="click: function() { listHelper.changeSorting('quality'); }">{{ _('Quality') }} ({{ _('descending') }})</a> |
| 13 | + {{ _('Sort by') }}: <a href="#" |
| 14 | + data-bind="click: function() { listHelper.changeSorting('ssid'); }">{{ _('SSID') }} |
| 15 | + ({{ _('ascending') }})</a> | <a href="#" |
| 16 | + data-bind="click: function() { listHelper.changeSorting('quality'); }">{{ _('Quality') }} |
| 17 | + ({{ _('descending') }})</a> |
13 | 18 | </small> |
14 | 19 | </div> |
15 | 20 | <table class="table table-striped table-hover table-condensed table-hover" id="settings_plugin_netconnectd_wifis"> |
16 | 21 | <thead> |
17 | 22 | <tr> |
18 | 23 | <th class="settings_plugin_netconnectd_wifis_ssid">{{ _('SSID') }}</th> |
19 | | - <th class="settings_plugin_netconnectd_wifis_quality" data-bind="visible: enableQualitySorting">{{ _('Quality') }}</th> |
| 24 | + <th class="settings_plugin_netconnectd_wifis_quality" |
| 25 | + data-bind="visible: enableQualitySorting">{{ _('Quality') }}</th> |
20 | 26 | <th class="settings_plugin_netconnectd_wifis_action">{{ _('Action') }}</th> |
21 | 27 | </tr> |
22 | 28 | </thead> |
23 | 29 | <tbody data-bind="foreach: listHelper.paginatedItems"> |
24 | | - <tr data-bind="attr: {title: name}"> |
25 | | - <td class="settings_plugin_netconnectd_wifis_ssid"><span class="icon-lock" data-bind="invisible: !encrypted"></span> <span data-bind="text: ssid"></span> <small class="muted">({{ _('Address') }}: <span data-bind="text: address"></span>)</small></td> |
26 | | - <td class="settings_plugin_netconnectd_wifis_quality" data-bind="visible: $root.enableQualitySorting, text: qualityText"></td> |
27 | | - <td class="settings_plugin_netconnectd_wifis_action"> |
28 | | - <button class="btn btn-small" data-bind="click: function() { $parent.configureWifi($data); }, css: {disabled: !$root.loginState.isUser() || $root.working() || $root.error() || $root.getEntryId($data) == $root.statusCurrentWifi()}"><i class="icon-spinner icon-spin" data-bind="visible: $root.working"></i><i class="icon-signin" data-bind="visible: !$root.working()"></i> {{ _('Connect') }}</button> |
29 | | - </td> |
30 | | - </tr> |
| 30 | + <tr data-bind="attr: {title: name}"> |
| 31 | + <td class="settings_plugin_netconnectd_wifis_ssid"><span class="icon-lock" |
| 32 | + data-bind="invisible: !encrypted"></span> <span |
| 33 | + data-bind="text: ssid"></span> <small class="muted">({{ _('Address') }}: <span |
| 34 | + data-bind="text: address"></span>)</small></td> |
| 35 | + <td class="settings_plugin_netconnectd_wifis_quality" |
| 36 | + data-bind="visible: $root.enableQualitySorting"> |
| 37 | + <div data-bind="css: $root.signalQuality(quality)" class="signal-bars mt1 sizing-box"> |
| 38 | + <div class="first-bar bar"></div> |
| 39 | + <div class="second-bar bar"></div> |
| 40 | + <div class="third-bar bar"></div> |
| 41 | + <div class="fourth-bar bar"></div> |
| 42 | + <div class="fifth-bar bar"></div> |
| 43 | + </div> |
| 44 | + </td> |
| 45 | + <td class="settings_plugin_netconnectd_wifis_action"> |
| 46 | + <button class="btn btn-small" |
| 47 | + data-bind="click: function() { $parent.configureWifi($data); }, css: {disabled: !$root.loginState.isUser() || $root.working() || $root.error() || $root.getEntryId($data) == $root.statusCurrentWifi()}"> |
| 48 | + <i class="icon-spinner icon-spin" data-bind="visible: $root.working"></i><i class="icon-signin" |
| 49 | + data-bind="visible: !$root.working()"></i> {{ _('Connect') }} |
| 50 | + </button> |
| 51 | + </td> |
| 52 | + </tr> |
31 | 53 | </tbody> |
32 | 54 | </table> |
33 | 55 | <div class="pagination pagination-mini pagination-centered"> |
|
38 | 60 | </ul> |
39 | 61 | <ul data-bind="foreach: listHelper.pages"> |
40 | 62 | <li data-bind="css: { active: $data.number === $root.listHelper.currentPage(), disabled: $data.number === -1 }"> |
41 | | - <a href="#" data-bind="text: $data.text, click: function() { $root.listHelper.changePage($data.number); }"></a> |
| 63 | + <a href="#" |
| 64 | + data-bind="text: $data.text, click: function() { $root.listHelper.changePage($data.number); }"></a> |
42 | 65 | </li> |
43 | 66 | </ul> |
44 | 67 | <ul> |
|
48 | 71 | </ul> |
49 | 72 | </div> |
50 | 73 |
|
51 | | - <button class="btn btn-primary btn-block" data-bind="click: function() { $root.refresh() }, enable: $root.daemonOnline() && $root.status.wifi.present()">{{ _('Refresh') }}</button> |
| 74 | + <button class="btn btn-primary btn-block" |
| 75 | + data-bind="click: function() { $root.refresh() }, enable: $root.daemonOnline() && $root.status.wifi.present()">{{ _('Refresh') }}</button> |
52 | 76 |
|
53 | 77 | <div> |
54 | | - <small class="muted">{{ _('netconnectd socket') }}: <span data-bind="text: settings.plugins.netconnectd.socket"></span></small> |
| 78 | + <small class="muted">{{ _('netconnectd socket') }}: <span |
| 79 | + data-bind="text: settings.plugins.netconnectd.socket"></span></small> |
55 | 80 | </div> |
56 | 81 |
|
57 | 82 | <div> |
58 | | - <div><small><a href="#" class="muted" onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div> |
59 | | - <div class="hide row-fluid"> |
60 | | - <button class="btn span6" data-bind="click: function() { if ($root.apRunning()) { $root.sendStopAp(); } else { $root.sendStartAp(); } }, enable: $root.daemonOnline()"><span data-bind="visible: !$root.apRunning() && $root.daemonOnline()">{{ _('Start AP') }}</span><span data-bind="visible: $root.apRunning() && $root.daemonOnline()">{{ _('Stop AP') }}</span><span data-bind="visible: !$root.daemonOnline()">{{ _('Daemon offline') }}</span></button> |
61 | | - <button class="btn span6" data-bind="click: function() { $root.sendReset() }, enable: $root.daemonOnline()">{{ _('Reset daemon') }}</button> |
| 83 | + <div><small><a href="#" class="muted" |
| 84 | + onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i |
| 85 | + class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div> |
| 86 | + <div class="hide"> |
| 87 | + <div class="row-fluid" data-bind="visible: $root.countries().length != 0"> |
| 88 | + <div class="control-group"> |
| 89 | + <label class="control-labelt"><strong>Country</strong></label> |
| 90 | + <div class="controls"> |
| 91 | + <select data-bind="options: countries, |
| 92 | + optionsText: 'country', |
| 93 | + optionsValue: 'code', |
| 94 | + optionsCaption: 'Select Country...', |
| 95 | + value: country, |
| 96 | + event: {change: selectedValueChanged}"> |
| 97 | + </select> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + <div class="row-fluid"> |
| 102 | + <button class="btn span6" |
| 103 | + data-bind="click: function() { if ($root.apRunning()) { $root.sendStopAp(); } else { $root.sendStartAp(); } }, enable: $root.daemonOnline()"> |
| 104 | + <span data-bind="visible: !$root.apRunning() && $root.daemonOnline()">{{ _('Start AP') }}</span><span |
| 105 | + data-bind="visible: $root.apRunning() && $root.daemonOnline()">{{ _('Stop AP') }}</span><span |
| 106 | + data-bind="visible: !$root.daemonOnline()">{{ _('Daemon offline') }}</span></button> |
| 107 | + <button class="btn span6" |
| 108 | + data-bind="click: function() { $root.sendReset() }, enable: $root.daemonOnline()">{{ _('Reset daemon') }}</button> |
| 109 | + </div> |
62 | 110 | </div> |
63 | 111 | </div> |
64 | 112 |
|
|
69 | 117 | </div> |
70 | 118 | <div class="modal-body"> |
71 | 119 | <form class="form-horizontal"> |
72 | | - <div class="control-group" data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch()}"> |
73 | | - <label class="control-label" for="settings_plugin_netconnectd_wificonfig_passphrase1">{{ _('Password') }}</label> |
| 120 | + <div class="control-group" |
| 121 | + data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch()}"> |
| 122 | + <label class="control-label" |
| 123 | + for="settings_plugin_netconnectd_wificonfig_passphrase1">{{ _('Password') }}</label> |
74 | 124 | <div class="controls"> |
75 | | - <input type="password" class="input-block-level" id="settings_plugin_netconnectd_wificonfig_passphrase1" data-bind="value: $root.editorWifiPassphrase1, valueUpdate: 'input'" required> |
| 125 | + <input type="password" class="input-block-level" |
| 126 | + id="settings_plugin_netconnectd_wificonfig_passphrase1" |
| 127 | + data-bind="value: $root.editorWifiPassphrase1, valueUpdate: 'input'" required> |
76 | 128 | </div> |
77 | 129 | </div> |
78 | | - <div class="control-group" data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch(), error: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()}"> |
79 | | - <label class="control-label" for="settings_plugin_netconnectd_wificonfig_passphrase2">{{ _('Repeat Password') }}</label> |
| 130 | + <div class="control-group" |
| 131 | + data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch(), error: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()}"> |
| 132 | + <label class="control-label" |
| 133 | + for="settings_plugin_netconnectd_wificonfig_passphrase2">{{ _('Repeat Password') }}</label> |
80 | 134 | <div class="controls"> |
81 | | - <input type="password" class="input-block-level" id="settings_plugin_netconnectd_wificonfig_passphrase2" data-bind="value: $root.editorWifiPassphrase2, valueUpdate: 'input'" required> |
82 | | - <span class="help-inline" data-bind="visible: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()">{{ _('Passwords do not match') }}</span> |
| 135 | + <input type="password" class="input-block-level" |
| 136 | + id="settings_plugin_netconnectd_wificonfig_passphrase2" |
| 137 | + data-bind="value: $root.editorWifiPassphrase2, valueUpdate: 'input'" required> |
| 138 | + <span class="help-inline" |
| 139 | + data-bind="visible: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()">{{ _('Passwords do not match') }}</span> |
83 | 140 | </div> |
84 | 141 | </div> |
85 | 142 | </form> |
86 | 143 | </div> |
87 | 144 | <div class="modal-footer"> |
88 | | - <button class="btn" data-dismiss="modal" data-bind="enable: !$root.working() && !$root.error()" aria-hidden="true">{{ _('Abort') }}</button> |
89 | | - <button class="btn btn-primary" data-bind="click: function() { $root.confirmWifiConfiguration(); }, enable: !$root.editorWifiPassphraseMismatch() && !$root.working() && !$root.error()"><i class="icon-spinner icon-spin" data-bind="visible: working"></i> {{ _('Confirm') }}</button> |
| 145 | + <button class="btn" data-dismiss="modal" data-bind="enable: !$root.working() && !$root.error()" |
| 146 | + aria-hidden="true">{{ _('Abort') }}</button> |
| 147 | + <button class="btn btn-primary" |
| 148 | + data-bind="click: function() { $root.confirmWifiConfiguration(); }, enable: !$root.editorWifiPassphraseMismatch() && !$root.working() && !$root.error()"> |
| 149 | + <i class="icon-spinner icon-spin" data-bind="visible: working"></i> {{ _('Confirm') }}</button> |
90 | 150 | </div> |
91 | 151 | </div> |
92 | 152 | </div> |
0 commit comments