Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 7c9bf4d

Browse files
committed
Fixing log path change.
1 parent f3236aa commit 7c9bf4d

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

app/js/client/UI.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ var UI = {
3636
Data.state.datasources.logs.channels[ channel ] = checkbox.checked;
3737
},
3838

39+
updateLogPath: function(input) {
40+
if (/^win/.test(process.platform)) {
41+
Data.state.datasources.logs.path.win = input.value;
42+
} else {
43+
Data.state.datasources.logs.path.osx = input.value;
44+
}
45+
},
46+
3947
registerEventHandlers: function () {
4048
Data.ui.topMenu_clipboard.on('click', $.proxy(UI.tabClick, null, 'clipboard'));
4149
Data.ui.topMenu_logs.on('click', $.proxy(UI.tabClick, null, 'logs'));

app/js/client/UIPanels.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ var UIPanels = {
2727
{checkbox: {legend: 'Log Polling', checked: Data.state.poll.logs, onclick: 'UI.togglePolling(this, "logs");' }}
2828
]
2929
};
30-
30+
3131
if (/^win/.test(process.platform)) {
32-
panel.formitems.push({input: {legend: 'Log Path', label: 'Log Path', class: 'log-path', value: Data.state.datasources.logs.path.win}})
32+
panel.formitems.push({input: {legend: 'Log Path', label: 'Log Path', class: 'log-path', onblur: 'UI.updateLogPath(this);', value: Data.state.datasources.logs.path.win}})
3333
} else {
34-
panel.formitems.push({input: {legend: 'Log Path', label: 'Log Path', class: 'log-path', value: Data.state.datasources.logs.path.darwin}})
34+
panel.formitems.push({input: {legend: 'Log Path', label: 'Log Path', class: 'log-path', onblur: 'UI.updateLogPath(this);', value: Data.state.datasources.logs.path.darwin}})
3535
}
3636

3737
var channels = {group: {legend: 'Intel Channels', formitems: []}};
@@ -41,7 +41,7 @@ var UIPanels = {
4141
)
4242
}
4343
panel.formitems.push(channels);
44-
44+
4545
UIPanels.showPanel(panel, callback);
4646
},
4747

app/templates/panel.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{{#if input}}
2020
<div class="group">
2121
{{#if input.legend}}<span class="legend">{{{input.legend}}}</span>{{/if}}
22-
<input {{#if input.id}}id="{{input.id}}" {{/if}}{{#if input.class}}class="{{input.class}}" {{/if}}value="{{{input.value}}}" type={{#if input.hidden}}"hidden"{{else}}"text"{{/if}} {{#if input.readonly}}readonly="true"{{/if}} {{#if input.label}}placeholder="{{{input.label}}}"{{/if}}/>
22+
<input {{#if input.id}}id="{{input.id}}" {{/if}}{{#if input.class}}class="{{input.class}}" {{/if}}value="{{{input.value}}}" type={{#if input.hidden}}"hidden"{{else}}"text"{{/if}} {{#if input.readonly}}readonly="true"{{/if}} {{#if input.onblur}}onblur="{{input.onblur}}"{{/if}} {{#if input.label}}placeholder="{{{input.label}}}"{{/if}}/>
2323
</div>
2424
{{/if}}
2525
{{#if password}}
@@ -41,7 +41,7 @@
4141
<div class="group">
4242
<input type="checkbox" {{#if checkbox.checked}}checked{{/if}} {{#if checkbox.onclick}}onclick="{{checkbox.onclick}}"{{/if}}>
4343
<span class="label">{{checkbox.legend}}</span>
44-
</div>
44+
</div>
4545
{{/if}}
4646
{{#if submit}}
4747
<div class="submit">
@@ -57,7 +57,7 @@
5757
<div class="item">
5858
<input type="checkbox" {{#if checkbox.checked}}checked{{/if}} {{#if checkbox.onclick}}onclick="{{checkbox.onclick}}"{{/if}}>
5959
<span class="label">{{checkbox.legend}}</span>
60-
</div>
60+
</div>
6161
{{/if}}
6262
{{/each}}
6363
</div>

0 commit comments

Comments
 (0)