Skip to content
This repository was archived by the owner on Sep 3, 2018. It is now read-only.

Commit e718631

Browse files
committed
Removed modern style, was taking too long. Improved import dialog
1 parent 83696a4 commit e718631

File tree

7 files changed

+34
-8
lines changed

7 files changed

+34
-8
lines changed

WebApp/src/css/_default_styles.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ footer
128128
background-size: 32px 32px;
129129
}
130130

131+
.warning
132+
{
133+
color: @warning-color;
134+
font-size: smaller;
135+
}
136+
131137
/*****************************************************
132138
* Toolbar
133139
*****************************************************/
@@ -835,6 +841,22 @@ form
835841
height: 200px;
836842
}
837843

844+
.filePicker input
845+
{
846+
width: 310px;
847+
margin-top: 5px;
848+
}
849+
850+
.filePicker button
851+
{
852+
}
853+
854+
.fileAlternative
855+
{
856+
text-align: center;
857+
font-size: larger;
858+
}
859+
838860
.dragOver
839861
{
840862
border-color: @import-border-hover;

WebApp/src/css/simple_default.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@notice-background: black;
3737
@notice-text: ivory;
3838
@notice-error: #FF4848;
39+
@warning-color: #FF4848;
3940

4041
@add-border: silver;
4142
@add-background: #edef85;

WebApp/src/css/simple_solarized_dark.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@notice-background: #586e75;
3737
@notice-text: #002b36;
3838
@notice-error: #dc322f;
39+
@warning-color: #dc322f;
3940

4041
@add-border: #586e75;
4142
@add-background: #b58900;

WebApp/src/css/simple_solarized_light.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@notice-background: #586e75;
3737
@notice-text: #fdf6e3;
3838
@notice-error: #dc322f;
39+
@warning-color: #dc322f;
3940

4041
@add-border: #586e75;
4142
@add-background: #b58900;

WebApp/src/js/model/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module TodoTxtJs
155155

156156
this.themes = [
157157
{ name: "Original", file: "simple_default.css" },
158-
{ name: "Modern", file: "modern.css" },
158+
// { name: "Modern", file: "modern.css" },
159159
{ name: "Solarized Dark", file: "simple_solarized_dark.css" },
160160
{ name: "Solarized Light", file: "simple_solarized_light.css" }
161161
];

WebApp/src/js/views/importing.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module TodoTxtJs.View
3131
{
3232
export class Importing
3333
{
34-
public appendImport: KnockoutObservable<boolean>;
34+
public replaceImport: KnockoutObservable<boolean>;
3535
public importDetails: KnockoutObservable<string>;
3636

3737
private _dropTarget:any;
@@ -42,7 +42,7 @@ module TodoTxtJs.View
4242

4343
constructor(todoManager:TodoManager)
4444
{
45-
this.appendImport = ko.observable<boolean>(false);
45+
this.replaceImport = ko.observable<boolean>(false);
4646
this.importDetails = ko.observable<string>("");
4747

4848
this._dropTarget = null;
@@ -97,7 +97,7 @@ module TodoTxtJs.View
9797

9898
public onClick_Import()
9999
{
100-
if (!this.appendImport())
100+
if (this.replaceImport())
101101
{
102102
this._todoManager.removeAll();
103103
}

WebApp/src/todotxt.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,19 @@ <h1>Display</h1>
347347
<div id="fileUpload" class="uploadTarget">
348348
<span>Drop your todo.txt file here.</span>
349349
</div>
350+
<div class="fileAlternative">or</div>
350351
<div class="filePicker">
351352
<label><input type="text" readonly></label><button data-bind="click: onClick_PickFile">Pick File</button>
352353
</div>
353354
<div class="importDetails" data-bind="text: importDetails">
354355

355356
</div>
356-
<div class="importAppendOption">
357+
<div class="importReplaceOption">
357358
<label>
358-
<input type="checkbox" data-bind="checked: appendImport"/>
359-
Append
359+
<input type="checkbox" data-bind="checked: replaceImport"/>
360+
Replace
360361
</label>
361-
<span class="warning" data-bind="visible: !appendImport()" >Delete existing entries</span>
362+
<span class="warning" data-bind="visible: replaceImport()" >This deletes <b>ALL</b> existing entries</span>
362363
</div>
363364
</div>
364365
</section>

0 commit comments

Comments
 (0)