Skip to content

Commit 4609532

Browse files
author
Evgeniy Negometyanov
committed
CMS-735: Implement FE part of sidebar image settings
1 parent 7dd0647 commit 4609532

File tree

14 files changed

+237
-8
lines changed

14 files changed

+237
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
- DJANGO="https://github.com/django/django/archive/master.zip" EASY_THUMBNAILS="easy-thumbnails>2.0"
3030

3131
script:
32-
- if [[ $TRAVIS_PYTHON_VERSION = "2.6" && $FRONTEND = "true" ]]; then gulp lint; else coverage run --rcfile=coverage.rc test_settings.py; fi;
32+
- if [[ $TRAVIS_PYTHON_VERSION = "2.6" && $FRONTEND = "true" ]]; then gulp ci; else coverage run --rcfile=coverage.rc test_settings.py; fi;
3333

3434
after_success:
3535
- coveralls --config_file=coverage.rc

filer/static/filer/css/admin_filer.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filer/static/filer/css/maps/admin_filer.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filer/static/filer/js/libs/jquery.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filer/templates/admin/filer/base_site.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{# upload stuff #}
1414
{{ media.js }}
1515
<script src="{% static 'filer/js/libs/class.min.js' %}"></script>
16-
<script src="{% static 'admin/js/jquery.min.js' %}"></script>
16+
<script src="{% static 'filer/js/libs/jquery.min.js' %}"></script>
1717
<script src="{% static 'filer/js/libs/jquery-ui.min.js' %}"></script>
1818
<script src="{% static 'filer/js/addons/jquery.cookie.min.js' %}"></script>
1919
<script src="{% static 'filer/js/addons/fileuploader.min.js' %}"></script>
@@ -22,6 +22,6 @@
2222
<script src="{% static 'filer/js/addons/popup_handling.js' %}"></script>
2323

2424
<script src="{% static 'filer/js/addons/mediator.min.js' %}"></script>
25-
<script src="{% static 'filer/js/addons/focal_point.js' %}"></script>
25+
<script src="{% static 'filer/js/addons/focal-point.js' %}"></script>
2626
<script src="{% static 'filer/js/base.js' %}"></script>
2727
{% endblock %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="js-focal-point" id="container">
2+
<img src="image.url" data-ratio="4.638095" width="210" height="266" class="js-focal-point-image" id="image">
3+
<div class="js-focal-point-circle hidden" id="circle"></div>
4+
<input type="hidden" class="js-focal-point-location" id="location">
5+
</div>

filer/tests/frontend/karma.conf.js

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
'use strict';
2+
3+
// #############################################################################
4+
// CONFIGURATION
5+
6+
// rake spec:javascript loads specs relative to the tmp/jasmine/runner.html, need to override:
7+
module.exports = function (config) {
8+
var browsers = {
9+
'PhantomJS': 'used for local testing'
10+
};
11+
12+
var settings = {
13+
// base path that will be used to resolve all patterns (eg. files, exclude)
14+
basePath: '..',
15+
16+
// frameworks to use
17+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
18+
frameworks: ['jasmine', 'fixture'],
19+
20+
// list of files / patterns to load in the browser
21+
// tests/${path}
22+
files: [
23+
// the current order meets the dependency requirements
24+
// dependency loading is not handled yet
25+
'../static/filer/js/libs/jquery.min.js',
26+
'../static/filer/js/libs/!(jquery.min)*.js',
27+
'../static/filer/js/addons/mediator.min.js',
28+
29+
'frontend/unit/mocks.js',
30+
'frontend/unit/mock-ajax.js',
31+
32+
'../static/filer/js/addons/!(mediator.min)*.js',
33+
34+
// tests themselves
35+
'frontend/unit/*.js',
36+
37+
// fixture patterns
38+
{
39+
pattern: 'frontend/fixtures/**/*'
40+
}
41+
],
42+
43+
// list of files to exclude
44+
exclude: [],
45+
46+
// preprocess matching files before serving them to the browser
47+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
48+
preprocessors: {
49+
// for fixtures
50+
'**/*.html': ['html2js'],
51+
'**/*.json': ['json_fixtures']
52+
},
53+
54+
// fixtures dependency
55+
// https://github.com/billtrik/karma-fixture
56+
jsonFixturesPreprocessor: {
57+
variableName: '__json__'
58+
},
59+
60+
// web server port
61+
port: 9876,
62+
63+
// enable / disable colors in the output (reporters and logs)
64+
colors: true,
65+
66+
// level of logging
67+
// possible values:
68+
// config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
69+
logLevel: config.LOG_INFO,
70+
71+
// enable / disable watching file and executing tests whenever any file changes
72+
autoWatch: true,
73+
74+
// start these browsers
75+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
76+
browsers: Object.keys(browsers),
77+
78+
// Continuous Integration mode
79+
// if true, Karma captures browsers, runs the tests and exits
80+
singleRun: false
81+
};
82+
83+
config.set(settings);
84+
};

filer/tests/frontend/unit/jasmine-jquery.min.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)