Revision: 10180
http://sourceforge.net/p/languagetool/code/10180
Author: dnaber
Date: 2013-06-02 20:04:31 +0000 (Sun, 02 Jun 2013)
Log Message:
-----------
declutter homepage by moving tips to a popup that appears automatically after
download starts
Modified Paths:
--------------
trunk/website/include/download.php
trunk/website/include/downloadStandAlone.php
trunk/website/include/header.php
trunk/website/www/index.php
Added Paths:
-----------
trunk/website/www/css/zebra_dialog.css
trunk/website/www/js/zebra_dialog.js
Modified: trunk/website/include/download.php
===================================================================
--- trunk/website/include/download.php 2013-06-02 19:46:30 UTC (rev 10179)
+++ trunk/website/include/download.php 2013-06-02 20:04:31 UTC (rev 10180)
@@ -5,10 +5,11 @@
if( !isset($downloadLabel) ) $downloadLabel = "for
LibreOffice/OpenOffice";
if( !isset($downloadVersionLabel) ) $downloadVersionLabel = "Version";
if( !isset($downloadLabelMB) ) $downloadLabelMB = "MB";
+if( !isset($onclick) ) $onclick = "";
?>
<div class="downloadButton">
- <a class='piwik_download' href="/download/LanguageTool-<?php print $version
?>.oxt">
+ <a <?php print $onclick ?> class='piwik_download'
href="/download/LanguageTool-<?php print $version ?>.oxt">
<img class="downloadButtonLogo" src="<?php print $rootUrl
?>/images/LanguageToolBig.png" alt="LT logo"/>
<span class="languagetool"><?php print $downloadTitle ?></span><br/>
<span class="download"><?php print $downloadLabel ?></span><br/>
Modified: trunk/website/include/downloadStandAlone.php
===================================================================
--- trunk/website/include/downloadStandAlone.php 2013-06-02 19:46:30 UTC
(rev 10179)
+++ trunk/website/include/downloadStandAlone.php 2013-06-02 20:04:31 UTC
(rev 10180)
@@ -5,10 +5,11 @@
if( !isset($downloadLabelStandAlone) ) $downloadLabelStandAlone = "for
stand-alone use";
if( !isset($downloadVersionLabelStandAlone) ) $downloadVersionLabel =
"Version";
if( !isset($downloadLabelMB) ) $downloadLabelMB = "MB";
+if( !isset($onclick) ) $onclick = "";
?>
<div class="downloadButton">
- <a class='piwik_download' href="/download/LanguageTool-<?php print $version
?>.zip">
+ <a <?php print $onclick ?> class='piwik_download'
href="/download/LanguageTool-<?php print $version ?>.zip">
<img class="downloadButtonLogo" src="<?php print $rootUrl
?>/images/LanguageToolBig.png" alt="LT logo"/>
<span class="languagetool"><?php print $downloadTitleStandAlone
?></span><br/>
<span class="download"><?php print $downloadLabelStandAlone ?></span><br/>
Modified: trunk/website/include/header.php
===================================================================
--- trunk/website/include/header.php 2013-06-02 19:46:30 UTC (rev 10179)
+++ trunk/website/include/header.php 2013-06-02 20:04:31 UTC (rev 10180)
@@ -30,6 +30,32 @@
// -->
</script>
<?php } ?>
+
+ <?php if ($enable_download_dialogs) { ?>
+ <script type="text/javascript" src="<?php print $rootUrl
?>/js/zebra_dialog.js"></script>
+ <link href="<?php print $rootUrl ?>/css/zebra_dialog.css"
rel="stylesheet" type="text/css" />
+ <script type="text/javascript">
+ <!--
+ function showDownloadOfficeThanks() {
+ $.Zebra_Dialog('<b>Thanks for downloading LanguageTool!</b>' +
+ '<ul>' +
+ '<li>Use <em>Tools → Extension Manager →
Add…</em> in LibreOffice/OpenOffice to install this file</li>' +
+ ' <li><strong>Restart LibreOffice/OpenOffice</strong>
(including quickstarter) after installation of the extension</li>' +
+ ' <li>If you are using LibreOffice and you want to check
English texts:' +
+ ' Use <em>Options → Language Settings → Writing
Aids → Edit…</em> to disable LightProof and enable LanguageTool for
English</li>' +
+ ' <li><strong>Having problems? Please see <a href="<?php
print $rootUrl ?>/issues">the list of common problems</a>.</strong></li>' +
+ '</ul>',
+ {width: 600});
+ }
+ function showDownloadStandaloneThanks() {
+ $.Zebra_Dialog('<b>Thanks for downloading
LanguageTool!</b><p>Unzip the file and start languagetool-standalone.jar by
double clicking it.</p>' +
+ '<p>Advanced options are described at <a href="<?php print
$rootUrl ?>/usage/">other ways to use LanguageTool</a>.',
+ {width: 600});
+ }
+ // -->
+ </script>
+ <?php } ?>
+
<?php if ($enable_tablesorter) { ?>
<link href="<?php print $rootUrl ?>/css/tablesorter-style.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php print $rootUrl
?>/js/jquery-1.4.min.js"></script>
Added: trunk/website/www/css/zebra_dialog.css
===================================================================
--- trunk/website/www/css/zebra_dialog.css (rev 0)
+++ trunk/website/www/css/zebra_dialog.css 2013-06-02 20:04:31 UTC (rev
10180)
@@ -0,0 +1,185 @@
+.ZebraDialog *,
+.ZebraDialog *:after,
+.ZebraDialog *:before { -moz-box-sizing: content-box !important;
-webkit-box-sizing: content-box !important; box-sizing: content-box !important }
+
+.ZebraDialog {
+ width: 350px;
+ z-index: 1001;
+}
+
+.ZebraDialog,
+.ZebraDialog .ZebraDialog_Title,
+.ZebraDialog .ZebraDialog_Body,
+.ZebraDialog .ZebraDialog_Buttons a {
+ margin: 0;
+ padding: 0;
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
+ font-size: 14px;
+ text-align: left;
+}
+
+.ZebraDialog .ZebraDialog_Title,
+.ZebraDialog .ZebraDialog_BodyOuter,
+.ZebraDialog .ZebraDialog_Buttons {
+ border-color: #13252F;
+ border-width: 7px;
+}
+
+.ZebraDialog .ZebraDialog_Title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #F6F5F5;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ background: #444444;
+ padding: 12px 15px;
+ line-height: 1;
+}
+
+/* set background color here and not on ZebraDialog_Body, or you'll
eventually run into problems with rounded corners
+ when using smaller widths for border! */
+.ZebraDialog .ZebraDialog_BodyOuter {
+ background: #E7EDEF;
+}
+
+.ZebraDialog .ZebraDialog_Body {
+ color: #44484A;
+ padding: 20px;
+ border-top-color: #000;
+ border-bottom-color: #FFF;
+}
+
+.ZebraDialog .ZebraDialog_Buttons {
+ background: #E7EDEF;
+ padding: 10px 5px 10px 10px;
+}
+
+.ZebraDialog .ZebraDialog_Buttons a {
+ font-weight: bold;
+ color: #FFF;
+ text-shadow: 1px 0px 2px #222;
+ padding: 10px 15px;
+}
+
+.ZebraDialog .ZebraDialog_Buttons a:hover {
+ background: #224467;
+ color: #FFF
+}
+
+.ZebraDialogOverlay {
+ background: #666;
+ z-index: 1000;
+}
+
+/* = YOU SHOULD NOT CHANGE ANYTHING FROM THIS POINT ON
+---------------------------------------------------------------------------------------------------------------------*/
+.ZebraDialog {
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+}
+
+.ZebraDialog .ZebraDialog_Title {
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ -webkit-border-radius: 10px 10px 0 0;
+ -moz-border-radius: 10px 10px 0 0;
+ border-radius: 10px 10px 0 0;
+}
+
+.ZebraDialog .ZebraDialog_BodyOuter {
+ border-left-style: solid;
+ border-right-style: solid;
+}
+
+.ZebraDialog .ZebraDialog_NoTitle {
+ border-top-style: solid;
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-top-left-radius: 10px;
+ border-top-left-radius: 10px;
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-top-right-radius: 10px;
+ border-top-right-radius: 10px;
+}
+
+.ZebraDialog .ZebraDialog_NoButtons {
+ border-bottom-style: solid;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-bottom-left-radius: 10px;
+ border-bottom-left-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-bottom-right-radius: 10px;
+ border-bottom-right-radius: 10px;
+}
+
+.ZebraDialog .ZebraDialog_Body {
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-bottom-width: 2px;
+ border-bottom-style: groove;
+ overflow: auto;
+}
+
+.ZebraDialog .ZebraDialog_NoTitle .ZebraDialog_Body {
+ border-top: none;
+}
+
+.ZebraDialog .ZebraDialog_NoButtons .ZebraDialog_Body {
+ border-bottom: none;
+}
+
+.ZebraDialog .ZebraDialog_Icon {
+ background-repeat: no-repeat;
+ background-position: 20px 20px;
+ padding-left: 88px;
+ min-height: 48px;
+ _height: 85px;
+}
+
+.ZebraDialog .ZebraDialog_Confirmation { background-image:
url('confirmation.png') }
+.ZebraDialog .ZebraDialog_Error { background-image: url('error.png') }
+.ZebraDialog .ZebraDialog_Information { background-image:
url('information.png') }
+.ZebraDialog .ZebraDialog_Question { background-image:
url('question.png') }
+.ZebraDialog .ZebraDialog_Warning { background-image: url('warning.png')
}
+
+.ZebraDialog .ZebraDialog_Buttons {
+ border-left-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ -webkit-border-radius: 0 0 10px 10px;
+ -moz-border-radius: 0 0 10px 10px;
+ border-radius: 0 0 10px 10px;
+}
+
+.ZebraDialog .ZebraDialog_Buttons a {
+ white-space: nowrap;
+ text-align: center;
+ text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ float: right;
+ margin-right: 5px;
+ min-width: 60px;
+ _width: 60px;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+
+ /* taken from Twitter Bootstrap */
+ background-color: #006DCC;
+ *background-color: #0044CC;
+ background-image: -moz-linear-gradient(top, #0088CC, #0044CC);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088CC),
to(#0044CC));
+ background-image: -webkit-linear-gradient(top, #0088CC, #0044CC);
+ background-image: -o-linear-gradient(top, #0088CC, #0044CC);
+ background-image: linear-gradient(to bottom, #0088CC, #0044CC);
+ background-repeat: repeat-x;
+ border-color: #0044CC #0044CC #002A80;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF0088CC',
endColorstr='#FF0044CC', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.ZebraDialog .ZebraDialog_Preloader {
+ height: 32px;
+ background: url('preloader.gif') no-repeat center center;
+}
\ No newline at end of file
Modified: trunk/website/www/index.php
===================================================================
--- trunk/website/www/index.php 2013-06-02 19:46:30 UTC (rev 10179)
+++ trunk/website/www/index.php 2013-06-02 20:04:31 UTC (rev 10180)
@@ -2,9 +2,10 @@
$page = "homepage";
$title = "LanguageTool";
$title2 = "Style and Grammar Checker";
-$lastmod = "2013-04-07 14:00:00 CET";
+$lastmod = "2013-06-01 22:00:00 CET";
$enable_fancybox = 1;
$enable_textcheck = 1;
+$enable_download_dialogs = 1;
include("../include/header.php");
include("../include/browser_language.php");
?>
@@ -86,58 +87,48 @@
<p>Using LanguageTool locally requires <?=show_link("Java 6",
"http://www.java.com/en/download/manual.jsp", 0)?> or later.
<strong>Having problems? Please see the <?=show_link("list of common
problems", "issues", 0)?>.</strong></p>
+<noscript class="warning">Please activate Javascript - we use it to display
some tips after you start a download</noscript>
+
<div class="downloadSection">
<table width="100%">
<tr>
<td>
<?php
$downloadPath = "download";
+ $onclick =
"onclick=\"setTimeout(function(){showDownloadOfficeThanks()},500)\"";
include("../include/download.php");
?>
+ <div style="margin-left: 5px">
+ <a href="#" onclick="showDownloadOfficeThanks()">Help</a>
+ </div>
</td>
<td> </td>
<td>
<?php
$downloadPath = "download";
+ $onclick =
"onclick=\"setTimeout(function(){showDownloadStandaloneThanks()},500)\"";
include("../include/downloadStandAlone.php");
?>
+ <div style="margin-left: 5px">
+ <a href="#" onclick="showDownloadStandaloneThanks()">Help</a>
+ </div>
</td>
</tr>
<tr>
- <td valign="top">
- <ul style="padding-left: 20px">
- <li>Use <em>Tools → Extension Manager → Add…</em>
in LibreOffice/OpenOffice.org to install this file</li>
- <li><strong>Restart LibreOffice/OpenOffice.org</strong> after
installation of the extension</li>
- <li>If you are using LibreOffice <!--3.5 or later--> and you want
to check English texts:
- Use <em>Options → Language Settings → Writing Aids
→ Edit…</em> to disable LightProof and enable LanguageTool for
English</li>
- <li>We recommend using
- <a href="http://www.libreoffice.org/download">LibreOffice 3.5.4
or later</a> or
- <a href="http://www.openoffice.org/download/">Apache OpenOffice
3.4.1 or later</a> as older versions
- have a bug that causes a freeze on startup</li>
- </ul>
+ <td valign="top" align="middle" colspan="3">
- </td>
+ <br/>
+ <br/>
- <td></td>
-
- <td valign="top">
-
- <ul style="padding-left: 20px">
- <li>Unzip the file and start languagetool-standalone.jar by double
clicking it.
- Also see <?=show_link("other ways to use LanguageTool",
"usage/", 0)?>.</li>
- </ul>
-
- <br/>
-
<?php
include("../include/downloadFx.php");
?>
-
- <ul style="padding-left: 20px">
- <li>Check selected text on websites and text in text fields. No
Java required!</li>
- </ul>
-
+
+ <div style="margin-left: 5px">
+ Check selected text on websites and<br/>text in text fields. No
Java required!
+ </div>
+
</td>
</tr>
Added: trunk/website/www/js/zebra_dialog.js
===================================================================
--- trunk/website/www/js/zebra_dialog.js (rev 0)
+++ trunk/website/www/js/zebra_dialog.js 2013-06-02 20:04:31 UTC (rev
10180)
@@ -0,0 +1 @@
+(function(d){d.Zebra_Dialog=function(g,k){var
s={animation_speed_hide:250,animation_speed_show:0,auto_close:!1,buttons:!0,custom_class:!1,keyboard:!0,max_height:0,message:"",modal:!0,overlay_close:!0,overlay_opacity:0.9,position:"center",reposition_speed:100,source:!1,title:"",type:"information",vcenter_short_message:!0,width:0,onClose:null},a=this;a.settings={};options={};"string"==typeof
g&&(options.message=g);if("object"==typeof g||"object"==typeof
k)options=d.extend(options,"object"==typeof g?
g:k);a.init=function(){a.settings=d.extend({},s,options);a.isIE6="explorer"==j.name&&6==j.version||!1;a.settings.modal&&(a.overlay=jQuery("<div>",{"class":"ZebraDialogOverlay"}).css({position:a.isIE6?"absolute":"fixed",left:0,top:0,opacity:a.settings.overlay_opacity}),a.settings.overlay_close&&a.overlay.bind("click",function(){a.close()}),a.overlay.appendTo("body"));a.dialog=jQuery("<div>",{"class":"ZebraDialog"+(a.settings.custom_class?"
"+a.settings.custom_class:"")}).css({position:a.isI
E6?"absolute":
"fixed",left:0,top:0,visibility:"hidden"});!a.settings.buttons&&a.settings.auto_close&&a.dialog.attr("id","ZebraDialog_"+Math.floor(9999999*Math.random()));var
e=parseInt(a.settings.width);!isNaN(e)&&(e==a.settings.width&&e.toString()==a.settings.width.toString()&&0<e)&&a.dialog.css({width:a.settings.width});a.settings.title&&jQuery("<h3>",{"class":"ZebraDialog_Title"}).html(a.settings.title).appendTo(a.dialog);e=jQuery("<div>",{"class":"ZebraDialog_BodyOuter"+(!a.settings.title?"
ZebraDialog_NoTitle": "")+(!l()?"
ZebraDialog_NoButtons":"")}).appendTo(a.dialog);a.message=jQuery("<div>",{"class":"ZebraDialog_Body"+(""!=m()?"
ZebraDialog_Icon
ZebraDialog_"+m():"")});0<a.settings.max_height&&(a.message.css("max-height",a.settings.max_height),a.isIE6&&a.message.attr("style","height:
expression(this.scrollHeight > "+a.settings.max_height+' ?
"'+a.settings.max_height+'px" :
"85px")'));a.settings.vcenter_short_message?jQuery("<div>").html(a.settings.message).appendTo(a.messa
ge):a.message.html(a.settings.message); if(a.settings.source&&"object"==typeof
a.settings.source){var
b=a.settings.vcenter_short_message?d("div:first",a.message):a.message,c;for(c
in a.settings.source)switch(c){case "ajax":var f="string"==typeof
a.settings.source[c]?{url:a.settings.source[c]}:a.settings.source[c],g=jQuery("<div>").attr("class","ZebraDialog_Preloader").appendTo(b);f.success=function(a){g.remove();b.append(a);h(!1)};d.ajax(f);break;case
"iframe":iframe_options=d.extend({width:"100%",height:"100%",marginheight:"0",marginwidth:"0",
frameborder:"0"},"string"==typeof
a.settings.source[c]?{src:a.settings.source[c]}:a.settings.source[c]);b.append(jQuery("<iframe>").attr(iframe_options));break;case
"inline":b.append(a.settings.source[c])}}a.message.appendTo(e);if(c=l()){var
n=jQuery("<div>",{"class":"ZebraDialog_Buttons"}).appendTo(a.dialog);d.each(c,function(e,b){var
c=jQuery("<a>",{href:"javascript:void(0)","class":"ZebraDialog_Button"+e});d.isPlainObject(b)?c.html(b.capti
on):c.html(b);c.bind("click",function(){void 0!=b.callback&&
b.callback(a.dialog);a.close(void
0!=b.caption?b.caption:b)});c.appendTo(n)});jQuery("<div>",{style:"clear:both"}).appendTo(n)}a.dialog.appendTo("body");d(window).bind("resize",h);a.settings.keyboard&&d(document).bind("keyup",p);a.isIE6&&d(window).bind("scroll",q);!1!==a.settings.auto_close&&(a.dialog.bind("click",function(){clearTimeout(a.timeout);a.close()}),a.timeout=setTimeout(a.close,a.settings.auto_close));h(!1);return
a};a.close=function(e){a.settings.keyboard&&d(document).unbind("keyup",p);
a.isIE6&&d(window).unbind("scroll",q);d(window).unbind("resize",h);a.overlay&&a.overlay.animate({opacity:0},a.settings.animation_speed_hide,function(){a.overlay.remove()});a.dialog.animate({top:0,opacity:0},a.settings.animation_speed_hide,function(){a.dialog.remove();if(a.settings.onClose&&"function"==typeof
a.settings.onClose)a.settings.onClose(void 0!=e?e:"")})};var h=function(e){var
b=d(window).width(),c=d(window).height(),f=
a.dialog.width(),g=a.dialog.height(),f={left:0,top:0,right:b-f,bottom:c-
g,center:(b-f)/2,middle:(c-g)/2};a.dialog_left=void 0;a.dialog_top=void
0;a.settings.modal&&a.overlay.css({width:b,height:c});d.isArray(a.settings.position)&&(2==a.settings.position.length&&"string"==typeof
a.settings.position[0]&&a.settings.position[0].match(/^(left|right|center)[\s0-9\+\-]*$/)&&"string"==typeof
a.settings.position[1]&&a.settings.position[1].match(/^(top|bottom|middle)[\s0-9\+\-]*$/))&&(a.settings.position[0]=a.settings.position[0].toLowerCase(),a.settings.position[1]=a.settings.position[1].toLowerCase(),
d.each(f,function(b,e){for(var c=0;2>c;c++){var
d=a.settings.position[c].replace(b,e);d!=a.settings.position[c]&&(0==c?a.dialog_left=eval(d):a.dialog_top=eval(d))}}));if(void
0==a.dialog_left||void
0==a.dialog_top)a.dialog_left=f.center,a.dialog_top=f.middle;a.settings.vcenter_short_message&&(b=a.message.find("div:first"),c=b.height(),f=a.message.height(),c<f&&b.css({"padding-top":(f-c)/2}));
"boolean"==typeof
e&&!1===e||0==a.settings.reposition_speed?a.dialog.css({left:a.dialog_left,top:a.dialog_top,
visibility:"visible",opacity:0}).animate({opacity:1},a.settings.animation_speed_show):(a.dialog.stop(!0),a.dialog.css("visibility","visible").animate({left:a.dialog_left,top:a.dialog_top},a.settings.reposition_speed));a.dialog.find("a[class^=ZebraDialog_Button]:first").focus();a.isIE6&&setTimeout(r,500)},r=function(){var
e=d(window).scrollTop(),b=d(window).scrollLeft();a.settings.modal&&a.overlay.css({top:e,left:b});a.dialog.css({left:a.dialog_left+b,top:a.dialog_top+e})},l=function(){if(!0!==a.settings.buttons&&
!d.isArray(a.settings.buttons))return!1;if(!0===a.settings.buttons)switch(a.settings.type){case
"question":a.settings.buttons=["Yes","No"];break;default:a.settings.buttons=["Ok"]}return
a.settings.buttons.reverse()},m=function(){switch(a.settings.type){case
"confirmation":case "error":case "information":case "question":case
"warning":return a.settings.type.charAt(0
).toUpperCase()+a.settings.type.slice(1).toLowerCase();default:return!1}},p=function(e){27==e.which&&a.close();return!0},q=function(){r()},
j={init:function(){this.name=this.searchString(this.dataBrowser)||"";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||""},searchString:function(a){for(var
b=0;b<a.length;b++){var
c=a[b].string,d=a[b].prop;this.versionSearchString=a[b].versionSearch||a[b].identity;if(c){if(-1!=c.indexOf(a[b].subString))return
a[b].identity}else if(d)return a[b].identity}},searchVersion:function(a){var
b=a.indexOf(this.versionSearchString);if(-1!=b)return parseFloat(a.substring(b+
this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"MSIE",identity:"explorer",versionSearch:"MSIE"}]};j.init();return
a.init()}})(jQuery);
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits