Skip to content

Commit c5c115b

Browse files
committed
delete features in print size
1 parent e63fe53 commit c5c115b

File tree

3 files changed

+273
-11
lines changed

3 files changed

+273
-11
lines changed

src/App.css

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,4 +332,256 @@ a.pure-button-secondary
332332
h1 {
333333
font-size: 1.4em !important;
334334
font-weight: bold;
335+
}
336+
337+
/* alert box */
338+
/*
339+
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
340+
341+
body {
342+
font-family:'Open Sans',sans-serif;
343+
line-height:normal;
344+
background:#e9f0f4;
345+
padding:0;
346+
margin:0;
347+
}
348+
*/
349+
.content {
350+
padding:0;
351+
margin:10% 15%;
352+
}
353+
354+
.close {
355+
float: right;
356+
font-size: 21px;
357+
font-weight: bold;
358+
line-height: 1;
359+
color: #000;
360+
text-shadow: 0 1px 0 #fff;
361+
opacity: .2;
362+
}
363+
364+
.close:hover,.close:focus {
365+
color: #000;
366+
text-decoration: none;
367+
cursor: pointer;
368+
opacity: .5;
369+
}
370+
371+
button.close {
372+
padding: 0;
373+
cursor: pointer;
374+
background: transparent;
375+
border: 0;
376+
-webkit-appearance: none;
377+
}
378+
379+
.alert {
380+
padding: 15px;
381+
margin-bottom: 20px;
382+
border: 1px solid transparent;
383+
border-radius: 4px;
384+
}
385+
386+
.alert h4 {
387+
margin-top: 0;
388+
color: inherit;
389+
}
390+
391+
.alert .alert-link {
392+
font-weight: bold;
393+
}
394+
395+
.alert>p,.alert>ul {
396+
margin-bottom: 0;
397+
}
398+
399+
.alert>p+p {
400+
margin-top: 5px;
401+
}
402+
403+
.alert-dismissable {
404+
padding-right: 35px;
405+
}
406+
407+
.alert-dismissable .close {
408+
position: relative;
409+
top: -2px;
410+
right: -21px;
411+
color: inherit;
412+
}
413+
414+
.alert-success {
415+
background-color: #dff0d8;
416+
border-color: #d6e9c6;
417+
color: #3c763d;
418+
}
419+
420+
.alert-success hr {
421+
border-top-color: #c9e2b3;
422+
}
423+
424+
.alert-success .alert-link {
425+
color: #2b542c;
426+
}
427+
428+
.alert-info {
429+
background-color: #d9edf7;
430+
border-color: #bce8f1;
431+
color: #31708f;
432+
}
433+
434+
.alert-info hr {
435+
border-top-color: #a6e1ec;
436+
}
437+
438+
.alert-info .alert-link {
439+
color: #245269;
440+
}
441+
442+
.alert-warning {
443+
background-color: #fcf8e3;
444+
border-color: #faebcc;
445+
color: #8a6d3b;
446+
}
447+
448+
.alert-warning hr {
449+
border-top-color: #f7e1b5;
450+
}
451+
452+
.alert-warning .alert-link {
453+
color: #66512c;
454+
}
455+
456+
.alert-danger {
457+
background-color: #f2dede;
458+
border-color: #ebccd1;
459+
color: #a94442;
460+
}
461+
462+
.alert-danger hr {
463+
border-top-color: #e4b9c0;
464+
}
465+
466+
.alert-danger .alert-link {
467+
color: #843534;
468+
}
469+
470+
.alert {
471+
border-radius: 0;
472+
-webkit-border-radius: 0;
473+
box-shadow: 0 1px 2px rgba(0,0,0,0.11);
474+
}
475+
476+
.alert .sign {
477+
font-size: 20px;
478+
vertical-align: middle;
479+
margin-right: 5px;
480+
text-align: center;
481+
width: 25px;
482+
display: inline-block;
483+
}
484+
485+
.alert-success {
486+
background-color: #dbf6d3;
487+
border-color: #aed4a5;
488+
color: #569745;
489+
}
490+
491+
.alert-info {
492+
background-color: #d9edf7;
493+
border-color: #98cce6;
494+
color: #3a87ad;
495+
}
496+
497+
.alert-warning {
498+
background-color: #fcf8e3;
499+
border-color: #f1daab;
500+
color: #c09853;
501+
}
502+
503+
.alert-danger {
504+
background-color: #f2dede;
505+
border-color: #e0b1b8;
506+
color: #b94a48;
507+
}
508+
509+
.alert-white {
510+
background-image: linear-gradient(to bottom,#FFFFFF,#F9F9F9);
511+
border-top-color: #d8d8d8;
512+
border-bottom-color: #bdbdbd;
513+
border-left-color: #cacaca;
514+
border-right-color: #cacaca;
515+
color: #404040;
516+
padding-left: 61px;
517+
position: relative;
518+
}
519+
520+
.alert-white .icon {
521+
text-align: center;
522+
width: 45px;
523+
height: 100%;
524+
position: absolute;
525+
top: -1px;
526+
left: -1px;
527+
border: 1px solid #bdbdbd;
528+
}
529+
530+
.alert-white .icon:after {
531+
-webkit-transform: rotate(45deg);
532+
-moz-transform: rotate(45deg);
533+
-ms-transform: rotate(45deg);
534+
-o-transform: rotate(45deg);
535+
-webkit-transform: rotate(45deg);
536+
display: block;
537+
content: '';
538+
width: 10px;
539+
height: 10px;
540+
border: 1px solid #bdbdbd;
541+
position: absolute;
542+
border-left: 0;
543+
border-bottom: 0;
544+
top: 50%;
545+
right: -6px;
546+
margin-top: -5px;
547+
background: #fff;
548+
}
549+
550+
.alert-white.rounded {
551+
border-radius: 3px;
552+
-webkit-border-radius: 3px;
553+
}
554+
555+
.alert-white.rounded .icon {
556+
border-radius: 3px 0 0 3px;
557+
-webkit-border-radius: 3px 0 0 3px;
558+
}
559+
560+
.alert-white .icon i {
561+
font-size: 20px;
562+
color: #FFF;
563+
left: 12px;
564+
margin-top: -10px;
565+
position: absolute;
566+
top: 50%;
567+
}
568+
569+
.alert-white.alert-danger .icon,.alert-white.alert-danger .icon:after {
570+
border-color: #ca452e;
571+
background: #da4932;
572+
}
573+
574+
.alert-white.alert-info .icon,.alert-white.alert-info .icon:after {
575+
border-color: #3a8ace;
576+
background: #4d90fd;
577+
}
578+
579+
.alert-white.alert-warning .icon,.alert-white.alert-warning .icon:after {
580+
border-color: #d68000;
581+
background: #fc9700;
582+
}
583+
584+
.alert-white.alert-success .icon,.alert-white.alert-success .icon:after {
585+
border-color: #54a754;
586+
background: #60c060;
335587
}

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"param.paper_height": "Paper height (mm)",
3232
"param.paper_width": "Paper width (mm)",
3333
"param.paper_size": "Paper size",
34-
"param.formtitle": "Parameters",
34+
"param.formtitle": "Options",
3535
"param.form_aria": "Application parameters form",
3636
"param.path_step": "Step delta along path (mm)",
3737
"param.brailletable": "Transcription table ",

src/pages/ModalUsablePrint.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,10 @@ const ModalUsablePrint = ({ show, handleOK, handleCancel, paperusablesize }) =>
2424
}, [usableSize]);
2525

2626
const render_lock = (locked) => {
27-
2827
return locked ? String.fromCodePoint(0x1f512) : " ";
29-
if (locked)
30-
return String.fromCodePoint(0x1f512);
31-
//return "🔒";
32-
//return "🔒";
33-
else
34-
return " ";
3528
}
3629

3730
const onOk = () => {
38-
console.log("onOK()");
39-
console.log(handleOK);
4031
if (handleOK)
4132
handleOK(usableSize);
4233
}
@@ -51,7 +42,17 @@ const ModalUsablePrint = ({ show, handleOK, handleCancel, paperusablesize }) =>
5142

5243
}
5344
const onDelete = () => {
54-
45+
if (SelectedSize)
46+
{
47+
console.log (SelectedSize);
48+
console.log(usableSize[SelectedSize]);
49+
if (usableSize[SelectedSize].lock === false)
50+
{
51+
let data = [...usableSize];
52+
data.splice (SelectedSize, 1);
53+
setUsableSize (data);
54+
}
55+
}
5556
}
5657
const onDuplicate = () => {
5758

@@ -68,6 +69,8 @@ const ModalUsablePrint = ({ show, handleOK, handleCancel, paperusablesize }) =>
6869
<div className='MakeColumn100'>
6970
<div>
7071
<select
72+
onChange={(e)=>{setSelectedSize(e.target.value)}}
73+
value={SelectedSize}
7174
id="usablepaper"
7275
name="usablepaper"
7376
className='select_param'
@@ -85,6 +88,13 @@ const ModalUsablePrint = ({ show, handleOK, handleCancel, paperusablesize }) =>
8588
</div>
8689
<div>
8790
<div className='pure-form pure-form-aligned'>
91+
<div className='content'>
92+
<div class="alert alert-success alert-white rounded">
93+
blabla
94+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
95+
<div class="icon"><i class="fa fa-check"></i></div>
96+
</div>
97+
</div>
8898
<div className='pure-control-group'>
8999
<legend>A legend for size</legend>
90100
<fieldset>

0 commit comments

Comments
 (0)