Version Notes
New Extension
Download this release
Release Info
Developer | Sujeet Kr Singh |
Extension | Wizard_AdminLogin |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Wizard/AdminLogin/Helper/Data.php +28 -0
- app/code/community/Wizard/AdminLogin/etc/config.xml +110 -0
- app/code/community/Wizard/AdminLogin/etc/system.xml +255 -0
- app/design/adminhtml/default/default/layout/adminlogin.xml +54 -0
- app/design/adminhtml/default/default/template/wizard_forgotpassword.phtml +91 -0
- app/design/adminhtml/default/default/template/wizard_login.phtml +95 -0
- app/etc/modules/Wizard_AdminLogin.xml +34 -0
- js/wizard/jscolor/arrow.gif +0 -0
- js/wizard/jscolor/cross.gif +0 -0
- js/wizard/jscolor/demo.html +12 -0
- js/wizard/jscolor/hs.png +0 -0
- js/wizard/jscolor/hv.png +0 -0
- js/wizard/jscolor/jscolor.js +840 -0
- package.xml +18 -0
- skin/adminhtml/default/default/images/wizard/favicon.ico +0 -0
- skin/adminhtml/default/default/images/wizard/logo.gif +0 -0
app/code/community/Wizard/AdminLogin/Helper/Data.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
**/
|
27 |
+
class Wizard_AdminLogin_Helper_Data extends Mage_Core_Helper_Abstract{
|
28 |
+
}
|
app/code/community/Wizard/AdminLogin/etc/config.xml
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
-->
|
27 |
+
<config>
|
28 |
+
<modules>
|
29 |
+
<Wizard_AdminLogin>
|
30 |
+
<version>1.0.0</version>
|
31 |
+
</Wizard_AdminLogin>
|
32 |
+
</modules>
|
33 |
+
<global>
|
34 |
+
<helpers>
|
35 |
+
<wizard_adminlogin>
|
36 |
+
<class>Wizard_AdminLogin_Helper</class>
|
37 |
+
</wizard_adminlogin>
|
38 |
+
</helpers>
|
39 |
+
|
40 |
+
</global>
|
41 |
+
<admin>
|
42 |
+
<routers>
|
43 |
+
<adminhtml>
|
44 |
+
<args>
|
45 |
+
<modules>
|
46 |
+
<wizard_adminlogin before="Mage_Adminhtml">Wizard_AdminLogin_Adminhtml</wizard_adminlogin>
|
47 |
+
</modules>
|
48 |
+
</args>
|
49 |
+
</adminhtml>
|
50 |
+
</routers>
|
51 |
+
</admin>
|
52 |
+
<adminhtml>
|
53 |
+
<default>
|
54 |
+
<adminlogin>
|
55 |
+
<condition_name>admin_login</condition_name>
|
56 |
+
</adminlogin>
|
57 |
+
</default>
|
58 |
+
<acl>
|
59 |
+
<resources>
|
60 |
+
<admin>
|
61 |
+
<children>
|
62 |
+
<system>
|
63 |
+
<children>
|
64 |
+
<config>
|
65 |
+
<children>
|
66 |
+
<admin_login>
|
67 |
+
<title>Admin Login</title>
|
68 |
+
</admin_login>
|
69 |
+
</children>
|
70 |
+
</config>
|
71 |
+
</children>
|
72 |
+
</system>
|
73 |
+
</children>
|
74 |
+
</admin>
|
75 |
+
</resources>
|
76 |
+
</acl>
|
77 |
+
<layout>
|
78 |
+
<updates>
|
79 |
+
<adminlogin>
|
80 |
+
<file>adminlogin.xml</file>
|
81 |
+
</adminlogin>
|
82 |
+
</updates>
|
83 |
+
</layout>
|
84 |
+
</adminhtml>
|
85 |
+
<default>
|
86 |
+
<admin_login>
|
87 |
+
<general>
|
88 |
+
<window_title>Log into Magento Admin</window_title>
|
89 |
+
<bg_color>#F4F4F4</bg_color>
|
90 |
+
<btnbg_color>#867bc4</btnbg_color>
|
91 |
+
<btnborder_color>#5b5bb2</btnborder_color>
|
92 |
+
<btnhoverbg_color>#9a90d1</btnhoverbg_color>
|
93 |
+
<btnfont_color>#FFFFFF</btnfont_color>
|
94 |
+
<labelfont_color>#555555</labelfont_color>
|
95 |
+
<linkfont_color>#EA7601</linkfont_color>
|
96 |
+
</general>
|
97 |
+
<loginform>
|
98 |
+
<loginbg_color>#EEEEEE</loginbg_color>
|
99 |
+
<loginborder_color>#CCCCCC</loginborder_color>
|
100 |
+
<header_text>Log into Admin Panel</header_text>
|
101 |
+
<header_text_color>#555555</header_text_color>
|
102 |
+
<loginbtn_text>Login</loginbtn_text>
|
103 |
+
</loginform>
|
104 |
+
<forgotform>
|
105 |
+
<forgotpwdheader_text>Forgot your user name or password?</forgotpwdheader_text>
|
106 |
+
<forgotpwdbtn_text>Retrieve Password</forgotpwdbtn_text>
|
107 |
+
</forgotform>
|
108 |
+
</admin_login>
|
109 |
+
</default>
|
110 |
+
</config>
|
app/code/community/Wizard/AdminLogin/etc/system.xml
ADDED
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
-->
|
27 |
+
<config>
|
28 |
+
<tabs>
|
29 |
+
<wizard translate="label" module="wizard_adminlogin">
|
30 |
+
<label>Wizard Extensions</label>
|
31 |
+
<sort_order>100</sort_order>
|
32 |
+
</wizard>
|
33 |
+
</tabs>
|
34 |
+
<sections>
|
35 |
+
<admin_login translate="label" module="wizard_adminlogin">
|
36 |
+
<label>Admin Login</label>
|
37 |
+
<tab>wizard</tab>
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
<sort_order>301</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
<groups>
|
44 |
+
<general translate="label">
|
45 |
+
<label>General</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<sort_order>2</sort_order>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>1</show_in_store>
|
51 |
+
<fields>
|
52 |
+
<active translate="label">
|
53 |
+
<label>Enabled</label>
|
54 |
+
<frontend_type>select</frontend_type>
|
55 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
56 |
+
<sort_order>0</sort_order>
|
57 |
+
<show_in_default>1</show_in_default>
|
58 |
+
<show_in_website>1</show_in_website>
|
59 |
+
<show_in_store>1</show_in_store>
|
60 |
+
</active>
|
61 |
+
<logo translate="label">
|
62 |
+
<label>Logo</label>
|
63 |
+
<frontend_type>image</frontend_type>
|
64 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
65 |
+
<upload_dir config="system/filesystem/media" scope_info="1">wizard</upload_dir>
|
66 |
+
<base_url type="media" scope_info="1">wizard</base_url>
|
67 |
+
<comment>Select logo image</comment>
|
68 |
+
<sort_order>1</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</logo>
|
73 |
+
<favicon translate="label">
|
74 |
+
<label>Favicon File Name</label>
|
75 |
+
<frontend_type>image</frontend_type>
|
76 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
77 |
+
<upload_dir config="system/filesystem/media" scope_info="1">wizard</upload_dir>
|
78 |
+
<base_url type="media" scope_info="1">wizard</base_url>
|
79 |
+
<comment>Select favicon image. Allowed file types: ICO, PNG, GIF, JPG, JPEG, APNG, SVG. Not all browsers support all these formats!</comment>
|
80 |
+
<sort_order>2</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>1</show_in_website>
|
83 |
+
<show_in_store>1</show_in_store>
|
84 |
+
</favicon>
|
85 |
+
<window_title translate="label">
|
86 |
+
<label>Title</label>
|
87 |
+
<comment>Enter title of the page</comment>
|
88 |
+
<frontend_type>text</frontend_type>
|
89 |
+
<sort_order>3</sort_order>
|
90 |
+
<show_in_default>1</show_in_default>
|
91 |
+
<show_in_website>1</show_in_website>
|
92 |
+
<show_in_store>1</show_in_store>
|
93 |
+
</window_title>
|
94 |
+
<bg_color translate="label">
|
95 |
+
<label>Page Background Color</label>
|
96 |
+
<comment>Choose background color</comment>
|
97 |
+
<frontend_type>text</frontend_type>
|
98 |
+
<frontend_class>color {hash:true}</frontend_class>
|
99 |
+
<sort_order>4</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
</bg_color>
|
104 |
+
<btnbg_color translate="label">
|
105 |
+
<label>Button Background Color</label>
|
106 |
+
<comment>Choose button background color</comment>
|
107 |
+
<frontend_type>text</frontend_type>
|
108 |
+
<frontend_class>color {hash:true}</frontend_class>
|
109 |
+
<sort_order>5</sort_order>
|
110 |
+
<show_in_default>1</show_in_default>
|
111 |
+
<show_in_website>1</show_in_website>
|
112 |
+
<show_in_store>1</show_in_store>
|
113 |
+
</btnbg_color>
|
114 |
+
<btnborder_color translate="label">
|
115 |
+
<label>Button Border Color</label>
|
116 |
+
<comment>Choose button border color</comment>
|
117 |
+
<frontend_type>text</frontend_type>
|
118 |
+
<frontend_class>color {hash:true}</frontend_class>
|
119 |
+
<sort_order>6</sort_order>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
</btnborder_color>
|
124 |
+
<btnhoverbg_color translate="label">
|
125 |
+
<label>Button Hover Background Color</label>
|
126 |
+
<comment>Choose button hover background color</comment>
|
127 |
+
<frontend_type>text</frontend_type>
|
128 |
+
<frontend_class>color {hash:true}</frontend_class>
|
129 |
+
<sort_order>7</sort_order>
|
130 |
+
<show_in_default>1</show_in_default>
|
131 |
+
<show_in_website>1</show_in_website>
|
132 |
+
<show_in_store>1</show_in_store>
|
133 |
+
</btnhoverbg_color>
|
134 |
+
<btnfont_color translate="label">
|
135 |
+
<label>Button Text Color</label>
|
136 |
+
<comment>Choose button text color</comment>
|
137 |
+
<frontend_type>text</frontend_type>
|
138 |
+
<frontend_class>color {hash:true}</frontend_class>
|
139 |
+
<sort_order>8</sort_order>
|
140 |
+
<show_in_default>1</show_in_default>
|
141 |
+
<show_in_website>1</show_in_website>
|
142 |
+
<show_in_store>1</show_in_store>
|
143 |
+
</btnfont_color>
|
144 |
+
<labelfont_color translate="label">
|
145 |
+
<label>Label Text Color</label>
|
146 |
+
<comment>Choose label text color</comment>
|
147 |
+
<frontend_type>text</frontend_type>
|
148 |
+
<frontend_class>color {hash:true}</frontend_class>
|
149 |
+
<sort_order>9</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
</labelfont_color>
|
154 |
+
<linkfont_color translate="label">
|
155 |
+
<label>Link Text Color</label>
|
156 |
+
<comment>Choose link text color</comment>
|
157 |
+
<frontend_type>text</frontend_type>
|
158 |
+
<frontend_class>color {hash:true}</frontend_class>
|
159 |
+
<sort_order>10</sort_order>
|
160 |
+
<show_in_default>1</show_in_default>
|
161 |
+
<show_in_website>1</show_in_website>
|
162 |
+
<show_in_store>1</show_in_store>
|
163 |
+
</linkfont_color>
|
164 |
+
</fields>
|
165 |
+
</general>
|
166 |
+
<loginform translate="label">
|
167 |
+
<label>Login Form</label>
|
168 |
+
<frontend_type>text</frontend_type>
|
169 |
+
<sort_order>3</sort_order>
|
170 |
+
<show_in_default>1</show_in_default>
|
171 |
+
<show_in_website>1</show_in_website>
|
172 |
+
<show_in_store>1</show_in_store>
|
173 |
+
<fields>
|
174 |
+
<loginbg_color translate="label">
|
175 |
+
<label>Login Box Background Color</label>
|
176 |
+
<comment>Choose login box background color</comment>
|
177 |
+
<frontend_type>text</frontend_type>
|
178 |
+
<frontend_class>color {hash:true}</frontend_class>
|
179 |
+
<sort_order>1</sort_order>
|
180 |
+
<show_in_default>1</show_in_default>
|
181 |
+
<show_in_website>1</show_in_website>
|
182 |
+
<show_in_store>1</show_in_store>
|
183 |
+
</loginbg_color>
|
184 |
+
<loginborder_color translate="label">
|
185 |
+
<label>Login Box Border Color</label>
|
186 |
+
<comment>Choose login box border color</comment>
|
187 |
+
<frontend_type>text</frontend_type>
|
188 |
+
<frontend_class>color {hash:true}</frontend_class>
|
189 |
+
<sort_order>2</sort_order>
|
190 |
+
<show_in_default>1</show_in_default>
|
191 |
+
<show_in_website>1</show_in_website>
|
192 |
+
<show_in_store>1</show_in_store>
|
193 |
+
</loginborder_color>
|
194 |
+
<header_text translate="label">
|
195 |
+
<label>Header Text</label>
|
196 |
+
<comment>Enter header text of login form</comment>
|
197 |
+
<frontend_type>text</frontend_type>
|
198 |
+
<sort_order>3</sort_order>
|
199 |
+
<show_in_default>1</show_in_default>
|
200 |
+
<show_in_website>1</show_in_website>
|
201 |
+
<show_in_store>1</show_in_store>
|
202 |
+
</header_text>
|
203 |
+
<header_text_color translate="label">
|
204 |
+
<label>Header Text Color</label>
|
205 |
+
<comment>Choose header text color</comment>
|
206 |
+
<frontend_type>text</frontend_type>
|
207 |
+
<frontend_class>color {hash:true}</frontend_class>
|
208 |
+
<sort_order>4</sort_order>
|
209 |
+
<show_in_default>1</show_in_default>
|
210 |
+
<show_in_website>1</show_in_website>
|
211 |
+
<show_in_store>1</show_in_store>
|
212 |
+
</header_text_color>
|
213 |
+
<loginbtn_text translate="label">
|
214 |
+
<label>Login Button Text</label>
|
215 |
+
<comment>Enter login button text</comment>
|
216 |
+
<frontend_type>text</frontend_type>
|
217 |
+
<sort_order>5</sort_order>
|
218 |
+
<show_in_default>1</show_in_default>
|
219 |
+
<show_in_website>1</show_in_website>
|
220 |
+
<show_in_store>1</show_in_store>
|
221 |
+
</loginbtn_text>
|
222 |
+
</fields>
|
223 |
+
</loginform>
|
224 |
+
<forgotform translate="label">
|
225 |
+
<label>Forgot Password Form</label>
|
226 |
+
<frontend_type>text</frontend_type>
|
227 |
+
<sort_order>4</sort_order>
|
228 |
+
<show_in_default>1</show_in_default>
|
229 |
+
<show_in_website>1</show_in_website>
|
230 |
+
<show_in_store>1</show_in_store>
|
231 |
+
<fields>
|
232 |
+
<forgotpwdheader_text translate="label">
|
233 |
+
<label>Forgot Password Header Text</label>
|
234 |
+
<comment>Enter forgot password header text</comment>
|
235 |
+
<frontend_type>text</frontend_type>
|
236 |
+
<sort_order>1</sort_order>
|
237 |
+
<show_in_default>1</show_in_default>
|
238 |
+
<show_in_website>1</show_in_website>
|
239 |
+
<show_in_store>1</show_in_store>
|
240 |
+
</forgotpwdheader_text>
|
241 |
+
<forgotpwdbtn_text translate="label">
|
242 |
+
<label>Forgot Password Button Text</label>
|
243 |
+
<comment>Enter forgot password button text</comment>
|
244 |
+
<frontend_type>text</frontend_type>
|
245 |
+
<sort_order>2</sort_order>
|
246 |
+
<show_in_default>1</show_in_default>
|
247 |
+
<show_in_website>1</show_in_website>
|
248 |
+
<show_in_store>1</show_in_store>
|
249 |
+
</forgotpwdbtn_text>
|
250 |
+
</fields>
|
251 |
+
</forgotform>
|
252 |
+
</groups>
|
253 |
+
</admin_login>
|
254 |
+
</sections>
|
255 |
+
</config>
|
app/design/adminhtml/default/default/layout/adminlogin.xml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
-->
|
27 |
+
<layout>
|
28 |
+
<adminhtml_system_config_edit>
|
29 |
+
<reference name="head">
|
30 |
+
<action method="addJs"><script>wizard/jscolor/jscolor.js</script></action>
|
31 |
+
</reference>
|
32 |
+
</adminhtml_system_config_edit>
|
33 |
+
<adminhtml_index_login>
|
34 |
+
<block type="core/text_list" name="root" output="toHtml">
|
35 |
+
<block type="adminhtml/template" name="content" template="login.phtml">
|
36 |
+
<action method="setTemplate" ifconfig="admin_login/general/active">
|
37 |
+
<template>wizard_login.phtml</template>
|
38 |
+
</action>
|
39 |
+
<block type="core/text_list" name="form.additional.info" />
|
40 |
+
</block>
|
41 |
+
</block>
|
42 |
+
</adminhtml_index_login>
|
43 |
+
|
44 |
+
<adminhtml_index_forgotpassword>
|
45 |
+
<block type="core/text_list" name="root" output="toHtml">
|
46 |
+
<block type="adminhtml/template" name="content" template="forgotpassword.phtml">
|
47 |
+
<action method="setTemplate" ifconfig="admin_login/general/active">
|
48 |
+
<template>wizard_forgotpassword.phtml</template>
|
49 |
+
</action>
|
50 |
+
<block type="core/text_list" name="form.additional.info" />
|
51 |
+
</block>
|
52 |
+
</block>
|
53 |
+
</adminhtml_index_forgotpassword>
|
54 |
+
</layout>
|
app/design/adminhtml/default/default/template/wizard_forgotpassword.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
29 |
+
<html lang="en">
|
30 |
+
<head>
|
31 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
32 |
+
<title><?php echo Mage::getStoreConfig('admin_login/general/window_title'); ?></title>
|
33 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" />
|
34 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" />
|
35 |
+
<link rel="icon" href="<?php echo Mage::getStoreConfig('admin_login/general/favicon')?Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wizard/'.Mage::getStoreConfig('admin_login/general/favicon'):$this->getSkinUrl('images/wizard/favicon.ico') ?>" type="image/x-icon" />
|
36 |
+
<link rel="shortcut icon" href="<?php echo Mage::getStoreConfig('admin_login/general/favicon')?Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wizard/'.Mage::getStoreConfig('admin_login/general/favicon'):$this->getSkinUrl('images/wizard/favicon.ico') ?>" type="image/x-icon" />
|
37 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl(); ?>index.php/x.js?f=prototype/prototype.js,prototype/validation.js,mage/adminhtml/events.js,mage/adminhtml/form.js,scriptaculous/effects.js"></script>
|
38 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>
|
39 |
+
|
40 |
+
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
41 |
+
<style type="text/css">
|
42 |
+
body{background-color: <?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>; margin:0; font-family: 'Open Sans', sans-serif;}
|
43 |
+
body *{font-family: 'Open Sans', sans-serif;}
|
44 |
+
body a{color:<?php echo Mage::getStoreConfig('admin_login/general/linkfont_color'); ?>;}
|
45 |
+
.login-container{background: none; padding-left:0; margin-top:10px;}
|
46 |
+
.login-form{background: none}
|
47 |
+
html{background-color:<?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>;}
|
48 |
+
#page-login{background-color:<?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>}
|
49 |
+
.login-box .bottom{background:none;}
|
50 |
+
.login-box{background:#eee; border:1px solid #ccc;}
|
51 |
+
.logo{float:none; margin-top:150px;}
|
52 |
+
.messages li{background:none !important; min-height:10px !important; padding:2px 8px !important; background-color:#fff !important; font-weight:normal !important; text-align: center}
|
53 |
+
.messages ul li{margin-bottom:0px !important;}
|
54 |
+
h2{color:<?php echo Mage::getStoreConfig('admin_login/loginform/header_text_color'); ?>; text-align: center;}
|
55 |
+
.login-form label{color:<?php echo Mage::getStoreConfig('admin_login/general/labelform_color'); ?>;}
|
56 |
+
button{background:<?php echo Mage::getStoreConfig('admin_login/general/btnbg_color'); ?>; border:1px solid <?php echo Mage::getStoreConfig('admin_login/general/btnborder_color'); ?>; font-size:14px; padding:5px 15px; font-family: 'Open Sans' !important; font-weight:normal; transition:.5s;}
|
57 |
+
button:hover{background:<?php echo Mage::getStoreConfig('admin_login/general/btnhoverbg_color'); ?>; transition:.5s;}
|
58 |
+
</style>
|
59 |
+
|
60 |
+
</head>
|
61 |
+
<body id="page-login">
|
62 |
+
<img src='<?php echo $this->getSkinUrl('images/wizard/logo.gif') ?>' class='logo' />
|
63 |
+
<div class="login-container">
|
64 |
+
<div class="login-box">
|
65 |
+
<form method="post" action="" id="loginForm">
|
66 |
+
<fieldset class="login-form">
|
67 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
|
68 |
+
<h2><?php echo Mage::getStoreConfig('admin_login/forgotform/forgotpwdheader_text'); ?></h2>
|
69 |
+
<div id="messages">
|
70 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
|
71 |
+
</div>
|
72 |
+
<div class="input-box forgot-password"><label for="email"><?php echo Mage::helper('adminhtml')->__('Email Address:'); ?></label><br />
|
73 |
+
<input type="text" id="email" name="email" value="" class="required-entry input-text forgot-password validate-email" style="width:461px;" />
|
74 |
+
</div>
|
75 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
76 |
+
<div class="clear"></div>
|
77 |
+
<div class="form-buttons">
|
78 |
+
<a class="left" href="<?php echo $this->getUrl('adminhtml', array('_nosecret' => true)); ?>">« <?php echo Mage::helper('adminhtml')->__('Back to Login'); ?></a>
|
79 |
+
<button class="forgot-password" onclick="loginForm.submit()" type="button"><span><span><span><?php echo Mage::getStoreConfig('admin_login/forgotform/forgotpwdbtn_text'); ?></span></span></span></button>
|
80 |
+
</div>
|
81 |
+
</fieldset>
|
82 |
+
</form>
|
83 |
+
<div class="bottom"></div>
|
84 |
+
<script type="text/javascript">
|
85 |
+
var loginForm = new varienForm('loginForm');
|
86 |
+
</script>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
</body>
|
90 |
+
</html>
|
91 |
+
|
app/design/adminhtml/default/default/template/wizard_login.phtml
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
29 |
+
<html lang="en">
|
30 |
+
<head>
|
31 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
32 |
+
<title><?php echo Mage::getStoreConfig('admin_login/general/window_title'); ?></title>
|
33 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css') ?>" media="all" />
|
34 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css') ?>" media="all" />
|
35 |
+
<link rel="icon" href="<?php echo Mage::getStoreConfig('admin_login/general/favicon')?Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wizard/'.Mage::getStoreConfig('admin_login/general/favicon'):$this->getSkinUrl('images/wizard/favicon.ico') ?>" type="image/x-icon" />
|
36 |
+
<link rel="shortcut icon" href="<?php echo Mage::getStoreConfig('admin_login/general/favicon')?Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wizard/'.Mage::getStoreConfig('admin_login/general/favicon'):$this->getSkinUrl('images/wizard/favicon.ico') ?>" type="image/x-icon" />
|
37 |
+
|
38 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/prototype.js') ?>"></script>
|
39 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/validation.js') ?>"></script>
|
40 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('scriptaculous/effects.js') ?>"></script>
|
41 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
|
42 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>
|
43 |
+
|
44 |
+
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
45 |
+
<style type="text/css">
|
46 |
+
body{background-color: <?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>; margin:0; font-family: 'Open Sans', sans-serif;}
|
47 |
+
body *{font-family: 'Open Sans', sans-serif;}
|
48 |
+
body a{color:<?php echo Mage::getStoreConfig('admin_login/general/linkfont_color'); ?>;}
|
49 |
+
.login-container{background: none; padding-left:0; margin-top:10px;}
|
50 |
+
.login-form{background: none}
|
51 |
+
html{background-color:<?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>;}
|
52 |
+
#page-login{background-color:<?php echo Mage::getStoreConfig('admin_login/general/bg_color'); ?>}
|
53 |
+
.login-box .bottom{background:none;}
|
54 |
+
.login-box{background:<?php echo Mage::getStoreConfig('admin_login/loginform/loginbg_color'); ?>; border:1px solid <?php echo Mage::getStoreConfig('admin_login/loginform/loginborder_color'); ?>;}
|
55 |
+
.logo{float:none; margin-top:150px;}
|
56 |
+
.messages li{background:none !important; min-height:10px !important; padding:2px 8px !important; background-color:#fff !important; font-weight:normal !important; text-align: center}
|
57 |
+
.messages ul li{margin-bottom:0px !important;}
|
58 |
+
h2{color:<?php echo Mage::getStoreConfig('admin_login/loginform/header_text_color'); ?>; text-align: center;}
|
59 |
+
.login-form label{color:<?php echo Mage::getStoreConfig('admin_login/general/labelform_color'); ?>;}
|
60 |
+
.form-button{background:<?php echo Mage::getStoreConfig('admin_login/general/btnbg_color'); ?>; border:1px solid <?php echo Mage::getStoreConfig('admin_login/general/btnborder_color'); ?>; font-size:14px; padding:5px 15px; font-family: 'Open Sans' !important; font-weight:normal; transition:.5s;}
|
61 |
+
.form-button:hover{background:<?php echo Mage::getStoreConfig('admin_login/general/btnhoverbg_color'); ?>; transition:.5s;}
|
62 |
+
</style>
|
63 |
+
</head>
|
64 |
+
<body id="page-login" onload="document.forms.loginForm.username.focus();">
|
65 |
+
<img src='<?php echo Mage::getStoreConfig('admin_login/general/logo')?Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wizard/'.Mage::getStoreConfig('admin_login/general/logo'):$this->getSkinUrl('images/wizard/logo.gif') ?>' class='logo' />
|
66 |
+
<div class="login-container">
|
67 |
+
<div class="login-box">
|
68 |
+
<form method="post" action="" id="loginForm">
|
69 |
+
<div class="login-form">
|
70 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
71 |
+
<h2><?php echo Mage::getStoreConfig('admin_login/loginform/header_text'); ?></h2>
|
72 |
+
<div id="messages">
|
73 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
74 |
+
</div>
|
75 |
+
<div class="input-box input-left"><label for="username"><?php echo Mage::helper('adminhtml')->__('User Name:') ?></label><br/>
|
76 |
+
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" /></div>
|
77 |
+
<div class="input-box input-right"><label for="login"><?php echo Mage::helper('adminhtml')->__('Password:') ?></label><br />
|
78 |
+
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" /></div>
|
79 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
80 |
+
<div class="clear"></div>
|
81 |
+
<div class="form-buttons">
|
82 |
+
<a class="left" href="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/index/forgotpassword', array('_nosecret' => true)) ?>"><?php echo Mage::helper('adminhtml')->__('Forgot your password?') ?></a>
|
83 |
+
<input type="submit" class="form-button" value="<?php echo Mage::getStoreConfig('admin_login/loginform/loginbtn_text'); ?>" title="<?php echo Mage::getStoreConfig('admin_login/loginform/loginbtn_text'); ?>" /></div>
|
84 |
+
</div>
|
85 |
+
</form>
|
86 |
+
<div class="bottom"></div>
|
87 |
+
<script type="text/javascript">
|
88 |
+
var loginForm = new varienForm('loginForm');
|
89 |
+
</script>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
</body>
|
94 |
+
</html>
|
95 |
+
|
app/etc/modules/Wizard_AdminLogin.xml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
* Magento Wizard Admin Login Module
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Wizard
|
22 |
+
* @package Wizard_AdminLogin
|
23 |
+
* @copyright Copyright (c) 2015 Wizard (http://www.sujeetkrsingh.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*
|
26 |
+
-->
|
27 |
+
<config>
|
28 |
+
<modules>
|
29 |
+
<Wizard_AdminLogin>
|
30 |
+
<active>true</active>
|
31 |
+
<codePool>community</codePool>
|
32 |
+
</Wizard_AdminLogin>
|
33 |
+
</modules>
|
34 |
+
</config>
|
js/wizard/jscolor/arrow.gif
ADDED
Binary file
|
js/wizard/jscolor/cross.gif
ADDED
Binary file
|
js/wizard/jscolor/demo.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<head>
|
3 |
+
<title>jscolor demo</title>
|
4 |
+
</head>
|
5 |
+
<body>
|
6 |
+
|
7 |
+
<script type="text/javascript" src="jscolor.js"></script>
|
8 |
+
|
9 |
+
Click here: <input class="color" value="66ff00">
|
10 |
+
|
11 |
+
</body>
|
12 |
+
</html>
|
js/wizard/jscolor/hs.png
ADDED
Binary file
|
js/wizard/jscolor/hv.png
ADDED
Binary file
|
js/wizard/jscolor/jscolor.js
ADDED
@@ -0,0 +1,840 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jscolor, JavaScript Color Picker
|
3 |
+
*
|
4 |
+
* @version 1.3.1
|
5 |
+
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
|
6 |
+
* @author Jan Odvarko, http://odvarko.cz
|
7 |
+
* @created 2008-06-15
|
8 |
+
* @updated 2010-01-23
|
9 |
+
* @link http://jscolor.com
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
var jscolor = {
|
14 |
+
|
15 |
+
|
16 |
+
dir : '', // location of jscolor directory (leave empty to autodetect)
|
17 |
+
bindClass : 'color', // class name
|
18 |
+
binding : true, // automatic binding via <input class="...">
|
19 |
+
preloading : true, // use image preloading?
|
20 |
+
|
21 |
+
|
22 |
+
install : function() {
|
23 |
+
jscolor.addEvent(window, 'load', jscolor.init);
|
24 |
+
},
|
25 |
+
|
26 |
+
|
27 |
+
init : function() {
|
28 |
+
if(jscolor.binding) {
|
29 |
+
jscolor.bind();
|
30 |
+
}
|
31 |
+
if(jscolor.preloading) {
|
32 |
+
jscolor.preload();
|
33 |
+
}
|
34 |
+
},
|
35 |
+
|
36 |
+
|
37 |
+
getDir : function() {
|
38 |
+
if(!jscolor.dir) {
|
39 |
+
var detected = jscolor.detectDir();
|
40 |
+
jscolor.dir = detected!==false ? detected : 'jscolor/';
|
41 |
+
}
|
42 |
+
return jscolor.dir;
|
43 |
+
},
|
44 |
+
|
45 |
+
|
46 |
+
detectDir : function() {
|
47 |
+
var base = location.href;
|
48 |
+
|
49 |
+
var e = document.getElementsByTagName('base');
|
50 |
+
for(var i=0; i<e.length; i+=1) {
|
51 |
+
if(e[i].href) { base = e[i].href; }
|
52 |
+
}
|
53 |
+
|
54 |
+
var e = document.getElementsByTagName('script');
|
55 |
+
for(var i=0; i<e.length; i+=1) {
|
56 |
+
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
57 |
+
var src = new jscolor.URI(e[i].src);
|
58 |
+
var srcAbs = src.toAbsolute(base);
|
59 |
+
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
|
60 |
+
srcAbs.query = null;
|
61 |
+
srcAbs.fragment = null;
|
62 |
+
return srcAbs.toString();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
return false;
|
66 |
+
},
|
67 |
+
|
68 |
+
|
69 |
+
bind : function() {
|
70 |
+
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i');
|
71 |
+
var e = document.getElementsByTagName('input');
|
72 |
+
for(var i=0; i<e.length; i+=1) {
|
73 |
+
var m;
|
74 |
+
if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
|
75 |
+
var prop = {};
|
76 |
+
if(m[3]) {
|
77 |
+
try {
|
78 |
+
eval('prop='+m[3]);
|
79 |
+
} catch(eInvalidProp) {}
|
80 |
+
}
|
81 |
+
e[i].color = new jscolor.color(e[i], prop);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
},
|
85 |
+
|
86 |
+
|
87 |
+
preload : function() {
|
88 |
+
for(var fn in jscolor.imgRequire) {
|
89 |
+
if(jscolor.imgRequire.hasOwnProperty(fn)) {
|
90 |
+
jscolor.loadImage(fn);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
},
|
94 |
+
|
95 |
+
|
96 |
+
images : {
|
97 |
+
pad : [ 181, 101 ],
|
98 |
+
sld : [ 16, 101 ],
|
99 |
+
cross : [ 15, 15 ],
|
100 |
+
arrow : [ 7, 11 ]
|
101 |
+
},
|
102 |
+
|
103 |
+
|
104 |
+
imgRequire : {},
|
105 |
+
imgLoaded : {},
|
106 |
+
|
107 |
+
|
108 |
+
requireImage : function(filename) {
|
109 |
+
jscolor.imgRequire[filename] = true;
|
110 |
+
},
|
111 |
+
|
112 |
+
|
113 |
+
loadImage : function(filename) {
|
114 |
+
if(!jscolor.imgLoaded[filename]) {
|
115 |
+
jscolor.imgLoaded[filename] = new Image();
|
116 |
+
jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
|
117 |
+
}
|
118 |
+
},
|
119 |
+
|
120 |
+
|
121 |
+
fetchElement : function(mixed) {
|
122 |
+
return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
|
123 |
+
},
|
124 |
+
|
125 |
+
|
126 |
+
addEvent : function(el, evnt, func) {
|
127 |
+
if(el.addEventListener) {
|
128 |
+
el.addEventListener(evnt, func, false);
|
129 |
+
} else if(el.attachEvent) {
|
130 |
+
el.attachEvent('on'+evnt, func);
|
131 |
+
}
|
132 |
+
},
|
133 |
+
|
134 |
+
|
135 |
+
fireEvent : function(el, evnt) {
|
136 |
+
if(!el) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
if(document.createEventObject) {
|
140 |
+
var ev = document.createEventObject();
|
141 |
+
el.fireEvent('on'+evnt, ev);
|
142 |
+
} else if(document.createEvent) {
|
143 |
+
var ev = document.createEvent('HTMLEvents');
|
144 |
+
ev.initEvent(evnt, true, true);
|
145 |
+
el.dispatchEvent(ev);
|
146 |
+
} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
|
147 |
+
el['on'+evnt]();
|
148 |
+
}
|
149 |
+
},
|
150 |
+
|
151 |
+
|
152 |
+
getElementPos : function(e) {
|
153 |
+
var e1=e, e2=e;
|
154 |
+
var x=0, y=0;
|
155 |
+
if(e1.offsetParent) {
|
156 |
+
do {
|
157 |
+
x += e1.offsetLeft;
|
158 |
+
y += e1.offsetTop;
|
159 |
+
} while(e1 = e1.offsetParent);
|
160 |
+
}
|
161 |
+
while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
|
162 |
+
x -= e2.scrollLeft;
|
163 |
+
y -= e2.scrollTop;
|
164 |
+
}
|
165 |
+
return [x, y];
|
166 |
+
},
|
167 |
+
|
168 |
+
|
169 |
+
getElementSize : function(e) {
|
170 |
+
return [e.offsetWidth, e.offsetHeight];
|
171 |
+
},
|
172 |
+
|
173 |
+
|
174 |
+
getMousePos : function(e) {
|
175 |
+
if(!e) { e = window.event; }
|
176 |
+
if(typeof e.pageX === 'number') {
|
177 |
+
return [e.pageX, e.pageY];
|
178 |
+
} else if(typeof e.clientX === 'number') {
|
179 |
+
return [
|
180 |
+
e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
|
181 |
+
e.clientY + document.body.scrollTop + document.documentElement.scrollTop
|
182 |
+
];
|
183 |
+
}
|
184 |
+
},
|
185 |
+
|
186 |
+
|
187 |
+
getViewPos : function() {
|
188 |
+
if(typeof window.pageYOffset === 'number') {
|
189 |
+
return [window.pageXOffset, window.pageYOffset];
|
190 |
+
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
191 |
+
return [document.body.scrollLeft, document.body.scrollTop];
|
192 |
+
} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
|
193 |
+
return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
|
194 |
+
} else {
|
195 |
+
return [0, 0];
|
196 |
+
}
|
197 |
+
},
|
198 |
+
|
199 |
+
|
200 |
+
getViewSize : function() {
|
201 |
+
if(typeof window.innerWidth === 'number') {
|
202 |
+
return [window.innerWidth, window.innerHeight];
|
203 |
+
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
204 |
+
return [document.body.clientWidth, document.body.clientHeight];
|
205 |
+
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
206 |
+
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
|
207 |
+
} else {
|
208 |
+
return [0, 0];
|
209 |
+
}
|
210 |
+
},
|
211 |
+
|
212 |
+
|
213 |
+
URI : function(uri) { // See RFC3986
|
214 |
+
|
215 |
+
this.scheme = null;
|
216 |
+
this.authority = null;
|
217 |
+
this.path = '';
|
218 |
+
this.query = null;
|
219 |
+
this.fragment = null;
|
220 |
+
|
221 |
+
this.parse = function(uri) {
|
222 |
+
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
|
223 |
+
this.scheme = m[3] ? m[2] : null;
|
224 |
+
this.authority = m[5] ? m[6] : null;
|
225 |
+
this.path = m[7];
|
226 |
+
this.query = m[9] ? m[10] : null;
|
227 |
+
this.fragment = m[12] ? m[13] : null;
|
228 |
+
return this;
|
229 |
+
};
|
230 |
+
|
231 |
+
this.toString = function() {
|
232 |
+
var result = '';
|
233 |
+
if(this.scheme !== null) { result = result + this.scheme + ':'; }
|
234 |
+
if(this.authority !== null) { result = result + '//' + this.authority; }
|
235 |
+
if(this.path !== null) { result = result + this.path; }
|
236 |
+
if(this.query !== null) { result = result + '?' + this.query; }
|
237 |
+
if(this.fragment !== null) { result = result + '#' + this.fragment; }
|
238 |
+
return result;
|
239 |
+
};
|
240 |
+
|
241 |
+
this.toAbsolute = function(base) {
|
242 |
+
var base = new jscolor.URI(base);
|
243 |
+
var r = this;
|
244 |
+
var t = new jscolor.URI;
|
245 |
+
|
246 |
+
if(base.scheme === null) { return false; }
|
247 |
+
|
248 |
+
if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
|
249 |
+
r.scheme = null;
|
250 |
+
}
|
251 |
+
|
252 |
+
if(r.scheme !== null) {
|
253 |
+
t.scheme = r.scheme;
|
254 |
+
t.authority = r.authority;
|
255 |
+
t.path = removeDotSegments(r.path);
|
256 |
+
t.query = r.query;
|
257 |
+
} else {
|
258 |
+
if(r.authority !== null) {
|
259 |
+
t.authority = r.authority;
|
260 |
+
t.path = removeDotSegments(r.path);
|
261 |
+
t.query = r.query;
|
262 |
+
} else {
|
263 |
+
if(r.path === '') { // TODO: == or === ?
|
264 |
+
t.path = base.path;
|
265 |
+
if(r.query !== null) {
|
266 |
+
t.query = r.query;
|
267 |
+
} else {
|
268 |
+
t.query = base.query;
|
269 |
+
}
|
270 |
+
} else {
|
271 |
+
if(r.path.substr(0,1) === '/') {
|
272 |
+
t.path = removeDotSegments(r.path);
|
273 |
+
} else {
|
274 |
+
if(base.authority !== null && base.path === '') { // TODO: == or === ?
|
275 |
+
t.path = '/'+r.path;
|
276 |
+
} else {
|
277 |
+
t.path = base.path.replace(/[^\/]+$/,'')+r.path;
|
278 |
+
}
|
279 |
+
t.path = removeDotSegments(t.path);
|
280 |
+
}
|
281 |
+
t.query = r.query;
|
282 |
+
}
|
283 |
+
t.authority = base.authority;
|
284 |
+
}
|
285 |
+
t.scheme = base.scheme;
|
286 |
+
}
|
287 |
+
t.fragment = r.fragment;
|
288 |
+
|
289 |
+
return t;
|
290 |
+
};
|
291 |
+
|
292 |
+
function removeDotSegments(path) {
|
293 |
+
var out = '';
|
294 |
+
while(path) {
|
295 |
+
if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
|
296 |
+
path = path.replace(/^\.+/,'').substr(1);
|
297 |
+
} else if(path.substr(0,3)==='/./' || path==='/.') {
|
298 |
+
path = '/'+path.substr(3);
|
299 |
+
} else if(path.substr(0,4)==='/../' || path==='/..') {
|
300 |
+
path = '/'+path.substr(4);
|
301 |
+
out = out.replace(/\/?[^\/]*$/, '');
|
302 |
+
} else if(path==='.' || path==='..') {
|
303 |
+
path = '';
|
304 |
+
} else {
|
305 |
+
var rm = path.match(/^\/?[^\/]*/)[0];
|
306 |
+
path = path.substr(rm.length);
|
307 |
+
out = out + rm;
|
308 |
+
}
|
309 |
+
}
|
310 |
+
return out;
|
311 |
+
}
|
312 |
+
|
313 |
+
if(uri) {
|
314 |
+
this.parse(uri);
|
315 |
+
}
|
316 |
+
|
317 |
+
},
|
318 |
+
|
319 |
+
|
320 |
+
/*
|
321 |
+
* Usage example:
|
322 |
+
* var myColor = new jscolor.color(myInputElement)
|
323 |
+
*/
|
324 |
+
|
325 |
+
color : function(target, prop) {
|
326 |
+
|
327 |
+
|
328 |
+
this.required = true; // refuse empty values?
|
329 |
+
this.adjust = true; // adjust value to uniform notation?
|
330 |
+
this.hash = false; // prefix color with # symbol?
|
331 |
+
this.caps = true; // uppercase?
|
332 |
+
this.valueElement = target; // value holder
|
333 |
+
this.styleElement = target; // where to reflect current color
|
334 |
+
this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
|
335 |
+
this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
|
336 |
+
|
337 |
+
this.pickerOnfocus = true; // display picker on focus?
|
338 |
+
this.pickerMode = 'HSV'; // HSV | HVS
|
339 |
+
this.pickerPosition = 'bottom'; // left | right | top | bottom
|
340 |
+
this.pickerFace = 10; // px
|
341 |
+
this.pickerFaceColor = 'ThreeDFace'; // CSS color
|
342 |
+
this.pickerBorder = 1; // px
|
343 |
+
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
|
344 |
+
this.pickerInset = 1; // px
|
345 |
+
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
|
346 |
+
this.pickerZIndex = 10000;
|
347 |
+
|
348 |
+
|
349 |
+
for(var p in prop) {
|
350 |
+
if(prop.hasOwnProperty(p)) {
|
351 |
+
this[p] = prop[p];
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
|
356 |
+
this.hidePicker = function() {
|
357 |
+
if(isPickerOwner()) {
|
358 |
+
removePicker();
|
359 |
+
}
|
360 |
+
};
|
361 |
+
|
362 |
+
|
363 |
+
this.showPicker = function() {
|
364 |
+
if(!isPickerOwner()) {
|
365 |
+
var tp = jscolor.getElementPos(target); // target pos
|
366 |
+
var ts = jscolor.getElementSize(target); // target size
|
367 |
+
var vp = jscolor.getViewPos(); // view pos
|
368 |
+
var vs = jscolor.getViewSize(); // view size
|
369 |
+
var ps = [ // picker size
|
370 |
+
2*this.pickerBorder + 4*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0],
|
371 |
+
2*this.pickerBorder + 2*this.pickerInset + 2*this.pickerFace + jscolor.images.pad[1]
|
372 |
+
];
|
373 |
+
var a, b, c;
|
374 |
+
switch(this.pickerPosition.toLowerCase()) {
|
375 |
+
case 'left': a=1; b=0; c=-1; break;
|
376 |
+
case 'right':a=1; b=0; c=1; break;
|
377 |
+
case 'top': a=0; b=1; c=-1; break;
|
378 |
+
default: a=0; b=1; c=1; break;
|
379 |
+
}
|
380 |
+
var l = (ts[b]+ps[b])/2;
|
381 |
+
var pp = [ // picker pos
|
382 |
+
-vp[a]+tp[a]+ps[a] > vs[a] ?
|
383 |
+
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
|
384 |
+
tp[a],
|
385 |
+
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
|
386 |
+
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
|
387 |
+
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
|
388 |
+
];
|
389 |
+
drawPicker(pp[a], pp[b]);
|
390 |
+
}
|
391 |
+
};
|
392 |
+
|
393 |
+
|
394 |
+
this.importColor = function() {
|
395 |
+
if(!valueElement) {
|
396 |
+
this.exportColor();
|
397 |
+
} else {
|
398 |
+
if(!this.adjust) {
|
399 |
+
if(!this.fromString(valueElement.value, leaveValue)) {
|
400 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
401 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
402 |
+
this.exportColor(leaveValue | leaveStyle);
|
403 |
+
}
|
404 |
+
} else if(!this.required && /^\s*$/.test(valueElement.value)) {
|
405 |
+
valueElement.value = '';
|
406 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
407 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
408 |
+
this.exportColor(leaveValue | leaveStyle);
|
409 |
+
|
410 |
+
} else if(this.fromString(valueElement.value)) {
|
411 |
+
// OK
|
412 |
+
} else {
|
413 |
+
this.exportColor();
|
414 |
+
}
|
415 |
+
}
|
416 |
+
};
|
417 |
+
|
418 |
+
|
419 |
+
this.exportColor = function(flags) {
|
420 |
+
if(!(flags & leaveValue) && valueElement) {
|
421 |
+
var value = this.toString();
|
422 |
+
if(this.caps) { value = value.toUpperCase(); }
|
423 |
+
if(this.hash) { value = '#'+value; }
|
424 |
+
valueElement.value = value;
|
425 |
+
}
|
426 |
+
if(!(flags & leaveStyle) && styleElement) {
|
427 |
+
styleElement.style.backgroundColor =
|
428 |
+
'#'+this.toString();
|
429 |
+
styleElement.style.color =
|
430 |
+
0.213 * this.rgb[0] +
|
431 |
+
0.715 * this.rgb[1] +
|
432 |
+
0.072 * this.rgb[2]
|
433 |
+
< 0.5 ? '#FFF' : '#000';
|
434 |
+
}
|
435 |
+
if(!(flags & leavePad) && isPickerOwner()) {
|
436 |
+
redrawPad();
|
437 |
+
}
|
438 |
+
if(!(flags & leaveSld) && isPickerOwner()) {
|
439 |
+
redrawSld();
|
440 |
+
}
|
441 |
+
};
|
442 |
+
|
443 |
+
|
444 |
+
this.fromHSV = function(h, s, v, flags) { // null = don't change
|
445 |
+
h<0 && (h=0) || h>6 && (h=6);
|
446 |
+
s<0 && (s=0) || s>1 && (s=1);
|
447 |
+
v<0 && (v=0) || v>1 && (v=1);
|
448 |
+
this.rgb = HSV_RGB(
|
449 |
+
h===null ? this.hsv[0] : (this.hsv[0]=h),
|
450 |
+
s===null ? this.hsv[1] : (this.hsv[1]=s),
|
451 |
+
v===null ? this.hsv[2] : (this.hsv[2]=v)
|
452 |
+
);
|
453 |
+
this.exportColor(flags);
|
454 |
+
};
|
455 |
+
|
456 |
+
|
457 |
+
this.fromRGB = function(r, g, b, flags) { // null = don't change
|
458 |
+
r<0 && (r=0) || r>1 && (r=1);
|
459 |
+
g<0 && (g=0) || g>1 && (g=1);
|
460 |
+
b<0 && (b=0) || b>1 && (b=1);
|
461 |
+
var hsv = RGB_HSV(
|
462 |
+
r===null ? this.rgb[0] : (this.rgb[0]=r),
|
463 |
+
g===null ? this.rgb[1] : (this.rgb[1]=g),
|
464 |
+
b===null ? this.rgb[2] : (this.rgb[2]=b)
|
465 |
+
);
|
466 |
+
if(hsv[0] !== null) {
|
467 |
+
this.hsv[0] = hsv[0];
|
468 |
+
}
|
469 |
+
if(hsv[2] !== 0) {
|
470 |
+
this.hsv[1] = hsv[1];
|
471 |
+
}
|
472 |
+
this.hsv[2] = hsv[2];
|
473 |
+
this.exportColor(flags);
|
474 |
+
};
|
475 |
+
|
476 |
+
|
477 |
+
this.fromString = function(hex, flags) {
|
478 |
+
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
|
479 |
+
if(!m) {
|
480 |
+
return false;
|
481 |
+
} else {
|
482 |
+
if(m[1].length === 6) { // 6-char notation
|
483 |
+
this.fromRGB(
|
484 |
+
parseInt(m[1].substr(0,2),16) / 255,
|
485 |
+
parseInt(m[1].substr(2,2),16) / 255,
|
486 |
+
parseInt(m[1].substr(4,2),16) / 255,
|
487 |
+
flags
|
488 |
+
);
|
489 |
+
} else { // 3-char notation
|
490 |
+
this.fromRGB(
|
491 |
+
parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
|
492 |
+
parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
|
493 |
+
parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
|
494 |
+
flags
|
495 |
+
);
|
496 |
+
}
|
497 |
+
return true;
|
498 |
+
}
|
499 |
+
};
|
500 |
+
|
501 |
+
|
502 |
+
this.toString = function() {
|
503 |
+
return (
|
504 |
+
(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
|
505 |
+
(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
|
506 |
+
(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
|
507 |
+
);
|
508 |
+
};
|
509 |
+
|
510 |
+
|
511 |
+
function RGB_HSV(r, g, b) {
|
512 |
+
var n = Math.min(Math.min(r,g),b);
|
513 |
+
var v = Math.max(Math.max(r,g),b);
|
514 |
+
var m = v - n;
|
515 |
+
if(m === 0) { return [ null, 0, v ]; }
|
516 |
+
var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
|
517 |
+
return [ h===6?0:h, m/v, v ];
|
518 |
+
}
|
519 |
+
|
520 |
+
|
521 |
+
function HSV_RGB(h, s, v) {
|
522 |
+
if(h === null) { return [ v, v, v ]; }
|
523 |
+
var i = Math.floor(h);
|
524 |
+
var f = i%2 ? h-i : 1-(h-i);
|
525 |
+
var m = v * (1 - s);
|
526 |
+
var n = v * (1 - s*f);
|
527 |
+
switch(i) {
|
528 |
+
case 6:
|
529 |
+
case 0: return [v,n,m];
|
530 |
+
case 1: return [n,v,m];
|
531 |
+
case 2: return [m,v,n];
|
532 |
+
case 3: return [m,n,v];
|
533 |
+
case 4: return [n,m,v];
|
534 |
+
case 5: return [v,m,n];
|
535 |
+
}
|
536 |
+
}
|
537 |
+
|
538 |
+
|
539 |
+
function removePicker() {
|
540 |
+
delete jscolor.picker.owner;
|
541 |
+
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
|
542 |
+
}
|
543 |
+
|
544 |
+
|
545 |
+
function drawPicker(x, y) {
|
546 |
+
if(!jscolor.picker) {
|
547 |
+
jscolor.picker = {
|
548 |
+
box : document.createElement('div'),
|
549 |
+
boxB : document.createElement('div'),
|
550 |
+
pad : document.createElement('div'),
|
551 |
+
padB : document.createElement('div'),
|
552 |
+
padM : document.createElement('div'),
|
553 |
+
sld : document.createElement('div'),
|
554 |
+
sldB : document.createElement('div'),
|
555 |
+
sldM : document.createElement('div')
|
556 |
+
};
|
557 |
+
for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
|
558 |
+
var seg = document.createElement('div');
|
559 |
+
seg.style.height = segSize+'px';
|
560 |
+
seg.style.fontSize = '1px';
|
561 |
+
seg.style.lineHeight = '0';
|
562 |
+
jscolor.picker.sld.appendChild(seg);
|
563 |
+
}
|
564 |
+
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
|
565 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldB);
|
566 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldM);
|
567 |
+
jscolor.picker.padB.appendChild(jscolor.picker.pad);
|
568 |
+
jscolor.picker.box.appendChild(jscolor.picker.padB);
|
569 |
+
jscolor.picker.box.appendChild(jscolor.picker.padM);
|
570 |
+
jscolor.picker.boxB.appendChild(jscolor.picker.box);
|
571 |
+
}
|
572 |
+
|
573 |
+
var p = jscolor.picker;
|
574 |
+
|
575 |
+
// recompute controls positions
|
576 |
+
posPad = [
|
577 |
+
x+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset,
|
578 |
+
y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
|
579 |
+
posSld = [
|
580 |
+
null,
|
581 |
+
y+THIS.pickerBorder+THIS.pickerFace+THIS.pickerInset ];
|
582 |
+
|
583 |
+
// controls interaction
|
584 |
+
p.box.onmouseup =
|
585 |
+
p.box.onmouseout = function() { target.focus(); };
|
586 |
+
p.box.onmousedown = function() { abortBlur=true; };
|
587 |
+
p.box.onmousemove = function(e) { holdPad && setPad(e); holdSld && setSld(e); };
|
588 |
+
p.padM.onmouseup =
|
589 |
+
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
|
590 |
+
p.padM.onmousedown = function(e) { holdPad=true; setPad(e); };
|
591 |
+
p.sldM.onmouseup =
|
592 |
+
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
|
593 |
+
p.sldM.onmousedown = function(e) { holdSld=true; setSld(e); };
|
594 |
+
|
595 |
+
// picker
|
596 |
+
p.box.style.width = 4*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[0] + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] + 'px';
|
597 |
+
p.box.style.height = 2*THIS.pickerInset + 2*THIS.pickerFace + jscolor.images.pad[1] + 'px';
|
598 |
+
|
599 |
+
// picker border
|
600 |
+
p.boxB.style.position = 'absolute';
|
601 |
+
p.boxB.style.clear = 'both';
|
602 |
+
p.boxB.style.left = x+'px';
|
603 |
+
p.boxB.style.top = y+'px';
|
604 |
+
p.boxB.style.zIndex = THIS.pickerZIndex;
|
605 |
+
p.boxB.style.border = THIS.pickerBorder+'px solid';
|
606 |
+
p.boxB.style.borderColor = THIS.pickerBorderColor;
|
607 |
+
p.boxB.style.background = THIS.pickerFaceColor;
|
608 |
+
|
609 |
+
// pad image
|
610 |
+
p.pad.style.width = jscolor.images.pad[0]+'px';
|
611 |
+
p.pad.style.height = jscolor.images.pad[1]+'px';
|
612 |
+
|
613 |
+
// pad border
|
614 |
+
p.padB.style.position = 'absolute';
|
615 |
+
p.padB.style.left = THIS.pickerFace+'px';
|
616 |
+
p.padB.style.top = THIS.pickerFace+'px';
|
617 |
+
p.padB.style.border = THIS.pickerInset+'px solid';
|
618 |
+
p.padB.style.borderColor = THIS.pickerInsetColor;
|
619 |
+
|
620 |
+
// pad mouse area
|
621 |
+
p.padM.style.position = 'absolute';
|
622 |
+
p.padM.style.left = '0';
|
623 |
+
p.padM.style.top = '0';
|
624 |
+
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
|
625 |
+
p.padM.style.height = p.box.style.height;
|
626 |
+
p.padM.style.cursor = 'crosshair';
|
627 |
+
|
628 |
+
// slider image
|
629 |
+
p.sld.style.overflow = 'hidden';
|
630 |
+
p.sld.style.width = jscolor.images.sld[0]+'px';
|
631 |
+
p.sld.style.height = jscolor.images.sld[1]+'px';
|
632 |
+
|
633 |
+
// slider border
|
634 |
+
p.sldB.style.position = 'absolute';
|
635 |
+
p.sldB.style.right = THIS.pickerFace+'px';
|
636 |
+
p.sldB.style.top = THIS.pickerFace+'px';
|
637 |
+
p.sldB.style.border = THIS.pickerInset+'px solid';
|
638 |
+
p.sldB.style.borderColor = THIS.pickerInsetColor;
|
639 |
+
|
640 |
+
// slider mouse area
|
641 |
+
p.sldM.style.position = 'absolute';
|
642 |
+
p.sldM.style.right = '0';
|
643 |
+
p.sldM.style.top = '0';
|
644 |
+
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
|
645 |
+
p.sldM.style.height = p.box.style.height;
|
646 |
+
try {
|
647 |
+
p.sldM.style.cursor = 'pointer';
|
648 |
+
} catch(eOldIE) {
|
649 |
+
p.sldM.style.cursor = 'hand';
|
650 |
+
}
|
651 |
+
|
652 |
+
// load images in optimal order
|
653 |
+
switch(modeID) {
|
654 |
+
case 0: var padImg = 'hs.png'; break;
|
655 |
+
case 1: var padImg = 'hv.png'; break;
|
656 |
+
}
|
657 |
+
p.padM.style.background = "url('"+jscolor.getDir()+"cross.gif') no-repeat";
|
658 |
+
p.sldM.style.background = "url('"+jscolor.getDir()+"arrow.gif') no-repeat";
|
659 |
+
p.pad.style.background = "url('"+jscolor.getDir()+padImg+"') 0 0 no-repeat";
|
660 |
+
|
661 |
+
// place pointers
|
662 |
+
redrawPad();
|
663 |
+
redrawSld();
|
664 |
+
|
665 |
+
jscolor.picker.owner = THIS;
|
666 |
+
document.getElementsByTagName('body')[0].appendChild(p.boxB);
|
667 |
+
}
|
668 |
+
|
669 |
+
|
670 |
+
function redrawPad() {
|
671 |
+
// redraw the pad pointer
|
672 |
+
switch(modeID) {
|
673 |
+
case 0: var yComponent = 1; break;
|
674 |
+
case 1: var yComponent = 2; break;
|
675 |
+
}
|
676 |
+
var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
|
677 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
|
678 |
+
jscolor.picker.padM.style.backgroundPosition =
|
679 |
+
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
|
680 |
+
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
|
681 |
+
|
682 |
+
// redraw the slider image
|
683 |
+
var seg = jscolor.picker.sld.childNodes;
|
684 |
+
|
685 |
+
switch(modeID) {
|
686 |
+
case 0:
|
687 |
+
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
|
688 |
+
for(var i=0; i<seg.length; i+=1) {
|
689 |
+
seg[i].style.backgroundColor = 'rgb('+
|
690 |
+
(rgb[0]*(1-i/seg.length)*100)+'%,'+
|
691 |
+
(rgb[1]*(1-i/seg.length)*100)+'%,'+
|
692 |
+
(rgb[2]*(1-i/seg.length)*100)+'%)';
|
693 |
+
}
|
694 |
+
break;
|
695 |
+
case 1:
|
696 |
+
var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
|
697 |
+
var i = Math.floor(THIS.hsv[0]);
|
698 |
+
var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
|
699 |
+
switch(i) {
|
700 |
+
case 6:
|
701 |
+
case 0: rgb=[0,1,2]; break;
|
702 |
+
case 1: rgb=[1,0,2]; break;
|
703 |
+
case 2: rgb=[2,0,1]; break;
|
704 |
+
case 3: rgb=[2,1,0]; break;
|
705 |
+
case 4: rgb=[1,2,0]; break;
|
706 |
+
case 5: rgb=[0,2,1]; break;
|
707 |
+
}
|
708 |
+
for(var i=0; i<seg.length; i+=1) {
|
709 |
+
s = 1 - 1/(seg.length-1)*i;
|
710 |
+
c[1] = c[0] * (1 - s*f);
|
711 |
+
c[2] = c[0] * (1 - s);
|
712 |
+
seg[i].style.backgroundColor = 'rgb('+
|
713 |
+
(c[rgb[0]]*100)+'%,'+
|
714 |
+
(c[rgb[1]]*100)+'%,'+
|
715 |
+
(c[rgb[2]]*100)+'%)';
|
716 |
+
}
|
717 |
+
break;
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
|
722 |
+
function redrawSld() {
|
723 |
+
// redraw the slider pointer
|
724 |
+
switch(modeID) {
|
725 |
+
case 0: var yComponent = 2; break;
|
726 |
+
case 1: var yComponent = 1; break;
|
727 |
+
}
|
728 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
|
729 |
+
jscolor.picker.sldM.style.backgroundPosition =
|
730 |
+
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
|
731 |
+
}
|
732 |
+
|
733 |
+
|
734 |
+
function isPickerOwner() {
|
735 |
+
return jscolor.picker && jscolor.picker.owner === THIS;
|
736 |
+
}
|
737 |
+
|
738 |
+
|
739 |
+
function blurTarget() {
|
740 |
+
if(valueElement === target) {
|
741 |
+
THIS.importColor();
|
742 |
+
}
|
743 |
+
if(THIS.pickerOnfocus) {
|
744 |
+
THIS.hidePicker();
|
745 |
+
}
|
746 |
+
}
|
747 |
+
|
748 |
+
|
749 |
+
function blurValue() {
|
750 |
+
if(valueElement !== target) {
|
751 |
+
THIS.importColor();
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
|
756 |
+
function setPad(e) {
|
757 |
+
var posM = jscolor.getMousePos(e);
|
758 |
+
var x = posM[0]-posPad[0];
|
759 |
+
var y = posM[1]-posPad[1];
|
760 |
+
switch(modeID) {
|
761 |
+
case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
|
762 |
+
case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
|
763 |
+
}
|
764 |
+
}
|
765 |
+
|
766 |
+
|
767 |
+
function setSld(e) {
|
768 |
+
var posM = jscolor.getMousePos(e);
|
769 |
+
var y = posM[1]-posPad[1];
|
770 |
+
switch(modeID) {
|
771 |
+
case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
|
772 |
+
case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
|
773 |
+
}
|
774 |
+
}
|
775 |
+
|
776 |
+
|
777 |
+
var THIS = this;
|
778 |
+
var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
|
779 |
+
var abortBlur = false;
|
780 |
+
var
|
781 |
+
valueElement = jscolor.fetchElement(this.valueElement),
|
782 |
+
styleElement = jscolor.fetchElement(this.styleElement);
|
783 |
+
var
|
784 |
+
holdPad = false,
|
785 |
+
holdSld = false;
|
786 |
+
var
|
787 |
+
posPad,
|
788 |
+
posSld;
|
789 |
+
var
|
790 |
+
leaveValue = 1<<0,
|
791 |
+
leaveStyle = 1<<1,
|
792 |
+
leavePad = 1<<2,
|
793 |
+
leaveSld = 1<<3;
|
794 |
+
|
795 |
+
// target
|
796 |
+
jscolor.addEvent(target, 'focus', function() {
|
797 |
+
if(THIS.pickerOnfocus) { THIS.showPicker(); }
|
798 |
+
});
|
799 |
+
jscolor.addEvent(target, 'blur', function() {
|
800 |
+
if(!abortBlur) {
|
801 |
+
window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
|
802 |
+
} else {
|
803 |
+
abortBlur = false;
|
804 |
+
}
|
805 |
+
});
|
806 |
+
|
807 |
+
// valueElement
|
808 |
+
if(valueElement) {
|
809 |
+
var updateField = function() {
|
810 |
+
THIS.fromString(valueElement.value, leaveValue);
|
811 |
+
};
|
812 |
+
jscolor.addEvent(valueElement, 'keyup', updateField);
|
813 |
+
jscolor.addEvent(valueElement, 'input', updateField);
|
814 |
+
jscolor.addEvent(valueElement, 'blur', blurValue);
|
815 |
+
valueElement.setAttribute('autocomplete', 'off');
|
816 |
+
}
|
817 |
+
|
818 |
+
// styleElement
|
819 |
+
if(styleElement) {
|
820 |
+
styleElement.jscStyle = {
|
821 |
+
backgroundColor : styleElement.style.backgroundColor,
|
822 |
+
color : styleElement.style.color
|
823 |
+
};
|
824 |
+
}
|
825 |
+
|
826 |
+
// require images
|
827 |
+
switch(modeID) {
|
828 |
+
case 0: jscolor.requireImage('hs.png'); break;
|
829 |
+
case 1: jscolor.requireImage('hv.png'); break;
|
830 |
+
}
|
831 |
+
jscolor.requireImage('cross.gif');
|
832 |
+
jscolor.requireImage('arrow.gif');
|
833 |
+
|
834 |
+
this.importColor();
|
835 |
+
}
|
836 |
+
|
837 |
+
};
|
838 |
+
|
839 |
+
|
840 |
+
jscolor.install();
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Wizard_AdminLogin</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Admin login extension provides options to an admin user to change view of admin login page.</summary>
|
10 |
+
<description>Admin Login extension provides lot of customization options through which anyone can easily transform the general Magento login page into a customized attractive login page with desired text and colors.</description>
|
11 |
+
<notes>New Extension</notes>
|
12 |
+
<authors><author><name>Sujeet Kr Singh</name><user>sujeet</user><email>sujeet.kumar.000@gmail.com</email></author></authors>
|
13 |
+
<date>2015-05-23</date>
|
14 |
+
<time>10:37:28</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Wizard"><dir name="AdminLogin"><dir name="Helper"><file name="Data.php" hash="29eb1c98df04971da2274d6418413331"/></dir><dir name="etc"><file name="config.xml" hash="a95d94cd9577c129eafeac6259315c82"/><file name="system.xml" hash="a8b04daca4b2009f77a13e59bbc741d6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wizard_AdminLogin.xml" hash="24ef4269ab23cc96b5eed0a3d595bc7a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="adminlogin.xml" hash="96a13f67082985a2ec6fd8fae9ad74ca"/></dir><dir name="template"><file name="wizard_login.phtml" hash="e4c092ca81b131355e213ab7a1fb7740"/><file name="wizard_forgotpassword.phtml" hash="7635fa1e51a5ee63c27fe76579707636"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="wizard"><file name="favicon.ico" hash="88733ee53676a47fc354a61c32516e82"/><file name="logo.gif" hash="5c77654c424b0a35cc24d28df5166dc4"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="wizard"><dir name="jscolor"><file name="arrow.gif" hash="5034704a76cd55c1cbcbc58ea6bf523f"/><file name="cross.gif" hash="ba9a274b9323753cd95bc3b1eb2f4e5f"/><file name="demo.html" hash="edf71251cb2be20322d2efb00aee86a6"/><file name="hs.png" hash="fefa1a03d92ebad25c88dca94a0b63db"/><file name="hv.png" hash="990d71cada17da100653636cf8490884"/><file name="jscolor.js" hash="b65a1505390592ac6c0177d6b84774e0"/></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/adminhtml/default/default/images/wizard/favicon.ico
ADDED
Binary file
|
skin/adminhtml/default/default/images/wizard/logo.gif
ADDED
Binary file
|