Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
3225faa4
Commit
3225faa4
authored
Sep 18, 2014
by
Julien Furrer
Browse files
Using of compiled js can be defined in settings
parent
45e762cb
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
adim_app/static/_src/Gruntfile.js
View file @
3225faa4
...
...
@@ -51,8 +51,16 @@ module.exports = function(grunt) {
name
:
"
../js/su_app
"
,
out
:
"
../js/su_app
"
+
jsOptimizedSuffix
+
"
.js
"
}
},
main_newao
:
{
options
:
{
name
:
"
../js/newao_app
"
,
out
:
"
../js/newao_app
"
+
jsOptimizedSuffix
+
"
.js
"
}
}
},
// ===== Copy Files =====
...
...
@@ -184,6 +192,6 @@ module.exports = function(grunt) {
grunt
.
registerTask
(
'
libs
'
,
[
'
copy:libs
'
,
'
less:libs
'
,
'
concat:libs
'
]);
// Build main app
grunt
.
registerTask
(
'
build
su_
app
'
,
[
'
uglify:adim
'
,
'
requirejs:main_su
'
]);
grunt
.
registerTask
(
'
build app
'
,
[
'
uglify:adim
'
,
'
requirejs:main_su
'
,
'
requirejs:main_newao
'
]);
};
\ No newline at end of file
adim_app/static/js/newao_app.min.js
0 → 100644
View file @
3225faa4
This diff is collapsed.
Click to expand it.
adim_app/static/js/su_app.min.js
View file @
3225faa4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
adim_app/templates/adim_app/annotation.html
View file @
3225faa4
...
...
@@ -37,7 +37,6 @@
{% block inline_script %}
{{ block.super }}
<script>
window
.
ADIM_CONFIG
=
{
mode
:
"
edit
"
,
...
...
@@ -79,7 +78,7 @@ window.ADIM_CONFIG = {
{% block content_js %}
{{ block.super }}
<script
src=
"{% static "
js
/
libs
/
require.min.js
"
%}"
data-main=
"{% static "
js
/
su_app
"
%}"
></script>
<script
src=
"{% static "
js
/
libs
/
require.min.js
"
%}"
data-main=
"{% static "
js
/
su_app
"
%}
{{
JS_MIN
}}
"
></script>
{% endblock %}
...
...
adim_app/templates/adim_app/annotation_new.html
View file @
3225faa4
...
...
@@ -34,20 +34,30 @@ window.ADIM_CONFIG = {
{% block content_js %}
{{ block.super }}
<script
src=
"{% static "
js
/
libs
/
require.min.js
"
%}"
data-main=
"{% static "
js
/
newao_app
"
%}"
></script>
<script
src=
"{% static "
js
/
libs
/
require.min.js
"
%}"
data-main=
"{% static "
js
/
newao_app
"
%}
{{
JS_MIN
}}
"
></script>
{% endblock %}
{% block canvas_content %}
<div
class=
"dropzone"
>
<div
class=
"dropzone-inner-wrapper"
>
<div
class=
"dropzone-inner adim-fu-status"
>
Pour ajouter une image, glisser un fichier ici
<br/>
ou cliquez sur
<span
class=
"btn btn-success navbar-btn fileinput-button"
>
<span
class=
"glyphicon glyphicon-plus"
></span>
<span>
Nouvelle image
</span>
<input
id=
"fileupload"
type=
"file"
name=
"image_file"
data-url=
"{% url "
adim.app:upload_file
"
%}"
accept=
"image/png,image/jpg"
>
</span>
<p>
Pour
<strong>
ajouter une image
</strong>
, glissez un fichier ici ou cliquez
sur
<span
class=
"btn btn-success btn-sm navbar-btn fileinput-button"
>
<span
class=
"glyphicon glyphicon-plus"
></span>
<span>
Nouvelle image
</span>
<input
id=
"fileupload"
type=
"file"
name=
"image_file"
data-url=
"{% url "
adim.app:upload_file
"
%}"
accept=
"image/png,image/jpg"
>
</span>
</p>
<p>
Pour
<strong>
choisir une image
</strong>
de votre collection, cliquez
sur
<button
type=
"button"
class=
"btn btn-sm btn-default navbar-btn"
onclick=
"$('#aom-show-but').click()"
>
<span
class=
"glyphicon glyphicon-th"
></span>
Mes images
</button>
</p>
<div
class=
"progress-wrapper hide"
>
<div
class=
"progress"
>
...
...
adim_project/context_processors.py
View file @
3225faa4
...
...
@@ -8,7 +8,8 @@ def default(request):
context_extras
=
{}
context_extras
.
update
({
'UPLOAD_MAX_FILESIZE'
:
settings
.
ADIM_UPLOAD_MAX_FILESIZE
'UPLOAD_MAX_FILESIZE'
:
settings
.
ADIM_UPLOAD_MAX_FILESIZE
,
'JS_MIN'
:
''
if
settings
.
ADIM_DEBUG_JS
else
'.min'
})
# try:
...
...
adim_project/settings/components/adim.py
View file @
3225faa4
# Max filesize in Mb
ADIM_UPLOAD_MAX_FILESIZE
=
50
ADIM_DEBUG_JS
=
False
Write
Preview
Supports
Markdown
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