Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
e7f6c49d
Commit
e7f6c49d
authored
Apr 29, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: fixed wrong icon setting on input buttons
parent
c2fb1dd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
js/erp5_loader.js
js/erp5_loader.js
+9
-7
No files found.
js/erp5_loader.js
View file @
e7f6c49d
...
...
@@ -350,7 +350,7 @@
case
"
submit
"
:
case
"
reset
"
:
if
(
icon
)
{
icon_string
=
factory
.
util
.
classes
(
spec
,
icon
);
icon_string
=
factory
.
util
.
classes
(
spec
,
icon
,
true
);
}
container_class_list
+=
"
ui-btn ui-input-btn
"
+
icon_string
;
need_text_node
=
true
;
...
...
@@ -2683,19 +2683,21 @@
* util.classes
* @param {object} element Configuration
* @param {string} default_icon Icon to pass as default
* @param {string} pass Allow to pass through manually (input-wrapper eg)
* @return {string} finished class string
**/
factory
.
util
.
classes
=
function
(
element
,
default_icon
)
{
factory
.
util
.
classes
=
function
(
element
,
default_icon
,
pass
)
{
var
def
,
string
,
iconpos
,
icon
;
string
=
""
;
// NOTE: we only set on <a>
// TODO: find a better way than to run everything through here...!
if
(
element
.
type
===
"
a
"
||
(
element
.
attributes
&&
element
.
attributes
.
type
===
"
submit
"
))
{
// NOTE: we only set on <a> NOT on INPUTs, because they are wrappped!
if
(
element
.
type
===
"
a
"
||
pass
)
{
icon
=
(
element
.
attributes
||
{})[
"
data-icon
"
]
||
default_icon
;
// because of custom a in service_instance_status!
// because of custom a in service_instance_status
// NOTE: input buttons may need icons, but not ui-btn ui-shadow
// TODO: this has nothing to do here!!!
if
(
!
(
element
.
logic
||
{}).
plain_link
)
{
string
+=
"
ui-btn ui-shadow
"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment