From 5e92fe09456b8607e9322774ec3cf257f9265223 Mon Sep 17 00:00:00 2001 From: baxtheman Date: Tue, 11 Jun 2019 22:41:54 +0200 Subject: [PATCH 1/3] fix styles, fix version --- bnd.bnd | 2 +- .../META-INF/jsps/html/portal/api/jsonws/actions.jsp | 2 +- .../resources/META-INF/jsps/html/portal/api/jsonws/css.jspf | 5 +++++ .../resources/META-INF/jsps/html/portal/api/jsonws/index.jsp | 3 ++- src/main/resources/META-INF/resources/js/config.js | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bnd.bnd b/bnd.bnd index b4feb36..50705bc 100644 --- a/bnd.bnd +++ b/bnd.bnd @@ -1,7 +1,7 @@ Bundle-Name: API JSONWS JSPs Ext Bundle-Description: Overrides core/kernel API JSONWS JSPs Bundle-SymbolicName: it.baxtheman.liferay.apijsonwsext -Bundle-Version: 7.1.0.5 +Bundle-Version: 7.2.0.5 Created-By: Daniele Baggio @baxtheman -sources: true Web-ContextPath: /api-jsonws-ext diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp index 8917aab..8a6b2f0 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp @@ -106,7 +106,7 @@ Set contextNames = JSONWebServiceActionsManagerUtil.getContextNames(); String serviceSignature = jsonWebServiceActionMapping.getSignature(); %> -
  • "> +
  • <% String methodURL = HttpUtil.addParameter(jsonWSContextPath, "signature", serviceSignature); diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf index 3e11dc2..b2c1ba7 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf @@ -132,6 +132,11 @@ h3 { background-color: #F5F5F5; } +.lfr-api-signature.selected { + font-weight: 700; + text-decoration: underline; +} + .lfr-api-section { padding-left: 25px; position: relative; diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp index b4ad9d4..d764bfc 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp @@ -35,7 +35,8 @@ \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/js/config.js b/src/main/resources/META-INF/resources/js/config.js index 107ef31..3ea2ad9 100644 --- a/src/main/resources/META-INF/resources/js/config.js +++ b/src/main/resources/META-INF/resources/js/config.js @@ -1,3 +1,4 @@ +;console.log('api-json-ext by @baxtheman'); ; (function () { AUI().applyConfig({ From 31afb24806ff2c67274643418f4bea41e078e6f9 Mon Sep 17 00:00:00 2001 From: baxtheman Date: Mon, 23 Sep 2019 15:11:32 +0200 Subject: [PATCH 2/3] add ApiJsonwsFilter --- .settings/org.eclipse.buildship.core.prefs | 2 +- bnd.bnd | 14 +- build.gradle | 11 +- .../corejsphook/ApiJsonCustomJspBag.java | 288 ++--- .../liferay/filter/ApiJsonwsFilter.java | 54 + .../jsps/html/portal/api/jsonws/action.jsp | 1048 ++++++++--------- .../jsps/html/portal/api/jsonws/actions.jsp | 642 +++++----- .../jsps/html/portal/api/jsonws/css.jspf | 636 +++++----- .../jsps/html/portal/api/jsonws/index.jsp | 82 +- .../META-INF/resources/js/clipboard.min.js | 12 +- .../META-INF/resources/js/dist.min.js | 12 +- .../js/local-storage-fallback.min.js | 12 +- .../META-INF/resources/js/prettify.js | 60 +- 13 files changed, 1464 insertions(+), 1409 deletions(-) create mode 100644 src/main/java/it/baxtheman/liferay/filter/ApiJsonwsFilter.java diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs index 36133d6..a7b84d9 100644 --- a/.settings/org.eclipse.buildship.core.prefs +++ b/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,2 @@ -connection.project.dir=../../ext +connection.project.dir=.. eclipse.preferences.version=1 diff --git a/bnd.bnd b/bnd.bnd index 50705bc..4ee4533 100644 --- a/bnd.bnd +++ b/bnd.bnd @@ -1,8 +1,8 @@ -Bundle-Name: API JSONWS JSPs Ext -Bundle-Description: Overrides core/kernel API JSONWS JSPs -Bundle-SymbolicName: it.baxtheman.liferay.apijsonwsext -Bundle-Version: 7.2.0.5 -Created-By: Daniele Baggio @baxtheman --sources: true -Web-ContextPath: /api-jsonws-ext +Bundle-Name: API JSONWS JSPs Ext +Bundle-Description: Overrides core/kernel API JSONWS JSPs +Bundle-SymbolicName: it.baxtheman.liferay.apijsonwsext +Bundle-Version: 7.2.0.5 +Created-By: Daniele Baggio @baxtheman +-sources: true +Web-ContextPath: /api-jsonws-ext Liferay-JS-Config:/META-INF/resources/js/config.js \ No newline at end of file diff --git a/build.gradle b/build.gradle index 35a6e39..0a036e4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ -dependencies { - compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl" - compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" - compileOnly group: "org.osgi", name: "org.osgi.core" - compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" +dependencies { + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl" + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" + compileOnly group: "org.osgi", name: "org.osgi.core" + compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" + compileOnly group: "javax.servlet", name: "javax.servlet-api" } \ No newline at end of file diff --git a/src/main/java/it/baxtheman/liferay/corejsphook/ApiJsonCustomJspBag.java b/src/main/java/it/baxtheman/liferay/corejsphook/ApiJsonCustomJspBag.java index b3bc5b1..a99f8f7 100644 --- a/src/main/java/it/baxtheman/liferay/corejsphook/ApiJsonCustomJspBag.java +++ b/src/main/java/it/baxtheman/liferay/corejsphook/ApiJsonCustomJspBag.java @@ -1,145 +1,145 @@ -/** - * Copyright 2000-present Liferay, Inc. - * - * Licensed 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. - */ - -package it.baxtheman.liferay.corejsphook; - -import com.liferay.portal.deploy.hot.CustomJspBag; -import com.liferay.portal.kernel.url.URLContainer; - -import java.net.URL; - -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.service.component.annotations.Activate; -import org.osgi.service.component.annotations.Component; - -/** - * Represents a custom JSP bag used to override Liferay's core JSPs. This class - * sets the following properties: - * - *
      - *
    • - * context.id: the custom JSP bag class name - *
    • - *
    • - * context.name: the human readable name for you service - *
    • - *
    • - * service.ranking: the priority of your implementation. The - * importance of your change dictates its service ranking. For example, if - * another custom JSP bag implementation overriding the same JSP is deployed - * with a service rank of 101, it takes precedence over this one - * because its service ranking is higher. - *
    • - *
    - * - * @author Liferay - */ -@Component( - immediate = true, - property = { - "context.id=ApiJsonCustomJspBag", "context.name=API JSONWS Extender", - "service.ranking:Integer=100" - } -) -public class ApiJsonCustomJspBag implements CustomJspBag { - - /** - * Returns the directory path in the module JAR where the custom JSPs - * reside. - * - * @return the directory path in the module JAR where the custom JSPs reside - */ - @Override - public String getCustomJspDir() { - return "META-INF/jsps/"; - } - - /** - * Returns the custom JSP URL paths. - * - * @return the custom JSP URL paths - */ - @Override - public List getCustomJsps() { - return _customJsps; - } - - @Override - public URLContainer getURLContainer() { - return _urlContainer; - } - - @Override - public boolean isCustomJspGlobal() { - return true; - } - - /** - * Adds the URL paths for all custom core JSPs to a list when the module is - * activated. - * - * @param bundleContext the bundle context from which to get the custom - * JSP's bundle - */ - @Activate - protected void activate(BundleContext bundleContext) { - _bundle = bundleContext.getBundle(); - - _customJsps = new ArrayList<>(); - - Enumeration entries = _bundle.findEntries( - getCustomJspDir(), "*.jsp*", true); - - while (entries.hasMoreElements()) { - URL url = entries.nextElement(); - - _customJsps.add(url.getPath()); - } - } - - private Bundle _bundle; - private List _customJsps; - - private final URLContainer _urlContainer = new URLContainer() { - - @Override - public URL getResource(String name) { - return _bundle.getEntry(name); - } - - @Override - public Set getResources(String path) { - Set paths = new HashSet<>(); - - for (String entry : _customJsps) { - if (entry.startsWith(path)) { - paths.add(entry); - } - } - - return paths; - } - - }; - +/** + * Copyright 2000-present Liferay, Inc. + * + * Licensed 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. + */ + +package it.baxtheman.liferay.corejsphook; + +import com.liferay.portal.deploy.hot.CustomJspBag; +import com.liferay.portal.kernel.url.URLContainer; + +import java.net.URL; + +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; + +/** + * Represents a custom JSP bag used to override Liferay's core JSPs. This class + * sets the following properties: + * + *
      + *
    • + * context.id: the custom JSP bag class name + *
    • + *
    • + * context.name: the human readable name for you service + *
    • + *
    • + * service.ranking: the priority of your implementation. The + * importance of your change dictates its service ranking. For example, if + * another custom JSP bag implementation overriding the same JSP is deployed + * with a service rank of 101, it takes precedence over this one + * because its service ranking is higher. + *
    • + *
    + * + * @author Liferay + */ +@Component( + immediate = true, + property = { + "context.id=ApiJsonCustomJspBag", "context.name=API JSONWS Extender", + "service.ranking:Integer=100" + } +) +public class ApiJsonCustomJspBag implements CustomJspBag { + + /** + * Returns the directory path in the module JAR where the custom JSPs + * reside. + * + * @return the directory path in the module JAR where the custom JSPs reside + */ + @Override + public String getCustomJspDir() { + return "META-INF/jsps/"; + } + + /** + * Returns the custom JSP URL paths. + * + * @return the custom JSP URL paths + */ + @Override + public List getCustomJsps() { + return _customJsps; + } + + @Override + public URLContainer getURLContainer() { + return _urlContainer; + } + + @Override + public boolean isCustomJspGlobal() { + return true; + } + + /** + * Adds the URL paths for all custom core JSPs to a list when the module is + * activated. + * + * @param bundleContext the bundle context from which to get the custom + * JSP's bundle + */ + @Activate + protected void activate(BundleContext bundleContext) { + _bundle = bundleContext.getBundle(); + + _customJsps = new ArrayList<>(); + + Enumeration entries = _bundle.findEntries( + getCustomJspDir(), "*.jsp*", true); + + while (entries.hasMoreElements()) { + URL url = entries.nextElement(); + + _customJsps.add(url.getPath()); + } + } + + private Bundle _bundle; + private List _customJsps; + + private final URLContainer _urlContainer = new URLContainer() { + + @Override + public URL getResource(String name) { + return _bundle.getEntry(name); + } + + @Override + public Set getResources(String path) { + Set paths = new HashSet<>(); + + for (String entry : _customJsps) { + if (entry.startsWith(path)) { + paths.add(entry); + } + } + + return paths; + } + + }; + } \ No newline at end of file diff --git a/src/main/java/it/baxtheman/liferay/filter/ApiJsonwsFilter.java b/src/main/java/it/baxtheman/liferay/filter/ApiJsonwsFilter.java new file mode 100644 index 0000000..3dd147d --- /dev/null +++ b/src/main/java/it/baxtheman/liferay/filter/ApiJsonwsFilter.java @@ -0,0 +1,54 @@ +package it.baxtheman.liferay.filter; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.servlet.BaseFilter; + +@Component(immediate = true, property = { + "servlet-context-name=", + "servlet-filter-name=ApiJsonwsFilter", + "url-pattern=/api/jsonws/invoke/*" }, + service = Filter.class) +public class ApiJsonwsFilter extends BaseFilter { + + @Activate + void activate() { + + _log.info("init"); + } + + @Deactivate + void deactivate() { + } + + @Override + protected void processFilter(HttpServletRequest request, + HttpServletResponse response, FilterChain filterChain) + throws Exception { + + String cmd = request.getParameter("cmd"); + + if (_log.isDebugEnabled()) { + + _log.debug("ApiJsonwsFilter " + cmd); + } + + super.processFilter(request, response, filterChain); + } + + @Override + protected Log getLog() { + return _log; + } + + private static final Log _log = LogFactoryUtil.getLog(ApiJsonwsFilter.class); +} diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp index b914c82..0132769 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp @@ -1,525 +1,525 @@ -<%@ include file="/html/portal/api/jsonws/init.jsp" %> - -<% -String signature = ParamUtil.getString(request, "signature"); -%> - - - - - <% - JSONWebServiceActionMapping jsonWebServiceActionMapping = JSONWebServiceActionsManagerUtil.getJSONWebServiceActionMapping(signature); - %> - -

    <%= jsonWebServiceActionMapping.getPath() %>

    - -

    - -

    -
    -
    - - <%@ include file="/html/portal/api/jsonws/details.jspf" %> - -
    -
    - -
    -

    - -

    - - <% - String enctype = StringPool.BLANK; - - for (MethodParameter methodParameter : methodParameters) { - Class methodParameterTypeClass = methodParameter.getType(); - - if (methodParameterTypeClass.equals(File.class)) { - enctype = "multipart/form-data"; - - break; - } - } - %> - - - Liferay.TPL_DATA_TYPES = { - array: {}, - file: {}, - other: {}, - string: {} - }; - - - - - - - <% - if (PropsValues.JSON_SERVICE_AUTH_TOKEN_ENABLED) { - %> - - - - <% - } - - for (int i = 0; i < methodParameters.length; i++) { - MethodParameter methodParameter = methodParameters[i]; - - String methodParameterName = methodParameter.getName(); - - if (methodParameterName.equals("serviceContext")) { - continue; - } - - Class methodParameterTypeClass = methodParameter.getType(); - - String methodParameterTypeClassName = null; - - if (methodParameterTypeClass.isArray()) { - methodParameterTypeClassName = methodParameterTypeClass.getComponentType() + "[]"; - } - else { - methodParameterTypeClassName = methodParameterTypeClass.getName(); - } - - if (methodParameterTypeClass.equals(File.class)) { - %> - - - - <% - } - else if (methodParameterTypeClass.equals(boolean.class) || methodParameterTypeClass.equals(Boolean.class)) { - %> - - - - - - - <%= methodParameterTypeClassName %> - - - <% - } - else if (methodParameterTypeClass.isArray() || methodParameterTypeClass.isEnum() || methodParameterTypeClass.isPrimitive() || methodParameterTypeClass.equals(Byte.class) || methodParameterTypeClass.equals(Character.class) || methodParameterTypeClass.equals(Date.class) || methodParameterTypeClass.equals(Double.class) || methodParameterTypeClass.equals(Float.class) || methodParameterTypeClass.equals(Integer.class) || methodParameterTypeClass.equals(List.class) || methodParameterTypeClass.equals(Locale.class) || methodParameterTypeClass.equals(Long.class) || methodParameterTypeClass.equals(Map.class) || methodParameterTypeClass.equals(Short.class) || methodParameterTypeClass.equals(String.class) || methodParameterTypeClass.equals(Void.class)) { - int size = 10; - - if (methodParameterTypeClass.equals(String.class)) { - size = 60; - } - %> - - - - <% - } - else { - String objectMethodParameterName = "+" + methodParameterName; - int size = 10; - %> - - - - <% - } - %> - - - - <% - String jsObjectType = "other"; - - if (methodParameterTypeClass.isArray()) { - jsObjectType = "array"; - } - else if (methodParameterTypeClass.equals(File.class)) { - jsObjectType = "file"; - } - else if (methodParameterTypeClass.equals(String.class)) { - jsObjectType = "string"; - } - %> - - Liferay.TPL_DATA_TYPES['<%= jsObjectType %>']['<%= methodParameterName %>'] = true; - - // local storage - - Liferay.LOCAL_STORAGE_ACTION_NAME = 'APIJSONWS' + '<%= jsonWebServiceActionMapping.getPath() %>'; - var actionstorage = localStorageFallback.getItem(Liferay.LOCAL_STORAGE_ACTION_NAME); - - if (actionstorage) { - - var scriptData = JSON.parse(actionstorage); - - var prevBtn = A.one('#previous-call-data'); - prevBtn.show(); - prevBtn.on('click', function() { - - var form = A.one('#execute'); - - A.Array.forEach(scriptData, function(entry, index) { - - var input = form.one('input[name=' + entry.key + ']'); - if (input) { - input.val(entry.value); - } - }); - }); - } - - - - <% - } - %> - - - - -
    - - -
    - - -
    - -
    success callback
    - -
    
    -
    -						
    error callback
    - -
    
    -					
    - - - - -
    
    -					
    - - -
    
    -					
    - - -
    
    -					
    -
    -
    -
    - - - - new ClipboardJS('.copy-clipboard'); - - var REGEX_QUERY_STRING = new RegExp('([^?=&]+)(?:=([^&]*))?', 'g'); - - var form = A.one('#execute'); - - var tplDataTypes = Liferay.TPL_DATA_TYPES; - - var multipart = !A.Object.isEmpty(tplDataTypes.file); - - var curlTpl = A.Template.from('#curlTpl'); - - var scriptTpl = A.Template.from('#scriptTpl'); - var urlTpl = A.Template.from('#urlTpl'); - - var arrayType = tplDataTypes.array; - var fileType = tplDataTypes.file; - var stringType = tplDataTypes.string; - - var formatDataType = function(key, value, includeNull) { - value = decodeURIComponent(value.replace(/\+/g, ' ')); - value = escape(value); - - if (fileType[key]) { - value = 'null'; - } - else if (stringType[key]) { - value = '\'' + value + '\''; - } - else if (arrayType[key]) { - if (!value && includeNull) { - value = 'null'; - } - else if (value) { - value = '[' + value + ']'; - } - } - - return value; - }; - - var formatCurlDataType = function(key, value, includeNull) { - var filePath = fileType[key]; - - if (!multipart || !filePath) { - value = formatDataType(key, value, includeNull); - } - else { - value = '@path_to_file'; - } - - return value; - }; - - curlTpl.formatDataType = formatCurlDataType; - scriptTpl.formatDataType = A.rbind(formatDataType, scriptTpl, true); - - urlTpl.toURIParam = function(value) { - value = A.Lang.String.uncamelize(value, '-'); - - return value.toLowerCase(); - }; - - var curlExample = A.one('#curlExample'); - var jsExample = A.one('#jsExample'); - var urlExample = A.one('#urlExample'); - - var serviceOutput = A.one('#serviceOutput'); - var serviceError = A.one('#serviceError'); - var serviceResults = A.one('#serviceResults'); - - form.on( - 'submit', - function(event) { - event.halt(); - - var output = A.all([curlExample, jsExample, urlExample, serviceOutput]); - - output.empty().addClass('loading-results'); - - var formEl = form.getDOM(); - - var formQueryString = A.IO.prototype._serialize(formEl); - - var query_elements = formQueryString.split("&"); - - var PLUS_ENCODING = "%2B"; - var MINUS_ENCODING = "%2D"; - - for (var i = 0 ; i < query_elements.length ; i++) { var query_map=query_elements[i].split("="); - - var key = query_map[0]; - - var plus_bool = ((key.indexOf(PLUS_ENCODING) == 0) || (key.indexOf(" +")==0)); var - minus_bool=((key.indexOf(MINUS_ENCODING)==0) || (key.indexOf("-")==0)); if (plus_bool || minus_bool) { var - value="" ; for (var j=1; j < query_map.length ; j++) { value +=query_map[j]; } if (value.length> 0) { - if (minus_bool) { - key = key.replace(MINUS_ENCODING,"-"); - var node = A.one('[name=' + key + ']'); - - key = key.replace("-", "+"); - node.attr("name", key); - } - } - else if (plus_bool) { - key = key.replace(PLUS_ENCODING,"+"); - var node = A.one('[name=' + key + ']'); - - key = key.replace("+", "-"); - node.attr("name", key); - } - } - } - - formEl = form.getDOM(); - - var startTime, endTime; - startTime = new Date(); - - var _callback = function(obj,err) { - - serviceOutput.text(''); - serviceError.text(''); - - endTime = new Date(); - var timeDiff = endTime - startTime; - var milliseconds = Math.round(timeDiff); - - var jsontext = JSON.stringify(obj, null, 2); - var jsonsize = jsontext.length; - - var output = (!err) ? serviceOutput : serviceError; - - output.html(PR.prettyPrintOne(A.Lang.String.escapeHTML(jsontext))); - - output.removeClass('loading-results'); - - location.hash = '#serviceResults'; - - A.one('span.time-elapsed').text('call time: ' + milliseconds + ' ms'); - A.one('span.response-size').text(jsonsize + ' chars lenght'); - } - - Liferay.Service( - '<%= jsonWebServiceActionMapping.getPath() %>', - formEl, - function(obj) { - - _callback(obj); - }, - function(err,obj) { - - _callback(obj,err); - } - ); - - formQueryString = A.IO.prototype._serialize(formEl); - - formQueryString = formQueryString.replace(PLUS_ENCODING, "+"); - formQueryString = formQueryString.replace(MINUS_ENCODING, "-"); - - if (multipart) { - formQueryString += Object.keys(tplDataTypes.file).map( - function(item, index) { - return '&' + item + '='; - } - ).join(''); - } - - var curlData = []; - var scriptData = []; - - var ignoreFields = { - formDate: true, - p_auth: true - }; - - formQueryString.replace( - REGEX_QUERY_STRING, - function(match, key, value) { - if (!ignoreFields[key]) { - curlData.push( - { - key: key, - value: value - } - ); - - scriptData.push( - { - key: key, - value: value - } - ); - } - } - ); - - var tplCurlData = { - data: curlData, - flag: multipart ? 'F' : 'd' - }; - - var tplScriptData = { - data: scriptData - }; - - curlTpl.render(tplCurlData, curlExample); - scriptTpl.render(tplScriptData, jsExample); - - var urlTplData = { - data: [], - extraData: [] - }; - - var extraFields = { - p_auth: true - }; - - formQueryString.replace( - REGEX_QUERY_STRING, - function(match, key, value) { - if (!ignoreFields[key]) { - if (extraFields[key]) { - urlTplData.extraData.push( - { - key: key, - value: value - } - ); - } - else { - urlTplData.data.push( - { - key: key, - value: value - } - ); - - } - } - } - ); - - urlTpl.render(urlTplData, urlExample); - - serviceResults.show(); - - // save parameters to local storage - - localStorageFallback.setItem(Liferay.LOCAL_STORAGE_ACTION_NAME, - JSON.stringify(scriptData)); - } - ); - - - - - - - -
    - -
    - -
    -
    +<%@ include file="/html/portal/api/jsonws/init.jsp" %> + +<% +String signature = ParamUtil.getString(request, "signature"); +%> + + + + + <% + JSONWebServiceActionMapping jsonWebServiceActionMapping = JSONWebServiceActionsManagerUtil.getJSONWebServiceActionMapping(signature); + %> + +

    <%= jsonWebServiceActionMapping.getPath() %>

    + +

    + +

    +
    +
    + + <%@ include file="/html/portal/api/jsonws/details.jspf" %> + +
    +
    + +
    +

    + +

    + + <% + String enctype = StringPool.BLANK; + + for (MethodParameter methodParameter : methodParameters) { + Class methodParameterTypeClass = methodParameter.getType(); + + if (methodParameterTypeClass.equals(File.class)) { + enctype = "multipart/form-data"; + + break; + } + } + %> + + + Liferay.TPL_DATA_TYPES = { + array: {}, + file: {}, + other: {}, + string: {} + }; + + + + + + + <% + if (PropsValues.JSON_SERVICE_AUTH_TOKEN_ENABLED) { + %> + + + + <% + } + + for (int i = 0; i < methodParameters.length; i++) { + MethodParameter methodParameter = methodParameters[i]; + + String methodParameterName = methodParameter.getName(); + + if (methodParameterName.equals("serviceContext")) { + continue; + } + + Class methodParameterTypeClass = methodParameter.getType(); + + String methodParameterTypeClassName = null; + + if (methodParameterTypeClass.isArray()) { + methodParameterTypeClassName = methodParameterTypeClass.getComponentType() + "[]"; + } + else { + methodParameterTypeClassName = methodParameterTypeClass.getName(); + } + + if (methodParameterTypeClass.equals(File.class)) { + %> + + + + <% + } + else if (methodParameterTypeClass.equals(boolean.class) || methodParameterTypeClass.equals(Boolean.class)) { + %> + + + + + + + <%= methodParameterTypeClassName %> + + + <% + } + else if (methodParameterTypeClass.isArray() || methodParameterTypeClass.isEnum() || methodParameterTypeClass.isPrimitive() || methodParameterTypeClass.equals(Byte.class) || methodParameterTypeClass.equals(Character.class) || methodParameterTypeClass.equals(Date.class) || methodParameterTypeClass.equals(Double.class) || methodParameterTypeClass.equals(Float.class) || methodParameterTypeClass.equals(Integer.class) || methodParameterTypeClass.equals(List.class) || methodParameterTypeClass.equals(Locale.class) || methodParameterTypeClass.equals(Long.class) || methodParameterTypeClass.equals(Map.class) || methodParameterTypeClass.equals(Short.class) || methodParameterTypeClass.equals(String.class) || methodParameterTypeClass.equals(Void.class)) { + int size = 10; + + if (methodParameterTypeClass.equals(String.class)) { + size = 60; + } + %> + + + + <% + } + else { + String objectMethodParameterName = "+" + methodParameterName; + int size = 10; + %> + + + + <% + } + %> + + + + <% + String jsObjectType = "other"; + + if (methodParameterTypeClass.isArray()) { + jsObjectType = "array"; + } + else if (methodParameterTypeClass.equals(File.class)) { + jsObjectType = "file"; + } + else if (methodParameterTypeClass.equals(String.class)) { + jsObjectType = "string"; + } + %> + + Liferay.TPL_DATA_TYPES['<%= jsObjectType %>']['<%= methodParameterName %>'] = true; + + // local storage + + Liferay.LOCAL_STORAGE_ACTION_NAME = 'APIJSONWS' + '<%= jsonWebServiceActionMapping.getPath() %>'; + var actionstorage = localStorageFallback.getItem(Liferay.LOCAL_STORAGE_ACTION_NAME); + + if (actionstorage) { + + var scriptData = JSON.parse(actionstorage); + + var prevBtn = A.one('#previous-call-data'); + prevBtn.show(); + prevBtn.on('click', function() { + + var form = A.one('#execute'); + + A.Array.forEach(scriptData, function(entry, index) { + + var input = form.one('input[name=' + entry.key + ']'); + if (input) { + input.val(entry.value); + } + }); + }); + } + + + + <% + } + %> + + + + +
    + + +
    + + +
    + +
    success callback
    + +
    
    +
    +						
    error callback
    + +
    
    +					
    + + + + +
    
    +					
    + + +
    
    +					
    + + +
    
    +					
    +
    +
    +
    + + + + new ClipboardJS('.copy-clipboard'); + + var REGEX_QUERY_STRING = new RegExp('([^?=&]+)(?:=([^&]*))?', 'g'); + + var form = A.one('#execute'); + + var tplDataTypes = Liferay.TPL_DATA_TYPES; + + var multipart = !A.Object.isEmpty(tplDataTypes.file); + + var curlTpl = A.Template.from('#curlTpl'); + + var scriptTpl = A.Template.from('#scriptTpl'); + var urlTpl = A.Template.from('#urlTpl'); + + var arrayType = tplDataTypes.array; + var fileType = tplDataTypes.file; + var stringType = tplDataTypes.string; + + var formatDataType = function(key, value, includeNull) { + value = decodeURIComponent(value.replace(/\+/g, ' ')); + value = escape(value); + + if (fileType[key]) { + value = 'null'; + } + else if (stringType[key]) { + value = '\'' + value + '\''; + } + else if (arrayType[key]) { + if (!value && includeNull) { + value = 'null'; + } + else if (value) { + value = '[' + value + ']'; + } + } + + return value; + }; + + var formatCurlDataType = function(key, value, includeNull) { + var filePath = fileType[key]; + + if (!multipart || !filePath) { + value = formatDataType(key, value, includeNull); + } + else { + value = '@path_to_file'; + } + + return value; + }; + + curlTpl.formatDataType = formatCurlDataType; + scriptTpl.formatDataType = A.rbind(formatDataType, scriptTpl, true); + + urlTpl.toURIParam = function(value) { + value = A.Lang.String.uncamelize(value, '-'); + + return value.toLowerCase(); + }; + + var curlExample = A.one('#curlExample'); + var jsExample = A.one('#jsExample'); + var urlExample = A.one('#urlExample'); + + var serviceOutput = A.one('#serviceOutput'); + var serviceError = A.one('#serviceError'); + var serviceResults = A.one('#serviceResults'); + + form.on( + 'submit', + function(event) { + event.halt(); + + var output = A.all([curlExample, jsExample, urlExample, serviceOutput]); + + output.empty().addClass('loading-results'); + + var formEl = form.getDOM(); + + var formQueryString = A.IO.prototype._serialize(formEl); + + var query_elements = formQueryString.split("&"); + + var PLUS_ENCODING = "%2B"; + var MINUS_ENCODING = "%2D"; + + for (var i = 0 ; i < query_elements.length ; i++) { var query_map=query_elements[i].split("="); + + var key = query_map[0]; + + var plus_bool = ((key.indexOf(PLUS_ENCODING) == 0) || (key.indexOf(" +")==0)); var + minus_bool=((key.indexOf(MINUS_ENCODING)==0) || (key.indexOf("-")==0)); if (plus_bool || minus_bool) { var + value="" ; for (var j=1; j < query_map.length ; j++) { value +=query_map[j]; } if (value.length> 0) { + if (minus_bool) { + key = key.replace(MINUS_ENCODING,"-"); + var node = A.one('[name=' + key + ']'); + + key = key.replace("-", "+"); + node.attr("name", key); + } + } + else if (plus_bool) { + key = key.replace(PLUS_ENCODING,"+"); + var node = A.one('[name=' + key + ']'); + + key = key.replace("+", "-"); + node.attr("name", key); + } + } + } + + formEl = form.getDOM(); + + var startTime, endTime; + startTime = new Date(); + + var _callback = function(obj,err) { + + serviceOutput.text(''); + serviceError.text(''); + + endTime = new Date(); + var timeDiff = endTime - startTime; + var milliseconds = Math.round(timeDiff); + + var jsontext = JSON.stringify(obj, null, 2); + var jsonsize = jsontext.length; + + var output = (!err) ? serviceOutput : serviceError; + + output.html(PR.prettyPrintOne(A.Lang.String.escapeHTML(jsontext))); + + output.removeClass('loading-results'); + + location.hash = '#serviceResults'; + + A.one('span.time-elapsed').text('call time: ' + milliseconds + ' ms'); + A.one('span.response-size').text(jsonsize + ' chars lenght'); + } + + Liferay.Service( + '<%= jsonWebServiceActionMapping.getPath() %>', + formEl, + function(obj) { + + _callback(obj); + }, + function(err,obj) { + + _callback(obj,err); + } + ); + + formQueryString = A.IO.prototype._serialize(formEl); + + formQueryString = formQueryString.replace(PLUS_ENCODING, "+"); + formQueryString = formQueryString.replace(MINUS_ENCODING, "-"); + + if (multipart) { + formQueryString += Object.keys(tplDataTypes.file).map( + function(item, index) { + return '&' + item + '='; + } + ).join(''); + } + + var curlData = []; + var scriptData = []; + + var ignoreFields = { + formDate: true, + p_auth: true + }; + + formQueryString.replace( + REGEX_QUERY_STRING, + function(match, key, value) { + if (!ignoreFields[key]) { + curlData.push( + { + key: key, + value: value + } + ); + + scriptData.push( + { + key: key, + value: value + } + ); + } + } + ); + + var tplCurlData = { + data: curlData, + flag: multipart ? 'F' : 'd' + }; + + var tplScriptData = { + data: scriptData + }; + + curlTpl.render(tplCurlData, curlExample); + scriptTpl.render(tplScriptData, jsExample); + + var urlTplData = { + data: [], + extraData: [] + }; + + var extraFields = { + p_auth: true + }; + + formQueryString.replace( + REGEX_QUERY_STRING, + function(match, key, value) { + if (!ignoreFields[key]) { + if (extraFields[key]) { + urlTplData.extraData.push( + { + key: key, + value: value + } + ); + } + else { + urlTplData.data.push( + { + key: key, + value: value + } + ); + + } + } + } + ); + + urlTpl.render(urlTplData, urlExample); + + serviceResults.show(); + + // save parameters to local storage + + localStorageFallback.setItem(Liferay.LOCAL_STORAGE_ACTION_NAME, + JSON.stringify(scriptData)); + } + ); + + + + + + + +
    + +
    + +
    +
    \ No newline at end of file diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp index 8a6b2f0..d3a0fc5 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/actions.jsp @@ -1,322 +1,322 @@ - - -<%@ include file="/html/portal/api/jsonws/init.jsp" %> - - -
    - GUEST -
    -
    - - -
    -   - <%= themeDisplay.getPermissionChecker().getUser().getScreenName() %> -
    -
    - -<% -String signature = ParamUtil.getString(request, "signature"); - -Set contextNames = JSONWebServiceActionsManagerUtil.getContextNames(); -%> - - - - - <% - for (String curContextName : contextNames) { - String curContextNameView = curContextName; - - if (Validator.isNull(curContextName)) { - curContextNameView = "portal"; - } - %> - - - - <% - } - %> - - - - - - -
    - - <% - Map jsonWebServiceClasses = new LinkedHashMap(); - - List jsonWebServiceActionMappings = JSONWebServiceActionsManagerUtil.getJSONWebServiceActionMappings(contextName); - - for (JSONWebServiceActionMapping jsonWebServiceActionMapping : jsonWebServiceActionMappings) { - Class actionClass = jsonWebServiceActionMapping.getActionClass(); - - String actionClassName = actionClass.getSimpleName(); - - if (actionClassName.endsWith("ServiceUtil")) { - actionClassName = actionClassName.substring(0, actionClassName.length() - 11); - } - - Set jsonWebServiceMappings = jsonWebServiceClasses.get(actionClassName); - - if (jsonWebServiceMappings == null) { - jsonWebServiceMappings = new LinkedHashSet(); - - jsonWebServiceClasses.put(actionClassName, jsonWebServiceMappings); - } - - jsonWebServiceMappings.add(jsonWebServiceActionMapping); - } - - for (Map.Entry entry : jsonWebServiceClasses.entrySet()) { - String jsonWebServiceClassName = entry.getKey(); - Set jsonWebServiceMappings = entry.getValue(); - - String panelTitle = jsonWebServiceClassName; - - if (panelTitle.endsWith("Impl")) { - panelTitle = panelTitle.substring(0, panelTitle.length() - 4); - } - - if (panelTitle.endsWith("Service")) { - panelTitle = panelTitle.substring(0, panelTitle.length() - 7); - } - %> - - -
      - - <% - for (JSONWebServiceActionMapping jsonWebServiceActionMapping : jsonWebServiceMappings) { - String path = jsonWebServiceActionMapping.getPath(); - - int pos = path.lastIndexOf(CharPool.SLASH); - - path = path.substring(pos + 1); - - String serviceSignature = jsonWebServiceActionMapping.getSignature(); - %> - -
    • - - <% - String methodURL = HttpUtil.addParameter(jsonWSContextPath, "signature", serviceSignature); - %> - - - <%= path %> - -
    • - - <% - } - %> - -
    -
    - - <% - } - %> - -
    - -
    - -
    - - - var Lang = A.Lang; - - var AArray = A.Array; - - - var contextNameSelector = A.one('#contextName'); - - if (contextNameSelector) { - contextNameSelector.on( - 'change', - function(event) { - debugger; - var contextName = contextNameSelector.val(); - - var location = Liferay.Util.addParams('contextName=' + contextName, '<%= jsonWSPath %>'); - - window.location.href = location; - } - ); - } - - - var ServiceFilter = A.Component.create( - { - AUGMENTS: [A.AutoCompleteBase], - EXTENDS: A.Base, - NAME: 'servicefilter', - prototype: { - initializer: function() { - var instance = this; - - instance._bindUIACBase(); - instance._syncUIACBase(); - } - } - } - ); - - var noMatchMessage = A.one('#noMatches'); - var services = A.one('#services'); - - var servicesClone = services.clone(); - - var results = []; - - servicesClone.all('.lfr-api-service-result').each( - function(item, index) { - results.push( - { - el: item._node, - node: item, - text: item.text().trim() - } - ); - } - ); - - var replaceRE = new RegExp('[-_\\s\\W]', 'g'); - - var cache = {}; - - var filter = new ServiceFilter( - { - inputNode: A.one('#serviceSearch'), - minQueryLength: 0, - queryDelay: 0, - resultFilters: function(query, results) { - query = query.toLowerCase().replace(replaceRE, ''); - - return results.filter( - function(item, index) { - var node = item.raw.node; - - var guid = node.guid(); - - var text = cache[guid]; - - if (!text) { - text = node.attr('data-metaData') + '/' + item.text; - text = text.toLowerCase().replace(replaceRE, ''); - - cache[guid] = text; - } - - return text.indexOf(query) !== -1; - } - ); - }, - resultHighlighter: function(query, results) { - var cachedResults = cache[query]; - - if (!cachedResults) { - var queryChars = AArray.dedupe(query.toLowerCase().split('')); - - cachedResults = results.map( - function(item, index) { - return A.Highlight.all(item.text, queryChars); - } - ); - - cache[query] = cachedResults; - } - - return cachedResults; - }, - resultTextLocator: 'text', - source: results - } - ); - - var servicesParent = services.ancestor(); - - var trackedNodes; - - filter.on( - 'results', - A.debounce( - function(event) { - var query = event.query; - var results = event.results; - - var resultsLength = results.length; - - servicesClone.remove(); - services.remove(); - - if (!trackedNodes) { - trackedNodes = servicesClone.all('.lfr-panel, .lfr-api-signature'); - } - - trackedNodes.hide(); - - var activeServiceNode = services; - - if (query) { - results.forEach( - function(item, index) { - var raw = item.raw; - - var el = raw.el; - var node = raw.node; - var serviceNode = raw.serviceNode; - - if (!serviceNode) { - serviceNode = node.ancestorsByClassName('lfr-panel'); - - raw.serviceNode = serviceNode; - } - - if (node.hasClass('method-name')) { - var signatureNode = raw.signatureNode; - - if (!signatureNode) { - signatureNode = node.ancestorsByClassName('lfr-api-signature'); - - raw.signatureNode = signatureNode; - } - - signatureNode.show(); - - var parentEl = el.parentNode; - - parentEl.removeChild(el); - - el.innerHTML = item.highlighted; - - parentEl.appendChild(el); - } - - node.show(); - serviceNode.show(); - } - ); - - noMatchMessage.toggle(!resultsLength); - - activeServiceNode = servicesClone; - } - - servicesParent.append(activeServiceNode); - }, - 50 - ) - ); + + +<%@ include file="/html/portal/api/jsonws/init.jsp" %> + + +
    + GUEST +
    +
    + + +
    +   + <%= themeDisplay.getPermissionChecker().getUser().getScreenName() %> +
    +
    + +<% +String signature = ParamUtil.getString(request, "signature"); + +Set contextNames = JSONWebServiceActionsManagerUtil.getContextNames(); +%> + + + + + <% + for (String curContextName : contextNames) { + String curContextNameView = curContextName; + + if (Validator.isNull(curContextName)) { + curContextNameView = "portal"; + } + %> + + + + <% + } + %> + + + + + + +
    + + <% + Map jsonWebServiceClasses = new LinkedHashMap(); + + List jsonWebServiceActionMappings = JSONWebServiceActionsManagerUtil.getJSONWebServiceActionMappings(contextName); + + for (JSONWebServiceActionMapping jsonWebServiceActionMapping : jsonWebServiceActionMappings) { + Class actionClass = jsonWebServiceActionMapping.getActionClass(); + + String actionClassName = actionClass.getSimpleName(); + + if (actionClassName.endsWith("ServiceUtil")) { + actionClassName = actionClassName.substring(0, actionClassName.length() - 11); + } + + Set jsonWebServiceMappings = jsonWebServiceClasses.get(actionClassName); + + if (jsonWebServiceMappings == null) { + jsonWebServiceMappings = new LinkedHashSet(); + + jsonWebServiceClasses.put(actionClassName, jsonWebServiceMappings); + } + + jsonWebServiceMappings.add(jsonWebServiceActionMapping); + } + + for (Map.Entry entry : jsonWebServiceClasses.entrySet()) { + String jsonWebServiceClassName = entry.getKey(); + Set jsonWebServiceMappings = entry.getValue(); + + String panelTitle = jsonWebServiceClassName; + + if (panelTitle.endsWith("Impl")) { + panelTitle = panelTitle.substring(0, panelTitle.length() - 4); + } + + if (panelTitle.endsWith("Service")) { + panelTitle = panelTitle.substring(0, panelTitle.length() - 7); + } + %> + + +
      + + <% + for (JSONWebServiceActionMapping jsonWebServiceActionMapping : jsonWebServiceMappings) { + String path = jsonWebServiceActionMapping.getPath(); + + int pos = path.lastIndexOf(CharPool.SLASH); + + path = path.substring(pos + 1); + + String serviceSignature = jsonWebServiceActionMapping.getSignature(); + %> + +
    • + + <% + String methodURL = HttpUtil.addParameter(jsonWSContextPath, "signature", serviceSignature); + %> + + + <%= path %> + +
    • + + <% + } + %> + +
    +
    + + <% + } + %> + +
    + +
    + +
    + + + var Lang = A.Lang; + + var AArray = A.Array; + + + var contextNameSelector = A.one('#contextName'); + + if (contextNameSelector) { + contextNameSelector.on( + 'change', + function(event) { + debugger; + var contextName = contextNameSelector.val(); + + var location = Liferay.Util.addParams('contextName=' + contextName, '<%= jsonWSPath %>'); + + window.location.href = location; + } + ); + } + + + var ServiceFilter = A.Component.create( + { + AUGMENTS: [A.AutoCompleteBase], + EXTENDS: A.Base, + NAME: 'servicefilter', + prototype: { + initializer: function() { + var instance = this; + + instance._bindUIACBase(); + instance._syncUIACBase(); + } + } + } + ); + + var noMatchMessage = A.one('#noMatches'); + var services = A.one('#services'); + + var servicesClone = services.clone(); + + var results = []; + + servicesClone.all('.lfr-api-service-result').each( + function(item, index) { + results.push( + { + el: item._node, + node: item, + text: item.text().trim() + } + ); + } + ); + + var replaceRE = new RegExp('[-_\\s\\W]', 'g'); + + var cache = {}; + + var filter = new ServiceFilter( + { + inputNode: A.one('#serviceSearch'), + minQueryLength: 0, + queryDelay: 0, + resultFilters: function(query, results) { + query = query.toLowerCase().replace(replaceRE, ''); + + return results.filter( + function(item, index) { + var node = item.raw.node; + + var guid = node.guid(); + + var text = cache[guid]; + + if (!text) { + text = node.attr('data-metaData') + '/' + item.text; + text = text.toLowerCase().replace(replaceRE, ''); + + cache[guid] = text; + } + + return text.indexOf(query) !== -1; + } + ); + }, + resultHighlighter: function(query, results) { + var cachedResults = cache[query]; + + if (!cachedResults) { + var queryChars = AArray.dedupe(query.toLowerCase().split('')); + + cachedResults = results.map( + function(item, index) { + return A.Highlight.all(item.text, queryChars); + } + ); + + cache[query] = cachedResults; + } + + return cachedResults; + }, + resultTextLocator: 'text', + source: results + } + ); + + var servicesParent = services.ancestor(); + + var trackedNodes; + + filter.on( + 'results', + A.debounce( + function(event) { + var query = event.query; + var results = event.results; + + var resultsLength = results.length; + + servicesClone.remove(); + services.remove(); + + if (!trackedNodes) { + trackedNodes = servicesClone.all('.lfr-panel, .lfr-api-signature'); + } + + trackedNodes.hide(); + + var activeServiceNode = services; + + if (query) { + results.forEach( + function(item, index) { + var raw = item.raw; + + var el = raw.el; + var node = raw.node; + var serviceNode = raw.serviceNode; + + if (!serviceNode) { + serviceNode = node.ancestorsByClassName('lfr-panel'); + + raw.serviceNode = serviceNode; + } + + if (node.hasClass('method-name')) { + var signatureNode = raw.signatureNode; + + if (!signatureNode) { + signatureNode = node.ancestorsByClassName('lfr-api-signature'); + + raw.signatureNode = signatureNode; + } + + signatureNode.show(); + + var parentEl = el.parentNode; + + parentEl.removeChild(el); + + el.innerHTML = item.highlighted; + + parentEl.appendChild(el); + } + + node.show(); + serviceNode.show(); + } + ); + + noMatchMessage.toggle(!resultsLength); + + activeServiceNode = servicesClone; + } + + servicesParent.append(activeServiceNode); + }, + 50 + ) + ); \ No newline at end of file diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf index b2c1ba7..68dbdba 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/css.jspf @@ -1,319 +1,319 @@ - \ No newline at end of file diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp index d764bfc..4ee86ff 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/index.jsp @@ -1,42 +1,42 @@ - -<%@ include file="/html/portal/api/jsonws/init.jsp" %> - - - - <%@ include file="/html/portal/api/jsonws/css.jspf" %> - -
    - - -
    -
    - - - - - - - - - -
    -
    - - -
    + +<%@ include file="/html/portal/api/jsonws/init.jsp" %> + + + + <%@ include file="/html/portal/api/jsonws/css.jspf" %> + +
    + + +
    +
    + + + + + + + + + +
    +
    + + +
    \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/js/clipboard.min.js b/src/main/resources/META-INF/resources/js/clipboard.min.js index b00ee51..c4f28c5 100644 --- a/src/main/resources/META-INF/resources/js/clipboard.min.js +++ b/src/main/resources/META-INF/resources/js/clipboard.min.js @@ -1,7 +1,7 @@ -/*! - * clipboard.js v2.0.0 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ +/*! + * clipboard.js v2.0.0 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){var o,r,i;!function(a,c){r=[t,n(7)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])}); \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/js/dist.min.js b/src/main/resources/META-INF/resources/js/dist.min.js index baa1b9c..4ed3186 100644 --- a/src/main/resources/META-INF/resources/js/dist.min.js +++ b/src/main/resources/META-INF/resources/js/dist.min.js @@ -1,7 +1,7 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.localStorageFallback=t():e.localStorageFallback=t()}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(){var e=new l;try{e.setItem("__test","1");var t=e.getItem("__test");return e.removeItem("__test"),"1"===t}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.cookieOptions=Object.assign({path:"/"},t),s=void 0===t.prefix?s:t.prefix}return a(e,[{key:"getItem",value:function(e){var t=u.default.parse(document.cookie);return t&&t.hasOwnProperty(s+e)?t[s+e]:null}},{key:"setItem",value:function(e,t){return document.cookie=u.default.serialize(s+e,t,this.cookieOptions),t}},{key:"removeItem",value:function(e){var t=Object.assign({},this.cookieOptions,{maxAge:-1});return document.cookie=u.default.serialize(s+e,"",t),null}},{key:"clear",value:function(){var e=u.default.parse(document.cookie);for(var t in e)0===t.indexOf(s)&&this.removeItem(t.substr(s.length));return null}}]),e}();t.default=l},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=t.CookieStorage=t.isSupported=t.storage=void 0;var n=r(2),a=o(n),i=r(0),u=o(i),s=r(4),l=o(s),c=null;(0,a.default)("localStorage")?t.storage=c=window.localStorage:(0,a.default)("sessionStorage")?t.storage=c=window.sessionStorage:(0,a.default)("cookieStorage")?t.storage=c=new u.default:t.storage=c=new l.default,t.default=c,t.storage=c,t.isSupported=a.default,t.CookieStorage=u.default,t.MemoryStorage=l.default},function(e,t,r){"use strict";function o(e){try{var t=window[e];return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"localStorage",t=String(e).replace(/storage$/i,"").toLowerCase();if("local"===t)return o("localStorage");if("session"===t)return o("sessionStorage");if("cookie"===t)return(0,a.hasCookies)();if("memory"===t)return!0;throw new Error("Storage method `"+e+"` is not available.\n Please use one of the following: localStorage, sessionStorage, cookieStorage, memoryStorage.")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a=r(0),i="__test"},function(e,t,r){"use strict";function o(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},n=e.split(s),u=o.decode||i,l=0;l0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.cookieOptions=Object.assign({path:"/"},t),s=void 0===t.prefix?s:t.prefix}return a(e,[{key:"getItem",value:function(e){var t=u.default.parse(document.cookie);return t&&t.hasOwnProperty(s+e)?t[s+e]:null}},{key:"setItem",value:function(e,t){return document.cookie=u.default.serialize(s+e,t,this.cookieOptions),t}},{key:"removeItem",value:function(e){var t=Object.assign({},this.cookieOptions,{maxAge:-1});return document.cookie=u.default.serialize(s+e,"",t),null}},{key:"clear",value:function(){var e=u.default.parse(document.cookie);for(var t in e)0===t.indexOf(s)&&this.removeItem(t.substr(s.length));return null}}]),e}();t.default=l},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=t.CookieStorage=t.isSupported=t.storage=void 0;var n=r(2),a=o(n),i=r(0),u=o(i),s=r(4),l=o(s),c=null;(0,a.default)("localStorage")?t.storage=c=window.localStorage:(0,a.default)("sessionStorage")?t.storage=c=window.sessionStorage:(0,a.default)("cookieStorage")?t.storage=c=new u.default:t.storage=c=new l.default,t.default=c,t.storage=c,t.isSupported=a.default,t.CookieStorage=u.default,t.MemoryStorage=l.default},function(e,t,r){"use strict";function o(e){try{var t=window[e];return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"localStorage",t=String(e).replace(/storage$/i,"").toLowerCase();if("local"===t)return o("localStorage");if("session"===t)return o("sessionStorage");if("cookie"===t)return(0,a.hasCookies)();if("memory"===t)return!0;throw new Error("Storage method `"+e+"` is not available.\n Please use one of the following: localStorage, sessionStorage, cookieStorage, memoryStorage.")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a=r(0),i="__test"},function(e,t,r){"use strict";function o(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},n=e.split(s),u=o.decode||i,l=0;l0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.cookieOptions=Object.assign({path:"/"},t),s=void 0===t.prefix?s:t.prefix}return a(e,[{key:"getItem",value:function(e){var t=u.default.parse(document.cookie);return t&&t.hasOwnProperty(s+e)?t[s+e]:null}},{key:"setItem",value:function(e,t){return document.cookie=u.default.serialize(s+e,t,this.cookieOptions),t}},{key:"removeItem",value:function(e){var t=Object.assign({},this.cookieOptions,{maxAge:-1});return document.cookie=u.default.serialize(s+e,"",t),null}},{key:"clear",value:function(){var e=u.default.parse(document.cookie);for(var t in e)0===t.indexOf(s)&&this.removeItem(t.substr(s.length));return null}}]),e}();t.default=l},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=t.CookieStorage=t.isSupported=t.storage=void 0;var n=r(2),a=o(n),i=r(0),u=o(i),s=r(4),l=o(s),c=null;(0,a.default)("localStorage")?t.storage=c=window.localStorage:(0,a.default)("sessionStorage")?t.storage=c=window.sessionStorage:(0,a.default)("cookieStorage")?t.storage=c=new u.default:t.storage=c=new l.default,t.default=c,t.storage=c,t.isSupported=a.default,t.CookieStorage=u.default,t.MemoryStorage=l.default},function(e,t,r){"use strict";function o(e){try{var t=window[e];return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"localStorage",t=String(e).replace(/storage$/i,"").toLowerCase();if("local"===t)return o("localStorage");if("session"===t)return o("sessionStorage");if("cookie"===t)return(0,a.hasCookies)();if("memory"===t)return!0;throw new Error("Storage method `"+e+"` is not available.\n Please use one of the following: localStorage, sessionStorage, cookieStorage, memoryStorage.")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a=r(0),i="__test"},function(e,t,r){"use strict";function o(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},n=e.split(s),u=o.decode||i,l=0;l0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.cookieOptions=Object.assign({path:"/"},t),s=void 0===t.prefix?s:t.prefix}return a(e,[{key:"getItem",value:function(e){var t=u.default.parse(document.cookie);return t&&t.hasOwnProperty(s+e)?t[s+e]:null}},{key:"setItem",value:function(e,t){return document.cookie=u.default.serialize(s+e,t,this.cookieOptions),t}},{key:"removeItem",value:function(e){var t=Object.assign({},this.cookieOptions,{maxAge:-1});return document.cookie=u.default.serialize(s+e,"",t),null}},{key:"clear",value:function(){var e=u.default.parse(document.cookie);for(var t in e)0===t.indexOf(s)&&this.removeItem(t.substr(s.length));return null}}]),e}();t.default=l},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=t.CookieStorage=t.isSupported=t.storage=void 0;var n=r(2),a=o(n),i=r(0),u=o(i),s=r(4),l=o(s),c=null;(0,a.default)("localStorage")?t.storage=c=window.localStorage:(0,a.default)("sessionStorage")?t.storage=c=window.sessionStorage:(0,a.default)("cookieStorage")?t.storage=c=new u.default:t.storage=c=new l.default,t.default=c,t.storage=c,t.isSupported=a.default,t.CookieStorage=u.default,t.MemoryStorage=l.default},function(e,t,r){"use strict";function o(e){try{var t=window[e];return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"localStorage",t=String(e).replace(/storage$/i,"").toLowerCase();if("local"===t)return o("localStorage");if("session"===t)return o("sessionStorage");if("cookie"===t)return(0,a.hasCookies)();if("memory"===t)return!0;throw new Error("Storage method `"+e+"` is not available.\n Please use one of the following: localStorage, sessionStorage, cookieStorage, memoryStorage.")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var a=r(0),i="__test"},function(e,t,r){"use strict";function o(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},o=t||{},n=e.split(s),u=o.decode||i,l=0;l122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", -/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ -s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, -q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= -c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], -O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, -V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", -/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], -["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), -["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, -hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); -p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
    "+a+"
    ";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); -return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", +/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ +s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, +q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= +c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], +O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, +V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", +/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], +["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), +["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, +hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); +p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
    "+a+"
    ";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); +return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i Date: Sun, 1 Dec 2019 14:26:28 +0100 Subject: [PATCH 3/3] 7.2.1 specific fix --- .settings/org.eclipse.buildship.core.prefs | 2 +- bnd.bnd | 2 +- .../resources/META-INF/jsps/html/portal/api/jsonws/action.jsp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs index a7b84d9..70fd309 100644 --- a/.settings/org.eclipse.buildship.core.prefs +++ b/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,2 @@ -connection.project.dir=.. +connection.project.dir=../.. eclipse.preferences.version=1 diff --git a/bnd.bnd b/bnd.bnd index 4ee4533..42014bf 100644 --- a/bnd.bnd +++ b/bnd.bnd @@ -1,7 +1,7 @@ Bundle-Name: API JSONWS JSPs Ext Bundle-Description: Overrides core/kernel API JSONWS JSPs Bundle-SymbolicName: it.baxtheman.liferay.apijsonwsext -Bundle-Version: 7.2.0.5 +Bundle-Version: 7.2.1.5 Created-By: Daniele Baggio @baxtheman -sources: true Web-ContextPath: /api-jsonws-ext diff --git a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp index 0132769..faa8fb6 100644 --- a/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp +++ b/src/main/resources/META-INF/jsps/html/portal/api/jsonws/action.jsp @@ -231,7 +231,7 @@ String signature = ParamUtil.getString(request, "signature"); - + new ClipboardJS('.copy-clipboard');