Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
whats-open
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open
Commits
9a99479b
Commit
9a99479b
authored
Mar 07, 2018
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use django's built-in js library, and abstracted static information out to new template
parent
6e3fcd8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
49 deletions
+63
-49
whats-open/api/templates/base_bulk_schedules_intermediate.html
...-open/api/templates/base_bulk_schedules_intermediate.html
+59
-0
whats-open/api/templates/bulk_schedules_intermediate.html
whats-open/api/templates/bulk_schedules_intermediate.html
+2
-31
whats-open/api/templates/bulk_special_schedules_intermediate.html
...en/api/templates/bulk_special_schedules_intermediate.html
+2
-18
No files found.
whats-open/api/templates/base_bulk_schedules_intermediate.html
0 → 100644
View file @
9a99479b
{% extends "admin/base_site.html" %}
{% load static %}
{% block extrahead %}
<link
href=
"{% static "
admin
/
css
/
vendor
/
select2
/
select2.min.css
"
%}"
type=
"text/css"
media=
"screen"
rel=
"stylesheet"
/>
<link
href=
"{% static "
admin
/
css
/
autocomplete.css
"
%}"
type=
"text/css"
media=
"screen"
rel=
"stylesheet"
/>
<script
type=
"text/javascript"
src=
"{% static "
admin
/
js
/
vendor
/
jquery
/
jquery.min.js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
admin
/
js
/
vendor
/
select2
/
select2.full.min.js
"
%}"
></script>
<!-- Django changes jQuery to django.jQuery in case the version bundled with Django is not the version
you want to use in your app -->
<script
type=
"text/javascript"
src=
"{% static "
admin
/
js
/
jquery.init.js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
admin
/
js
/
cancel.js
"
%}"
></script>
<script>
/**
Django's admin inferface uses select2 for its new autocompletion selects
Unfortunately, use of that specific widget and the associated support attributes
are limited to admin.ModelAdmin change views
You need instead to use it manually
See
https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields
https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#reversing-admin-urls
https://select2.org/getting-started/basic-usage
for more information
**/
(
function
(
$
)
{
$
(
document
).
ready
(
function
()
{
$
(
'
.select2-basic-single
'
).
select2
();
});
})(
django
.
jQuery
);
</script>
{{ block.super }}
{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link
href=
"{% static "
admin
/
css
/
forms.css
"
%}"
type=
"text/css"
rel=
"stylesheet"
/>
<style
type=
"text/css"
>
a
.button.cancel-link
{
display
:
inline-block
;
vertical-align
:
middle
;
height
:
15px
;
line-height
:
15px
;
background
:
#ddd
;
border-radius
:
4px
;
padding
:
10px
15px
;
color
:
#333
;
margin
:
0
0
0
10px
;
}
a
.button.cancel-link
:active
,
a
.button.cancel-link
:focus
,
a
.button.cancel-link
:hover
{
background
:
#ccc
;
}
</style>
{% endblock %}
whats-open/api/templates/bulk_schedules_intermediate.html
View file @
9a99479b
{% extends "admin/base_site.html" %}
{% extends "base_bulk_schedules_intermediate.html" %}
{% block extrahead %}
{{ block.super }}
<!-- neither jQuery proper nor Django's version is loaded by default on this page -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"
></script>
{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css"
rel=
"stylesheet"
/>
{% endblock %}
{% block title %}
{% block title %}
Set main schedule for multiple facilities
Set main schedule for multiple facilities
...
@@ -47,24 +35,7 @@ Set main schedule for multiple facilities
...
@@ -47,24 +35,7 @@ Set main schedule for multiple facilities
</ul>
</ul>
<input
type=
"hidden"
name=
"action"
value=
"assign_bulk_schedules"
/>
<input
type=
"hidden"
name=
"action"
value=
"assign_bulk_schedules"
/>
<input
type=
"submit"
name=
"bulk_schedule"
value=
"Yes, I'm sure"
/>
<input
type=
"submit"
name=
"bulk_schedule"
value=
"Yes, I'm sure"
/>
<a
href=
"#"
class=
"button cancel-link"
>
No, take me back
</a>
</form>
</form>
<script>
/**
Django's admin inferface uses this library for its new autocompletion selects
Unfortunately, use of that specific widget and the associated support attributes
are limited to admin.ModelAdmin change views
See
https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields
https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#reversing-admin-urls
for more information
**/
$
(
document
).
ready
(
function
()
{
$
(
'
.select2-basic-single
'
).
select2
({
});
});
</script>
{% endblock %}
{% endblock %}
whats-open/api/templates/bulk_special_schedules_intermediate.html
View file @
9a99479b
{% extends "admin/base_site.html" %}
{% extends "base_bulk_schedules_intermediate.html" %}
{% block extrahead %}
{{ block.super }}
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"
></script>
{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css"
rel=
"stylesheet"
/>
{% endblock %}
{% block title %}
{% block title %}
Add special schedule to multiple facilities
Add special schedule to multiple facilities
...
@@ -46,12 +35,7 @@ Add special schedule to multiple facilities
...
@@ -46,12 +35,7 @@ Add special schedule to multiple facilities
</ul>
</ul>
<input
type=
"hidden"
name=
"action"
value=
"assign_bulk_special_schedules"
/>
<input
type=
"hidden"
name=
"action"
value=
"assign_bulk_special_schedules"
/>
<input
type=
"submit"
name=
"bulk_special_schedule"
value=
"Yes, I'm sure"
/>
<input
type=
"submit"
name=
"bulk_special_schedule"
value=
"Yes, I'm sure"
/>
<a
href=
"#"
class=
"button cancel-link"
>
No, take me back
</a>
</form>
</form>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
.select2-basic-single
'
).
select2
({
});
});
</script>
{% endblock %}
{% endblock %}
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