You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/04/26 15:13:42 UTC
[7/8] tomee git commit: No need for the UI part here
No need for the UI part here
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/3e579aad
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/3e579aad
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/3e579aad
Branch: refs/heads/fb_tomee8
Commit: 3e579aad22e21cf239604e00bcb6a3b22646f6c8
Parents: ebf29ec
Author: Jean-Louis Monteiro <je...@gmail.com>
Authored: Mon Apr 23 15:01:15 2018 +0200
Committer: Jean-Louis Monteiro <je...@gmail.com>
Committed: Mon Apr 23 15:01:15 2018 +0200
----------------------------------------------------------------------
.../rest-mp-jwt/src/main/webapp/WEB-INF/web.xml | 46 -----
.../rest-mp-jwt/src/main/webapp/app/app.less | 62 ------
.../rest-mp-jwt/src/main/webapp/app/config.js | 45 -----
.../src/main/webapp/app/js/application.js | 193 -------------------
.../rest-mp-jwt/src/main/webapp/app/js/i18n.js | 66 -------
.../rest-mp-jwt/src/main/webapp/app/js/id.js | 43 -----
.../rest-mp-jwt/src/main/webapp/app/js/log.js | 40 ----
.../src/main/webapp/app/js/model/movie.js | 48 -----
.../src/main/webapp/app/js/model/movies.js | 35 ----
.../rest-mp-jwt/src/main/webapp/app/js/start.js | 29 ---
.../src/main/webapp/app/js/templates.js | 69 -------
...pplication-table-paginator-button.handlebars | 1 -
.../templates/application-table-row.handlebars | 8 -
.../app/js/templates/application.handlebars | 50 -----
.../app/js/templates/container.handlebars | 10 -
.../app/js/templates/load-data-link.handlebars | 1 -
.../webapp/app/js/templates/movie.handlebars | 56 ------
.../app/js/view/application-table-paginator.js | 77 --------
.../webapp/app/js/view/application-table-row.js | 63 ------
.../src/main/webapp/app/js/view/application.js | 135 -------------
.../src/main/webapp/app/js/view/container.js | 62 ------
.../src/main/webapp/app/js/view/movie.js | 75 -------
examples/rest-mp-jwt/src/main/webapp/index.jsp | 36 ----
23 files changed, 1250 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/WEB-INF/web.xml b/examples/rest-mp-jwt/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 328247d..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
- <!-- The trick is to put all your static files under the same directory and map the "default" servlet to it -->
- <servlet-mapping>
- <servlet-name>default</servlet-name>
- <url-pattern>/app/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>default</servlet-name>
- <url-pattern>/webjars/*</url-pattern>
- </servlet-mapping>
-
- <!-- Any other request will point to the "index.jsp" page. This way Backbone knows how to manage page transitions
- at the client side in case the user starts the application from a permalink. -->
- <servlet>
- <servlet-name>application</servlet-name>
- <jsp-file>/index.jsp</jsp-file>
- </servlet>
- <servlet-mapping>
- <servlet-name>application</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/app.less
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/app.less b/examples/rest-mp-jwt/src/main/webapp/app/app.less
deleted file mode 100644
index 61fd5e2..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/app.less
+++ /dev/null
@@ -1,62 +0,0 @@
-/*!
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-body {
- @content-margin-top: 80px;
-
- .ux-movie-window {
- .modal-dialog {
- padding-top: 90px;
- padding-bottom: 0px;
- }
- }
-
- .ux-landing {
- margin-top: @content-margin-top;
- }
-
- .ux-setup {
- margin-top: @content-margin-top;
- }
-
- .ux-application {
- margin-top: @content-margin-top;
-
- .pagination {
- margin-top: 0px;
- margin-bottom: 0px;
- }
-
- th:last-child {
- width: 5px;
- }
-
- .ux-add-btn {
- position: absolute;
- bottom: 20px;
- right: 30px;
- }
-
- a.ux-delete-row:hover, a.ux-edit-row:hover {
- cursor: hand;
- }
-
- .panel-body>.input-group {
- margin-bottom: 15px;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/config.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/config.js b/examples/rest-mp-jwt/src/main/webapp/app/config.js
deleted file mode 100644
index bbdc5e1..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/config.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var APP_CONFIG = {
- baseUrl: window.ux.ROOT_URL,
- paths: {
- 'text': 'webjars/requirejs-text/2.0.10/text',
- 'lib/less': 'webjars/less/1.6.0/less.min',
- 'lib/jquery': 'webjars/jquery/2.1.0/jquery.min',
- 'lib/bootstrap': 'webjars/bootstrap/3.1.0/js/bootstrap.min',
- 'lib/handlebars': 'webjars/handlebars/1.2.1/handlebars.min',
- 'lib/underscore': 'webjars/underscorejs/1.4.3/underscore-min',
- 'lib/json2': 'webjars/json2/20110223/json2.min',
- 'lib/backbone': 'webjars/backbonejs/1.0.0/backbone'
- },
- shim: {
- 'lib/bootstrap': {
- deps: ['lib/jquery']
- },
- 'lib/underscore': {
- exports: '_'
- },
- 'lib/backbone': {
- deps: ['lib/jquery', 'lib/json2', 'lib/underscore']
- },
- 'app/js/templates': {
- deps: ['lib/underscore', 'app/js/i18n']
- }
- }
-};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/application.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/application.js b/examples/rest-mp-jwt/src/main/webapp/app/js/application.js
deleted file mode 100644
index 9ec4cab..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/application.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = [
- 'app/js/view/container',
- 'app/js/view/application',
- 'app/js/view/application-table-paginator',
- 'app/js/view/movie',
- 'lib/underscore',
- 'app/js/model/movies',
- 'app/js/model/movie',
- 'app/js/i18n',
- 'lib/less', 'lib/backbone', 'lib/jquery', 'lib/bootstrap'
- ];
- define(deps, function (containerView, applicationView, paginator, MovieView, underscore, moviesList, MovieModel) {
- var max = 5;
- var appState = {
- page: null,
- fieldName: null,
- fieldValue: null
- };
- containerView.render();
-
- $.ajaxSetup({ cache: false });
-
- function loadPage(pageNumber, fieldName, fieldValue) {
- var data = {
- max: max,
- first: ((pageNumber - 1) * max)
- };
- if (fieldName && fieldValue) {
- data.field = fieldName;
- data.searchTerm = fieldValue;
- }
- applicationView.setFilter(fieldName, fieldValue);
- moviesList.fetch({
- data: data,
- success: function (result) {
- applicationView.addRows(result.models);
-
- $.ajax({
- url: window.ux.ROOT_URL + 'rest/movies/count/',
- method: 'GET',
- dataType: 'json',
- data: {
- field: appState.fieldName,
- searchTerm: appState.fieldValue
- },
- success: function (total) {
- var count = Math.ceil(total / max);
- paginator.setCount(count);
- applicationView.setPaginator(count);
- }
- });
- }
- });
- }
-
- function start() {
- //Starting the backbone router.
- var Router = Backbone.Router.extend({
- routes: {
- '': 'showApplication',
- 'application': 'showApplication',
- 'application/:page': 'showApplication',
- 'application/:page/:field/:value': 'showApplication'
- },
-
- showApplication: function (page, fieldName, fieldValue) {
- var me = this;
- appState.page = page;
- appState.fieldName = fieldName;
- appState.fieldValue = fieldValue;
- containerView.showView(applicationView);
- if (!page || !underscore.isNumber(Number(page))) {
- me.showApplication(1);
- } else {
- loadPage(Number(page), fieldName, fieldValue);
- if (fieldName) {
- me.navigate('application/' + page + '/' + fieldName + '/' + fieldValue, {
- trigger: false
- });
- } else {
- me.navigate('application/' + page, {
- trigger: false
- });
- }
- }
- }
- });
- var router = new Router();
-
- applicationView.on('load-sample', function () {
- $.ajax({
- url: window.ux.ROOT_URL + 'rest/load/',
- method: 'POST',
- dataType: 'json',
- data: {},
- success: function (data) {
- router.showApplication();
- }
- });
- });
-
- applicationView.on('delete', function (data) {
- data.model.destroy({
- success: function () {
- router.showApplication(appState.page, appState.fieldName, appState.fieldValue);
- }
- });
- });
-
- function showMovieWindow(model) {
- var view = new MovieView({
- model: model
- });
- view.render();
- view.on('save-model', function (data) {
- data.model.save({}, {
- success: function () {
- view.remove();
- loadPage(appState.page, appState.fieldName, appState.fieldValue);
- }
- });
- });
- $('body').append(view.$el);
- view.$el.modal({});
- }
-
- applicationView.on('add', function () {
- showMovieWindow(new MovieModel({}));
- });
-
- applicationView.on('edit', function (data) {
- showMovieWindow(data.model);
- });
-
- applicationView.on('filter', function (data) {
- router.navigate('application/1/' + data.filterType + '/' + data.filterValue, {
- trigger: true
- });
- });
-
- applicationView.on('clear-filter', function (data) {
- router.navigate('application/1', {
- trigger: true
- });
- });
-
- paginator.on('go-to-page', function (data) {
- var page = data.number;
- if (page === 'last') {
- page = paginator.getCount();
- }
- router.showApplication(page, appState.fieldName, appState.fieldValue);
- });
-
- //Starting the backbone history.
- Backbone.history.start({
- pushState: true,
- root: window.ux.ROOT_URL // This value is set by <c:url>
- });
-
- return {
- getRouter: function () {
- return router;
- }
- };
- }
-
- return {
- start: start
- };
- });
-}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/i18n.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/i18n.js b/examples/rest-mp-jwt/src/main/webapp/app/js/i18n.js
deleted file mode 100644
index 2603dec..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/i18n.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- "use strict";
- */
-
-define(['lib/underscore', 'lib/handlebars', 'app/js/log'], function (underscore) {
- 'use strict';
-
- var missing = Handlebars.compile('[!{{key}}!]');
- var messages = {
- 'application.name': 'Moviefun',
- 'load.dada': 'Click here to load sample data',
- 'movies': 'Movies',
- 'title': 'Title',
- 'director': 'Director',
- 'genre': 'Genre',
- 'rating': 'Rating',
- 'year': 'Year',
- 'add.movie': 'Add movie',
- 'movie': 'Movie',
- 'close': 'Close',
- 'save': 'Save',
-
- 'dummy': ''
- };
-
- underscore.each(underscore.keys(messages), function (key) {
- var template = Handlebars.compile(messages[key]);
- messages[key] = template;
- });
-
- var get = function (key, values) {
- var template = messages[key];
- var cfg = values;
- if (!template) {
- template = missing;
- cfg = {
- key: key
- };
- window.console.error('Missing i18n message.', key);
- }
- return template(cfg);
- };
-
- Handlebars.registerHelper('i18n', function (key) {
- return get(key);
- });
-
- return {
- get: get
- };
-});
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/id.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/id.js b/examples/rest-mp-jwt/src/main/webapp/app/js/id.js
deleted file mode 100644
index fc4c56a..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/id.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- "use strict";
- */
-
-define(['lib/underscore', 'lib/handlebars'], function (underscore) {
- 'use strict';
-
- var value = underscore.uniqueId('moviefun_');
-
- var current = function () {
- return value;
- };
- var next = function () {
- value = underscore.uniqueId('moviefun_');
- return value;
- };
- Handlebars.registerHelper('id_current', function (key) {
- return current();
- });
- Handlebars.registerHelper('id_next', function (key) {
- return next();
- });
-
- return {
- current: current,
- next: next
- };
-});
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/log.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/log.js b/examples/rest-mp-jwt/src/main/webapp/app/js/log.js
deleted file mode 100644
index 6e79b98..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/log.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-define([], function () {
- 'use strict';
-
- var noOp = function () {
- return ''; // no-op
- };
-
- if (!window.console) {
- window.console = {};
- }
-
- function createIfNull(functionName) {
- if (!window.console[functionName]) {
- window.console[functionName] = noOp;
- }
- }
-
- createIfNull('error');
- createIfNull('warn');
- createIfNull('log');
- createIfNull('info');
-});
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/model/movie.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/model/movie.js b/examples/rest-mp-jwt/src/main/webapp/app/js/model/movie.js
deleted file mode 100644
index 36be222..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/model/movie.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['lib/backbone'];
- define(deps, function () {
- var isString = function (obj) {
- return Object.prototype.toString.call(obj) === '[object String]';
- };
- return Backbone.Model.extend({
- urlRoot: window.ux.ROOT_URL + 'rest/movies',
- idAttribute: 'id',
- toJSON: function () {
- if (!!this.attributes.rating && isString(this.attributes.rating)) {
- this.attributes.rating = parseInt(this.attributes.rating, 10);
- }
- if (!!this.attributes.year && isString(this.attributes.year)) {
- this.attributes.year = parseInt(this.attributes.year, 10);
- }
- if (!!this.attributes.id && isString(this.attributes.id)) {
- this.attributes.id = parseInt(this.attributes.id, 10);
- }
- return this.attributes;
- },
- defaults: {
- rating: 5,
- year: new Date().getFullYear()
- }
- });
- });
-}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/model/movies.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/model/movies.js b/examples/rest-mp-jwt/src/main/webapp/app/js/model/movies.js
deleted file mode 100644
index 828d2f8..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/model/movies.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/model/movie', 'lib/backbone'];
- define(deps, function (Movie) {
- var Cls = Backbone.Collection.extend({
- model: Movie,
- url: window.ux.ROOT_URL + 'rest/movies',
- parse: function (response) {
- return response;
- }
- });
- return new Cls();
- });
-}());
-
-
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/start.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/start.js b/examples/rest-mp-jwt/src/main/webapp/app/js/start.js
deleted file mode 100644
index 33f7fbd..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/start.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-require.config(APP_CONFIG);
-
-requirejs(['app/js/application'], function (app) {
- 'use strict';
-
- $(window.document).ready(function () {
- // all the action is in app
- app.start();
- });
-});
-
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates.js b/examples/rest-mp-jwt/src/main/webapp/app/js/templates.js
deleted file mode 100644
index e3f3300..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var files = [
- 'container',
- 'application',
- 'application-table-row',
- 'application-table-paginator-button',
- 'load-data-link',
- 'movie'
- ];
-
- function loop(values, callback) {
- var index;
- for (index = 0; index < values.length; index += 1) {
- callback(values[index], index);
- }
- }
-
- // Preparing the "requirements" paths.
- var requirements = [];
- loop(files, function (file) {
- requirements.push('text!app/js/templates/' + file + '.handlebars');
- });
-
- define(requirements, function () {
- var templates = {};
-
- var myArgs = arguments;
- loop(files, function (file, i) {
- templates[file] = Handlebars.compile(myArgs[i]);
- });
-
- return {
- getValue: function (templateName, cfg) {
- var template = templates[templateName];
- if (!template) {
- throw 'Template not registered. "' + templateName + '"';
- }
- var result;
- if (cfg) {
- result = template(cfg);
- } else {
- result = template({});
- }
- return result;
- }
- };
- });
-}());
-
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-paginator-button.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-paginator-button.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-paginator-button.handlebars
deleted file mode 100644
index 0031aba..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-paginator-button.handlebars
+++ /dev/null
@@ -1 +0,0 @@
-<li><a href="{{pageNumber}}">{{pageText}}</a></li>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-row.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-row.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-row.handlebars
deleted file mode 100644
index dc9bf7c..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application-table-row.handlebars
+++ /dev/null
@@ -1,8 +0,0 @@
-<td><a href="edit" class="ux-edit-row">{{title}}</a></td>
-<td>{{director}}</td>
-<td>{{genre}}</td>
-<td>{{rating}}</td>
-<td>{{year}}</td>
-<td>
- <a href="delete" class="ux-delete-row"><span class="glyphicon glyphicon-trash"></span></a>
-</td>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application.handlebars
deleted file mode 100644
index f15d1a9..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/application.handlebars
+++ /dev/null
@@ -1,50 +0,0 @@
-<div class="row">
- <div class="col-md-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">{{i18n "movies"}}</h3>
- </div>
- <div class="panel-body">
- <div class="input-group">
- <div class="input-group-btn">
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- <span class="ux-selected-filter">{{i18n "title"}}</span> <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li><a href="title" class="ux-filter">{{i18n "title"}}</a></li>
- <li><a href="director" class="ux-filter">{{i18n "director"}}</a></li>
- <li><a href="genre" class="ux-filter">{{i18n "genre"}}</a></li>
- <li><a href="rating" class="ux-filter">{{i18n "rating"}}</a></li>
- <li><a href="year" class="ux-filter">{{i18n "year"}}</a></li>
- </ul>
- </div><!-- /btn-group -->
- <input type="text" class="form-control ux-filter-field">
- <span class="input-group-btn">
- <button class="btn btn-primary ux-clear-filter-action" type="button">
- <span class="glyphicon glyphicon-remove-circle"></span>
- </button>
- <button class="btn btn-primary ux-filter-action" type="button">
- <span class="glyphicon glyphicon-search"></span>
- </button>
- </span>
- </div>
- <table class="table table-bordered table-striped table-hover">
- <thead>
- <tr>
- <th>{{i18n "title"}}</th>
- <th>{{i18n "director"}}</th>
- <th>{{i18n "genre"}}</th>
- <th>{{i18n "rating"}}</th>
- <th>{{i18n "year"}}</th>
- <th></th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- <button type="button" class="btn btn-primary ux-add-btn">{{i18n "add.movie"}}</button>
- </div>
- </div>
- </div>
-</div>
-
-
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/container.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/container.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/container.handlebars
deleted file mode 100644
index dba60dd..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/container.handlebars
+++ /dev/null
@@ -1,10 +0,0 @@
-<div class="navbar navbar-inverse navbar-fixed-top">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand" href="#">{{i18n "application.name"}}</a>
- </div>
- </div>
-</div>
-<div class="container">
- <div class="ux-contentarea"></div>
-</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/load-data-link.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/load-data-link.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/load-data-link.handlebars
deleted file mode 100644
index 1785578..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/load-data-link.handlebars
+++ /dev/null
@@ -1 +0,0 @@
-<a href="load-data">{{i18n "load.dada"}}</a>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/templates/movie.handlebars
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/movie.handlebars b/examples/rest-mp-jwt/src/main/webapp/app/js/templates/movie.handlebars
deleted file mode 100644
index 97c511c..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/templates/movie.handlebars
+++ /dev/null
@@ -1,56 +0,0 @@
-<div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title">{{i18n "movie"}}</h4>
- </div>
- <div class="modal-body">
- <form class="form-horizontal" role="form">
- <div class="form-group">
- <label for="{{id_next}}" class="col-lg-2 control-label">{{i18n "title"}}</label>
-
- <div class="col-lg-10">
- <input class="form-control ux-title" id="{{id_current}}" placeholder="{{i18n 'title'}}"
- type="text" value="{{title}}">
- </div>
- </div>
- <div class="form-group">
- <label for="{{id_next}}" class="col-lg-2 control-label">{{i18n "director"}}</label>
-
- <div class="col-lg-10">
- <input class="form-control ux-director" id="{{id_current}}"
- type="text" placeholder="{{i18n 'director'}}" value="{{director}}">
- </div>
- </div>
- <div class="form-group">
- <label for="{{id_next}}" class="col-lg-2 control-label">{{i18n "genre"}}</label>
-
- <div class="col-lg-10">
- <input class="form-control ux-genre" id="{{id_current}}" placeholder="{{i18n 'genre'}}"
- type="text" value="{{genre}}">
- </div>
- </div>
- <div class="form-group">
- <label for="{{id_next}}" class="col-lg-2 control-label">{{i18n "rating"}}</label>
-
- <div class="col-lg-10">
- <input class="form-control ux-rating" id="{{id_current}}"
- type="number" min="0" max="10" placeholder="{{i18n 'rating'}}" value="{{rating}}">
- </div>
- </div>
- <div class="form-group">
- <label for="{{id_next}}" class="col-lg-2 control-label">{{i18n "year"}}</label>
-
- <div class="col-lg-10">
- <input class="form-control ux-year" id="{{id_current}}" placeholder="{{i18n 'year'}}"
- type="number" min="1900" max="{{currentYear}}" value="{{year}}">
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default ux-close" data-dismiss="modal">{{i18n "close"}}</button>
- <button type="button" class="btn btn-primary ux-save" data-dismiss="modal">{{i18n "save"}}</button>
- </div>
- </div>
-</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-paginator.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-paginator.js b/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-paginator.js
deleted file mode 100644
index c5d2422..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-paginator.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/templates', 'lib/backbone'];
- define(deps, function (templates) {
-
- var View = Backbone.View.extend({
- tagName: 'ul',
- className: 'pagination',
-
- count: 0,
-
- events: {
- 'click a': function (evt) {
- evt.preventDefault();
- var me = this;
- var myLink = $(evt.target);
- var href = myLink.attr('href');
- me.trigger('go-to-page', {
- number: href
- });
- }
- },
-
- render: function () {
- var me = this;
- me.$el.empty();
- me.$el.append(templates.getValue('application-table-paginator-button', {
- pageNumber: '1',
- pageText: '<<'
- }));
- var i;
- for (i = 1; i < me.count + 1; i += 1) {
- me.$el.append(templates.getValue('application-table-paginator-button', {
- pageNumber: i,
- pageText: i
- }));
- }
- me.$el.append(templates.getValue('application-table-paginator-button', {
- pageNumber: 'last',
- pageText: '>>'
- }));
- return this;
- },
-
- setCount: function (count) {
- var me = this;
- me.count = count;
- me.render();
- },
-
- getCount: function () {
- var me = this;
- return me.count;
- }
- });
- return new View().render();
- });
-}());
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-row.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-row.js b/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-row.js
deleted file mode 100644
index 771a062..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application-table-row.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/templates', 'lib/backbone'];
- define(deps, function (templates) {
-
- var View = Backbone.View.extend({
- tagName: 'tr',
- events: {
- 'click .ux-delete-row': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('delete', {
- model: me.model
- });
- me.remove();
- },
- 'click .ux-edit-row': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('edit', {
- model: me.model
- });
- }
- },
-
- render: function () {
- var me = this;
- if (!this.options.isRendered) {
- me.$el.empty();
- me.$el.append(templates.getValue('application-table-row', {
- title: me.model.get('title'),
- director: me.model.get('director'),
- genre: me.model.get('genre'),
- rating: me.model.get('rating'),
- year: me.model.get('year')
- }));
- me.options.isRendered = true;
- }
- return this;
- }
- });
- return View;
- });
-}());
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/view/application.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application.js b/examples/rest-mp-jwt/src/main/webapp/app/js/view/application.js
deleted file mode 100644
index 7dae6b3..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/view/application.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/templates', 'app/js/view/application-table-row', 'app/js/view/application-table-paginator',
- 'lib/underscore', 'app/js/i18n', 'lib/backbone'];
- define(deps, function (templates, TableRowView, paginator, underscore, i18n) {
-
- var View = Backbone.View.extend({
- tagName: 'div',
- className: 'ux-application',
-
- loadDataLink: $(templates.getValue('load-data-link', {})),
-
- filterOption: 'title',
-
- events: {
- 'click .ux-filter': function (evt) {
- evt.preventDefault();
- var me = this;
- var selected = $(me.$el.find('.ux-selected-filter').get(0));
- var myLink = $(evt.target);
- me.filterOption = myLink.attr('href');
- selected.html(i18n.get(me.filterOption, {}));
- },
- 'click .ux-filter-action': function (evt) {
- evt.preventDefault();
- var me = this;
- var filterValue = $(me.$el.find('.ux-filter-field').get(0)).val();
- filterValue = $.trim(filterValue);
- if (filterValue !== '') {
- me.trigger('filter', {
- filterType: me.filterOption,
- filterValue: filterValue
- });
- }
- },
- 'click .ux-clear-filter-action': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('clear-filter', {});
- },
- 'click .ux-application': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('navigate', {
- path: 'application'
- });
- },
- 'click .ux-add-btn': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('add', {});
- }
- },
-
- setFilter: function (fieldName, fieldValue) {
- var field = fieldName;
- var value = fieldValue;
- if (!fieldName || $.trim(fieldName) === '') {
- field = 'title';
- value = '';
- }
- var me = this;
- me.filterOption = field;
- $(me.$el.find('.ux-selected-filter').get(0)).html(i18n.get(me.filterOption, {}));
- $(me.$el.find('.ux-filter-field').get(0)).val(value);
- },
-
- render: function () {
- var me = this;
- if (!this.options.isRendered) {
- me.$el.empty();
- me.$el.append(templates.getValue('application', {}));
- me.loadDataLink.on('click', function (evt) {
- evt.preventDefault();
- me.trigger('load-sample', {});
- });
- me.options.isRendered = true;
- }
- return this;
- },
-
- addRows: function (rows) {
- var me = this;
- var tbody = $(me.$el.find('tbody').get(0));
- tbody.empty();
- paginator.$el.detach();
- me.loadDataLink.detach();
- underscore.each(rows, function (model) {
- var row = new TableRowView({
- model: model
- });
- row.on('delete', function (data) {
- me.trigger('delete', data);
- });
- row.on('edit', function (data) {
- me.trigger('edit', data);
- });
- tbody.append(row.render().$el);
- });
- },
-
- setPaginator: function (count) {
- var me = this;
- paginator.$el.detach();
- me.loadDataLink.detach();
- var table = $(me.$el.find('.table').get(0));
- if (count) {
- table.after(paginator.$el);
- } else {
- table.after(me.loadDataLink);
- }
- }
- });
- return new View();
- });
-}());
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/view/container.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/view/container.js b/examples/rest-mp-jwt/src/main/webapp/app/js/view/container.js
deleted file mode 100644
index 73a57f1..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/view/container.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/templates', 'app/js/i18n', 'lib/backbone'];
- define(deps, function (templates) {
-
- var View = Backbone.View.extend({
- el: 'body',
-
- showView: function (view) {
- var me = this;
- var contentarea = me.$('.ux-contentarea');
- if (me.currentView) {
- me.currentView.$el.detach();
- }
- me.currentView = view;
- me.currentView.render();
- contentarea.append(me.currentView.el);
- if (view.renderCallback) {
- view.renderCallback();
- }
- me.$('.ux-app-menu-item').removeClass('active');
- var myMenuItem = me.$('li.ux-app-menu-item.' + view.className);
- myMenuItem.addClass('active');
- },
-
- render: function () {
- if (this.options.isRendered) {
- return this;
- }
- var html = templates.getValue('container', {
- userName: ''
- });
- this.$el.html(html);
-
- // render it only once
- this.options.isRendered = true;
- return this;
- }
- });
-
- return new View({});
- });
-}());
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/app/js/view/movie.js
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/app/js/view/movie.js b/examples/rest-mp-jwt/src/main/webapp/app/js/view/movie.js
deleted file mode 100644
index 0417945..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/app/js/view/movie.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
- 'use strict';
-
- var deps = ['app/js/templates', 'lib/underscore', 'lib/backbone', 'app/js/id'];
- define(deps, function (templates, underscore) {
-
- var View = Backbone.View.extend({
- tagName: 'div',
- className: 'modal ux-movie-window',
- events: {
- 'click .ux-application': function (evt) {
- evt.preventDefault();
- var me = this;
- me.trigger('show-application', {});
- },
- 'click .ux-close': function (evt) {
- evt.preventDefault();
- var me = this;
- me.remove();
- },
- 'click .ux-save': function (evt) {
- evt.preventDefault();
- var me = this;
- var model = me.model;
-
- function set(name) {
- var field = $(me.$el.find('.ux-' + name).get(0));
- model.set(name, field.val());
- }
-
- set('title');
- set('director');
- set('genre');
- set('rating');
- set('year');
- me.trigger('save-model', {
- model: model
- });
- }
- },
- render: function () {
- var me = this;
- me.$el.empty();
- me.$el.append(templates.getValue('movie', {
- title: me.model.get('title'),
- director: me.model.get('director'),
- genre: me.model.get('genre'),
- rating: me.model.get('rating'),
- year: me.model.get('year'),
- currentYear: new Date().getFullYear()
- }));
- return me;
- }
- });
- return View;
- });
-}());
http://git-wip-us.apache.org/repos/asf/tomee/blob/3e579aad/examples/rest-mp-jwt/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/examples/rest-mp-jwt/src/main/webapp/index.jsp b/examples/rest-mp-jwt/src/main/webapp/index.jsp
deleted file mode 100644
index 63d3e42..0000000
--- a/examples/rest-mp-jwt/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>Moviefun</title>
- <link href="<c:url value='/webjars/bootstrap/3.1.0/css/bootstrap.min.css'/>" rel="stylesheet">
- <link href="<c:url value='/app/app.less'/>" rel="stylesheet/less" type="text/css">
- <script src="<c:url value='/webjars/requirejs/2.1.10/require.min.js'/>"></script>
- <script type="text/javascript">
- window.ux = window.ux || {};
- window.ux.SESSION_ID = "<%=request.getSession().getId()%>";
- window.ux.ROOT_URL = "<c:url value='/'/>".replace(';jsessionid=' + window.ux.SESSION_ID, '');
- </script>
- <script src="<c:url value='/app/config.js'/>"></script>
- <script src="<c:url value='/app/js/start.js'/>"></script>
-</head>
-<body></body>
-</html>
\ No newline at end of file