Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICNML
web app
Commits
694ea5a4
Commit
694ea5a4
authored
5 years ago
by
Marco De Donno
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring the general pattern generation
parent
8f77b0dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/submission/segment.html
+20
-25
20 additions, 25 deletions
templates/submission/segment.html
with
20 additions
and
25 deletions
templates/submission/segment.html
+
20
−
25
View file @
694ea5a4
...
...
@@ -109,10 +109,10 @@
<div>
General pattern
</div>
<div
id=
"general_pattern"
>
{% macro gp_div( gp_name ) %}
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_{{ gp_
name
}}"
>
{% macro gp_div(
gp_id,
gp_name ) %}
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_{{ gp_
id
}}"
>
<span
class=
"ui-button-text"
>
{{ gp_name|title }}
</span>
<div
class=
"gp_checked"
id=
"gp_{{ gp_
name
}}_checked"
>
<div
class=
"gp_checked"
id=
"gp_{{ gp_
id
}}_checked"
>
<svg
width=
"20px"
height=
"20px"
viewBox=
"0 0 54 54"
version=
"1.1"
>
<g
id=
""
fill-rule=
"evenodd"
>
<path
...
...
@@ -126,10 +126,10 @@
</div>
{% endmacro %}
{{ gp_div( 'loop' ) }}
{{ gp_div( 'whorl' ) }}
{{ gp_div( 'arch' ) }}
{{ gp_div( 'unknown' ) }}
{{ gp_div(
'loop',
'loop' ) }}
{{ gp_div(
'whorl',
'whorl' ) }}
{{ gp_div(
'arch',
'arch' ) }}
{{ gp_div(
'unknown',
'unknown' ) }}
</div>
{% endif %}
...
...
@@ -151,24 +151,19 @@
/*
* General pattern buttons
*/
$
(
'
#general_pattern_loop
'
).
on
(
'
click
'
,
function
()
{
update_general_pattern_db
(
'
loop
'
);
}
);
$
(
'
#general_pattern_whorl
'
).
on
(
'
click
'
,
function
()
{
update_general_pattern_db
(
'
whorl
'
);
}
);
$
(
'
#general_pattern_arch
'
).
on
(
'
click
'
,
function
()
{
update_general_pattern_db
(
'
arch
'
);
}
);
$
(
'
#general_pattern_arch
'
).
on
(
'
click
'
,
function
()
{
update_general_pattern_db
(
'
arch
'
);
}
);
{
%
macro
gp_action
(
id
)
%
}
$
(
'
#general_pattern_{{ id }}
'
).
on
(
'
click
'
,
function
()
{
update_general_pattern_db
(
'
{{ id }}
'
);
}
);
{
%
endmacro
%
}
{{
gp_action
(
'
loop
'
)
}}
{{
gp_action
(
'
whorl
'
)
}}
{{
gp_action
(
'
arch
'
)
}}
{{
gp_action
(
'
unknown
'
)
}}
//
$
(
"
#gp_{{ current_gp }}_checked
"
).
css
(
"
visibility
"
,
"
visible
"
);
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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