pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
--- a/cms/app-client/.ember-cli Mon Aug 08 15:27:35 2016 +0700
+++ b/cms/app-client/.ember-cli Wed Aug 24 09:46:03 2016 +0200
@@ -5,5 +5,5 @@
Setting `disableAnalytics` to true will prevent any data from being sent.
*/
- "disableAnalytics": false
+ "disableAnalytics": true
}
--- a/server/bo_client/.jshintrc Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/.jshintrc Wed Aug 24 09:46:03 2016 +0200
@@ -27,6 +27,6 @@
"strict": false,
"white": false,
"eqnull": true,
- "esnext": true,
+ "esversion": 6,
"unused": true
}
--- a/server/bo_client/.travis.yml Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/.travis.yml Wed Aug 24 09:46:03 2016 +0200
@@ -12,7 +12,9 @@
before_install:
- npm config set spin false
- npm install -g bower
+ - bower --version
- npm install phantomjs-prebuilt
+ - node_modules/phantomjs-prebuilt/bin/phantomjs --version
install:
- npm install
--- a/server/bo_client/.watchmanconfig Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/.watchmanconfig Wed Aug 24 09:46:03 2016 +0200
@@ -1,4 +1,3 @@
{
- "ignore_dirs": ["tmp", "dist"],
- "root_files": ["../src/resources/assets/sass/app.scss"]
+ "ignore_dirs": ["tmp", "dist"]
}
--- a/server/bo_client/README.md Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/README.md Wed Aug 24 09:46:03 2016 +0200
@@ -16,13 +16,13 @@
## Installation
* `git clone <repository-url>` this repository
-* change into the new directory
+* `cd bo-client`
* `npm install`
* `bower install`
## Running / Development
-* `ember server`
+* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
### Code Generators
--- a/server/bo_client/app/adapters/application.js Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/adapters/application.js Wed Aug 24 09:46:03 2016 +0200
@@ -2,7 +2,7 @@
import ENV from 'bo-client/config/environment';
export default RESTAdapter.extend({
- namespace: ENV.baseURL.replace(/\/$/,"")+'/api/v1',
+ namespace: ENV.rootURL.replace(/\/$/,"")+'/api/v1',
//TODO: pass this as configuration
//host: 'http://localhost:8000'
});
--- a/server/bo_client/app/index.html Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/index.html Wed Aug 24 09:46:03 2016 +0200
@@ -9,7 +9,7 @@
{{content-for "head"}}
<!-- Fonts -->
- <link rel="stylesheet" href="assets/css/fonts.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/css/fonts.css">
<!--link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
@@ -19,8 +19,8 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
- <link rel="stylesheet" href="assets/bo-client-vendor.css">
- <link rel="stylesheet" href="assets/bo-client.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/bo-client-vendor.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/bo-client.css">
{{content-for "head-footer"}}
</head>
<body>
@@ -51,8 +51,8 @@
{{content-for "body"}}
- <script src="assets/bo-client-vendor.js"></script>
- <script src="assets/bo-client.js"></script>
+ <script src="{{rootURL}}assets/bo-client-vendor.js"></script>
+ <script src="{{rootURL}}assets/bo-client.js"></script>
{{content-for "body-footer"}}
--- a/server/bo_client/app/pods/components/bo-doc-bnf-autocomplete/component.js Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/pods/components/bo-doc-bnf-autocomplete/component.js Wed Aug 24 09:46:03 2016 +0200
@@ -1,11 +1,13 @@
import Ember from 'ember';
import URI from 'urijs';
-import suggestionTemplate from 'bo-client/templates/components/bo-doc-bnf-autocomplete/suggestion';
+//import suggestionTemplate from 'bo-client/templates/components/bo-doc-bnf-autocomplete/suggestion';
import _ from 'lodash/lodash';
import config from 'bo-client/config/environment';
import * as utils from 'corpus-common-addon/utils/utils';
import * as constants from 'corpus-common-addon/utils/constants';
+const suggestionTemplateBase = _.template('<div class="typeahead-suggestion""><% if(model) { %><%= model.label %> - <%= model.url %><% } %></div>');
+
export default Ember.Component.extend({
actions: {
setBnfId: function(value) {
@@ -48,8 +50,12 @@
Ember.$(this.$(), ".aupac-typeahead").typeahead('close');
}
},
-
- suggestionTemplate: suggestionTemplate,
+ //suggestionTemplate: suggestionTemplate,
+ suggestionTemplate: (model) => { return suggestionTemplateBase({model: model}); },
+ notFoundTemplate: '<div class="typeahead-not-found">Pas de résultats.</div>',
+ pendingTemplate: '<div class="typeahead-pending">Recherche...</div>',
+ headerTemplate: '<div class="typeahead-header"></div>',
+ footerTemplate: '<div class="typeahead-footer"></div>',
_registerAfterRender: function() {
Ember.run.schedule('afterRender', this, function () {
--- a/server/bo_client/app/pods/components/bo-doc-bnf-autocomplete/template.hbs Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/pods/components/bo-doc-bnf-autocomplete/template.hbs Wed Aug 24 09:46:03 2016 +0200
@@ -6,6 +6,10 @@
async=true
hint=false
suggestionTemplate=suggestionTemplate
+ notFoundTemplate=notFoundTemplate
+ pendingTemplate=pendingTemplate
+ headerTemplate=headerTemplate
+ footerTemplate=footerTemplate
selection=(readonly initialBnfId)
allowFreeInput=true
minLength=4
--- a/server/bo_client/app/pods/components/bo-doc-viaf-autocomplete/component.js Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/pods/components/bo-doc-viaf-autocomplete/component.js Wed Aug 24 09:46:03 2016 +0200
@@ -1,10 +1,11 @@
import config from 'bo-client/config/environment';
import Ember from 'ember';
import URI from 'urijs';
-import suggestionTemplate from 'bo-client/templates/components/bo-doc-viaf-autocomplete/suggestion';
import _ from 'lodash/lodash';
+const suggestionTemplateBase = _.template('<div class="typeahead-suggestion""><% if(model) { %><%= model.label %> - <%= model.url %><% } %></div>');
+
// inspired by https://github.com/oclc-developer-house/jquery-viaf-autocomplete/blob/master/src/jquery.viafauto.js
/*jshint unused:false*/
export default Ember.Component.extend({
@@ -52,7 +53,11 @@
}
},
- suggestionTemplate: suggestionTemplate,
+ suggestionTemplate: (model) => { return suggestionTemplateBase({model: model}); },
+ notFoundTemplate: '<div class="typeahead-not-found">Pas de résultats.</div>',
+ pendingTemplate: '<div class="typeahead-pending">Recherche...</div>',
+ headerTemplate: '<div class="typeahead-header"></div>',
+ footerTemplate: '<div class="typeahead-footer"></div>',
_registerAfterRender: function() {
Ember.run.schedule('afterRender', this, function () {
--- a/server/bo_client/app/pods/components/bo-doc-viaf-autocomplete/template.hbs Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/pods/components/bo-doc-viaf-autocomplete/template.hbs Wed Aug 24 09:46:03 2016 +0200
@@ -6,6 +6,10 @@
async=true
hint=false
suggestionTemplate=suggestionTemplate
+ notFoundTemplate=notFoundTemplate
+ pendingTemplate=pendingTemplate
+ headerTemplate=headerTemplate
+ footerTemplate=footerTemplate
selection=(readonly initialViafId)
allowFreeInput=false
limit=15
--- a/server/bo_client/app/router.js Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/app/router.js Wed Aug 24 09:46:03 2016 +0200
@@ -2,7 +2,8 @@
import config from './config/environment';
const Router = Ember.Router.extend({
- location: config.locationType
+ location: config.locationType,
+ rootURL: config.rootURL
});
Router.map(function() {
--- a/server/bo_client/app/templates/components/bo-doc-bnf-autocomplete/suggestion.hbs Mon Aug 08 15:27:35 2016 +0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<div class='typeahead-suggestion'>{{#if model}}{{model.label}} - {{model.url}}{{/if}}</div>
--- a/server/bo_client/app/templates/components/bo-doc-viaf-autocomplete/suggestion.hbs Mon Aug 08 15:27:35 2016 +0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<div class='typeahead-suggestion'>{{#if model}}{{model.label}} - {{model.url}}{{/if}}</div>
--- a/server/bo_client/bower.json Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/bower.json Wed Aug 24 09:46:03 2016 +0200
@@ -1,15 +1,14 @@
{
"name": "bo-client",
"dependencies": {
- "ember": "~2.6.0-beta.2",
+ "ember": "~2.8.0-beta.1",
"ember-cli-shims": "0.1.1",
- "ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0",
"jquery": "^2.2",
- "loader.js": "^4.0.0",
+ "loader.js": "^4.0.10",
"qunit": "~1.20.0",
- "bootstrap-sass": "bootstrap-sass-official#~3.3.6",
- "font-awesome": "~4.6.1",
+ "bootstrap-sass": "bootstrap-sass-official#~3.3.7",
+ "font-awesome": "~4.6.3",
"typeahead.js": "~0.11.1",
"urijs": "URIjs#~1.17.0",
"store": "https://github.com/marcuswestin/store.js.git#v1.3.20"
--- a/server/bo_client/config/environment.js Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/config/environment.js Wed Aug 24 09:46:03 2016 +0200
@@ -1,13 +1,12 @@
/* jshint node: true */
module.exports = function(environment) {
- var baseURL = '/';
+ var rootURL = '/';
var ENV = {
modulePrefix: 'bo-client',
podModulePrefix: 'bo-client/pods',
environment: environment,
- baseURL: baseURL,
- //locationType: 'auto',
+ rootURL: rootURL,
locationType: 'auto',
i18n : {
defaultLocale: 'fr'
@@ -27,9 +26,9 @@
viafBaseUrl: "http://viaf.org/viaf/",
},
'bo-doc-bnf-autocomplete' : {
- bnfQueryUrl: baseURL + "proxy/bnf/?term=",
+ bnfQueryUrl: rootURL + "proxy/bnf/?term=",
bnfBaseUrl: "http://data.bnf.fr/",
- bnfSparqlUrl: baseURL + "proxy/bnf-sparql"
+ bnfSparqlUrl: rootURL + "proxy/bnf-sparql"
}
},
};
@@ -53,7 +52,7 @@
if (environment === 'test') {
// Testem prefers this...
- ENV.baseURL = '/';
+ ENV.rootURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
--- a/server/bo_client/package.json Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/package.json Wed Aug 24 09:46:03 2016 +0200
@@ -21,14 +21,14 @@
"license": "MIT",
"devDependencies": {
"bower": "^1.7.9",
- "broccoli-asset-rev": "^2.4.2",
- "broccoli-funnel": "^1.0.1",
- "broccoli-merge-trees": "^1.1.1",
+ "broccoli-asset-rev": "^2.4.6",
+ "broccoli-funnel": "^1.0.6",
+ "broccoli-merge-trees": "^1.1.4",
"broccoli-static-compiler": "^0.2.2",
"corpus-common-addon": "file:../../common/corpus-common-addon",
"ember-ajax": "^2.0.1",
- "ember-aupac-typeahead": "2.0.7",
- "ember-cli": "2.6.0-beta.2",
+ "ember-aupac-typeahead": "IRI-Research/ember-aupac-typeahead#ember_2.8",
+ "ember-cli": "2.8.0-beta.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-dependency-checker": "^1.2.0",
@@ -36,30 +36,32 @@
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
- "ember-cli-qunit": "^1.4.0",
- "ember-cli-release": "1.0.0-beta.1",
- "ember-cli-sass": "5.3.1",
+ "ember-cli-qunit": "^2.1.0",
+ "ember-cli-release": "^0.2.9",
+ "ember-cli-sass": "5.5.0",
"ember-cli-sri": "^2.1.0",
+ "ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
- "ember-data": "^2.6.0-beta.1",
+ "ember-data": "^2.8.0-beta.1",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.5",
"ember-font-awesome": "martndemus/ember-font-awesome#pull/91/head",
- "ember-i18n": "4.2.0",
+ "ember-i18n": "4.2.2",
"ember-load-initializers": "^0.5.1",
- "ember-lodash": "0.0.6",
+ "ember-lodash": "0.0.10",
"ember-resolver": "^2.0.3",
"ember-truth-helpers": "1.2.0",
- "ember-welcome-page": "^1.0.1",
- "eslint": "^2.8.0",
- "eslint-config-google": "^0.5.0",
- "express": "^4.13.4",
+ "ember-welcome-page": "^1.0.3",
+ "eslint": "^3.2.2",
+ "eslint-config-google": "^0.6.0",
+ "express": "^4.14.0",
"glob": "^7.0.3",
"http-proxy": "^1.13.2",
"loader.js": "^4.0.1",
"lodash": "^4.7.0",
"morgan": "^1.7.0",
"npm-check-updates": "^2.6.1",
- "walk-sync": "^0.2.6"
+ "walk-sync": "^0.3.1",
+ "loader.js": "^4.0.1"
}
}
--- a/server/bo_client/tests/.jshintrc Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/tests/.jshintrc Wed Aug 24 09:46:03 2016 +0200
@@ -47,6 +47,6 @@
"strict": false,
"white": false,
"eqnull": true,
- "esnext": true,
+ "esversion": 6,
"unused": true
}
--- a/server/bo_client/tests/index.html Mon Aug 08 15:27:35 2016 +0700
+++ b/server/bo_client/tests/index.html Wed Aug 24 09:46:03 2016 +0200
@@ -10,9 +10,9 @@
{{content-for "head"}}
{{content-for "test-head"}}
- <link rel="stylesheet" href="assets/vendor.css">
- <link rel="stylesheet" href="assets/bo-client.css">
- <link rel="stylesheet" href="assets/test-support.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/bo-client.css">
+ <link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
{{content-for "head-footer"}}
{{content-for "test-head-footer"}}
@@ -21,12 +21,11 @@
{{content-for "body"}}
{{content-for "test-body"}}
- <script src="testem.js" integrity=""></script>
- <script src="assets/vendor.js"></script>
- <script src="assets/test-support.js"></script>
- <script src="assets/bo-client.js"></script>
- <script src="assets/tests.js"></script>
- <script src="assets/test-loader.js"></script>
+ <script src="{{rootURL}}testem.js" integrity=""></script>
+ <script src="{{rootURL}}assets/vendor.js"></script>
+ <script src="{{rootURL}}assets/test-support.js"></script>
+ <script src="{{rootURL}}assets/bo-client.js"></script>
+ <script src="{{rootURL}}assets/tests.js"></script>
{{content-for "body-footer"}}
{{content-for "test-body-footer"}}