Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBI-Framework
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ebiwd
EBI-Framework
Commits
183670fc
Commit
183670fc
authored
8 years ago
by
Ken Hawkins
Browse files
Options
Downloads
Patches
Plain Diff
Adds search migration
parent
d77de0ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/testMigration.js
+47
-0
47 additions, 0 deletions
js/testMigration.js
with
47 additions
and
0 deletions
js/testMigration.js
+
47
−
0
View file @
183670fc
...
...
@@ -281,6 +281,53 @@ function testMigration(steppingTimeSpeed) {
console
.
log
(
'
------------------
\n
'
);
},
steppingTime
());
setTimeout
(
function
(){
$
.
fn
.
changeElementType
=
function
(
newType
)
{
var
attrs
=
{};
$
.
each
(
this
[
0
].
attributes
,
function
(
idx
,
attr
)
{
attrs
[
attr
.
nodeName
]
=
attr
.
nodeValue
;
});
var
newelement
=
$
(
"
<
"
+
newType
+
"
/>
"
,
attrs
).
append
(
$
(
this
).
contents
());
this
.
replaceWith
(
newelement
);
return
newelement
;
};
console
.
log
(
'
Local-search: The local-search in the local-masthead has an updated structure. I
\'
ve rearanged as follows:
'
);
$
(
'
#local-search div.left
'
).
removeClass
().
addClass
(
'
input-group
'
);
console
.
log
(
'
- div.left is now div.input-group
'
);
$
(
'
#local-search div.input-group
'
).
append
(
'
<div class="input-group-button" />
'
);
console
.
log
(
'
- div.input-group now contains a div.input-group-button
'
);
$
(
'
#local-search input.submit.button
'
).
detach
().
appendTo
(
'
#local-search div.input-group-button
'
);
console
.
log
(
'
- input.submit.button is now inside div.input-group-button
'
);
$
(
'
#local-search input.submit.button
'
).
addClass
(
'
secondary
'
);
console
.
log
(
'
- input.submit.button colouring updated with .secondary. This is fully optional depending on your themeing.
'
);
if
(
$
(
'
#local-search span.examples
'
).
length
>
0
)
{
$
(
'
#local-search span.examples
'
).
changeElementType
(
'
p
'
);
console
.
log
(
'
- The span.examples is now a p element
'
);
}
$
(
'
#local-search p.examples
'
).
detach
().
insertAfter
(
'
#local-search input#local-searchbox
'
);
console
.
log
(
'
- p.examples is now grouped with the searchbox
'
);
// $('#local-search p.examples').addClass('small');
// console.log(' - added .small to p.examples ');
$
(
'
#local-search div.right
'
).
detach
().
appendTo
(
'
#local-search div.input-group-button
'
);
console
.
log
(
'
- div.right is now inside div.input-group-button
'
);
$
(
'
#local-search div.right
'
).
removeClass
().
addClass
(
'
small
'
);
console
.
log
(
'
- div.right is now div.small
'
);
console
.
log
(
'
------------------
\n
'
);
},
steppingTime
());
setTimeout
(
function
(){
// The Foundation theme JavaScript
jQuery
(
'
head
'
).
append
(
'
<script src="https://ebiwd.github.io/EBI-Framework/libraries/foundation-6/js/foundation.js"></script>
\n
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment