Skip to content

Commit

Permalink
IMCMS-233 - Apply new UI to the admin panel and editors:
Browse files Browse the repository at this point in the history
- Pictures moved.
  • Loading branch information
Serg-Maximchuk committed Mar 30, 2018
1 parent 4223aa3 commit 5dfd75e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Expand Up @@ -164,20 +164,12 @@ Imcms.define("imcms-texts-builder",
})
.on('change keyup input', function (e) { // click
if (e.key === "ArrowDown") {
if (attributes.positive && ($(this).val() <= 0)) {
return;
}

decrementNumberBoxValue.call(this);

} else if (e.key === "ArrowUp") {
incrementNumberBoxValue.call(this);
}

if (attributes.positive && ($(this).val() < 0)) {
return;
}

validation.call(this, attributes.onValidChange);
}),

Expand Down
Expand Up @@ -139,6 +139,7 @@ Imcms.define(
var newWidth = +$(this).val();

if (isNaN(newWidth) || newWidth < 0) {
$(this).val($(this).val().replace(/[^0-9]/g, ''));
return;
}

Expand All @@ -150,6 +151,7 @@ Imcms.define(
var newHeight = +$(this).val();

if (isNaN(newHeight) || newHeight < 0) {
$(this).val($(this).val().replace(/[^0-9]/g, ''));
return;
}

Expand All @@ -162,7 +164,6 @@ Imcms.define(
placeholder: texts.height,
text: "H",
error: "Error",
positive: true,
onValidChange: onValidHeightChange
});

Expand All @@ -180,7 +181,6 @@ Imcms.define(
placeholder: texts.width,
text: "W",
error: "Error",
positive: true,
onValidChange: onValidWidthChange
});

Expand Down

0 comments on commit 5dfd75e

Please sign in to comment.