Skip to content

Commit

Permalink
Item12481: replace core copy mechanism with CopyContrib
Browse files Browse the repository at this point in the history
also:
- removed unused attach.js code, long superseded by TopicInteractionPlugin
- rename tags form now requires a POST
- color improvements for customato design
- compatibility fixes for old SolrPlugin
- improve shake effect in login dialog on wrong password



git-svn-id: http://svn.foswiki.org/trunk/NatSkin@17758 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Jun 10, 2014
1 parent 64667a4 commit c0a1c63
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 124 deletions.
4 changes: 2 additions & 2 deletions lib/Foswiki/Contrib/NatSkin.pm
Expand Up @@ -3,8 +3,8 @@ package Foswiki::Contrib::NatSkin;
use strict;
use warnings;

our $VERSION = '3.99_019';
our $RELEASE = '3.99_019';
our $VERSION = '3.99_020';
our $RELEASE = '3.99_020';
our $SHORTDESCRIPTION = 'Modern web design for Foswiki';

1;
3 changes: 2 additions & 1 deletion lib/Foswiki/Contrib/NatSkin/DEPENDENCIES
@@ -1,3 +1,4 @@
Foswiki::Contrib::CopyContrib,>=1.0,perl,Required.
Foswiki::Contrib::FamFamFamContrib,>=2075,perl,Required.
Foswiki::Plugins::AutoTemplatePlugin,>=2.01,perl,Required
Foswiki::Plugins::BreadCrumbsPlugin,>=4318,perl,Required
Expand All @@ -7,7 +8,7 @@ Foswiki::Plugins::FilterPlugin,>=3491,perl,Required
Foswiki::Plugins::FlexWebListPlugin,>=3493,perl,Required
Foswiki::Plugins::ImagePlugin,>=2.40,perl,Required
Foswiki::Plugins::ImagePlugin,>=6307,perl,Required
Foswiki::Plugins::JQueryPlugin,>=4.70,perl,Required
Foswiki::Plugins::JQueryPlugin,>=5.00,perl,Required
Foswiki::Plugins::MimeIconPlugin,>=1,perl,Required
Foswiki::Plugins::NatEditPlugin,>=1993,perl,Required
Foswiki::Plugins::NatSkinPlugin,>=3.99_004,perl,Required
Expand Down
3 changes: 0 additions & 3 deletions lib/Foswiki/Contrib/NatSkin/MANIFEST
Expand Up @@ -82,9 +82,6 @@ pub/System/JazzyNoteTheme/RedVariation.css 0644
pub/System/JazzyNoteTheme/RedVariation.css.gz 0644
pub/System/JazzyNoteTheme/RedVariation.uncompressed.css 0644
pub/System/JazzyNoteTheme/search_button.png 0644
pub/System/NatSkin/attach.js 0644
pub/System/NatSkin/attach.js.gz 0644
pub/System/NatSkin/attach.uncompressed.js 0644
pub/System/NatSkin/BaseStyle.css 0644
pub/System/NatSkin/BaseStyle.css.gz 0644
pub/System/NatSkin/BaseStyle.uncompressed.css 0644
Expand Down
2 changes: 0 additions & 2 deletions pub/System/CustomatoTheme/customato-base.uncompressed.css
Expand Up @@ -445,7 +445,6 @@ a.jqButton:link {
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
background-color:#1A7FE2;
color:#fff;
border-radius:0;
border-color:transparent;
Expand Down Expand Up @@ -523,7 +522,6 @@ a.jqButton:link {
.natSideBar h2,
.natSideBar h2 a {
display:block;
color: #1A7FE2;
font-weight:bold;
}
.natSideBar h2.webLink,
Expand Down
35 changes: 22 additions & 13 deletions pub/System/CustomatoTheme/customato-colors.uncompressed.css
@@ -1,6 +1,6 @@
/* main colors:
blue: #3E89D3, #1A7FE2
blue: #3D8FE0, #2375C5
orange: #FF9100
green: #52AF00
magenta: #FF45B1 / #ED299C
Expand Down Expand Up @@ -51,23 +51,32 @@ h2 a, h3 a, h4 a, h5 a, h6 a {

.natWebMenu li,
.natWebMenu li a {
background-color:#1A7FE2;
background-color:#3D8FE0;
color:#fff;
}

.natWebMenu li.sfHover,
.natWebMenu li.sfHover > a,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li a.current:hover,
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
/*
border-bottom:5px solid #FF45B1;
margin-bottom:-5px;
*/
background-color:#0055AB;
}
.natWebMenu li .foswikiCurrentTopicLink,
.natWebMenu li.sfHover > a,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li a:hover {
background-color:#0055AB;
.natWebMenu li a:hover,
.natTopicActions .sfHover .natMoreActionsTopicAction,
.natTopicActions .natTopicAction:hover,
.natWebMenu li.sfHover > a,
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
background-color:#2375C5;
}
.natSideBar h2,
.natSideBar h2 a {
color: #2375C5;
}

.natSideBar li a:hover {
Expand Down Expand Up @@ -141,7 +150,7 @@ h2.marked,
.foswikiPageForm h3 a, .foswikiPageForm h4 a, .foswikiPageForm h5 a, .foswikiPageForm h6 a,
.foswikiFormSteps h3, .foswikiFormSteps h4, .foswikiFormSteps h5, .foswikiFormSteps h6,
.foswikiFormSteps h3 a, .foswikiFormSteps h4 a, .foswikiFormSteps h5 a, .foswikiFormSteps h6 a {
color:#1A7FE2;
color:#2375C5;
}
.foswikiAlt h2,
.foswikiAlt h3,
Expand All @@ -161,7 +170,7 @@ h2.marked,
.natPageCacheBanner a,
.natBottomBarContents,
.natBottomBarContents a {
color:#777;
color:#666;
}

input[type=search],
Expand Down
37 changes: 22 additions & 15 deletions pub/System/CustomatoTheme/customato.uncompressed.css
Expand Up @@ -446,7 +446,6 @@ a.jqButton:link {
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
background-color:#1A7FE2;
color:#fff;
border-radius:0;
border-color:transparent;
Expand Down Expand Up @@ -524,7 +523,6 @@ a.jqButton:link {
.natSideBar h2,
.natSideBar h2 a {
display:block;
color: #1A7FE2;
font-weight:bold;
}
.natSideBar h2.webLink,
Expand Down Expand Up @@ -776,7 +774,7 @@ a.jqButton:link {
}
/* main colors:
blue: #3E89D3, #1A7FE2
blue: #3D8FE0, #2375C5
orange: #FF9100
green: #52AF00
magenta: #FF45B1 / #ED299C
Expand Down Expand Up @@ -827,23 +825,32 @@ h2 a, h3 a, h4 a, h5 a, h6 a {

.natWebMenu li,
.natWebMenu li a {
background-color:#1A7FE2;
background-color:#3D8FE0;
color:#fff;
}

.natWebMenu li.sfHover,
.natWebMenu li.sfHover > a,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li a.current:hover,
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
/*
border-bottom:5px solid #FF45B1;
margin-bottom:-5px;
*/
background-color:#0055AB;
}
.natWebMenu li .foswikiCurrentTopicLink,
.natWebMenu li.sfHover > a,
.natWebMenu li .foswikiCurrentWebHomeLink:hover,
.natWebMenu li a:hover {
background-color:#0055AB;
.natWebMenu li a:hover,
.natTopicActions .sfHover .natMoreActionsTopicAction,
.natTopicActions .natTopicAction:hover,
.natWebMenu li.sfHover > a,
.natWebMenu li a:hover,
.natWebMenu li .foswikiCurrentWebHomeLink,
.natWebMenu li .foswikiCurrentTopicLink {
background-color:#2375C5;
}
.natSideBar h2,
.natSideBar h2 a {
color: #2375C5;
}

.natSideBar li a:hover {
Expand Down Expand Up @@ -917,7 +924,7 @@ h2.marked,
.foswikiPageForm h3 a, .foswikiPageForm h4 a, .foswikiPageForm h5 a, .foswikiPageForm h6 a,
.foswikiFormSteps h3, .foswikiFormSteps h4, .foswikiFormSteps h5, .foswikiFormSteps h6,
.foswikiFormSteps h3 a, .foswikiFormSteps h4 a, .foswikiFormSteps h5 a, .foswikiFormSteps h6 a {
color:#1A7FE2;
color:#2375C5;
}
.foswikiAlt h2,
.foswikiAlt h3,
Expand All @@ -937,7 +944,7 @@ h2.marked,
.natPageCacheBanner a,
.natBottomBarContents,
.natBottomBarContents a {
color:#777;
color:#666;
}

input[type=search],
Expand Down
1 change: 0 additions & 1 deletion pub/System/NatSkin/Makefile
@@ -1,5 +1,4 @@
TARGET= \
attach.js \
BaseStyle.css \
history.js \
login.js \
Expand Down
55 changes: 0 additions & 55 deletions pub/System/NatSkin/attach.uncompressed.js

This file was deleted.

2 changes: 1 addition & 1 deletion pub/System/NatSkin/login.uncompressed.js
Expand Up @@ -12,6 +12,6 @@ jQuery(function($) {
}
});
if (foswiki.getPreference("NatSkin.loginFailed")) {
$(".natLogin").effect("shake", {times:3, distance:10}, 50);
$(".natLogin .foswikiFormSteps").effect("shake", {times:3, distance:10}, 50);
}
});
26 changes: 14 additions & 12 deletions pub/System/NatSkin/natskin.uncompressed.js
Expand Up @@ -157,18 +157,20 @@
$input = $form.find("input[type=text]"),
submitButton = $form.find("input[type=submit]");

$input.autosuggest({
menuClass: 'natSearchBoxMenu',
search: function(event) {
submitButton.hide();
},
response: function(event) {
submitButton.show();
},
open: function(event) {
submitButton.show();
}
});
if (typeof($.fn.autosuggest) === 'function') { // make sure autosuggest realy is present
$input.autosuggest({
menuClass: 'natSearchBoxMenu',
search: function(event) {
submitButton.hide();
},
response: function(event) {
submitButton.show();
},
open: function(event) {
submitButton.show();
}
});
}
});
}

Expand Down
33 changes: 19 additions & 14 deletions templates/copytopic.nat.tmpl
Expand Up @@ -16,23 +16,28 @@

%{ ################################################################################ }%
%TMPL:DEF{"copyform"}%<!-- -->
<form action="%SCRIPTURL{manage}%/%WEB%/" method="post">
<input type="hidden" name="action" value="create" />
<input type="hidden" name="onlynewtopic" value="on" />
<input type="hidden" name="templatetopic" value="%WEB%.%TOPIC%" />
<input type="hidden" name="nowysiwyg" value="1" />
<input type="hidden" name="notemplateexpansion" value="1" />
<input type="hidden" name="action_save" value="1" />
<form action="%SCRIPTURL{"copy"}%/%WEB%/" method="post">
<input type="hidden" name="mode" value="topic" />
<input type="hidden" name="source" value="%WEB%.%TOPIC%" />
<div class="foswikiFormStep">
<h3>%MAKETEXT{"To"}%:</h3>
<input type="text" name="topic" class="foswikiInputField" value="%TOPIC%Copy" size="30" style="width:98%" />
<div class="foswikiFormDescription">
%MAKETEXT{"Copy text and form data to a new topic."}%
</div>
<h3>%MAKETEXT{"Destination"}%:</h3>
<input type="text" name="destination" class="foswikiInputField" value="%TOPIC%Copy" size="30" style="width:98%" />
</div>
<div class="foswikiFormStep">
<h3>Parts:</h3>
<label><input type="checkbox" name="includepart" value="text" />%MAKETEXT{"Text"}%</label> %BR%
<label><input type="checkbox" name="includepart" value="attachments" />%MAKETEXT{"Attachments"}%</label> %BR%
<label><input type="checkbox" name="includepart" value="preferences" />%MAKETEXT{"Preferences"}%</label>%BR%
<label><input type="checkbox" name="includepart" value="parent" />%MAKETEXT{"Parent"}%</label>%BR%
<label><input type="checkbox" name="includeparts" value="form, fields" />%MAKETEXT{"DataForm"}%</label> %BR%
<label><input type="checkbox" name="includepart" value="comment" />%MAKETEXT{"Comments"}%</label>
<div class="foswikiGrayText">%MAKETEXT{"leave unchecked to copy all"}%</div>
</div>
<div class="foswikiFormStep">
<input type="checkbox" class="foswikiCheckbox" name="nonwikiword" id="nonwikiword" %IF{"$ 'URLPARAM{nonwikiword}'='on'" then="checked='checked'"}% />
<label for="nonwikiword">%MAKETEXT{"Allow non-<nop>WikiWord for the new topic name"}%</label>
<h3>%MAKETEXT{"Options"}%:</h3>
<label><input type="checkbox" name="onlynew" value="off">%MAKETEXT{"Allow overwrite"}%</label> %BR%
<label><input type="checkbox" name="forcenewrevision" value="off">%MAKETEXT{"Force a new revision"}%</label> %BR%
<label><input type="checkbox" name="clear" vlaue="on">%MAKETEXT{"Clear destination before copying"}%</label>
</div>
<a class="jqUIDialogButton jqUIDialogSubmit {icon:'ui-icon-copy'}">%MAKETEXT{"Copy"}%</a>
<a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-cancel'}">%MAKETEXT{"Cancel"}%</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/foswiki.nat.tmpl
Expand Up @@ -206,7 +206,7 @@
%TMPL:DEF{"DIFF_ACTION_RESTRICTED"}%<span class='natTopicAction natDisabledTopicAction natDiffAction'>%JQICON{"page_white_stack"}%$label</span>%TMPL:END%

%TMPL:DEF{"COPYTOPIC_SHORT"}%<span class='natTopicActionShortLabel'>%MAKETEXT{"Copy"}%</span>%TMPL:END%
%TMPL:DEF{"COPYTOPIC_LONG"}%<span class='natTopicActionLongLabel'>%MAKETEXT{"Copy this topic"}%</span>%TMPL:END%
%TMPL:DEF{"COPYTOPIC_LONG"}%<span class='natTopicActionLongLabel'>%MAKETEXT{"Copy topic"}%</span>%TMPL:END%
%TMPL:DEF{"COPYTOPIC_ACTION"}%<a class='natTopicAction jqUIDialogLink natCopyTopicAction' title='%MAKETEXT{"Create a copy of this topic under a new name"}%' href='%SCRIPTURLPATH{"rest"}%/RenderPlugin/template?name=copytopic;expand=dialog;topic=%BASEWEB%.%BASETOPIC%;render=on' rel='nofollow'>%JQICON{"page_white_copy"}%$label</a>%JQREQUIRE{"ui::dialog"}%%TMPL:END%
%TMPL:DEF{"COPYTOPIC_ACTION_RESTRICTED"}%<span class='natTopicAction natDisabledTopicAction natCopyTopicAction'>%JQICON{"page_white_copy"}%$label</span>%TMPL:END%

Expand Down
1 change: 1 addition & 0 deletions templates/javascript.nat.tmpl
Expand Up @@ -13,6 +13,7 @@ jQuery.extend(foswiki.preferences, {
%TMPL:P{"initRedDot"}%
%TMPL:P{"initBusyIndicator"}%
%TMPL:P{"initExternalLinks"}%
'_':'_'
});
</script>"
}%<!-- -->
Expand Down
4 changes: 2 additions & 2 deletions templates/managetags.nat.tmpl
Expand Up @@ -11,7 +11,7 @@

%{ ################################################################################ }%
%TMPL:DEF{"content"}%<!-- -->
<form class="jqRenameTag" name="renametagform" action="%SCRIPTURLPATH{"rest"}%/ClassificationPlugin/renametag">
<form class="jqRenameTag" name="renametagform" action="%SCRIPTURLPATH{"rest"}%/ClassificationPlugin/renametag" method="post">
<input type="hidden" name="web" value="%BASEWEB%" />
<input type="hidden" name="topic" value="%BASEWEB%.%BASETOPIC%" />
<div class="foswikiFormStep">
Expand All @@ -35,5 +35,5 @@
<!-- -->%TMPL:END%

%{ ################################################################################ }%
%TMPL:DEF{"managetags::javascript"}%<script src='%PUBURLPATH%/%SYSTEMWEB%/ClassificationPlugin/renametag.js?t=%GMTINE{"$epoch"}%'></script>%TMPL:END%
%TMPL:DEF{"managetags::javascript"}%<script src='%PUBURLPATH%/%SYSTEMWEB%/ClassificationPlugin/renametag.js?t=%GMTIME{"$epoch"}%'></script>%TMPL:END%

4 changes: 2 additions & 2 deletions templates/oopsgeneric.nat.tmpl
@@ -1,10 +1,10 @@
%TMPL:INCLUDE{"oops"}%<!-- template: oopsgeneric.nat.tmpl -->
%TMPL:DEF{"title"}%%PARAM1% - %WIKITOOLNAME%%TMPL:END%
%TMPL:DEF{"heading"}% %PARAM1% %TMPL:END%
%TMPL:DEF{"message"}%<!-- message -->
%TMPL:DEF{"message"}%<!-- -->
%MAKETEXT{ "[_1]" args="%PARAM2%" }%

%MAKETEXT{ "[_1]" args="%PARAM3%" }%

%MAKETEXT{ "[_1]" args="%PARAM4%" }%
<!-- //message -->%TMPL:END%
<!-- -->%TMPL:END%

0 comments on commit c0a1c63

Please sign in to comment.