Skip to content

Commit

Permalink
Change src/sass/jquery-ui.js to a scss file
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj authored and sbrunner committed Aug 22, 2019
1 parent adfaf5f commit 23954b2
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 37 deletions.
37 changes: 21 additions & 16 deletions buildtools/webpack.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function * mergeSources(opts, entry, resolve, level) {
}
const absoluteFile = path.normalize(path.resolve(entryDir, file));
// fix for windows path
let relativeFile = path.relative(opts.baseEntryDir, absoluteFile).replace(/\\/g, '/');
let relativeFile = path.relative(process.cwd(), absoluteFile).replace(/\\/g, '/');

if (relativeFile[0] !== '.') {
relativeFile = `./${relativeFile}`;
Expand Down Expand Up @@ -293,23 +293,28 @@ function manageContent(pluginOptions, usedContext, compilation, chunk, resolve,
}
try {
const assetUrl = url.getValue();
let assetName = url.getValue().substr(1);
let queryString = '';
const questionMarkIndex = assetName.indexOf('?');
if (questionMarkIndex > 0) {
queryString = assetName.substr(questionMarkIndex);
assetName = assetName.substr(0, questionMarkIndex);
} else {
const sharpIndex = assetName.indexOf('#');
if (sharpIndex > 0) {
queryString = assetName.substr(sharpIndex);
assetName = assetName.substr(0, sharpIndex);
if (assetUrl[0] == '~') {
let assetName = assetUrl.substr(1);
let queryString = '';
const questionMarkIndex = assetName.indexOf('?');
if (questionMarkIndex > 0) {
queryString = assetName.substr(questionMarkIndex);
assetName = assetName.substr(0, questionMarkIndex);
} else {
const sharpIndex = assetName.indexOf('#');
if (sharpIndex > 0) {
queryString = assetName.substr(sharpIndex);
assetName = assetName.substr(0, sharpIndex);
}
}
promises.push(new Promise(fillDependency(
pluginOptions, usedContext, compilation, assetName, assetUrl, queryString, replacements
)));
} else {
promises.push(new Promise(fillDependency(
pluginOptions, usedContext, compilation, assetUrl, assetUrl, '', replacements
)));
}

promises.push(new Promise(fillDependency(
pluginOptions, usedContext, compilation, assetName, assetUrl, queryString, replacements
)));
} catch (e) {
console.error(e.stack || e);
callback(`SCSS plugin error, ${e}`);
Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/src/layertree/timeSliderComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ngeoMiscWMSTime from 'ngeo/misc/WMSTime.js';
import ngeoMiscDebounce from 'ngeo/misc/debounce.js';

import 'jquery-ui/ui/widgets/slider.js';
import 'ngeo/sass/jquery-ui.scss';
import 'angular-ui-slider';
import './timeslider.scss';

Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/src/query/windowComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';

import 'jquery-ui/ui/widgets/resizable.js';
import 'ngeo/sass/jquery-ui.scss';
import 'angular-animate';
import 'angular-touch';
import 'bootstrap/js/src/collapse.js';
Expand Down
1 change: 1 addition & 0 deletions src/message/displaywindowComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import angular from 'angular';
import 'ngeo/sass/font.scss';
import 'jquery-ui/ui/widgets/resizable.js';
import 'jquery-ui/ui/widgets/draggable.js';
import 'ngeo/sass/jquery-ui.scss';
import 'angular-sanitize';


Expand Down
1 change: 1 addition & 0 deletions src/message/modalComponent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import angular from 'angular';
import 'jquery-ui/ui/widgets/draggable.js';
import 'ngeo/sass/jquery-ui.scss';
import 'bootstrap/js/src/modal.js';


Expand Down
2 changes: 1 addition & 1 deletion src/misc/datepickerComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import angular from 'angular';
import ngeoMiscTime from 'ngeo/misc/Time.js';

import 'angular-ui-date';
import 'ngeo/sass/jquery-ui.js';
import 'ngeo/sass/jquery-ui.scss';

// FIXME: import the locales in the applications
import 'jquery-ui/ui/i18n/datepicker-fr.js';
Expand Down
1 change: 1 addition & 0 deletions src/misc/sortableComponent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import angular from 'angular';
import 'jquery-ui/ui/widgets/sortable.js';
import 'ngeo/sass/jquery-ui.scss';
import 'jquery-ui-touch-punch';


Expand Down
20 changes: 0 additions & 20 deletions src/sass/jquery-ui.js

This file was deleted.

20 changes: 20 additions & 0 deletions src/sass/jquery-ui.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import "~jquery-ui/themes/base/core.css";
// @import "~jquery-ui/themes/base/accordion.css";
// @import "~jquery-ui/themes/base/autocomplete.css";
// @import "~jquery-ui/themes/base/button.css";
// @import "~jquery-ui/themes/base/checkboxradio.css";
// @import "~jquery-ui/themes/base/controlgroup.css";
@import "~jquery-ui/themes/base/datepicker.css";
// @import "~jquery-ui/themes/base/dialog.css";
@import "~jquery-ui/themes/base/draggable.css";
// @import "~jquery-ui/themes/base/menu.css";
// @import "~jquery-ui/themes/base/progressbar.css";
@import "~jquery-ui/themes/base/resizable.css";
// @import "~jquery-ui/themes/base/selectable.css";
// @import "~jquery-ui/themes/base/selectmenu.css";
// @import "~jquery-ui/themes/base/sortable.css";
@import "~jquery-ui/themes/base/slider.css";
// @import "~jquery-ui/themes/base/spinner.css";
// @import "~jquery-ui/themes/base/tabs.css";
// @import "~jquery-ui/themes/base/tooltip.css";
@import "~jquery-ui/themes/base/theme.css";

0 comments on commit 23954b2

Please sign in to comment.