diff --git a/vasl_templates/webapp/__init__.py b/vasl_templates/webapp/__init__.py index 9746ef8..5e91b8f 100644 --- a/vasl_templates/webapp/__init__.py +++ b/vasl_templates/webapp/__init__.py @@ -8,7 +8,7 @@ import logging.config from flask import Flask import yaml -from vasl_templates.webapp.config.constants import APP_NAME, BASE_DIR +from vasl_templates.webapp.config.constants import APP_NAME, APP_VERSION, BASE_DIR # --------------------------------------------------------------------- @@ -53,4 +53,7 @@ import vasl_templates.webapp.snippets #pylint: disable=cyclic-import @app.context_processor def inject_template_params(): """Inject template parameters into Jinja2.""" - return { "APP_NAME": APP_NAME } + return { + "APP_NAME": APP_NAME, + "APP_VERSION": APP_VERSION, + } diff --git a/vasl_templates/webapp/main.py b/vasl_templates/webapp/main.py index 784504a..576706d 100644 --- a/vasl_templates/webapp/main.py +++ b/vasl_templates/webapp/main.py @@ -21,8 +21,12 @@ def main(): def show_help(): """Show the help page.""" url = url_for( "static", filename="help/index.html" ) - if request.args.get( "embedded" ): - url += "?embedded=1" + args = [] + for arg in ("embedded","tab"): + if request.args.get( arg ): + args.append( "{}={}".format( arg, request.args[arg] ) ) + if args: + url += "?{}".format( "&".join( args ) ) return redirect( url, code=302 ) # --------------------------------------------------------------------- diff --git a/vasl_templates/webapp/static/css/main.css b/vasl_templates/webapp/static/css/main.css index 5945141..bbdbe3d 100644 --- a/vasl_templates/webapp/static/css/main.css +++ b/vasl_templates/webapp/static/css/main.css @@ -67,6 +67,12 @@ ul, ol { margin: 0.5em 0 0 1.25em ; br} /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +#tabs-help.ui-tabs-panel { background: #fff ; } + +#tabs-help iframe { width: 100% ; height: 99% ; border: none ; } + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + fieldset { margin: 0 5px 5px 5px ; padding: 10px ; border: 1px solid #888 ; background: #ffffff ; border-radius: 0 10px 0 0 ; } fieldset legend { padding: 0 0.2em 0 0.2em ; font-style: italic ; font-weight: bold ; } diff --git a/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.css b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.css new file mode 100755 index 0000000..dcd1e70 --- /dev/null +++ b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.css @@ -0,0 +1,48 @@ +div.jquery-image-zoom { + line-height: 0; + font-size: 0; + + z-index: 10; + + border: 5px solid #fff; + background: #eee; /* TM 25jan15: Added this to make it easier to see images with transparent backgrounds. */ + margin: -5px; + + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); +} + + div.jquery-image-zoom a { + background: url(jquery.imageZoom.png) no-repeat; + + display: block; + width: 25px; + height: 25px; + + position: absolute; + left: -17px; + top: -17px; + /* IE-users are prolly used to close-link in right-hand corner */ + *left: auto; + *right: -17px; + + text-decoration: none; + text-indent: -100000px; + outline: 0; + + z-index: 11; + } + + div.jquery-image-zoom a:hover { + background-position: left -25px; + } + + div.jquery-image-zoom img, + div.jquery-image-zoom embed, + div.jquery-image-zoom object, + div.jquery-image-zoom div { + width: 100%; + height: 100%; + margin: 0; + } diff --git a/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.min.js b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.min.js new file mode 100755 index 0000000..ccd572f --- /dev/null +++ b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.min.js @@ -0,0 +1 @@ +jQuery.fn.imageZoom=function(c,b){var a=c.extend({speed:200,dontFadeIn:1,hideClicked:1,imageMargin:30,className:"jquery-image-zoom",loading:"Loading..."},b);a.doubleSpeed=a.speed/4;c(document).keydown(function(d){if(d.keyCode==27){c("div.jquery-image-zoom a").click()}});return this.click(function(k){var h=c(k.target);var g=h.is("a")?h:h.parents("a");g=(g&&g.is("a")&&g.attr("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)$/gi)!=-1)?g:false;var i=(g&&g.find("img").length)?g.find("img"):false;c("div.jquery-image-zoom a").click();if(g){g.oldText=g.text();g.setLoadingImg=function(){if(i){i.css({opacity:"0.5"})}else{g.text(a.loading)}};g.setNotLoadingImg=function(){if(i){i.css({opacity:"1"})}else{g.text(g.oldText)}};var d=g.attr("href");if(c("div."+a.className+' img[src="'+d+'"]').length){return false}var j=function(l){g.setNotLoadingImg();var u=i?i:g;var q=i?a.hideClicked:0;var p=u.offset();var n={width:u.outerWidth(),height:u.outerHeight(),left:p.left,top:p.top};var o=c('
').css("position","absolute").appendTo(document.body);var m={width:l.width,height:l.height};var s={width:c(window).width(),height:c(window).height()};if(m.width>(s.width-a.imageMargin*2)){var r=s.width-a.imageMargin*2;m.height=(r/m.width)*m.height;m.width=r}if(m.height>(s.height-a.imageMargin*2)){var t=s.height-a.imageMargin*2;m.width=(t/m.height)*m.width;m.height=t}m.left=(s.width-m.width)/2+c(window).scrollLeft();m.top=(s.height-m.height)/2+c(window).scrollTop();var e=c('Close').appendTo(o).hide();if(q){g.css("visibility","hidden")}o.addClass(a.className).css(n).animate(m,a.speed,function(){e.fadeIn(a.doubleSpeed)});var v=function(){e.fadeOut(a.doubleSpeed,function(){o.animate(n,a.speed,function(){g.css("visibility","visible");o.remove()})});return false};o.click(v);e.click(v)};var f=new Image();f.src=d;if(f.complete){j(f)}else{g.setLoadingImg();f.onload=function(){j(f)}}return false}})}; \ No newline at end of file diff --git a/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.png b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.png new file mode 100755 index 0000000..2f5a381 Binary files /dev/null and b/vasl_templates/webapp/static/help/imageZoom/jquery.imageZoom.png differ diff --git a/vasl_templates/webapp/static/help/images/add-ssr.png b/vasl_templates/webapp/static/help/images/add-ssr.png new file mode 100755 index 0000000..fe1580d Binary files /dev/null and b/vasl_templates/webapp/static/help/images/add-ssr.png differ diff --git a/vasl_templates/webapp/static/help/images/add-ssr.small.png b/vasl_templates/webapp/static/help/images/add-ssr.small.png new file mode 100755 index 0000000..b51213d Binary files /dev/null and b/vasl_templates/webapp/static/help/images/add-ssr.small.png differ diff --git a/vasl_templates/webapp/static/help/images/draggable-overlays.png b/vasl_templates/webapp/static/help/images/draggable-overlays.png new file mode 100755 index 0000000..6170982 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/draggable-overlays.png differ diff --git a/vasl_templates/webapp/static/help/images/draggable-overlays.small.png b/vasl_templates/webapp/static/help/images/draggable-overlays.small.png new file mode 100755 index 0000000..8305277 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/draggable-overlays.small.png differ diff --git a/vasl_templates/webapp/static/help/images/edit-template.png b/vasl_templates/webapp/static/help/images/edit-template.png new file mode 100755 index 0000000..3a984e4 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/edit-template.png differ diff --git a/vasl_templates/webapp/static/help/images/edit-template.small.png b/vasl_templates/webapp/static/help/images/edit-template.small.png new file mode 100755 index 0000000..c02fb80 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/edit-template.small.png differ diff --git a/vasl_templates/webapp/static/help/images/hill-621.png b/vasl_templates/webapp/static/help/images/hill-621.png new file mode 100755 index 0000000..61befc4 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/hill-621.png differ diff --git a/vasl_templates/webapp/static/help/images/hill-621.small.png b/vasl_templates/webapp/static/help/images/hill-621.small.png new file mode 100755 index 0000000..2dee6d2 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/hill-621.small.png differ diff --git a/vasl_templates/webapp/static/help/images/load-template-pack.png b/vasl_templates/webapp/static/help/images/load-template-pack.png new file mode 100755 index 0000000..c1808dd Binary files /dev/null and b/vasl_templates/webapp/static/help/images/load-template-pack.png differ diff --git a/vasl_templates/webapp/static/help/images/load-template-pack.small.png b/vasl_templates/webapp/static/help/images/load-template-pack.small.png new file mode 100755 index 0000000..e1659ff Binary files /dev/null and b/vasl_templates/webapp/static/help/images/load-template-pack.small.png differ diff --git a/vasl_templates/webapp/static/help/images/ob_setup.png b/vasl_templates/webapp/static/help/images/ob_setup.png new file mode 100755 index 0000000..7210c14 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ob_setup.png differ diff --git a/vasl_templates/webapp/static/help/images/ob_setup.small.png b/vasl_templates/webapp/static/help/images/ob_setup.small.png new file mode 100755 index 0000000..dad49c0 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ob_setup.small.png differ diff --git a/vasl_templates/webapp/static/help/images/ob_vehicles.png b/vasl_templates/webapp/static/help/images/ob_vehicles.png new file mode 100755 index 0000000..9f7b025 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ob_vehicles.png differ diff --git a/vasl_templates/webapp/static/help/images/ob_vehicles.small.png b/vasl_templates/webapp/static/help/images/ob_vehicles.small.png new file mode 100755 index 0000000..a1b7ee1 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ob_vehicles.small.png differ diff --git a/vasl_templates/webapp/static/help/images/pf.png b/vasl_templates/webapp/static/help/images/pf.png new file mode 100755 index 0000000..4d13a25 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/pf.png differ diff --git a/vasl_templates/webapp/static/help/images/pf.small.png b/vasl_templates/webapp/static/help/images/pf.small.png new file mode 100755 index 0000000..1509de3 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/pf.small.png differ diff --git a/vasl_templates/webapp/static/help/images/scenario-vasl.png b/vasl_templates/webapp/static/help/images/scenario-vasl.png new file mode 100755 index 0000000..ac8555a Binary files /dev/null and b/vasl_templates/webapp/static/help/images/scenario-vasl.png differ diff --git a/vasl_templates/webapp/static/help/images/scenario-vasl.small.png b/vasl_templates/webapp/static/help/images/scenario-vasl.small.png new file mode 100755 index 0000000..ef891ef Binary files /dev/null and b/vasl_templates/webapp/static/help/images/scenario-vasl.small.png differ diff --git a/vasl_templates/webapp/static/help/images/scenario.png b/vasl_templates/webapp/static/help/images/scenario.png new file mode 100755 index 0000000..9aed418 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/scenario.png differ diff --git a/vasl_templates/webapp/static/help/images/scenario.small.png b/vasl_templates/webapp/static/help/images/scenario.small.png new file mode 100755 index 0000000..dd716eb Binary files /dev/null and b/vasl_templates/webapp/static/help/images/scenario.small.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr-template.png b/vasl_templates/webapp/static/help/images/ssr-template.png new file mode 100755 index 0000000..40398fc Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr-template.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr-template.small.png b/vasl_templates/webapp/static/help/images/ssr-template.small.png new file mode 100755 index 0000000..3c6d8a2 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr-template.small.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr-template2.png b/vasl_templates/webapp/static/help/images/ssr-template2.png new file mode 100755 index 0000000..de9789c Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr-template2.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr-template2.small.png b/vasl_templates/webapp/static/help/images/ssr-template2.small.png new file mode 100755 index 0000000..3cc8353 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr-template2.small.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr.png b/vasl_templates/webapp/static/help/images/ssr.png new file mode 100755 index 0000000..f073777 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr.png differ diff --git a/vasl_templates/webapp/static/help/images/ssr.small.png b/vasl_templates/webapp/static/help/images/ssr.small.png new file mode 100755 index 0000000..743474b Binary files /dev/null and b/vasl_templates/webapp/static/help/images/ssr.small.png differ diff --git a/vasl_templates/webapp/static/help/images/vc-vasl.png b/vasl_templates/webapp/static/help/images/vc-vasl.png new file mode 100755 index 0000000..9a9a3bc Binary files /dev/null and b/vasl_templates/webapp/static/help/images/vc-vasl.png differ diff --git a/vasl_templates/webapp/static/help/images/vc-vasl.small.png b/vasl_templates/webapp/static/help/images/vc-vasl.small.png new file mode 100755 index 0000000..d9fb7f3 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/vc-vasl.small.png differ diff --git a/vasl_templates/webapp/static/help/images/vc.png b/vasl_templates/webapp/static/help/images/vc.png new file mode 100755 index 0000000..4560c44 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/vc.png differ diff --git a/vasl_templates/webapp/static/help/images/vc.small.png b/vasl_templates/webapp/static/help/images/vc.small.png new file mode 100755 index 0000000..abf2590 Binary files /dev/null and b/vasl_templates/webapp/static/help/images/vc.small.png differ diff --git a/vasl_templates/webapp/static/help/index.html b/vasl_templates/webapp/static/help/index.html index c19f06e..0d897ea 100644 --- a/vasl_templates/webapp/static/help/index.html +++ b/vasl_templates/webapp/static/help/index.html @@ -4,13 +4,297 @@