Skip to content

Commit

Permalink
Item8199: detwikify NatSkin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/NatSkin@4361 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Jul 2, 2009
1 parent a37bfa3 commit 6a7a2d0
Show file tree
Hide file tree
Showing 218 changed files with 2,856 additions and 1,798 deletions.
4 changes: 2 additions & 2 deletions data/Main/WebLinks.txt
@@ -1,14 +1,14 @@
%META:TOPICINFO{author="ProjectContributor" date="1174668643" format="1.1" reprev="1.4" version="$Rev$"}%
---+ %TOPIC%

Sidebar navigation in the %WEB% web. See also the %SYSTEMWEB%.TWikiWebLinks
Sidebar navigation in the %WEB% web. See also the %SYSTEMWEB%.SiteLinks

%STARTINCLUDE%<!-- main.weblinks -->
* [[%SYSTEMWEB%.WelcomeGuest][%MAKETEXT{"Welcome"}%]]
* [[%USERREGISTRATION%][%MAKETEXT{"Registration"}%]] %IFDEFINEDTHEN{"%IFEXISTS{"%USERSWEB%.%WIKIUSERSTOPIC%"}%" as="1" glue="off"}%
* [[%USERSWEB%.%WIKIUSERSTOPIC%][%MAKETEXT{"Users"}%]] %FIDEFINED%
* [[%USERSWEB%.WikiGroups][%MAKETEXT{"Groups"}%]]
* [[%SYSTEMWEB%.ChangePassword][%MAKETEXT{"Password"}%]]%WEBCOMPONENT{"TWikiWebLinks"}%
* [[%SYSTEMWEB%.ChangePassword][%MAKETEXT{"Password"}%]]
<!-- //main.weblinks -->%STOPINCLUDE%


Expand Down
File renamed without changes.
223 changes: 223 additions & 0 deletions data/System/AjaxWebSelector.txt
@@ -0,0 +1,223 @@
%META:TOPICINFO{author="ProjectContributor" date="1243950128" format="1.1" reprev="1.4" version="1.4"}%
---+!! %TOPIC%
%TOC%

%JQREQUIRE{"chili"}%
---++ Webs
<verbatim class="tml">
%STARTSECTION{"webs"}%
<literal>
%FLEXWEBLIST{
subwebs="none"
header="[{"
format="$n$indent id:'$web',$n$indent name:'$name',$n$indent parent:'$parent',$n$indent depth: $depth,$n$indent color:'$color',$n$indent description:'$sitemapuseto',$n$indent nrsubwebs: $nrsubwebs,$n$indent url: '$url'$n$indent"
subheader=", subwebs:$n$indent [{"
separator="},{"
subseparator="},{"
subfooter="}]$n$indent"
footer="}]$n"
}%
</literal>
%ENDSECTION{"webs"}%
</verbatim>

---++ Webselector
<verbatim class="tml">
%STARTINCLUDE%<!-- webselector -->
%JQREQUIRE{"gradient"}% %JQREQUIRE{"simplemodal"}%<!-- jqrequire// -->
<style type="text/css">@import url(%ATTACHURLPATH%/webselector.css);</style>
<script type="text/javascript" src="%ATTACHURLPATH%/webselector.js"></script>
<div id="weblist" class="foswikiFormSteps" style="display:none">
---++ Select a web
<table><tr>
<td>
<input type="text" class="foswikiInputField" id="webName" size="30" />
<input type="hidden" id="webId" />
<input type="hidden" id="webUrl" />
</td>
<td>
%BUTTON{"Go" icon="page_white_go" id="webGo"}%
</td>
</tr></table>
<div class="container"></div>
</div>
</div>
<!-- //webselector -->%STOPINCLUDE%
</verbatim>

---++ Webselector.css
<verbatim class="css">
%STARTATTACH{"webselector.css"}%
.weblet {
float:left;
padding:10px;
margin:0px 10px 10px 0px;
border:1px solid #ddd;
width:100px;
height:100px;
position:relative;
font-size:95%;
overflow:hidden;
}
.weblet h2 {
margin:0px;
border:0px;
}
.weblet .parent {
font-size:95%;
font-style:italic;
}
.weblet .desc {
margin-top:0.1em;
}
.weblet .more {
margin-top:0.1em;
}
.weblet .more a {
text-decoration:none;
}
#weblist .container {
margin-top:10px;
width:550px;
height:390px;
overflow-x:hidden;
overflow-y:auto;
}
.weblet h2 {
margin-top:0px;
font-size:105%;
font-weight:bold;
color:#222;
}
.weblet.selected {
border:1px solid red;
}
%ENDATTACH%
</verbatim>

---++ Webselector.js
<verbatim class="js">
%STARTATTACH{"webselector.js"}%
(function($) {
webSelector = {
show: function() {
$("#weblist").modal({
persist:true,
onShow: webSelector.init
});
$(window).trigger("resize");
return false;
},

spaceOutWikiWord: function(wikiWord) {
return wikiWord.replace(/([a-z])([A-Z0-9]+)/g, "$1 $2");
},

addWeblets: function(webs, $container) {
for (var i in webs) {
var web = webs[i];
var color = web.color;
if (color == '')
color = 'dddddd';
color = color.replace(/#/g, '');
var webName = webSelector.spaceOutWikiWord(web.name);

var $weblet = $("<div class='weblet' id='"+web.id+"'>"+
"<h2>"+webName+"</h2>"+
(web.parent?"<div class='parent'> In "+web.parent+"</div>":"")+
"<div class='desc'>"+web.description+"</div>"+
(web.nrsubwebs?"<div class='more'><a href='#'>more &#187;</a></div>":"")+
"<input type='hidden' name='webUrl' value='"+web.url+"' />"+
"<input type='hidden' name='webName' value='"+web.name+"' />"+
"</div>").
appendTo($container);
$weblet.gradient({to:'ffffff', from:color});
webSelector.addWeblets(web.subwebs, $container);
}
},

selectWeblet: function(elem) {
var webId = '', webName= '', webUrl = '';
if (elem) {
if ($(elem).hasClass("selected")) {
return webSelector.goWeb();
}
webId = $(elem).attr('id');
webName = $(elem).find("input[name=webName]").val();
webUrl = $(elem).find("input[name=webUrl]").val();
}
$("#webId").val(webId);
$("#webName").val(webName);
$("#webUrl").val(webUrl);
$("#weblist .weblet").removeClass("selected");
if (elem)
$(elem).addClass("selected");
},

goWeb: function() {
var webUrl = $("#webUrl").val();
if (webUrl) {
window.location.href = webUrl;
}
return false;
},

init: function() {
if (typeof(webSelector.webs) == 'undefined') {
var $container = $("#weblist .container");
var url = "%SCRIPTURL{view}%/%WEB%/%TOPIC%?section=webs;skin=text;contenttype=text/plain";
$.getJSON(url, function(data) {
webSelector.webs = data;
webSelector.addWeblets(data, $container);
$(".weblet").click(function() {
webSelector.selectWeblet(this);
});
$("#webGo").click(webSelector.goWeb);
});

$("#webName").keyup(function(e) {
var webName = $(this).val();
var count = 0;
var foundWeblet;
if (webName) {
$(".weblet").each(function() {
var thisName = $(this).find("input[name=webName]").val();
if (thisName.indexOf(webName) == 0) {
$(this).show();
count++;
foundWeblet = this;
} else {
$(this).hide();
}
});
} else {
$(".weblet").show();
webSelector.selectWeblet();
}
if (count == 1 && e.which == 13) {
webSelector.selectWeblet(foundWeblet);
webSelector.goWeb();
}
});
}

window.setTimeout(function() {
$("#webName").focus();
}, 100);
}
}
})(jQuery);
%ENDATTACH%
</verbatim>

---++ Test
%<nop>INCLUDE{"%TOPIC%"}%

<div>
%BUTTON{"Goto webspace" onclick="webSelector.show();" icon="page_white_go"}%
%CLEAR%
</div>

%META:FILEATTACHMENT{name="webselector.css" attachment="webselector.css" attr="" author="micha" comment="Generated by !AttachContentPlugin" date="1243950128" path="webselector.css" size="649" version="8"}%
%META:FILEATTACHMENT{name="webselector.js" attachment="webselector.js" attr="" author="micha" comment="Generated by !AttachContentPlugin" date="1243950128" path="webselector.js" size="3199" version="29"}%
%META:TOPICMOVED{by="micha" date="1243614912" from="Sandbox.AjaxWebSelector" to="System.AjaxWebSelector"}%
2 changes: 1 addition & 1 deletion data/TWiki/MySideBar.txt → data/System/MySideBar.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1185741636" format="1.1" reprev="1.2" version="$Rev$"}%
%META:TOPICINFO{author="ProjectContributor" date="1185741636" format="1.1" reprev="1.2" version="$Rev: 1823 $"}%
%META:TOPICPARENT{name="WebHome"}%
%STARTINCLUDE%<!-- mysidebar -->
<nop><h2><a name="mysidebar">MySideBar</a></h2>
Expand Down
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1133357180" format="1.1" version="$Rev$"}%
%META:TOPICINFO{author="ProjectContributor" date="1133357180" format="1.1" version="$Rev: 1823 $"}%
%META:TOPICPARENT{name="MySideBar"}%
---+ %MAKETEXT{"[_1]'s sidebar" args="%WIKIUSERNAME%"}%

Expand Down Expand Up @@ -29,7 +29,7 @@
* [[%SYSTEMWEB%.ReferenceManual][%MAKETEXT{"Reference Manual"}%]]
* [[%SYSTEMWEB%.GoodStyle][%MAKETEXT{"Good Style"}%]]
* [[%SYSTEMWEB%.FrequentlyAskedQuestions][%MAKETEXT{"FAQs"}%]]
* [[%SYSTEMWEB%.Macros][%MAKETEXT{"TWiki Variables"}%]]
* [[%SYSTEMWEB%.Macros][%MAKETEXT{"Macros"}%]]
* [[%SYSTEMWEB%.DataForms][%MAKETEXT{"Data Forms"}%]]
* [[%SYSTEMWEB%.FormattedSearch][%MAKETEXT{"Formatted Search"}%]]
* [[%SYSTEMWEB%.FileAttachment][%MAKETEXT{"File Attachment"}%]]
Expand Down
File renamed without changes.
55 changes: 38 additions & 17 deletions data/TWiki/NatSkin.txt → data/System/NatSkin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1227037698" format="1.1" version="$Rev$"}%
%META:TOPICINFO{author="ProjectContributor" date="1234355406" format="1.1" version="1.2"}%
<!--

PLEASE DO NOT EDIT THIS TOPIC
Expand Down Expand Up @@ -103,7 +103,28 @@ allways open an extra window.
%$INSTALL_INSTRUCTIONS%

* Test if installed: [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?skin=nat][click here]]
* Set the SKIN variable in your %USERWEB%.SitePreferences to =nat=
* Edit [[%LOCALSITEPREFS%]] and change the SKIN variable to "nat";
customize the default style adding the variables SKINSTYLE, STYLEBORDER,
STYLEBUTTONS and STYLESIDEBAR (see NatSkin)
* If you have set up ssl for your server add the following variable to your <nop>SitePreferenecs:
<verbatim> * Set HTTPSLOGON = on </verbatim>
This will prevent passwords being sent in clear-text over a possibly insecure net.
* To switch on external link detection add
<verbatim> * Set EXTERNALLINKS = on </verbatim>
* To obfuscate email addresses in the case they appear online use:
<verbatim> * Set OBFUSCATEEMAILS = on </verbatim>
* To enable ssl as soon as you logged in use the following rewrite rules in =bin/.htaccess=:
<verbatim>
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteCond %{QUERY_STRING} template=oopslogon
RewriteRule ^(.*)$ https://%{HTTP_HOST}/bin/$1 [R,L]
</verbatim>
Note, that you might need to accommodate the =/bin= url path above to your installation!
* If you are running Foswiki using Foswiki:Extensions/FastCGIEngineContrib or any other stand-alone engine,
you will have to add the following line to your =LocalSite.cfg=
<verbatim>$Foswiki::cfg{SwitchBoard}{natsearch} = ['Foswiki::Plugins::NatSkinPlugin::Search', 'searchCgi', {natsearch => 1}];</verbatim>


---++ Dependencies
%$DEPENDENCIES%
Expand All @@ -115,9 +136,9 @@ are listed there.
| Skin Author: | Michael Daum |
| Copyright &copy;: | 2003-2009, Michael Daum http://michaeldaumconsulting.com |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Skin Version: | v3.0-pre37 |
| Dependencies: | NatSkinPlugin |
| Description: | Driven by cascading stylesheets, Comes with 12 alternative styles, <nop>MoveableType and Wordpress Look-n-Feel |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Description: | Userfriendly Foswiki skin providing a flexible theming engine for professional webdesigns |
| Base Name: | nat |
| Screenshot: | <div style="overflow:hidden;height:200px"><a href="%ATTACHURL%/BlueNoteStyle.jpeg"><img src="%ATTACHURL%/BlueNoteStyle.jpeg" title="Clean"/></a></div> |
| Change&nbsp;History: | <!-- specify latest version first -->&nbsp; |
Expand Down Expand Up @@ -194,11 +215,11 @@ are listed there.
reworked javascript to use jquery instead, \
numerous markup and css fixes, \
better attachment table at bottom of topics |
| 21 May 2007: | Bugs:Item3969 - 8bit email fix (TWiki:Main.WillNorris) |
| 21 May 2007: | Bugs:Item3969 - 8bit email fix (Foswiki:Main.WillNorris) |
| 08 Mar 2007: | fixed sidebar navigation in IE; fixed page forms width for FF |
| 06 Mar 2007: | fixed renameweb; nicened all rename dialogs; \
don't stretch tables to 100% width by default; \
added some default TWiki styles (twikiLeft, twikiRight, etc); \
added some default styles (twikiLeft, twikiRight, etc); \
some javascript fixes calculating the height of the edit textarea; \
simplified topic actions using the new USERACTIONS tag |
| 05 Feb 2007: | removed =...ForAdmins= components again; \
Expand All @@ -210,7 +231,7 @@ are listed there.
moved editsidebar content into a twisty under the textarea; \
new templates to customize the login screen; \
new <nop>JotSpot theme; \
increased the skin's css priority for the <nop>TWikiTable layout \
increased the skin's css priority for the <nop>DataTable layout \
to counter newer versions of the <nop>TablePlugin that inlines css \
by default; \
repositoned broadcast area above the main area and \
Expand All @@ -219,9 +240,9 @@ are listed there.
added presets to the <nop>NatSkinStyleBrowsers to switch the look&feel \
to that of some well-known CMS systems; \
added support for <nop>SectionalEditPlugin; \
added support for redirectto urlparam of TWiki-4.1.1; \
added support for redirectto urlparam of TMwiki-4.1.1; \
disabled css in print view as firefox can't print pages otherwise; \
added support for the forthcomming TWiki::Cache; \
added support for the forthcomming <nop>PageCache; \
fixed templates for renaming a web; \
fixed lease conflict template's use of QUERYPARAMS; \
new variable %<nop>TWIKIREGISTRAION% to make the registration form \
Expand Down Expand Up @@ -258,7 +279,7 @@ are listed there.
fixed sidebar in !PatternStyle + searchbox in position 1; \
fixed oopsmore's button style on different locales; \
more IE hacks; more i18n fixes |
| 15 Aug 2006: | interface internationalization (TWiki:Main.OliverKrueger, TWiki:Main.AndreUlrich); \
| 15 Aug 2006: | interface internationalization (Foswiki:Main.OliverKrueger, Foswiki:Main.AndreUlrich); \
adjusted css to cope waith possibly long strings in i18n; \
added "Change Language" dialogue to oopsmore; \
replaced most =em= based widths with =px= based ones to cope with different font presets; \
Expand All @@ -268,9 +289,9 @@ are listed there.
added =strings.nat.tmpl= template defining strings used in <nop>NatSkinPlugin; \
lots of css and template fixes;\
only load those javascript snippets that are really used |
| 7 Aug 2006: | removed natTWikiInfo from the bottom bar containing the "Powered by" prose; \
| 7 Aug 2006: | removed natWikiInfo from the bottom bar containing the "Powered by" prose; \
fixed USEWYSIWYG (again) |
| 3 Aug 2006: | first 3 dot O prerelease, 3.0-final will be a TWiki V4 only skin; \
| 3 Aug 2006: | first 3 dot O prerelease, 3.0-final will be a TMwiki V4 only skin; \
addded <nop>NatEdit templates; \
restructured edit and preview templates to allow <nop>NatEdit to "mix in" \
its toolbar; \
Expand Down Expand Up @@ -302,7 +323,7 @@ are listed there.
added css classes for ok/cancel buttons on oops dialogues; \
lots of css improvements, mostly diff related |
| 24 May 2006: | spacing and font improvements; \
added example <nop>TWikiWebCcss; \
added example <nop>SiteCcss; \
removed focusing the search box on every view; \
if there's an WEBLOGOIMAGE then use it in the title bar instead of the WIKITOOLNAME; \
fixed bug in save actions that could have caused data loss ; \
Expand Down Expand Up @@ -334,7 +355,7 @@ are listed there.
| 11 Mar 2006: | reworked sidebar using the new WEBCOMPONET logic; \
docu restructuring - more needed; \
using messages.tmpl as far as possible |
| 1 Mar 2006: | fixed <nop>TWikiForm not showing certain row values (uuh); \
| 1 Mar 2006: | fixed <nop>DataForm not showing certain row values (uuh); \
added more css for the most recent stuff added to the <nop>BlogPlugin; \
removed html from mailnotification; \
replaced SCRIPTURL{} with SCRIPTURL+SCRIPTSUFFIX again for legacy platforms; \
Expand Down Expand Up @@ -423,8 +444,8 @@ are listed there.
| 12 Aug 2005: | first round of pre-releases numbered 1.91 upwards |
| 24 Jul 2005: | rewritten the templates, renamed the CSS classes |
| 25 Jun 2003: | Initial version |
| Skin Home: | http://foswiki.org/Extensions/NatSkin |
| Feedback: | http://foswiki.org/Extensions/NatSkinDev |
| Home: | Foswiki:Extensions/NatSkin |
| Support: | Foswiki:Support/NatSkin |

%META:FILEATTACHMENT{name="wikiringlogo40x40.png" attachment="wikiringlogo40x40.png" attr="h" comment="" date="1189787359" path="wikiringlogo40x40.png" size="2571" stream="wikiringlogo40x40.png" tmpFilename="" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="BlueNoteStyle.jpeg" attachment="BlueNoteStyle.jpeg" attr="h" comment="" date="1225905266" path="BlueNoteStyle.jpeg" size="42093" stream="IO::File=GLOB(0x8f2567c)" tmpFilename="/var/tmp/CGItemp41158" user="ProjectContributor" version="1"}%

0 comments on commit 6a7a2d0

Please sign in to comment.