Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b22a3c02
Commit
b22a3c02
authored
Nov 16, 2008
by
Dries
Browse files
- Added missing file from
#302054
parent
dc65b62a
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/node/content_types.js
0 → 100644
View file @
b22a3c02
Drupal
.
behaviors
.
contentTypes
=
{
attach
:
function
()
{
if
(
$
(
'
#edit-type
'
).
val
()
==
$
(
'
#edit-name
'
).
val
().
toLowerCase
().
replace
(
/
[^
a-z0-9
]
+/g
,
'
_
'
).
replace
(
/_+/g
,
'
_
'
)
||
$
(
'
#edit-type
'
).
val
()
==
''
)
{
$
(
'
#edit-type-wrapper
'
).
hide
();
$
(
'
#edit-name
'
).
keyup
(
function
()
{
var
machine
=
$
(
this
).
val
().
toLowerCase
().
replace
(
/
[^
a-z0-9
]
+/g
,
'
_
'
).
replace
(
/_+/g
,
'
_
'
);
if
(
machine
!=
'
_
'
&&
machine
!=
''
)
{
$
(
'
#edit-type
'
).
val
(
machine
);
$
(
'
#node-type-name-suffix
'
).
empty
().
append
(
'
Machine name:
'
+
machine
+
'
[
'
).
append
(
$
(
'
<a href="#">
'
+
Drupal
.
t
(
'
Edit
'
)
+
'
</a>
'
).
click
(
function
()
{
$
(
'
#edit-type-wrapper
'
).
show
();
$
(
'
#node-type-name-suffix
'
).
hide
();
$
(
'
#edit-name
'
).
unbind
(
'
keyup
'
);
return
false
;
})).
append
(
'
]
'
);
}
else
{
$
(
'
#edit-type
'
).
val
(
machine
);
$
(
'
#node-type-name-suffix
'
).
text
(
''
);
}
});
$
(
'
#edit-name
'
).
keyup
();
}
}
};
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