Skip to content

Commit

Permalink
Fix: Right-Padding wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Brandt committed Oct 13, 2023
1 parent 364a88f commit 91039f3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
</head>
<body>
<div style="margin:15px; text-decoration: underline;"><h1>i18nInputViewDemo</h1></div>

<p>Simple Styled Input</p>
<div placeholder="['Deutsch', 'Österreichisch', 'English-GB', 'English-US', 'NL', 'IT', 'ES', 'Einfache Sprache']" class="demo" input-class="form-control" expander-class="roundcorners" id="my_id1" width="350" languages="['de_DE','de_AT','en_EN','en_US','nl_NL','it_IT','es_ES','de_SP']" ></div>

<p>TextArea</p>
<div rows="5" placeholder="['Deutsch', 'Österreichisch', 'English-GB', 'English-US', 'NL', 'IT', 'ES', 'Einfache Sprache']" class="demo" input-class="form-control" expander-class="roundcorners" id="my_id_area" width="350" languages="['de_DE','de_AT','en_EN','en_US','nl_NL','it_IT','es_ES','de_SP']" ></div>

<div style="border: 1px solid #ccc; padding-top: 20px; padding-bottom: 20px; margin: 45px 15px 15px 15px; width: 350px;">
<p>Form Data</p>
<form method="POST" action="demo.html">
<div style="margin-left: 16px; margin-top: -10px" id="my_id2" width="250" submitOnMissing="false" languages="['de_DE','de_AT','en_EN', 'de_SP']"></div>
<input style="margin-left: 16px; margin-top:40px;" type="submit" name="submit" value="Absenden"/>
Expand All @@ -28,6 +34,7 @@
//var i18nInput = new i18nInputView(['de_DE, en_EN, fr_FR, de SP']);

i18n("my_id1");
i18n("my_id_area");
i18n("my_id2");
$("#my_id2").registerFormIncompleteHandler(function() {
alert('Please fill in all languages!');
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18ninput",
"version": "1.0.13",
"version": "1.0.14",
"author": "Stephan Brandt <stephan.brandt@contagt.com>",
"homepage": "https://braandl.github.io/i18nInput/",
"repository": {
Expand Down Expand Up @@ -52,8 +52,8 @@
"webpack-stream": "^2.1.1"
},
"dependencies": {
"core-js": "^3.7.0",
"jquery": "^3.2.1",
"npm": "^6.8.0",
"core-js": "^3.7.0"
"npm": "^6.8.0"
}
}
2 changes: 1 addition & 1 deletion pkg/i18nInput.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/i18nInput.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
margin: 15px;
}

p {
margin-left: 18px;
}

.default-picker {
right: 7px;
cursor: pointer;
Expand Down
5 changes: 5 additions & 0 deletions src/css/base.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.demo {
margin: 15px;
}

p {
margin-left: 15px;
}

.default-picker {
right: 7px;
cursor: pointer;
Expand Down
4 changes: 2 additions & 2 deletions src/js/InputTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class InputTool
let placeholder = el.attr("placeholder") !== undefined ? "placeholder=''" : "";
let rows = parseInt(el.attr('rows'));
if (rows === 1 || !rows) {
el.append("<input "+placeholder+" class='"+this.inputStyleClasses+"' type='text' />");
el.append("<input "+placeholder+" class='"+this.inputStyleClasses+"' type='text' style='padding-right: 36px;'/>");
} else {
el.append("<textarea "+placeholder+" class='"+this.inputStyleClasses+"' style='line-height: 12px' type='text' rows='"+rows+"'></textarea>");
el.append("<textarea "+placeholder+" class='"+this.inputStyleClasses+"' style='padding-right: 36px; line-height: 12px' type='text' rows='"+rows+"'></textarea>");
}

this.input = $(el.children()[el.children().length - 1]);
Expand Down

0 comments on commit 91039f3

Please sign in to comment.