Skip to content

Commit

Permalink
Rewrote js/prototype/validation.js in modern vanilla js removing prot…
Browse files Browse the repository at this point in the history
…otypejs, moved to js/validation.js
  • Loading branch information
fballiano committed Oct 21, 2024
1 parent d0fb61a commit c2b57e5
Show file tree
Hide file tree
Showing 13 changed files with 923 additions and 972 deletions.
2 changes: 1 addition & 1 deletion .github/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
paths-ignore:
- 'js/prototype/prototype.js'
- 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js'
- 'js/prototype/validation.js'
- 'js/validation.js'
- 'js/extjs/ext-tree.js'
- '**/*.test.js'
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Mage_Core_Model_App
* The absolute minimum of password length for all types of passwords
*
* With changing this value also need to change:
* 1. in `js/prototype/validation.js` declarations `var minLength = 7;` in two places;
* 1. in `js/validation.js` declarations `var minLength = 7;` in two places;
* 2. in `app/code/core/Mage/Customer/etc/system.xml`
* comments for fields `min_password_length` and `min_admin_password_length`
* `<comment>Please enter a number 7 or greater in this field.</comment>`;
Expand Down
4 changes: 2 additions & 2 deletions app/design/adminhtml/default/default/layout/dataflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<block type="adminhtml/page" name="convert_root" output="toHtml" template="page.phtml">
<block type="adminhtml/page_head" name="convert_root_head" as="head" template="page/head.phtml">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>mage/adminhtml/tools.js</script></action>
Expand All @@ -32,7 +32,7 @@
<block type="adminhtml/page" name="convert_root" output="toHtml" template="page.phtml">
<block type="adminhtml/page_head" name="convert_root_head" as="head" template="page/head.phtml">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>mage/adminhtml/tools.js</script></action>
Expand Down
2 changes: 1 addition & 1 deletion app/design/adminhtml/default/default/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Default layout, loads most of the pages
<action method="setTitle" translate="title"><title>Maho Admin</title></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>maho-dialog.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="icon" type="image/svg+xml" href="<?= $this->getSkinUrl('images/favicon.svg') ?>" sizes="any">
<link rel="icon" type="image/png" href="<?= $this->getSkinUrl('images/favicon.png') ?>">
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/prototype.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
</head>
<body id="page-login">
Expand Down
2 changes: 1 addition & 1 deletion app/design/adminhtml/default/default/template/login.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="icon" type="image/svg+xml" href="<?= $this->getSkinUrl('images/favicon.svg') ?>" sizes="any">
<link rel="icon" type="image/png" href="<?= $this->getSkinUrl('images/favicon.png') ?>">
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/prototype.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
</head>
<body id="page-login">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="icon" type="image/svg+xml" href="<?= $this->getSkinUrl('images/favicon.svg') ?>" sizes="any">
<link rel="icon" type="image/png" href="<?= $this->getSkinUrl('images/favicon.png') ?>">
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/prototype.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('prototype/validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('validation.js') ?>"></script>
<script type="text/javascript" src="<?= $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
</head>
<body id="page-login">
Expand Down
4 changes: 2 additions & 2 deletions app/design/frontend/base/default/layout/page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Default layout, loads most of the pages

<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>maho-autocomplete.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>varien/form.js</script></action>
Expand Down Expand Up @@ -99,7 +99,7 @@ Default layout, loads most of the pages
<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>

<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
Expand Down
4 changes: 2 additions & 2 deletions app/design/frontend/rwd/default/layout/page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>maho-autocomplete.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addJs"><script>varien/form.js</script></action>
Expand Down Expand Up @@ -131,7 +131,7 @@
<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>

<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
Expand Down
2 changes: 1 addition & 1 deletion app/design/install/default/default/template/page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<meta charset="utf-8">
<title><?= Mage::helper('install')->__('Maho Installation Wizard') ?></title>
<script type="text/javascript" src="<?= $this->getJsUrl() ?>prototype/prototype.js"></script>
<script type="text/javascript" src="<?= $this->getJsUrl() ?>prototype/validation.js"></script>
<script type="text/javascript" src="<?= $this->getJsUrl() ?>validation.js"></script>
<script type="text/javascript" src="<?= $this->getJsUrl() ?>varien/js.js"></script>
<script type="text/javascript" src="<?= $this->getJsUrl() ?>varien/form.js"></script>
<link rel="icon" type="image/svg+xml" href="<?= $this->getSkinUrl('images/favicon.svg') ?>" sizes="any">
Expand Down
Loading

0 comments on commit c2b57e5

Please sign in to comment.