From 81e9fa27935fa28522d3353d2946699dbe410028 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 12 Dec 2014 23:25:19 -0300 Subject: [PATCH 1/4] Test new release plugin. --- pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index 1c365129..71a0dd3a 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,10 @@ ${project.basedir}/wise-webapps + + scm:git:git@bitbucket.org:wisemapping/wisemapping-open-source.git + + 4.0.0 org.wisemapping wisemapping @@ -90,6 +94,11 @@ native2ascii-maven-plugin 1.0-beta-1 + + org.apache.maven.plugins + maven-release-plugin + 2.5 + @@ -173,6 +182,15 @@ + + external.atlassian.jgitflow + jgitflow-maven-plugin + 1.0-m4.3 + + master + develop + + From 8003ef73bf2e2070dcecd43a77aef76b14c4dc92 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 16 Dec 2014 00:43:40 -0300 Subject: [PATCH 2/4] Fix Swagger console base URL location issue. --- distribution/package-bin.sh | 2 +- .../src/main/webapp/WEB-INF/app.properties | 2 +- .../src/main/webapp/doc/rest/index.html | 2 +- .../src/main/webapp/doc/rest/swagger-ui.js | 372 +++++++++--------- 4 files changed, 188 insertions(+), 190 deletions(-) diff --git a/distribution/package-bin.sh b/distribution/package-bin.sh index cae1ff18..6ea459b3 100755 --- a/distribution/package-bin.sh +++ b/distribution/package-bin.sh @@ -8,7 +8,7 @@ BASE_DIR=`pwd` TARGET_DIR=$BASE_DIR/target JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping -JETTY_VERSION=8.1.14.v20131031 +JETTY_VERSION=8.1.16.v20140903 JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION} JETTY_ZIP=${JETTY_DIST_DIR}.zip diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index ce732333..02ebda63 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -143,7 +143,7 @@ security.openid.enabled=false # REST Documentation # -# This properties are used for REST API Documentation( http://localhost:8080/doc/rest/index.html) +# This properties are used for REST API Documentation( http://localhost:8080/wisemapping/doc/rest/index.html) # Change the URL for proper documentation console setup. documentation.services.basePath=http://localhost:8080/wisemapping/service documentation.services.version=3.0.1 diff --git a/wise-webapp/src/main/webapp/doc/rest/index.html b/wise-webapp/src/main/webapp/doc/rest/index.html index 3835996c..976d6b9a 100755 --- a/wise-webapp/src/main/webapp/doc/rest/index.html +++ b/wise-webapp/src/main/webapp/doc/rest/index.html @@ -24,7 +24,7 @@ supportedSubmitMethods: ['get', 'post', 'put', 'delete'], onComplete: function(swaggerApi, swaggerUi){ if(console) { - console.log("Loaded SwaggerUI") + console.log("Loaded SwaggerUI") } $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, diff --git a/wise-webapp/src/main/webapp/doc/rest/swagger-ui.js b/wise-webapp/src/main/webapp/doc/rest/swagger-ui.js index 56f284a2..f72e763e 100755 --- a/wise-webapp/src/main/webapp/doc/rest/swagger-ui.js +++ b/wise-webapp/src/main/webapp/doc/rest/swagger-ui.js @@ -1,187 +1,187 @@ -$(function() { - - // Helper function for vertically aligning DOM elements - // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ - $.fn.vAlign = function() { - return this.each(function(i){ - var ah = $(this).height(); - var ph = $(this).parent().height(); - var mh = (ph - ah) / 2; - $(this).css('margin-top', mh); - }); - }; - - $.fn.stretchFormtasticInputWidthToParent = function() { - return this.each(function(i){ - var p_width = $(this).closest("form").innerWidth(); - var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10); - var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); - $(this).css('width', p_width - p_padding - this_padding); - }); - }; - - $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); - - // Vertically center these paragraphs - // Parent may need a min-height for this to work.. - $('ul.downplayed li div.content p').vAlign(); - - // When a sandbox form is submitted.. - $("form.sandbox").submit(function(){ - - var error_free = true; - - // Cycle through the forms required inputs - $(this).find("input.required").each(function() { - - // Remove any existing error styles from the input - $(this).removeClass('error'); - - // Tack the error style on if the input is empty.. - if ($(this).val() == '') { - $(this).addClass('error'); - $(this).wiggle(); - error_free = false; - } - - }); - - return error_free; - }); - -}); - -function clippyCopiedCallback(a) { - $('#api_key_copied').fadeIn().delay(1000).fadeOut(); - - // var b = $("#clippy_tooltip_" + a); - // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { - // b.attr("title", "copy to clipboard") - // }, - // 500)) -} - -// Logging function that accounts for browsers that don't have window.console -function log() { - if (window.console) console.log.apply(console,arguments); -} -// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) -if (Function.prototype.bind && console && typeof console.log == "object") { - [ - "log","info","warn","error","assert","dir","clear","profile","profileEnd" - ].forEach(function (method) { - console[method] = this.bind(console[method], console); - }, Function.prototype.call); -} - -var Docs = { - - shebang: function() { - - // If shebang has an operation nickname in it.. - // e.g. /docs/#!/words/get_search - var fragments = $.param.fragment().split('/'); - fragments.shift(); // get rid of the bang - - switch (fragments.length) { - case 1: - // Expand all operations for the resource and scroll to it -// log('shebang resource:' + fragments[0]); - var dom_id = 'resource_' + fragments[0]; - - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - break; - case 2: - // Refer to the endpoint DOM element, e.g. #words_get_search -// log('shebang endpoint: ' + fragments.join('_')); - - // Expand Resource - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - - // Expand operation - var li_dom_id = fragments.join('_'); - var li_content_dom_id = li_dom_id + "_content"; - -// log("li_dom_id " + li_dom_id); -// log("li_content_dom_id " + li_content_dom_id); - - Docs.expandOperation($('#'+li_content_dom_id)); - $('#'+li_dom_id).slideto({highlight: false}); - break; - } - - }, - - toggleEndpointListForResource: function(resource) { - var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); - if (elem.is(':visible')) { - Docs.collapseEndpointListForResource(resource); - } else { - Docs.expandEndpointListForResource(resource); - } - }, - - // Expand resource - expandEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideDown(); - return; - } - - $('li#resource_' + resource).addClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideDown(); - }, - - // Collapse resource and mark as explicitly closed - collapseEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - $('li#resource_' + resource).removeClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideUp(); - }, - - expandOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideDown(); - return; - } - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.expandOperation($(this)); - }); - }, - - collapseOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.collapseOperation($(this)); - }); - }, - - escapeResourceName: function(resource) { - return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); - }, - - expandOperation: function(elem) { - elem.slideDown(); - }, - - collapseOperation: function(elem) { - elem.slideUp(); - } - -}; +$(function() { + + // Helper function for vertically aligning DOM elements + // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ + $.fn.vAlign = function() { + return this.each(function(i){ + var ah = $(this).height(); + var ph = $(this).parent().height(); + var mh = (ph - ah) / 2; + $(this).css('margin-top', mh); + }); + }; + + $.fn.stretchFormtasticInputWidthToParent = function() { + return this.each(function(i){ + var p_width = $(this).closest("form").innerWidth(); + var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10); + var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); + $(this).css('width', p_width - p_padding - this_padding); + }); + }; + + $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); + + // Vertically center these paragraphs + // Parent may need a min-height for this to work.. + $('ul.downplayed li div.content p').vAlign(); + + // When a sandbox form is submitted.. + $("form.sandbox").submit(function(){ + + var error_free = true; + + // Cycle through the forms required inputs + $(this).find("input.required").each(function() { + + // Remove any existing error styles from the input + $(this).removeClass('error'); + + // Tack the error style on if the input is empty.. + if ($(this).val() == '') { + $(this).addClass('error'); + $(this).wiggle(); + error_free = false; + } + + }); + + return error_free; + }); + +}); + +function clippyCopiedCallback(a) { + $('#api_key_copied').fadeIn().delay(1000).fadeOut(); + + // var b = $("#clippy_tooltip_" + a); + // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { + // b.attr("title", "copy to clipboard") + // }, + // 500)) +} + +// Logging function that accounts for browsers that don't have window.console +function log() { + if (window.console) console.log.apply(console,arguments); +} +// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) +if (Function.prototype.bind && console && typeof console.log == "object") { + [ + "log","info","warn","error","assert","dir","clear","profile","profileEnd" + ].forEach(function (method) { + console[method] = this.bind(console[method], console); + }, Function.prototype.call); +} + +var Docs = { + + shebang: function() { + + // If shebang has an operation nickname in it.. + // e.g. /docs/#!/words/get_search + var fragments = $.param.fragment().split('/'); + fragments.shift(); // get rid of the bang + + switch (fragments.length) { + case 1: + // Expand all operations for the resource and scroll to it +// log('shebang resource:' + fragments[0]); + var dom_id = 'resource_' + fragments[0]; + + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + break; + case 2: + // Refer to the endpoint DOM element, e.g. #words_get_search +// log('shebang endpoint: ' + fragments.join('_')); + + // Expand Resource + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + + // Expand operation + var li_dom_id = fragments.join('_'); + var li_content_dom_id = li_dom_id + "_content"; + +// log("li_dom_id " + li_dom_id); +// log("li_content_dom_id " + li_content_dom_id); + + Docs.expandOperation($('#'+li_content_dom_id)); + $('#'+li_dom_id).slideto({highlight: false}); + break; + } + + }, + + toggleEndpointListForResource: function(resource) { + var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); + if (elem.is(':visible')) { + Docs.collapseEndpointListForResource(resource); + } else { + Docs.expandEndpointListForResource(resource); + } + }, + + // Expand resource + expandEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + if (resource == '') { + $('.resource ul.endpoints').slideDown(); + return; + } + + $('li#resource_' + resource).addClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideDown(); + }, + + // Collapse resource and mark as explicitly closed + collapseEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + $('li#resource_' + resource).removeClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideUp(); + }, + + expandOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + if (resource == '') { + $('.resource ul.endpoints li.operation div.content').slideDown(); + return; + } + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.expandOperation($(this)); + }); + }, + + collapseOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.collapseOperation($(this)); + }); + }, + + escapeResourceName: function(resource) { + return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); + }, + + expandOperation: function(elem) { + elem.slideDown(); + }, + + collapseOperation: function(elem) { + elem.slideUp(); + } + +}; (function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) { @@ -1281,10 +1281,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }; SwaggerUi.prototype.buildUrl = function(base, url) { - var parts; console.log("base is " + base); - parts = base.split("/"); - base = parts[0] + "//" + parts[2]; + base = base.substring(0,base.indexOf("/doc/")); if (url.indexOf("/") === 0) { return base + url; } else { From 079c6499664810f0276b942dc4b079fb2350b21f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 16 Dec 2014 21:03:19 -0300 Subject: [PATCH 3/4] Fix typo... --- wise-webapp/src/main/webapp/doc/rest/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/doc/rest/index.html b/wise-webapp/src/main/webapp/doc/rest/index.html index 976d6b9a..7201f9ad 100755 --- a/wise-webapp/src/main/webapp/doc/rest/index.html +++ b/wise-webapp/src/main/webapp/doc/rest/index.html @@ -66,7 +66,7 @@

Welcome REST API Console

Use this console to learn how to use WiseMapping REST APIs.

-

Important: Don't forget to configure your server host url in /WEB-INF/app.properties. By default it's configure to http://localhost:8080/wisemapping/

+

Important: Don't forget to configure your server host url in /WEB-INF/app.properties. By default it's configured to http://localhost:8080/wisemapping/

From 277bd499da9ca385e05d95f60574e3fb045d2a6e Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Fri, 26 Dec 2014 20:11:41 -0300 Subject: [PATCH 4/4] change api for url thumbnails --- mindplot/src/main/javascript/widget/LinkIconTooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindplot/src/main/javascript/widget/LinkIconTooltip.js b/mindplot/src/main/javascript/widget/LinkIconTooltip.js index d1a01fca..dfffb9db 100644 --- a/mindplot/src/main/javascript/widget/LinkIconTooltip.js +++ b/mindplot/src/main/javascript/widget/LinkIconTooltip.js @@ -67,7 +67,7 @@ mindplot.widget.LinkIconTooltip = new Class({ }); var img = new Element('img', { - src:'https://api.thumbalizr.com/?url=' + linkIcon.getModel().getUrl() + '&width=250', + src:'http://free.pagepeeker.com/v2/thumbs.php?size=m&url=' + linkIcon.getModel().getUrl(), img:linkIcon.getModel().getUrl(), alt:linkIcon.getModel().getUrl() }